[MOD] Decrypt /data for emui 8 - Honor 7X ROMs, Kernels, Recoveries, & Other Devel

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

Sudeep Duhoon said:
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
Click to expand...
Click to collapse
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?

mrmazak said:
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?
Click to expand...
Click to collapse
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

iGamer77z7 said:
Can you post that boot.img?
Click to expand...
Click to collapse
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"

mrmazak said:
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"
Click to expand...
Click to collapse
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

iGamer77z7 said:
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
Click to expand...
Click to collapse
How to backup data partition... please tell?

Related

[BACKUP] (V510) GPE ONLY LMY47O.L008 Stock For TWRP

This is a TWRP backup of the stock firmware for V510 GPE GPAD 8.3. They have already been updated. It is completely stock no mods, no root, no busybox. This should ensure that you are able to take future OTAs without issue. Many GPE users have been having problems with the OTAs. The reason is that the OTA does a system verification and any type of modification causes it to fail.
How to flash this:
1. Reboot into bootloader
2. Flash TWRP if you don't already have it. Current version is 2.8.1.0 fastboot flash recovery xxxxxxxxxxxxx.img (where xxxxx is the filename)
3. Reboot System
4. Copy the entire contents of the zip file to your TWRP/BACKUPS/LG0000XXXXXXXX folder. Make sure you copy the folder 2014-11-30--23-35-25 LRX21P.L004 or 2014-06-26--18-41-18 KTU84P.L002. If you don't have a backups folder, create one in TWRP by choosing Backup, then backup something like the boot partition.
5. Reboot to Recovery Vol Dwn+Pwr or adb reboot recovery.
6. Choose Restore and select 2014-11-30--23-35-25 LRX21P.L004 or 2014-06-26--18-41-18 KTU84P.L002
7. Once finished Reboot System.
8. Upon boot you should be greeted with the usual Setup screens.
9. Reboot into bootloader
10. (Optional for Kit Kat) Flash stock recovery: fastboot flash recovery 17-recovery.img
11. Reboot into system
.
Flashing the stock recovery is optional however if you want a completely stock experience and ensure future OTAs, you probably want to do so. Also note that you must unroot to take any future OTAs.
To reroot flash latest version of TWRP.
Download Links:
LMY47O.L008 with Stock Recovery
TWRP Backup 5.1 LMY47O.L005 with Stock Recovery
TWRP Backup 5.1 LMY47O Thanks @rocket321 for providing the image.
TWRP BACKUP 5.0 LRX21P.L004
TWRP BACKUP 4.4.4 KTU84P.L002
KK Stock Recovery
You did an excellent job on this thread. Thanks for doing this for our small community.
BTW: regarding recovery for our device, the latest (and in fact only) that I see is TWRP 2.7.0.1 in the Original Android Development section.
Agreed. I wasn't able to flash 4.4.4 any other way. Tried everything, kept getting errors. This finally worked!
cam30era said:
You did an excellent job on this thread. Thanks for doing this for our small community.
BTW: regarding recovery for our device, the latest (and in fact only) that I see is TWRP 2.7.0.1 in the Original Android Development section.
Click to expand...
Click to collapse
Figured it will come in handy to have this online for everyone in the future...when I bought the device when it was announced thought there would be more dev on it...but that hasn't been the case. Luckily we at least have twrp.
No partitions selected for restore.
djkinetic said:
This is a TWRP backup of the stock firmware for V510 GPE GPAD 8.3. It has already been updated to 4.4.4. It is completely stock no mods, no root, no busybox. This should ensure that you are able to take future OTAs without issue. Many GPE users have been having problems with the OTA for 4.4.4 The reason is that the OTA does a system verification and any type of modification causes it to fail.
How to flash this:
1. Reboot into bootloader
2. Flash TWRP if you don't already have it. Current version is 2.7.0.1 fastboot flash recovery xxxxxxxxxxxxx.img (where xxxxx is the filename)
3. Reboot System
4. Copy the entire contents of the zip file to your TWRP/BACKUPS/LG0000XXXXXXXX folder. Make sure you copy the folder 2014-06-26--18-41-18 KTU84P.L002. If you don't have a backups folder, create one in TWRP by choosing Backup, then backup something like the boot partition.
5. Reboot to Recovery Vol Dwn+Pwr or adb reboot recovery.
6. Choose Restore and select 2014-06-26--18-41-18 KTU84P.L002
7. Once finished Reboot System.
8. Upon boot you should be greeted with the usual Setup screens.
9. Reboot into bootloader
10. (Optional) Flash stock recovery: fastboot flash recovery 17-recovery.img
11. Reboot into system
.
Flashing the stock recovery is optional however if you want a completely stock experience and ensure future OTAs, you probably want to do so. Also note that you must unroot to take any future OTAs.
Download Links:
TWRP BACKUP 4.4.4 KTU84P.L002
Stock Recovery
Click to expand...
Click to collapse
When I flash this in twrp it fails to flash and i get an error message: No partitions selected for restore. Have twrp 2.7.0.1 installed. Thank you.
Do I unzip the folder before I move it to the backup folder?
1barlog17 said:
Do I unzip the folder before I move it to the backup folder?
Click to expand...
Click to collapse
Delete
Figured out what was going on. finally got it to flash in TWRP. Works great. Thank you for this.
Thanks for this image - was the only way I was able to update.
Sent from my LG-V510 using Tapatalk
I was not able to update using your image and I don't know why. Everything was done correctly as far as I know. I downloaded and unpacked the zip and placed it in the back apps folder of TWRP and rebooted into recovery and tried restore with no success during the system restore it stops halfway through and says failed.
I tried downloading the file twice, installing the file from my computer, changing my SD card, deleting everything and trying, deleting just dalvik cache a,updating the partition separately, and was able to update the boot partition but not system and data. I honestly don't know what the trouble is as I was able to restore my own back up several times.if anybody has any insight into what is happening here please tell me. I would really like to install the update! I don't know why it is not allowing me to.
sleekmason said:
I was not able to update using your image and I don't know why. Everything was done correctly as far as I know. I downloaded and unpacked the zip and placed it in the back apps folder of TWRP and rebooted into recovery and tried restore with no success during the system restore it stops halfway through and says failed.
I tried downloading the file twice, installing the file from my computer, changing my SD card, deleting everything and trying, deleting just dalvik cache a,updating the partition separately, and was able to update the boot partition but not system and data. I honestly don't know what the trouble is as I was able to restore my own back up several times.if anybody has any insight into what is happening here please tell me. I would really like to install the update! I don't know why it is not allowing me to.
Click to expand...
Click to collapse
First off, I use solid explorer, dual pane. Very easy to navigate for me.
I only copied system. I didn't even wipe. All my data and settings were intact. As close to an OTA I could get. The system backup was 790.95mb
It sounds like you did everything right to me. I included a screen shot of what it looked like after i clicked the backup.zip and moved the unzipped backup to the TWRP backup folder.
Sent from my LG-V510 using XDA Premium 4 mobile app
sleekmason said:
I was not able to update using your image and I don't know why. Everything was done correctly as far as I know. I downloaded and unpacked the zip and placed it in the back apps folder of TWRP and rebooted into recovery and tried restore with no success during the system restore it stops halfway through and says failed.
I tried downloading the file twice, installing the file from my computer, changing my SD card, deleting everything and trying, deleting just dalvik cache a,updating the partition separately, and was able to update the boot partition but not system and data. I honestly don't know what the trouble is as I was able to restore my own back up several times.if anybody has any insight into what is happening here please tell me. I would really like to install the update! I don't know why it is not allowing me to.
Click to expand...
Click to collapse
im not sure if this would work
did u try restoring from the internal sd instead of external. as far as I know the backup file should have no issues.
djkinetic said:
im not sure if this would work
did u try restoring from the internal sd instead of external. as far as I know the backup file should have no issues.
Click to expand...
Click to collapse
That was it!! Thank you!
Do I need to uninstall Xposed Framework, unroot, restore the stock kernel, etc., before restoring this system back up TWRP? I assume the answer is no, though I'll need to reinstall those afterward, but I figured I'd check first!
UPDATE: Never mind. I just went ahead and restored it successfully and am in the process of restoring my apps from TiBu now. Thanks again for providing this for those of us who couldn't upgrade to 4.4.4 any other way!
Hey guys,
first off thank you for posting this tutorial, I was able to perform the backup0 and am currently on 4.4.4.
I did, however, run into a slight hiccup when I was trying to flash the stock recovery. I kept getting messages about partitions and so forth. I entered in the following commands from beginning to end:
adb devices
adb reboot bootloader
fastboot flash recovery 17-recovery.img
but as I said I can't get the job done lol.
Any ideas?
ephayzee said:
Hey guys,
first off thank you for posting this tutorial, I was able to perform the backup0 and am currently on 4.4.4.
I did, however, run into a slight hiccup when I was trying to flash the stock recovery. I kept getting messages about partitions and so forth. I entered in the following commands from beginning to end:
adb devices
adb reboot bootloader
fastboot flash recovery 17-recovery.img
but as I said I can't get the job done lol.
Any ideas?
Click to expand...
Click to collapse
A few things to check:
you need to have usb debugging checked on phone
you need the recovery image in same folder as your fastboot.exe/adb files
you need to cd to that directory/folder
TWRP source
Hi,
Can you please tell me where to find TWRP 2.7.x for the V510. I currently have 2.6.3.0, I believe?
Thanks
techinv said:
Hi,
Can you please tell me where to find TWRP 2.7.x for the V510. I currently have 2.6.3.0, I believe?
Thanks
Click to expand...
Click to collapse
It worked fine for me with TWRP 2.6
techinv said:
Hi,
Can you please tell me where to find TWRP 2.7.x for the V510. I currently have 2.6.3.0, I believe?
Thanks
Click to expand...
Click to collapse
Here > http://forum.xda-developers.com/showthread.php?t=2682606
However, download link in OP is currently broken. I PMed the OP about it.
Has anyone gotten the error "E: No partitions selected for restore." when trying to flash the recovery?

