Android Tips

How to install a new Certificate Authority

Upload the certificate in to the sd card:

adb push CA.crt /sdcard/

Go to Settings -> Security -> Trusted Credentials -> Install from Storage …

The certificate has to be in DER format. To convert from PEM to DER :

openssl x509 -inform PEM -outform DER -in CA.pem -out CA.crt

How to backup the device content

Use the following command:

adb backup -apk -shared -all

And follow onscreen instructions.

To recover the backup use the command adb restore. To selectively restore things user the scripts from here (backup must not be encrypted).