[MOD] Decrypt /data for emui 8

Sudeep Duhoon

Recognized Contributor
Oct 23, 2012
1,267
2,756
0
Delhi
Needed:
Unlocked Honor7x on emui 8 and twrp

I have tested this and found it working.
All you need to do is copy data/hw_init to your external sd
Then format data in twrp and flash the zip attached to this thread

Reboot

If it boots to system, then it's done

If it boots to erecovery and asks you to wipe data, then wipe data and boot to twrp

Make a data backup, format data, restore the back up you just made

Copy back hw_init from external sd to data

Reboot

Your device will be decrypted

more detailed instructions will follow
 

Attachments

mrmazak

Senior Member
Jun 16, 2013
3,212
1,324
253
Needed:
Unlocked Honor7x on emui 8 and twrp

I have tested this and found it working.
All you need to do is copy data/hw_init to your external sd
Then format data in twrp and flash the zip attached to this thread

Reboot

If it boots to system, then it's done

If it boots to erecovery and asks you to wipe data, then wipe data and boot to twrp

Make a data backup, format data, restore the back up you just made

Copy back hw_init from external sd to data

Reboot

Your device will be decrypted

more detailed instructions will follow


I did similar. I made almost same edits to fstab file in boot.img( removed verity, and "filencrypt") flashed modded boot.img and formatted /data. Phone boots normal, and twrp has full access to /data. But a side effect is developer options menu force closes when try to open it. Do you know why?
 

iGamer77z7

Member
Mar 29, 2013
26
9
0
I did similar. I made almost same edits to fstab file in boot.img( removed verity, and "filencrypt") flashed modded boot.img and formatted /data. Phone boots normal, and twrp has full access to /data. But a side effect is developer options menu force closes when try to open it. Do you know why?
Can you post that boot.img? Or for emui 8 ramdisk or kernel img whichever is needed for oreo, this mod doesnt work for me
 
Last edited:

mrmazak

Senior Member
Jun 16, 2013
3,212
1,324
253
Can you post that boot.img?
this is for emui 5 , android 7

It gave the trouble of crashing the settings app. so I did not continue using it.

USE AT YOUR OWN RISK.

copy the folder "/data/hw_init" before continuing.

Better way to apply this , instead of formatting in twrp, just factory reset in stock recovery. This way you do not wipe out the hw_init folder.

once done factory reset in stock recovery, plug in usb cable and select reboot from recovery screen. then hold volume down. Thais will reboot to fastboot.
Then "fastboot flash boot boot-decrypt.img"
 

Attachments

iGamer77z7

Member
Mar 29, 2013
26
9
0
this is for emui 5 , android 7

It gave the trouble of crashing the settings app. so I did not continue using it.

USE AT YOUR OWN RISK.

copy the folder "/data/hw_init" before continuing.

Better way to apply this , instead of formatting in twrp, just factory reset in stock recovery. This way you do not wipe out the hw_init folder.

once done factory reset in stock recovery, plug in usb cable and select reboot from recovery screen. then hold volume down. Thais will reboot to fastboot.
Then "fastboot flash boot boot-decrypt.img"
sorry I realized my mistake and edited my post, I was looking for an emui 8 solution, I'll keep trying unless you have an edited ramdisk or kernel img, not sure which one does force encrypt. Edit: Honestly I'm not on EMUI 8 currently, I am in the process of flashing gsi treble and wanted to decrpyt while my data was wiped.

EDIT: Got it, fastboot -w and factory reset in stock recovery did the trick along with flashing the included zip file
 
Last edited:
  • Like
Reactions: MAX TEN

MAX TEN

Member
Feb 9, 2018
27
0
0
sorry I realized my mistake and edited my post, I was looking for an emui 8 solution, I'll keep trying unless you have an edited ramdisk or kernel img, not sure which one does force encrypt. Edit: Honestly I'm not on EMUI 8 currently, I am in the process of flashing gsi treble and wanted to decrpyt while my data was wiped.

EDIT: Got it, fastboot -w and factory reset in stock recovery did the trick along with flashing the included zip file
How to backup data partition... please tell?