[GUIDE] How to flash TWRP on the Xperia 5 II - Sony Xperia 5 II Guides, News, & Discussion

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

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?

Again on recovery, root, etc.

Hi to all. I'm new in Honor world and I've stopped my Android experience with KitKat so I'm a little bit confused ...
I've read several guides (on XDA too) that that three steps to obtain root are unlock bootloader, flash TWRP via ADB and then install Magisk or SuperSU via TWRP. But in the thread on TWRP is clearly written that to install Magisk decryption is needed and to have decryption we must flash a kernel with encryption disabled in fstab. But no guide says anything about this step. Can someone explain me how encryption/decryption work doing a standard installation of TWRP ? Is needed a flash of a modified kernel ? And where find it ?
And another question (if it's not too much ). Since I don't need to install custom rom (I want root only to use some apps like Titanium) how can I make a backup of stock rom, boot.img, efs partition and all that can be useful to restore phone to the starting point if, by chance, I need Huawei warranty ?
Thanks a lot
Hi, apparently there's a way to get root on an encrypted system. Follow the rebrand guide and then flash supersu in TWRP via ADB sideload. It worked for me and a few others, there is no comment from the developers as of right now.
So basically in short follow this guide until you are finished with the TWRP section:
https://forum.xda-developers.com/honor-9/how-to/one-guide-recovery-os-roms-t3661829
Then
- enter twrp
- adb sideload supersu
Afterwards follow the "rooting!" section with point 2
Thank for your answer... I'd like to try to install Magisk instead of SuperSU. In several places is written that this should be right. I'll try....
unvisigoth said:
Thank for your answer... I'd like to try to install Magisk instead of SuperSU. In several places is written that this should be right. I'll try....
Click to expand...
Click to collapse
The method is also working fine with Magisk. Let me know if you need help
zxz0O0 said:
The method is also working fine with Magisk. Let me know if you need help
Click to expand...
Click to collapse
Finally done with a couple of hours of panic. This is the story if can be useful to someone...
Unlock bootloader....done TWRP install... done. Copy magisk (apk and zip) on phone than install apk without opening it. Reboot to recovery wipe all, factory reset. Trying to boot.....BOOTLOOP But I don't have installed Magisk zip. Only apk without opening it.
Nothing to do. Bootloop and then erecovery. I try to restore the backups previously done with TWRP. I restore boot and system partition. All wipes ...no luck. I don't know what has happened. While downloading full firmware to try to reinstall it I try to install magisk.zip. Install via TWRP. All wipes and then magically (it's such a case ) phone boots. Powered off and on several times no problem. Root (verified with root checker) ok.
I habe b100 release but I don't think to update to b130. I wait for Oreo...
The only two things that I can say are these: first TWRP even after flashing magisk gave an error (unable to mount system). Two while installing magisk it seems that magisk itself has patched something.
If someone has an explanation is welcome...
unvisigoth said:
Finally done with a couple of hours of panic. This is the story if can be useful to someone...
Unlock bootloader....done TWRP install... done. Copy magisk (apk and zip) on phone than install apk without opening it. Reboot to recovery wipe all, factory reset. Trying to boot.....BOOTLOOP But I don't have installed Magisk zip. Only apk without opening it.
Nothing to do. Bootloop and then erecovery. I try to restore the backups previously done with TWRP. I restore boot and system partition. All wipes ...no luck. I don't know what has happened. While downloading full firmware to try to reinstall it I try to install magisk.zip. Install via TWRP. All wipes and then magically (it's such a case ) phone boots. Powered off and on several times no problem. Root (verified with root checker) ok.
I habe b100 release but I don't think to update to b130. I wait for Oreo...
The only two things that I can say are these: first TWRP even after flashing magisk gave an error (unable to mount system). Two while installing magisk it seems that magisk itself has patched something.
If someone has an explanation is welcome...
Click to expand...
Click to collapse
So do you have some step-by-step instructions for someone who wants to unlock and root the phone with magisk?
shiboby said:
So do you have some step-by-step instructions for someone who wants to unlock and root the phone with magisk?
Click to expand...
Click to collapse
Here what I have done:
Unlock bootloader
install adb drivers (find something that is right for your PC. For example minimal ADB found on XDA weren't suitable for me. Google adb drivers...). Open a command windows (shift+right click). If typing "adb devices" your phone is found that's ok
Enable usb debugging and oem unlock (or in other words disable FRP, factory reset protection)
Put the phone in fastboot mode ("adb reboot bootloader"). If all ok typing "fastboot devices" your phone is found
Type "fastboot oem unlock xxxxxxxx" (xxxxxxxx is the code provided by Huawey)
Bootloader unlocked
Flash TWRP
Download TWRP recovery for Honor 9 (link found on other thread on this forum)
Put the phone in fastboot mode
Type "fastboot flash recovery xxxxx.img" (where xxxx.img is the recovery downloaded)
Reboot phone directly in Recovery to avoid erecovery overwrite TWRP. Booting on TWRP let TWRP patch to avoid erecovery booting
Now here I've had some issues as said (read previous post). My tip is the following:
after rebooting in TWRP make all wipes then reboot again in TWRP
Install Magisk.zip (for me download here https://geekaxe.com/root-honor-9-twrp-bootloader-unlocking/)
Reboot recovery
All wipes
Reboot to system
If it's all OK you can install magisk.apk and you are rooted
I suggest after flashing TWRP to make backup of all partitions on external SD (for some reasons, maybe encryption, backup on internal storage gives error). Again I suggest to copy all files that you need (i.e. magisk files) on external sd before starting all.
Pay attention that if you update firmware after this procedure I think that you must repeat all. For me I remain on original firmware found on phone (B100). B130 seems to have some bugs, B120 doesn't seem improve much. Moreover all releases are 7.0 based. I wait for Oreo, hopefully in some custom rom!
To add to this, a bootloop or two might be normal. Let it sit for a few minutes before considering re-flashing everything.
Thanks for your guide!
Zuzler said:
To add to this, a bootloop or two might be normal. Let it sit for a few minutes before considering re-flashing everything.
Thanks for your guide!
Click to expand...
Click to collapse
You're right. But after 20 minutes of bootlops I've chosen another way....:laugh::laugh:
unvisigoth said:
You're right. But after 20 minutes of bootlops I've chosen another way....:laugh::laugh:
Click to expand...
Click to collapse
So is it fixed?
Sent from my Honor 8 Pro using XDA Labs
adriansticoid said:
So is it fixed?
Sent from my Honor 8 Pro using XDA Labs
Click to expand...
Click to collapse
Yes sure. As said previously installation of magisk.zip fixed the bootloop problem. I think (but I could be wrong) that installation of TWRP corrupted the boot partition and magisk fixed it. But it's only an hypothesis...
unvisigoth said:
Yes sure. As said previously installation of magisk.zip fixed the bootloop problem. I think (but I could be wrong) that installation of TWRP corrupted the boot partition and magisk fixed it. But it's only an hypothesis...
Click to expand...
Click to collapse
Observe and be careful man.
Sent from my Honor 8 Pro using XDA Labs
unvisigoth said:
Yes sure. As said previously installation of magisk.zip fixed the bootloop problem. I think (but I could be wrong) that installation of TWRP corrupted the boot partition and magisk fixed it. But it's only an hypothesis...
Click to expand...
Click to collapse
Which TWRP version did you use?
I had a similar problem after formatting all data with the OpenKirin TWRP 3.1.1 Perhaps its an issue with this TWRP release?
I was able to recover in similar circumstances by flashing a stock boot.img over fastboot. Based on this, it's looking like Magisk is really the way to go for rooting atm. Making sure to pull my twrp backup with adb this time though.
If I'm lucky enough to install magisk and not get a bootloop the safetynet always fails. Anyone got a valid method of actually getting magisk working fully?

[GUIDE](sort of foolproof) to backing up and restoring your Mi9SE

Backup:
Step 0 It is supposed that you have already installed latest TWRP (https://github.com/redispade/device_xiaomi_grus-twrp/releases)
Step 1 Remove any pin/password/pattern on your existing rom
Step 2 Reboot to recovery and check the log on the 3 lines menu. It should say successfully decrypted data using default password/pattern
Step 3 Backup all partitions (Possibly in USB-OTG, so you can include Internal Storage in the backup)
Step 4 Save a second copy of your backup in your computer, in case the worst happen to your USB-OTG
Done backing up
Do whatever experiments you plan to do with your phone, roms, vendors gsi, IOS(just kidding)
Restore:
Step 1 Check if your adb/fastboot installation is the latest and correctly installed. (https://forum.xda-developers.com/showthread.php?t=2317790)
Step 2 If you really messed up with your phone, start by clean flashing your official stable rom(fastboot type)
Step 3 When fastboot flash finishes, keep pressing vol down while your phone reboots, so that you reboot again in fastboot mode. Don't boot the stock rom.
Step 4 Once back in fastboot, flash TWRP from fastboot, followed by vbmeta.img (see manual in #vbmeta note)
Step 5 Boot into twrp by keeping pressed volume+ and power button. Release power button once Mi logo appears but keep Volume+ until TWRP boots.
Step 6 Grab your USB-OTG and restore the following partitions: boot, system, vendor.
Step 6a (Optional) Remove your sim card, so that the next step is faster to execute
Step 7 Reboot into system, let it finish first boot, do the initial configuration(you can skip wifi, sim card and all options that is possible skipping)
Step 8 During first boot, you will be asked to set up a pin/password or pattern. Finish setting it up(fingerprints optional, not needed)
Step 9 Go into security settings of the new system, and remove the password/pin/pattern
Step 10 Reboot into TWRP by keeping volume+ pressed while you reboot your phone
Step 11 Check TWRP log on the 3 lines menu. It should say successfully decrypted data using default password/pattern
Step 12 Restore Data partition(and only that)
Step 13 Reboot back into TWRP without rebooting to system
Step 14 Restore Internal Storage(if you backed it up)
Step 15 Reboot into your old system and enjoy
Disclaimer: You have to follow this guide to the letter, if you care about your data.
I can't be held responsible if anything goes wrong for whatever reason
I will provide help if I can, but don't take it for granted
Excellent guide. Can you expand info on Vmeta?
Command:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Sent from my Mi 9 SE using Tapatalk
don't you have a dedicated thread for your twrp? seems the most updated version around...
ot, why there is no more official twrp for latest devices?
gian569 said:
don't you have a dedicated thread for your twrp? seems the most updated version around...
ot, why there is no more official twrp for latest devices?
Click to expand...
Click to collapse
https://forum.xda-developers.com/mi-9-se/development/twrp-3-3-1-3-mi9se-t3949328
PeterImmel said:
https://forum.xda-developers.com/mi-9-se/development/twrp-3-3-1-3-mi9se-t3949328
Click to expand...
Click to collapse
i must be blind, thank you!

Development Working TWRP but very unofficial! But very useful!

Hi, so I just got this phone and I see there's not much on the postings like with links to a working TWRP, in particular. So I did some digging around and experented, and found this TWRP. It's from the Moto G9 Play (guamp). But it works, at least just booting it. I have not tried flashing it to the boot partition but it serves it's function when just booted (see command below) . Most important on the get go is a Android backup.
fastboot boot recovery.img
After booting, go to "Mount" and mount all the partitions listed there. Then backtrack to "Backup" and select where you want the backup to go. Then continue with backing it up. You don't have to back up both the 'Super' and the 'Super image' partitions, just choose one of those. Then once that finishes, it's a matter of bravery on your part. There was a 'vbmeta.img' you could flash then a Magisk_21.zip but I'm not sure if the Play G9 vbmeta would work. Anyhow, attached it the TWRP and then the link to it's source with the other files mentioned above. Let us know how it works or helps anyone. Oh, and it will ask for your internal PIN or password first to decrypt that partition. I think it's best to delete your finger prints and change the lock to NONE. Then boot it and backup everything. Remember to Mount everything first!
Link
Lastly, my recovery log shows this works on our Moto G Play 2021 (guamna)
It does work 100% I have tested every feature out and it all works do not install it only boot it I have tried to mod the recovery 3 times now to install it but Everytime I do it bootloops my phone and I have to reflash all the imgs to the device
You can boot it with terminal emulator by running the below steps
Step 1 (backup stock_boot.img so we can get back in to android)
dd if=/dev/block/by-name/boot_a of=/sdcard/stock_recovery_backup.img
Step 2 (dd recovery.img to boot_a)
dd if=(path to stock_recovery.img) of=/dev/block/by-name/boot_a
Step 3( from twrp terminal replace recovery very.img with stock_boot_a in twrp mount all that can be mounted)
dd if=/sdcard/stock_boot_a of=/dev/block/by-name/boot_a
Thank you for that info. I actually was not aware it could be done. For me, personally, this twrp serves best as being able to do a complete backup as well as I realized it does flash Magisk for root successfully as well. Until we get an official twrp, this seems sufficient enough for the most necessary functions.
It works 100% so there is no need for a official twrp this will work just need the device trees to add to it so it can be installed to recovery and stay after a reboot
Hey guys I built a TWRP from this one and the stock recovery you can flash it to the recovery partition it's 100% working.. I had a little problem with the touch but I fixed the kernel... I posted it in the development section

Question about upgrading Pocophone F1

Hello all,
It's a long time that's i haven't post a thread here but i have a question.I have a Poco with MIUI Global 9.6 Stable (9.6.25.0) for ROM with a Android Version 8.1.0 OPM 171019.011 with root acces, unlocking bootloader and TWRP 3.3.0-0 installed.
I would upgrade my phone to something "newer" (A ROM with Android 12 if possible) and conserv the root access and my apps.
I have read that now ,we should have 3 files to do that (firmware,system and vendor) to make a wipe and install new ROM with TWRP.
So my question:
-Is it possible to upgrade Android 8.1.0 to Android 12 witn a new ROM? (i have read something about kernel in Android12 but haven't understand all)
-Have i missed some steps or just download files,boot TWRP,wipe and install newer ROM+firmware and vendor appropriate is good?
-Which ROM do you recommend?
Thanks for the previous answers.
devil1 said:
Hello all,
It's a long time that's i haven't post a thread here but i have a question.I have a Poco with MIUI Global 9.6 Stable (9.6.25.0) for ROM with a Android Version 8.1.0 OPM 171019.011 with root acces, unlocking bootloader and TWRP 3.3.0-0 installed.
I would upgrade my phone to something "newer" (A ROM with Android 12 if possible) and conserv the root access and my apps.
I have read that now ,we should have 3 files to do that (firmware,system and vendor) to make a wipe and install new ROM with TWRP.
So my question:
-Is it possible to upgrade Android 8.1.0 to Android 12 witn a new ROM? (i have read something about kernel in Android12 but haven't understand all)
-Have i missed some steps or just download files,boot TWRP,wipe and install newer ROM+firmware and vendor appropriate is good?
-Which ROM do you recommend?
Thanks for the previous answers.
Click to expand...
Click to collapse
It's not possible to switch from stock ROM to custom without doing clean install. You will have to root again.
First update to latest Official Stock ROM, then take backup of your files to your PC or to SDCard (if you have one) , flash to latest Official TWRP and check my POCO F1 Ultimate Collection & Guides. You can find everything there. I have awarded recommended ROMs in my collection.
Feel free to ask if you have any question regarding the guides.
Thanks for the answer.I have begin to read your guides.
If i understand good,it's not possible to conserv my root,unlock bootloader and twrp when i upgrade to android 12? Automaticaly i should root again my phone and restore with titanium backup my files,contact,....?
devil1 said:
Thanks for the answer.I have begin to read your guides.
If i understand good,it's not possible to conserv my root,unlock bootloader and twrp when i upgrade to android 12? Automaticaly i should root again my phone and restore with titanium backup my files,contact,....?
Click to expand...
Click to collapse
First you need to take backup of your files to PC or External SDCard.
Then you should update to latest version of MIUI via OTA if it's possible or via TWRP (you can use the stock recovery rom to do it via twrp). (You can also use my guides for clean install stock rom)
Then you should unlock your bootloader if it's not already unlocked.
Then flash latest Official TWRP.
Then flash latest firmware (not vendor) just to make sure you are on the latest. (You should be on latest firmware after updating to the latest MIUI version)
Then Wipe everything + format data according to my guides and flash the ROM you want. If you choose A12 Pixel Experience or crDroid keep in mind that these ROMs use their own recovery because these are encrypted by default ROMs and TWRP can't handle the decryption of A12 encrypted ROMs yet. So to make OTA updates and that stuff work correctly devs of these ROMs decide to use their own recovery which can handle the decryption of encrypted roms and as result to make OTA update work fine. Check the installation instructions of these roms in their threads. (Afterwards you can use adb sideload to flash stuff using these recoveries)
After that, flash Magisk since you want root.
Then you can restore titanium backup if you want.
OK i follow your instruction.Thanks
Hello retrial,
I have now updating my phone to MIUI Global 12.0.3 Stable with Android Version 10QKQ1.My phone is not yet rooted and now he is encrypted.The recovery is now Mi-Recovery 3.0
I have unlock again my bootloader.
Now to follow your instruction,i should flash the latest TWRP.
I have take TWRP-3.6.0_9-0-berylium in your guide.
I think i should do Fastboot Method because i'm now in Mi-Recovery?i'm right?
No problem with the encryption?
Thanks.
i have find this video.This is not the good phone but i think that the installation is the same:
devil1 said:
Hello retrial,
I have now updating my phone to MIUI Global 12.0.3 Stable with Android Version 10QKQ1.My phone is not yet rooted and now he is encrypted.The recovery is now Mi-Recovery 3.0
I have unlock again my bootloader.
Now to follow your instruction,i should flash the latest TWRP.
I have take TWRP-3.6.0_9-0-berylium in your guide.
I think i should do Fastboot Method because i'm now in Mi-Recovery?i'm right?
No problem with the encryption?
Thanks.
Click to expand...
Click to collapse
Yes use Fastboot Method to flash TWRP. No problem with encryption.
After that follow my clean install custom rom guide to flash the ROM you want. Also please check the instructions in the threads of ROMs you want to flash. A12 crDroid and PE use their own recoveries.
Basically tell me which ROM you want to flash to help you exactly with steps.
Hello retrial,
i have a problem to install TWRP-3.6.0-9-0 on my pocophone.Everything working fine but in step 8 of your guide,i can't find my twrp.img that i have copied in 2 different case to test :
8. Boot into Recovery by typing in cmd: fastboot boot <recovery_filename>.img (The file may not be named identically to what stands in this command, so adjust accordingly and write the full path of it, check the example below).
This command will not flash permantly the recovery, it will just temporary boot into it and afterwards you will flash permantly the twrp.img you copied into your Internal Storage or SDcard in recovery partition.
For example: fastboot boot C:\Users\Retrial\Desktop\twrp-3.5.2_9-0-beryllium.img
Have you an idea to why i cannot find my twrp.img in the boot mode?
devil1 said:
Hello retrial,
i have a problem to install TWRP-3.6.0-9-0 on my pocophone.Everything working fine but in step 8 of your guide,i can't find my twrp.img that i have copied in 2 different case to test :
8. Boot into Recovery by typing in cmd: fastboot boot <recovery_filename>.img (The file may not be named identically to what stands in this command, so adjust accordingly and write the full path of it, check the example below).
This command will not flash permantly the recovery, it will just temporary boot into it and afterwards you will flash permantly the twrp.img you copied into your Internal Storage or SDcard in recovery partition.
For example: fastboot boot C:\Users\Retrial\Desktop\twrp-3.5.2_9-0-beryllium.img
Have you an idea to why i cannot find my twrp.img in the boot mode?
Click to expand...
Click to collapse
Send a screenshot what you type in cmd and where you have the twrp.img
Or you mean you can't find it in your device while you are booted on TWRP?
i cannot find the twrp.img in my device.The step 8 of your tutorial.
I have copied the files but cannot find it in the cases.I have take TWRP-3.6.0-9-0
The link of the files: https://eu.dl.twrp.me/beryllium/twrp-3.6.0_9-0-beryllium.img.html
devil1 said:
i cannot find the twrp.img in my device.The step 8 of your tutorial.
I have copied the files but cannot find it in the cases.I have take TWRP-3.6.0-9-0
The link of the files: https://eu.dl.twrp.me/beryllium/twrp-3.6.0_9-0-beryllium.img.html
Click to expand...
Click to collapse
Are you sure you select Install Image?
ok i have download an other twrp.img and this time it's ok.i can go to the end of the tutorial but when i reboot my device mi-recovery 3.0 come back.I have tried 2 times but all the time mi-recovery3.0 come back
Have you an idea?
Should i take a additional command like in the video i have send you in the thread "fastboot flash recovery"?
devil1 said:
ok i have download an other twrp.img and this time it's ok.i can go to the end of the tutorial but when i reboot my device mi-recovery 3.0 come back.I have tried 2 times but all the time mi-recovery3.0 come back
Have you an idea?
Should i take a additional command like in the video i have send you in the thread "fastboot flash recovery"?
View attachment 5549731
Click to expand...
Click to collapse
I have all the steps on my guide. Please read it carefully. It boots back to mi recovery because you haven't flash TWRP yet just booted into. After boot into TWRP u need to flash twrp in recovery section so it will stay after reboot.
Please read the steps.
Download portable Minimal ADB and Fastboot and latest Official TWRP recovery.
Open cmd from minimal adb and fastboot and write:
fastboot boot and the path you have TWRP.
Example:
Code:
fastboot boot C:\Users\Retrial\Desktop\twrp-3.6.0_9-0-beryllium.img
Then proceed with the rest steps in my guide. Connect ur device to pc while u are booted into TWRP and copy TWRP.img to your device. Then in TWRP press Install Image and select the twrp.img u just copied into ur device. Select recovery and done.
I have made a video to show you what happened (sorry for the bad quality and the moove) :
I think a video is easyest to understand my problem.For information my bootloader is unlock and usb debugging ok.
devil1 said:
I have made a video to show you what happened (sorry for the bad quality and the moove) :
I think a video is easyest to understand my problem.For information my bootloader is unlock and usb debugging ok.
Click to expand...
Click to collapse
Hmm strange, probably of MIUI. Anyway since you are going to flash custom rom, when u flash twrp in recovery go back and select wipe and wipe everything (read my clean install guide), go back press format data type yes, and then reboot to TWRP.
EDIT: I just saw u rebooted to system. That's not what we want. Press reboot to recovery.
i reboot first to bootloader after have flash the twrp.img in recovery.That's only the second time that i reboot to system to use the normal mode of the phone and reboot after to recovery mode to show you that mi recovery is back.
devil1 said:
i reboot first to bootloader after have flash the twrp.img in recovery.That's only the second time that i reboot to system to use the normal mode of the phone and reboot after to recovery mode to show you that mi recovery is back.
Click to expand...
Click to collapse
The TWRP flashed correctly. You overlap it again by pressing reboot to recovery from MIUI updater.
Don't do that...do the combination to boot to TWRP after flashing it. Power+Volume Up.
And continue with clean install steps in my guide to flash custom rom.
In my guide I write nowhere to boot to MIUI and press from MIUI Updater reboot to recovery, please stick to my guide and you will be fine.
Poco f1 update not

Categories

Resources