Invalid Magisk installation (/data/adb/magisk.img not found)

I have clean installed Magisk because of an irregularity. To be specific: when I TWRP>Install systemless_xposed-uninstaller-signed.zip, I get an error: Updater process ended with ERROR: 1. TWRP last_log shows ¨e2fsck: No such file or directory¨while trying to open /data/adb/magisk.img¨. So Magisk seems not to be installed.
While this happens, at the same time, when sytem is booted, I have no issues (seemingly) using Magisk manager and installing and using modules.
Because of this irregularity I clean installed Magisk:
- un-installed Magisk through Magisk manager>Uninstall>Complete uninstall
- flashed stock boot image using ¨fastboot flash ramdisk RAMDISK.img¨
- and re-installed Magisk TWRP>Install Magisk-v16.0.zip
After which the Magisk installation on my device is still broken in some way and regarded as ¨weird¨ by fellow xda members; I was advised to ask about it in the device forum.
I attach last_log-magisk-install.txt & last_log-systemless_xposed-uninstaller-signed.txt
Does anybody have a clue and/or experience in this matter maybe?
It's because /data/adb/ is encrypted after installing Magisk.
Not sure why it does that, that folder used to stay unencrypted after installing.
You can use TWRP file manager and check /data/adb/ for encrypted files, and check while booted too. If it's empty it is indeed not installing correctly.
Why are you running Xposed uninstaller by the way?
ante0 said:
It's because /data/adb/ is encrypted after installing Magisk.
Not sure why it does that, that folder used to stay unencrypted after installing.
You can use TWRP file manager and check /data/adb/ for encrypted files, and check while booted too. If it's empty it is indeed not installing correctly.
Why are you running Xposed uninstaller by the way?
Click to expand...
Click to collapse
/data/adb in twrp filemanager looks encrypted yes. Booted to system however, it shows correctly (screenshot). I do not understand why you expected it to be empty as you say.
What do you advise? Decrypt data partition maybe?
You ask why i run Xposed uninstaller; I just ran this script now to get the log. Before all this investgation started I was advised to run it to get rid of possible Xposed framework leftovers after I had installed Xposed, bootlooped and deletef the module.
lvbaal said:
/data/adb in twrp filemanager looks encrypted yes. Booted to system however, it shows correctly (screenshot). I do not understand why you expected it to be empty as you say.
What do you advise? Decrypt data partition maybe?
You ask why i run Xposed uninstaller; I just ran this script now to get the log. Before all this investgation started I was advised to run it to get rid of possible Xposed framework leftovers after I had installed Xposed, bootlooped and deletef the module.
Click to expand...
Click to collapse
No, I meant if it was empty it would be a reason why it can't find magisk.img. But in this case its encryption thats causing it.
You could decrypt, it would fix it. Though as you probably know you'd have to do this after each update.
You might be able to go back to fastboot directly after update finishes and flash twrp, then to twrp and replace fstab in /vendor/etc/ so it doesn't encrypt again. I haven't tested but should work. As long as you don't boot to system before replacing fstab it should stay decrypted.
I have a feeling it's caused by the FBE bypass that was introduced in v16 (actually 1541 from the custom honor v10 link, but added in 16 to stable). Magisk refused to even install because of encryption before this was fixed.
ante0 said:
No, I meant if it was empty it would be a reason why it can't find magisk.img. But in this case its encryption thats causing it.
You could decrypt, it would fix it. Though as you probably know you'd have to do this after each update.
You might be able to go back to fastboot directly after update finishes and flash twrp, then to twrp and replace fstab in /vendor/etc/ so it doesn'tencrypt again. I haven't tested but should work. As long as you don't boot to system before replacing fstab it should stay decrypted.
I have a feeling it's caused by the FBE bypass that was introduced in v16 (actually 1541 from the custom honor v10 link, but added in 16 to stable). Magisk refused to even install because of encryption before this was fixed.
Click to expand...
Click to collapse
Thanks for your input. I'll keep decrypting in mind. For now, it looks like I can install a module from Magisk manager - greenify4magisk. I could not do this however when I had v16. Now on v16.1 it installs. I will check it's functioning later.
ante0 said:
No, I meant if it was empty it would be a reason why it can't find magisk.img. But in this case its encryption thats causing it.
You could decrypt, it would fix it. Though as you probably know you'd have to do this after each update.
You might be able to go back to fastboot directly after update finishes and flash twrp, then to twrp and replace fstab in /vendor/etc/ so it doesn't encrypt again. I haven't tested but should work. As long as you don't boot to system before replacing fstab it should stay decrypted.
I have a feeling it's caused by the FBE bypass that was introduced in v16 (actually 1541 from the custom honor v10 link, but added in 16 to stable). Magisk refused to even install because of encryption before this was fixed.
Click to expand...
Click to collapse
I'm not sure what alteration in /vendor/etc/fstab is needed to prevent encryption. Can you elaborate maybe? Also, in this regard, can you confirm the following:
when I decide to format internal storage in TWRP with ¨Format Data¨and thus getting rid of encryption(link), will it still be (re-)encrypted if I use the unmodified stock kernel (I'm using stock Emui8)? If so, do you know of a modified kernel without encryption for BLA-L29(C432)?
lvbaal said:
I'm not sure what alteration in /vendor/etc/fstab is needed to prevent encryption. Can you elaborate maybe? Also, in this regard, can you confirm the following:
when I decide to format internal storage in TWRP with ¨Format Data¨and thus getting rid of encryption(link), will it still be (re-)encrypted if I use the unmodified stock kernel (I'm using stock Emui8)? If so, do you know of a modified kernel without encryption for BLA-L29(C432)?
Click to expand...
Click to collapse
This flag: ",fileencryption=aes-256-xts:aes-256-cts" on the /data line needs to be removed. After that you format data in twrp and decryption will stick. As of Oreo fstab is located in /vendor/etc so it doesn't matter what ramdisk you use, only matter is when you update firmware as /vendor is over-written. In theory you should be able to update, go straight to fastboot after and flash twrp, go to twrp and replace fstab. I haven't tested that yet, but as long as you don't boot to system it should stay decrypted.
(TWRP with FBE decryption support is on the horizon so you might want to wait. A fix was pushed a few days ago and it works on Honor 9, we just need a newly built twrp. I can't get the 8.1 tree to build a working one so I will check if it can be done with the 7.1 tree.)
ante0 said:
This flag: ",fileencryption=aes-256-xts:aes-256-cts" on the /data line needs to be removed. After that you format data in twrp and decryption will stick. As of Oreo fstab is located in /vendor/etc so it doesn't matter what ramdisk you use, only matter is when you update firmware as /vendor is over-written. In theory you should be able to update, go straight to fastboot after and flash twrp, go to twrp and replace fstab. I haven't tested that yet, but as long as you don't boot to system it should stay decrypted.
(TWRP with FBE decryption support is on the horizon so you might want to wait. A fix was pushed a few days ago and it works on Honor 9, we just need a newly built twrp. I can't get the 8.1 tree to build a working one so I will check if it can be done with the 7.1 tree.)
Click to expand...
Click to collapse
Hi and thanks for the clarification. As I'm in the process of re-flashing complete stock firmware (131->138 from pro-teammt.ru) I think I will be going for the solution provided by @Didgeridoohan. As I understand it at this moment, both solutions will permanently decrypt my /data, but the your solution does not mention Magisk installation. Does a Magisk installation not have any bearing to the issue then?
lvbaal said:
Hi and thanks for the clarification. As I'm in the process of re-flashing complete stock firmware (131->138 from pro-teammt.ru) I think I will be going for the solution provided by @Didgeridoohan. As I understand it at this moment, both solutions will permanently decrypt my /data, but the your solution does not mention Magisk installation. Does a Magisk installation not have any bearing to the issue then?
Click to expand...
Click to collapse
I'm not sure Magisk can. It could when I pushed a commit that added fileencryptioninline (this was for nougat), and when fstab was located in boot partition.
But that was removed as it broke support for Pixel devices.
This is what it looks for: https://github.com/topjohnwu/Magisk...285d860b4d95db13f7/native/jni/utils/pattern.c
"const char *encrypt_list[] = { "forceencrypt", "forcefdeorfbe", NULL };"
As you see it doesn't contain "fileencryption".
I'm not sure it even looks for fstab in /vendor. That would break the systemlessness of Magisk (doesn't modify /system or /vendor)
Though, it doesn't matter anyway, it does the exact same thing as manually editing /vendor/etc/fstab.kirin970
You can test though, to confirm
When you do Format Data you need to manually flash back the public and hw data zips in TWRP, they give errors but it's the folder "hw_init" that's placed in /data/ that's needed. Themes and stuff are in there.
ante0 said:
This flag: ",fileencryption=aes-256-xts:aes-256-cts" on the /data line needs to be removed. After that you format data in twrp and decryption will stick. As of Oreo fstab is located in /vendor/etc so it doesn't matter what ramdisk you use, only matter is when you update firmware as /vendor is over-written. In theory you should be able to update, go straight to fastboot after and flash twrp, go to twrp and replace fstab. I haven't tested that yet, but as long as you don't boot to system it should stay decrypted.
(TWRP with FBE decryption support is on the horizon so you might want to wait. A fix was pushed a few days ago and it works on Honor 9, we just need a newly built twrp. I can't get the 8.1 tree to build a working one so I will check if it can be done with the 7.1 tree.)
Click to expand...
Click to collapse
Thanks again But I cannot quite picture this; when you say ¨In theory you should be able to update, go straight to fastboot after and flash twrp¨, because when I have flashed the complete stock firmware, I suppose Developper option USB debugging is off and I cannot send command <fastboot flash recovery_ramdisk twrp.img> from PC, or can I?
lvbaal said:
Thanks again But I cannot quite picture this; when you say ¨In theory you should be able to update, go straight to fastboot after and flash twrp¨, because when I have flashed the complete stock firmware, I suppose Developper option USB debugging is off and I cannot send command <fastboot flash recovery_ramdisk twrp.img> from PC, or can I?
Click to expand...
Click to collapse
When you flash on Oreo it will not wipe anything, /data stays.
Basically it does an OTA but with a full fw.
Unless you factory reset after, then it would wipe.
As I said it's in theory as I haven't tested it yet, so you're free to try if you're going to update anyway
Mine has been on everytime I've updated anyway. Only difference was in Nougat where bootloader was locked and you had to unlock it, which meant a mandatory wipe...
ante0 said:
This flag: ",fileencryption=aes-256-xts:aes-256-cts" on the /data line needs to be removed. After that you format data in twrp and decryption will stick. As of Oreo fstab is located in /vendor/etc so it doesn't matter what ramdisk you use, only matter is when you update firmware as /vendor is over-written. In theory you should be able to update, go straight to fastboot after and flash twrp, go to twrp and replace fstab. I haven't tested that yet, but as long as you don't boot to system it should stay decrypted.
(TWRP with FBE decryption support is on the horizon so you might want to wait. A fix was pushed a few days ago and it works on Honor 9, we just need a newly built twrp. I can't get the 8.1 tree to build a working one so I will check if it can be done with the 7.1 tree.)
Click to expand...
Click to collapse
Hello again. I've studied the shell scripts used in the HWOTA8 package and found out that the kernel and stock recovery will be flashed to the device after which it switches to recovery mode and the update zips will be pushed to /data/update along with update commands in /cache/recovery/command. Then it is supposed to reboot to recovery; to apply the updates I presume?. So when I interrupt this flow and do not boot to recovery but to fastboot to flash twrp and replace fstab, how will the updates be applied then?
I attach the script in question.
Any news already on TWRP on the horizon?
lvbaal said:
Hello again. I've studied the shell scripts used in the HWOTA8 package and found out that the kernel and stock recovery will be flashed to the device after which it switches to recovery mode and the update zips will be pushed to /data/update along with update commands in /cache/recovery/command. Then it is supposed to reboot to recovery; to apply the updates I presume?. So when I interrupt this flow and do not boot to recovery but to fastboot to flash twrp and replace fstab, how will the updates be applied then?
I attach the script in question.
Any news already on TWRP on the horizon?
Click to expand...
Click to collapse
First, copy fstab to computer and remove the fileencryption flag.
If course you need to flash update first.
You install update using HWOTA8. After it's done with the update in recovery mode you boot directly to fastboot instead of booting to system. You'd have to watch phone while it's updating as it reboota automatically. You should have USB plugged in already, so just start holding vol down when it says update is complete and it will reboot and you should land in fastboot. Now flash twrp to recovery_ramdisk and type 'fastboot reboot'. Remove USB and hold vol up. Now you should boot to twrp. Adb push the modified fstab to /vendor/etc/fstab.kirin970.
Also check Internal storage in twrp to make sure it's still decrypted. (you would have to decrypt before installing update to make sure this theory actually works ).
I could actually test it tonight on my Mate 9.
As for TWRP, the fix has been pushed to gerrit but it's not merged yet. I've been trying to get the android-8.0/8.1 branch to build a functional twrp but no luck yet. For some reason a bunch of folders are missing, and I'm not sure why. They are there in the source branch for both 8.0/8.1... I will test using git clone instead if repo sync.
ante0 said:
As for TWRP, the fix has been pushed to gerrit but it's not merged yet. I've been trying to get the android-8.0/8.1 branch to build a functional twrp but no luck yet. For some reason a bunch of folders are missing, and I'm not sure why. They are there in the source branch for both 8.0/8.1... I will test using git clone instead if repo sync.
Click to expand...
Click to collapse
I managed to build an Ubuntu based development environment, but using minimal manifest (8.1 branch) to build TWRP throws errors (i don't know if you have the same errors).
Here's the error log - > https://pastebin.com/C6jVg2eY
ante0 said:
First, copy fstab to computer and remove the fileencryption flag.
If course you need to flash update first.
You install update using HWOTA8. After it's done with the update in recovery mode you boot directly to fastboot instead of booting to system. You'd have to watch phone while it's updating as it reboota automatically. You should have USB plugged in already, so just start holding vol down when it says update is complete and it will reboot and you should land in fastboot. Now flash twrp to recovery_ramdisk and type 'fastboot reboot'. Remove USB and hold vol up. Now you should boot to twrp. Adb push the modified fstab to /vendor/etc/fstab.kirin970.
Also check Internal storage in twrp to make sure it's still decrypted. (you would have to decrypt before installing update to make sure this theory actually works ).
I could actually test it tonight on my Mate 9.
As for TWRP, the fix has been pushed to gerrit but it's not merged yet. I've been trying to get the android-8.0/8.1 branch to build a functional twrp but no luck yet. For some reason a bunch of folders are missing, and I'm not sure why. They are there in the source branch for both 8.0/8.1... I will test using git clone instead if repo sync.
Click to expand...
Click to collapse
Actually the ota.sh script boots to recovery after pushing the update. Presumably to apply the update through stock recovery. There fore I issued command adb reboot bootloader in an other powershell window. Then I flashed TWRP rebooted to TWRP to replace replaced fstab but then TWRP decides to apply the update because of input in /cache/recovery/command, so at that point I cannot replace fstab. Therefor I altered the script ota.sh and de-activated writes to /cache/recovery/command, and started over...
[/B]
lvbaal said:
Actually the ota.sh script boots to recovery after pushing the update. Presumably to apply the update through stock recovery. There fore I issued command adb reboot bootloader in an other powershell window. Then I flashed TWRP rebooted to TWRP to replace replaced fstab but then TWRP decides to apply the update because of input in /cache/recovery/command, so at that point I cannot replace fstab. Therefor I altered the script ota.sh and de-activated writes to /cache/recovery/command, and started over...
[/B]
Click to expand...
Click to collapse
Well, it has to apply the update in stock recovery. It can't do it in TWRP.
Basically you:
Format Data in TWRP and replace fstab with one that has fileencryption flag removed.
Boot to system once and then back to TWRP, check that you are decrypted (file manager in TWRP to Internal SD or browse child folders in /data).
Run HWOTA8 and let it update through stock recovery.
When it's done updating and about to reboot back to system, hold vol down so it goes to fastboot mode.
Now flash TWRP and issue 'fastboot reboot', quickly remove usb cable and hold volume up. Or remove usb and hold power+vol up.
Check that you are still decrypted.
Replace Fstab again with the 'fileencryption' flag removed one.
Now you can boot to system.
Edit: I managed to get TWRP source working, will test the decrypt fix soon.
---------- Post added at 08:44 PM ---------- Previous post was at 08:01 PM ----------
Pretoriano80 said:
I managed to build an Ubuntu based development environment, but using minimal manifest (8.1 branch) to build TWRP throws errors (i don't know if you have the same errors).
Here's the error log - > https://pastebin.com/C6jVg2eY
Click to expand...
Click to collapse
You need the full Omni source. Takes a while to sync
It's missing stuff from minimal that's needed.
After it's done syncing, you need to git clone https://github.com/omnirom/android_bootable_recovery to TWRPfolder/bootable/ and replace the recovery folder.
Same with https://github.com/omnirom/android_external_busybox/ to TWRPfolder/external/busybox (folder doesn't exist).
I'm not sure why it does this, the source looks fine when viewed in browser, but it doesn't sync everything...
ante0 said:
Well, it has to apply the update in stock recovery. It can't do it in TWRP.
Basically you:
Format Data in TWRP and replace fstab with one that has fileencryption flag removed.
Boot to system once and then back to TWRP, check that you are decrypted (file manager in TWRP to Internal SD or browse child folders in /data).
Run HWOTA8 and let it update through stock recovery.
When it's done updating and about to reboot back to system, hold vol down so it goes to fastboot mode.
Now flash TWRP and issue 'fastboot reboot', quickly remove usb cable and hold volume up. Or remove usb and hold power+vol up.
Check that you are still decrypted.
Replace Fstab again with the 'fileencryption' flag removed one.
Now you can boot to system.
Edit: I managed to get TWRP source working, will test the decrypt fix soon.
Click to expand...
Click to collapse
When I format data in twrp, replace fstab and boot to system once and then back to twrp to check encryption state in twrp filemanager, will /data not be empty then, so there's noting to check? Or am I missing something here?
lvbaal said:
When I format data in twrp, replace fstab and boot to system once and then back to twrp to check encryption state in twrp filemanager, will /data not be empty then, so there's noting to check? Or am I missing something here?
Click to expand...
Click to collapse
/data will not be empty. Unless you completely wipe it. But I think phone refuses to boot if you Wipe instead of Format Data
ante0 said:
/data will not be empty. Unless you completely wipe it. But I think phone refuses to boot if you Wipe instead of Format Data
Click to expand...
Click to collapse
I took my chances and did as proposed: only booting to system will not happen: it tries 2 times and the third time Huawei eRecovery comes up ¨Data partition was damaged seriously and you are recommended to format it to recover your phone¨ . It recommends Low level format data partition or shutdown. I chose Shutdown and booted to twrp once more to check /data. There's only lost+found and media/0 both empty. So /data turns out to be empty nevertheless. I did not completely wipe it; I did TWRP>Wipe>Format Data and typed ¨yes¨ to continue. Is this not what you meant by Format data in TWRP then?
lvbaal said:
I took my chances and did as proposed: only booting to system will not happen: it tries 2 times and the third time Huawei eRecovery comes up ¨Data partition was damaged seriously and you are recommended to format it to recover your phone¨ . It recommends Low level format data partition or shutdown. I chose Shutdown and booted to twrp once more to check /data. There's only lost+found and media/0 both empty. So /data turns out to be empty nevertheless. I did not completely wipe it; I did TWRP>Wipe>Format Data and typed ¨yes¨ to continue. Is this not what you meant by Format data in TWRP then?
Click to expand...
Click to collapse
Yes. That's where you Format Data.
Hmm.
Unless this twrp actually wipes rather than format.
Did you do update too now or just remove the flag in fstab and Format Data?
To get to Low level format, flash stock recovery OR the nocheck recovery from HWOTA8.

Correct procedure of rooting my Xiaomi Redmi 5 Plus

Hello everyone, im kinda new here and i have a question:
How do i correctly root my phone? I know that ill still be able to get updates since its xiaomi, but i dont really know how to do it since i dont trust supersu and kingoroot, could you help me out?
If you need any technical info from my phone, just ask in the comments
install twrp 3.2.3 and magisk 17.2 files to your pc and flash twrp to your phone using adb. After u flashed twrp to your phone enter it and flash magisk file from sd card or flash drive with otg cable. (your data might be deleted)
Kaanarchy said:
install twrp 3.2.3 and magisk 17.2 files to your pc and flash twrp to your phone using adb. After u flashed twrp to your phone enter it and flash magisk file from sd card or flash drive with otg cable. (your data might be deleted)
Click to expand...
Click to collapse
umm, eh, i didnt understand a word you were saying after "flash twrp"
I did this. Coming from miui 10.0.4
- Restart in fastboot mode.
- Flash TWRP
- Enter recovery. Flash magisk. Maybe here u will got a problem with data partition... ( I have it.. my solution was using orange fox).
- After this u got your device rooted... Restart in system. Install magisk APK.
If you have that problem with the data partition...
Here in the forum there is a lot of info about that.
After you flashed twrp from adb via "fastboot flash recovery twrp.img" command; hold volume up + power on/off button until you see the teamwin title from your phone. So you must be in twrp now.. Your data will be crypted because using twrp for the first time. Go to wipe - format data, write "yes" and confirm. Reboot recovery by going to ‘Reboot’ -> ‘Recovery’. go to the ‘Mount’ menu. press the ‘Enable MTP’ button. Transfer Magisk 17.2 to your phone's internal storage (check other posts for guide, you will use adb sideload) or you can just move your magisk file to your sd card or your flash drive(you will need otg cable to connect flash drive to phone) . Return to menu, go to install, press magisk.zip and then swipe to flash it. When the installation is complete, press the ‘Wipe Cache/Dalvik’ button. And that's it now just reboot your system
foxmonter said:
I did this. Coming from miui 10.0.4
- Restart in fastboot mode.
- Flash TWRP
- Enter recovery. Flash magisk. Maybe here u will got a problem with data partition... ( I have it.. my solution was using orange fox).
- After this u got your device rooted... Restart in system. Install magisk APK.
If you have that problem with the data partition...
Here in the forum there is a lot of info about that.
Click to expand...
Click to collapse
I'm stuck on Orange Fox for hours now. In twrp there is a chance for loosing my data, so I am using orange fox. After unlocking the bootloader I flashed the Orange Fox recovery and while performing a nandroid backup, it shows me a error saying "error on uevent". But the nandroid backup finished and so I carried on with the process. Now I wiped my data, system and dalvik and normal cache. I clicked on install and on the ROM(arrow) and swiped right. The installation after sometime of progress abruptly ends giving Error 7. So I thought of Restoring back my nandroid backup and it did complete but with an error 255. Can you help me?
Yeshu_bablu said:
I'm stuck on Orange Fox for hours now. In twrp there is a chance for loosing my data, so I am using orange fox. After unlocking the bootloader I flashed the Orange Fox recovery and while performing a nandroid backup, it shows me a error saying "error on uevent". But the nandroid backup finished and so I carried on with the process. Now I wiped my data, system and dalvik and normal cache. I clicked on install and on the ROM(arrow) and swiped right. The installation after sometime of progress abruptly ends giving Error 7. So I thought of Restoring back my nandroid backup and it did complete but with an error 255. Can you help me?
Click to expand...
Click to collapse
All your answers are here: https://forum.xda-developers.com/showpost.php?p=76885728&postcount=3
PS: I hope you rebooted the recovery after doing all that wiping, and before doing anything else.

encryption was interrupted and can't complete xiaomi poco f1

I already try to erase everything from Orange Fox and also with TWRP, I am trying to install the MIUI EU ROM but when it is starting it throws me the problem of encryption
Next time, do not interrupt the encryption process, it will make DATA and INTERNAL STORAGE impossible to access. So you have to sacrifice your files in it.
Requrements:
TWRP Official (Don't use OrangeFox, might have some problems)
Flash TWRP via FASTBOOT
fastboot flash recovery [twrp name].img
Click to expand...
Click to collapse
Reboot to TWRP
Skip the Encrypted Data, even though you typed your password, it will never decrypt it.
Go to WIPE
FORMAT DATA
DO NOT REBOOT TO DEVICE, Reboot to Recovery
Go to WIPE
ADVANCE WIPE
Select "Internal Storage" then WIPE
Now, reboot the device
After booting, if you encountered that the devices says "Internal storage corrupted because of encryption yada yada"
Boot again to the recovery and go to Wipe, Advance Wipe. Select "DATA" and "INTERNAL STORAGE" then WIPE
Darklouis said:
Default Encrypted Data File System is EXT4 so changing it, it will remove the encryption.
Click to expand...
Click to collapse
But it is combined with loss of data in this partition?
Does this process just change the file system and keep the data?
rolex0815 said:
But it is combined with loss of data in this partition?
Does this process just change the file system and keep the data?
Click to expand...
Click to collapse
When changing the file system, it will induce self-clean wipe (includes DATA and INTERNAL STORAGE) and no data including files will be remained.
Darklouis said:
Next time, do not interrupt the encryption process, it will make DATA and INTERNAL STORAGE impossible to access. So you have to sacrifice your files in it.
Requrements:
TWRP Official (Don't use OrangeFox, might have some problems)
Flash TWRP via FASTBOOT
Reboot to TWRP
Skip the Encrypted Data, even though you typed your password, it will never decrypt it.
Go to WIPE
Go to ADVANCE WIPE
Select DATA only and click REPAIR/CHANGE FILE SYSTEM
Select F2FS and wait for the magic
Default Encrypted Data File System is EXT4 so changing it, it will remove the encryption.
Click to expand...
Click to collapse
Hi i did all steps as u say but twrp doesnt show any of my files
aref_sh said:
Hi i did all steps as u say but twrp doesnt show any of my files
Click to expand...
Click to collapse
Lol reread his post, the first paragraph
aref_sh said:
Hi i did all steps as u say but twrp doesnt show any of my files
Click to expand...
Click to collapse
Skip it. The only importance is to remove encryption and sacrifice all files in INTERNAL STORAGE and in DATA.
Darklouis said:
Next time, do not interrupt the encryption process, it will make DATA and INTERNAL STORAGE impossible to access. So you have to sacrifice your files in it.
Requrements:
TWRP Official (Don't use OrangeFox, might have some problems)
Flash TWRP via FASTBOOT
Reboot to TWRP
Skip the Encrypted Data, even though you typed your password, it will never decrypt it.
Go to WIPE
Go to ADVANCE WIPE
Select DATA only and click REPAIR/CHANGE FILE SYSTEM
Select F2FS and wait for the magic
Default Encrypted Data File System is EXT4 so changing it, it will remove the encryption.
Click to expand...
Click to collapse
Default Encrypted Data File System is EXT4 why change to F2FS
why no repair in ext4???
thork_sk8 said:
Default Encrypted Data File System is EXT4 why change to F2FS
why no repair in ext4???
Click to expand...
Click to collapse
You can repair it, but sometimes it wont work, that's why changing partition type will work then revert it back.
Works on Xiaomi mi max 3
Thanks, it works for me on my mi max 3, MIUI 11.0.06
If you are using or changing userdata to f2fs then you need to flash this on your phone I think
https://forum.xda-developers.com/poco-f1/how-to/enable-f2fs-userdata-cache-t3901077/amp/
VeteranoX said:
Thanks, it works for me on my mi max 3, MIUI 11.0.06
Click to expand...
Click to collapse
what u have done bro i got phone max3 encyrpted i format reboot format still not working..
Mi Max 3
princemeedo said:
what u have done bro i got phone max3 encyrpted i format reboot format still not working..
Click to expand...
Click to collapse
The mi Max 3 is very especial, if you have a Mi Max 3 you must use the this: https://forum.xda-developers.com/mi-max-3/development/official-orangefox-recovery-project-t3890821
If you don't have a Mi Max 3 you should look for an OrangeFox recovery for you phone.
VeteranoX said:
The mi Max 3 is very especial, if you have a Mi Max 3 you must use the this: https://forum.xda-developers.com/mi-max-3/development/official-orangefox-recovery-project-t3890821
If you don't have a Mi Max 3 you should look for an OrangeFox recovery for you phone.
Click to expand...
Click to collapse
Thanx sir i will try n inform u with result best regards...
Sent from my iPhone using Tapatalk
Hey guys I need some help..
I bought a new mi max3 which is on stock muiu 10
Here are my steps to flash globe rom
1. Unlock bootloader
2. Fastboot twrp to recovery
3. fastboot to boot twrp
4. Could not see any file in twrp
5. Reboot phone and return to stock recovery
6. (At this stage I don't get it why it back to stock recovery everytime. I wasted so much time searching and fastboot different version of twrp or moded twrp but still revert to stock after boot)
https://forum.xda-developers.com/mi-max-3/development/recovery-twrp-3-2-3-1-nitrogen-t3866084
7. Then I came across a thread on orange fox for max3
8. I tried and viola, I can browse the file now
9. Came across a thread about eu miui rom, it said to fastboot format user data first before flash eu rom, but not System
https://forum.xda-developers.com/mi-max-3/how-to/rom-xiaomi-eu-miui-10-mi-max-3-t3825680
10. I fastboot format user data, wipe data cache internal storage then flash globe rom, which is based on eu miui, remove cache again
11. I boot up the phone successfully but it shows "Encryption was interrupted and can't complete. As a result, the data on your phone is no longer accessible." only button available oñ screen is reset phone
12. But no response after clicking it
13. Then I came to this thread
14. Tried wipe Data and internal storage and still no luck
(At this stage I am able to go in orange fox and fast boot mode)
15. I haven't tried changing file system to F2FS yet as I am afraid that will brick my phone
Suggested by this thread and this
https://xiaomi.eu/community/threads...ted-and-cant-be-completed-after-reboot.45640/
Could you guys give me some advice?
Many thanks in advance please
cyycolin said:
Hey guys I need some help..
I bought a new mi max3 which is on stock muiu 10
Here are my steps to flash globe rom
1. Unlock bootloader
2. Fastboot twrp to recovery
3. fastboot to boot twrp
4. Could not see any file in twrp
5. Reboot phone and return to stock recovery
6. (At this stage I don't get it why it back to stock recovery everytime. I wasted so much time searching and fastboot different version of twrp or moded twrp but still revert to stock after boot)
https://forum.xda-developers.com/mi-max-3/development/recovery-twrp-3-2-3-1-nitrogen-t3866084
7. Then I came across a thread on orange fox for max3
8. I tried and viola, I can browse the file now
9. Came across a thread about eu miui rom, it said to fastboot format user data first before flash eu rom, but not System
https://forum.xda-developers.com/mi-max-3/how-to/rom-xiaomi-eu-miui-10-mi-max-3-t3825680
10. I fastboot format user data, wipe data cache internal storage then flash globe rom, which is based on eu miui, remove cache again
11. I boot up the phone successfully but it shows "Encryption was interrupted and can't complete. As a result, the data on your phone is no longer accessible." only button available oñ screen is reset phone
12. But no response after clicking it
13. Then I came to this thread
14. Tried wipe Data and internal storage and still no luck
(At this stage I am able to go in orange fox and fast boot mode)
15. I haven't tried changing file system to F2FS yet as I am afraid that will brick my phone
Suggested by this thread and this
https://xiaomi.eu/community/threads...ted-and-cant-be-completed-after-reboot.45640/
Could you guys give me some advice?
Many thanks in advance please
Click to expand...
Click to collapse
Try Fixing the partition through TWRP
gems.2000 said:
Try Fixing the partition through TWRP
Click to expand...
Click to collapse
i did manage to boot up the phone finally by format "data" and "internal storage" file system to f2fs.
Thanks for your help!
cyycolin said:
i did manage to boot up the phone finally by format "data" and "internal storage" file system to f2fs.
Thanks for your help!
Click to expand...
Click to collapse
Sure Man, anytime !

[GUIDE] How to flash TWRP on the Xperia 5 II

PLEASE NOTE I HAVE ONLY TESTED THIS ON MY PERSONAL DEVICE RUNNING BUILD 58.0.A.10.3 WITH DATA ENCRYPTED. NEWER FIRMWARE VERSIONS HAVE ISSUES THAT I CANNOT PRESENTLY FIX, THAT IS UP TO THE TWRP DEVELOPER.
This requires you to have adb installed on your computer, magisk needs to be installed, and your bootloader needs to be unlocked.
Use this guide for bootloader unlocking and Magisk installation
https://forum.xda-developers.com/sony-xperia-5-ii/how-to/guide-magisk-twrp-recovery-t4177209
Step 1. Download the twrp.img linked in this thread
https://forum.xda-developers.com/showthread.php?t=4185891
Step 2. Place that .img wherever your adb is installed on your pc.
Step 3. Reboot your device to fastboot by any means. Either use
Code:
adb reboot fastboot
when your device is plugged in, or boot your device while holding volume up.
Steps 4 - 8 are optional, as they make a TWRP backup of your stock recovery. I did this just to be safe because this TWRP isn't perfectly stable yet. It does work fine so far but its just a precaution.
Step 4.
Code:
fastboot flash boot_a Twrp-Xperia5II.img
Code:
fastboot flash boot_b Twrp-Xperia5II.img
Step 5.
Code:
fastboot reboot
Step 6. TWRP should boot now. Once in TWRP, be sure to change your language, it should be Chinese by default.
Step 7. Mount all partitions, except op2 and USB. Then create a backup of at least your recovery partition, although you can do all partitions if you would like. The backup will take a couple minutes, but let it runs its course.
Step 8. Reboot back to fastboot, either via TWRP or power button methods.
IF YOU MADE A RECOVERY BACKUP LOOK BELOW STEP 11 FIRST
Step 9.
Code:
fastboot flash recovery Twrp-Xperia5II.img
Step 10.
Code:
fastboot reboot recovery
Step 11. TWRP should now be booted from the recovery partition. You can verify by trying to reboot to system like normal. The easiest way to test once booted to system is to reboot to recovery in Magisk manager. If TWRP boots you are done.
THE FOLLOWING STEPS ARE ONLY NECESSARY IF YOU MADE A RECOVERY BACKUP IN STEPS 4 - 8
Immediately after Step 8 do the following, you will need your patched magisk .img file from the magisk guide I linked above.
Step 1.
Code:
fastboot flash boot_a [your patched magisk img]
Step 2.
Code:
fastboot flash boot_b [your patched magisk img]
Step 3.
Code:
fastboot reboot
Step 4. Go back to step 9 above.
Your system should now boot like normal again, but TWRP should be flashed to recovery. Test by following the steps listed in Step 11 above. Please reply with an questions or issues.
I will attach screenshots of what you should see in some of the steps in the second post.
Special thanks to Miustone and M-Rom for the Magisk guide and TWRP respectively.
Reserved
Reserved for Screenshots.
Very well explained man, thank you ?
Nice Guide! Really well written...
Glad to see the Xperia Community that active again
/data/media/0 is encrypted?
Thank you very much for this guide and the TWRP image file.
I have tried creating the backup of recovery per your instructions but it seems my /data/media/0 is encrypted so I can't create the TWRP backup folder. How do you remove this to create the recovery backup?
Thanks!
TripodKnight said:
Thank you very much for this guide and the TWRP image file.
I have tried creating the backup of recovery per your instructions but it seems my /data/media/0 is encrypted so I can't create the TWRP backup folder. How do you remove this to create the recovery backup?
Thanks!
Click to expand...
Click to collapse
You can wipe everything on the wipe menu, which will decrypt internal storage. This is a factory reset also so you will lose everything! I tried it in hope that I will at least be able to use twrp for future backups and zip flashing, but after rebooting the storage becomes encrypted again.
TWRP on the 5 ii is useless right now imo, you cant backup/restore or even flash anything with encrypted internal storage and no access to sdcard or usb OTG.
why does this need magisk to be installed?
TripodKnight said:
Thank you very much for this guide and the TWRP image file.
I have tried creating the backup of recovery per your instructions but it seems my /data/media/0 is encrypted so I can't create the TWRP backup folder. How do you remove this to create the recovery backup?
Thanks!
Click to expand...
Click to collapse
Did you make sure to allow system modifications when you first booted TWRP, because that is very important. I am running an encrypted internal storage myself and it works fine for backups and flashing.
palamosteliaro said:
You can wipe everything on the wipe menu, which will decrypt internal storage. This is a factory reset also so you will lose everything! I tried it in hope that I will at least be able to use twrp for future backups and zip flashing, but after rebooting the storage becomes encrypted again.
TWRP on the 5 ii is useless right now imo, you cant backup/restore or even flash anything with encrypted internal storage and no access to sdcard or usb OTG.
Click to expand...
Click to collapse
I have been able to run TWRP backups and restore fine on my device, even with encrypted storage. Please make sure you allowed system modification when you booted TWRP, as that is very important. As for SD card and OTG, I cannot help there. I am not the person who ported TWRP, I simply made the guide using the steps I did to make it work.
dgmortal said:
why does this need magisk to be installed?
Click to expand...
Click to collapse
It isn't really necessary, but it makes troubleshooting easier so I recommend it. You can do the same steps I listed but substitute your stock boot .img for the magisk .img steps and it should still work. I can't say for certain, as this guide is simply based on the steps I took to make TWRP work for me.
Jayram2000 said:
Did you make sure to allow system modifications when you first booted TWRP, because that is very important. I am running an encrypted internal storage myself and it works fine for backups and flashing.
Click to expand...
Click to collapse
Thanks for the advice. I wasn't given the option to allow system modifications. I've reflashed multiple times and not once does the option come up. I also notice that when I try to mount system then try a backup that the system mount box becomes unchecked.
I have no idea why it would work for you and not for us others. Maybe you used a different twrp build?
Jayram2000 said:
I have been able to run TWRP backups and restore fine on my device, even with encrypted storage. Please make sure you allowed system modification when you booted TWRP, as that is very important. As for SD card and OTG, I cannot help there. I am not the person who ported TWRP, I simply made the guide using the steps I did to make it work.
Click to expand...
Click to collapse
I remember that prompt from my s10, but I didn't get it here. I installed a twrp in chinese (from another topic here) is yours different?
TripodKnight said:
Thanks for the advice. I wasn't given the option to allow system modifications. I've reflashed multiple times and not once does the option come up. I also notice that when I try to mount system then try a backup that the system mount box becomes unchecked.
I have no idea why it would work for you and not for us others. Maybe you used a different twrp build?
Click to expand...
Click to collapse
I am using the exact same build that M-Rom posted, the one I linked. One thing to try is mounting your partitions manually in the TWRP menu prior to starting a backup. I have those all checked as mounted in my TWRP.
palamosteliaro said:
I remember that prompt from my s10, but I didn't get it here. I installed a twrp in chinese (from another topic here) is yours different?
Click to expand...
Click to collapse
This is the same TWRP M-Rom posted in another thread, and yes it does default to chinese.
Jayram2000 said:
This requires you to have adb installed on your computer, magisk needs to be installed, and your bootloader needs to be unlocked.
Use this guide for bootloader unlocking and Magisk installation
https://forum.xda-developers.com/sony-xperia-5-ii/how-to/guide-magisk-twrp-recovery-t4177209
Step 1. Download the twrp.img linked in this thread
https://forum.xda-developers.com/showthread.php?t=4185891
Step 2. Place that .img wherever your adb is installed on your pc.
Step 3. Reboot your device to fastboot by any means. Either use
Code:
adb reboot fastboot
when your device is plugged in, or boot your device while holding volume up.
Steps 4 - 8 are optional, as they make a TWRP backup of your stock recovery. I did this just to be safe because this TWRP isn't perfectly stable yet. It does work fine so far but its just a precaution.
Step 4.
Code:
fastboot flash boot_a Twrp-Xperia5II.img
Code:
fastboot flash boot_b Twrp-Xperia5II.img
Step 5.
Code:
fastboot reboot
Step 6. TWRP should boot now. Once in TWRP, be sure to change your language, it should be Chinese by default.
Step 7. Mount all partitions, except op2 and USB. Then create a backup of at least your recovery partition, although you can do all partitions if you would like. The backup will take a couple minutes, but let it runs its course.
Step 8. Reboot back to fastboot, either via TWRP or power button methods.
IF YOU MADE A RECOVERY BACKUP LOOK BELOW STEP 11 FIRST
Step 9.
Code:
fastboot flash recovery Twrp-Xperia5II.img
Step 10.
Code:
fastboot reboot recovery
Step 11. TWRP should now be booted from the recovery partition. You can verify by trying to reboot to system like normal. The easiest way to test once booted to system is to reboot to recovery in Magisk manager. If TWRP boots you are done.
THE FOLLOWING STEPS ARE ONLY NECESSARY IF YOU MADE A RECOVERY BACKUP IN STEPS 4 - 8
Immediately after Step 8 do the following, you will need your patched magisk .img file from the magisk guide I linked above.
Step 1.
Code:
fastboot flash boot_a [your patched magisk img]
Step 2.
Code:
fastboot flash boot_b [your patched magisk img]
Step 3.
Code:
fastboot reboot
Step 4. Go back to step 9 above.
Your system should now boot like normal again, but TWRP should be flashed to recovery. Test by following the steps listed in Step 11 above. Please reply with an questions or issues.
I will attach screenshots of what you should see in some of the steps in the second post.
Special thanks to Miustone and M-Rom for the Magisk guide and TWRP respectively.
Click to expand...
Click to collapse
It has come to my attention that users on updated system firmware are encountering decryption issues with the TWRP version listed here, rendering it useless. I am currently running build number 58.0.A.10.3 on my X5II, however flyl0 has brought it to my attention that other build versions could be proving to be the issue.
Please note that this guide is entirely based on the steps I took to do this on my own device, which currently isn't updated to the latest version of stock firmware. I will add a note in the OP as well. Sorry for any confusion.
Jayram2000 said:
This is the same TWRP M-Rom posted in another thread, and yes it does default to chinese.
Click to expand...
Click to collapse
Then I am doing something wrong in my root/twrp process. I am not able to edit (R/W) the system partition anyway after installing magisk, but I think that's expected. When you are just running android, are you able to edit the system? With root explorer for example? Or does it show that the partition is full?
Jayram2000 said:
It has come to my attention that users on updated system firmware are encountering decryption issues with the TWRP version listed here, rendering it useless. I am currently running build number 58.0.A.10.3 on my X5II, however flyl0 has brought it to my attention that other build versions could be proving to be the issue.
Please note that this guide is entirely based on the steps I took to do this on my own device, which currently isn't updated to the latest version of stock firmware. I will add a note in the OP as well. Sorry for any confusion.
Click to expand...
Click to collapse
Thanks for the clarification. Do you have the build number 58.0.A.10.3 from xperiFirm? Would you be able to upload it so I can downgrade and then install TWRP?
TripodKnight said:
Thanks for the clarification. Do you have the build number 58.0.A.10.3 from xperiFirm? Would you be able to upload it so I can downgrade and then install TWRP?
Click to expand...
Click to collapse
XQ-AS72(Hongkong or Tiwan model) is 58.0.A.10.3, I flash that, and I can use TWRP and also able to make backup.
But flash for XQ-AS52 ones (such as for EUver), I cant use TWRP(boot is OK, but cant make backup).
TWRP Encryption don't work on the latest update

Categories

Resources