• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

Jayram2000

Senior Member
Sep 14, 2015
90
22
Tampa
PLEASE NOTE
I wrote this guide for the Xperia 5 II initially, but the steps should be identical.

This require 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-1-II/how-to/kernel-magisk-patched-boot-images-t4119493


Step 1. Download the twrp.img linked in this thread
https://forum.xda-developers.com/sony-xperia-1-II/how-to/xperia-1-ii-twrp-t4185845
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.

Special thanks to Miustone and M-Rom for the Magisk guide and TWRP respectively.
 
Last edited:
  • Like
Reactions: DeathShot9

lebigmac

Senior Member
Jan 31, 2017
884
516
Does this allow us to mount the system partition as R/W? Could I delete the preloaded bloat/spyware, especially from the OEM directory?
Any Sony users interested in trying my new script to make their Android 10+ system read-write-able? I'm curious if it also works on next generation Sony devices. Does your new Sony device have a super partition? Then you're in luck.

With my new script you can completely delete these annoying bloatware apps from your internal hard drive. Problem solved.
Always make a backup before you permanently delete a system app! You never know which one is going to cause a bootloop!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    PLEASE NOTE
    I wrote this guide for the Xperia 5 II initially, but the steps should be identical.

    This require 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-1-II/how-to/kernel-magisk-patched-boot-images-t4119493


    Step 1. Download the twrp.img linked in this thread
    https://forum.xda-developers.com/sony-xperia-1-II/how-to/xperia-1-ii-twrp-t4185845
    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.

    Special thanks to Miustone and M-Rom for the Magisk guide and TWRP respectively.