Wednesday, August 1, 2018

6.0 marshmallow - Does TWRP recovery support encrypted /data/ partition?


I have a smartphone that is running Android 6.0 Marshmallow. I encrypted the device using the builtin mechanism. Unfortunately I forgot the password (intentionally). The only option to recover the phone is to Factory Reset the device, either from its recovery mode or using fastboot.


My smartphone has the TWRP recovery. When I wanted to Factory Reset the device using this mode, I simply couldn't do that because TWRP wasn't able to mount the /data/ partition:


enter image description here


So the question is simple: How to Factory Reset an encrypted device using the TWRP recovery? Is that even possible? Does TWRP recovery support this action?



Answer



I've managed to solve this issue. Apparently the ported TWRP image didn't have support for encryption. That's why it tried to mount the encrypted /data/ partition. I've build the image from source, and I've set the following flag:


TW_INCLUDE_CRYPTO := true


Now it can detect the encrypted partition:


enter image description here


The only problem is that it can't decrypt the data with the right password. Maybe something else is missing.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...