November 9, 2015

Encrypting an Android phone with a broken USB port

I have an Android phone with a broken USB port: neither the data nor the power lines work. However, I can still charge the battery by removing it from the device and putting it into an external charging device. Apart from that, the device still works absolutely fine and I see no reason to throw it away or risk breaking it by trying to repair it.

I have now decided that I want to encrypt this phone, but Android wanted me to connect it to power, even though the battery was 100% full.

Fortunately, one can force the device encryption from a root shell on the device by invoking:

vdc cryptfs enablecrypto inplace 

The phone will then reboot and start encrypting. Note that if your battery runs out during this process, you will loose data, so make sure to take a backup first!

Powered by Hugo & Kiss.