[EOL][RECOVERY][Android 8 / 9][Stock/SODP][XZ2/C/P/3] TWRP 3.3.1-0 [UNofficial]

Should I continue this project?

  • Yes, for the XZ2.

    Votes: 185 35.2%
  • Yes, for the XZ2C.

    Votes: 211 40.1%
  • Yes, for the XZ2P.

    Votes: 71 13.5%
  • Yes, for the XZ3.

    Votes: 114 21.7%
  • No.

    Votes: 3 0.6%

  • Total voters
    526
Search This thread

MartinX3

Recognized Contributor
Sep 14, 2014
6,121
3,130
Mars
martinx3.github.io
Xperia XZ2
I installed 51.1.A.11.51 and also downloaded the 51.1.A.11.51 twrp files but still can't boot in to the recovery . I get stuck on SONY logo and a blue led then i use they key combo to restart the phone and it boots in to android normaly. I use the "fastboot boot twrp.img" command to get in to the recovery.

EDIT: Never mind i figured it out myself
You have to flash it to the boot partition and then when you power the phone you should hold the volume down and boom you will be in the recovery :)

WARRNING EDIT2
Do not flash it to the boot partition. You will be able to enter recovery but it will bootloop your phone so I am back to where i was figuring out how to install the recovery

Just follow the bootloader hint on the first page. :p
 

MartinX3

Recognized Contributor
Sep 14, 2014
6,121
3,130
Mars
martinx3.github.io
Xperia XZ2
Hi,

i've got a xz2c running the latest version (11.32).
Can you confirm that if i just want to root and get magisk ineed to :
1) unlock bootlaoder
2) download the archive named 2019-11-16_10-27-04_twrp_stock_xz2c_52.0.A.11.32.tar.gz from the stock folder
3) fastboot boot it , then flash magisk
4) install magisk app

and that's all ?

Just follow the instructions and avoid the "install ramdisk" step for now. :p
 

tonev

Senior Member
Nov 10, 2008
229
40
Just follow the bootloader hint on the first page. :p

I tried many ways to get in fastboot and non of them worked. I was not able to get the "fastboot boot twrp.img" to work. The only way I can get in to twrp is by flashing it to boot but then I am unable to boot the device I can only enter the recovery.
 

tonev

Senior Member
Nov 10, 2008
229
40
So you booted into fastboot mode with "adb reboot bootloader"?

Yes i did and when i run the command "fastboot boot twrp.img" all i get is a black screen with the blue led on.

I got no errors in the command prompt so it is sending everything correctly
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp8.img
downloading 'boot.img'...
OKAY [ 0.732s]
booting...
OKAY [ 5.680s]
finished. total time: 6.415s


The only thing I can do is reset the phone with the key combination to get it out of the black screen.
 

MartinX3

Recognized Contributor
Sep 14, 2014
6,121
3,130
Mars
martinx3.github.io
Xperia XZ2
Yes i did and when i run the command "fastboot boot twrp.img" all i get is a black screen with the blue led on.



I got no errors in the command prompt so it is sending everything correctly

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp8.img

downloading 'boot.img'...

OKAY [ 0.732s]

booting...

OKAY [ 5.680s]

finished. total time: 6.415s




The only thing I can do is reset the phone with the key combination to get it out of the black screen.
Maybe you need to wait longer or accidentally mixed the stock and sodp twrp.
 

TacoLoco

Senior Member
Nov 28, 2007
529
34
Hey guys,

I have the newest Update from Sony installed (Android 9, November 2019) and successfully unlocked the device.

Now I want to install TWRP and your Android 10 AOSP ROM..

Do I have to execute the following command before booting into TWRP?

- (Optional; If you modify the system or need the camerafix.zip)fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

Sorry, don't understand why and if this is needed.. Also I wonder, why not install TWRP?

Thank you very much!
 

MartinX3

Recognized Contributor
Sep 14, 2014
6,121
3,130
Mars
martinx3.github.io
Xperia XZ2
Hey guys,

I have the newest Update from Sony installed (Android 9, November 2019) and successfully unlocked the device.

Now I want to install TWRP and your Android 10 AOSP ROM..

Do I have to execute the following command before booting into TWRP?

- (Optional; If you modify the system or need the camerafix.zip)fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

Sorry, don't understand why and if this is needed.. Also I wonder, why not install TWRP?

Thank you very much!

At the moment there is no TWRP for SODP 10.0 available and the 10.0 ROM with kernel 4.14 is work in progress.
To test it and share bug reports please follow the instructions.

The disabling of the vbmeta is needed if you modify any of the system partitions, which then will violate the generated hashvalues in the vbmeta table and deny the booting.
It is a security feature from google to prevent the phone from booting if it has been hacked.

You're welcome!
 

TacoLoco

Senior Member
Nov 28, 2007
529
34
At the moment there is no TWRP for SODP 10.0 available and the 10.0 ROM with kernel 4.14 is work in progress.
To test it and share bug reports please follow the instructions.

The disabling of the vbmeta is needed if you modify any of the system partitions, which then will violate the generated hashvalues in the vbmeta table and deny the booting.
It is a security feature from google to prevent the phone from booting if it has been hacked.

You're welcome!

So for installing a custom ROM I need to disable vbmeta? And what do you mean with no AOSP 10 Recovery available? Does this mean I cannot install it and only direct boot to it?

Sorry for the dumb questions, but I'm a bit lost, want to install a custom ROM in the next step, maybe Pie if this is more a daily driver..
 

MartinX3

Recognized Contributor
Sep 14, 2014
6,121
3,130
Mars
martinx3.github.io
Xperia XZ2
So for installing a custom ROM I need to disable vbmeta? And what do you mean with no AOSP 10 Recovery available? Does this mean I cannot install it and only direct boot to it?



Sorry for the dumb questions, but I'm a bit lost, want to install a custom ROM in the next step, maybe Pie if this is more a daily driver..
The 9.0 ROMs are daily driver, just follow the instructions.

But the camera is worse then in the 10.0 testing. There the camera development continues.
 

TacoLoco

Senior Member
Nov 28, 2007
529
34
Okay, so I'll stay at Stock Pie Form the Moment.. Did manage to magisk root and debloat it.. Will later move directly to Q.. Thanks for your hard Work!
 
  • Like
Reactions: MartinX3

MartinX3

Recognized Contributor
Sep 14, 2014
6,121
3,130
Mars
martinx3.github.io
Xperia XZ2
@MartinX3 is there a fixed stock twrp for 11.32? Or you are forcusing to android 10 :) anyway, thank for your nice work!
Thank you :)

At the moment I wait for the OmniROM November security patch.
Just changing the security patch level text field to November didn't help sadly.
Something changed which must be backported to 9.0 on OmniROM :(
 
  • Like
Reactions: tqttpt

Anti-root

Senior Member
Apr 27, 2018
143
38
City
www.meandros.com
Sony Xperia XZ2C H8314
Android 9
Build number 52.0.A.11.3
The bootloader can be unlocked
Sony says I have the latest firmware, but I also downloaded UK 52.0.A.11.32
I do not know the original region of the phone, and I do not know if it matters, so I did not install the firmware. Should I?
I downloaded all the relevant files from your site. (If I flash new firmware, I will download the relevant files to those, of course.)
I do not want Android 10 (for now). I do not want a custom ROM. I just want root.

Considering the above, am I correct that the procedure is:
1. Unlock bootloader
Boot into fastboot
2. fastboot –disable-verity –disable-verification flash vbmeta vbmeta.img
3. fastboot boot twrp.img
4. fastboot boot recovery
From TWPR
5. Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img (from the card, where we copied a second copy of TWPR.)
6. Wipe->Advanced Wipe -> Choose Cache Data
7. Flash magisk.zip
Reboot into system
8. Install "Magisk Manager.apk"

Is the above procedure correct? Why do some people advise to flash kernel?
Is it 100% that the camera will not be affected?

Thank you very much and rest assured that your clarification will not only help me, but many other users who have the same questions. Your hard work is highly appreciated!
 
Last edited:

MartinX3

Recognized Contributor
Sep 14, 2014
6,121
3,130
Mars
martinx3.github.io
Xperia XZ2
Sony Xperia XZ2C H8314
Android 9
Build number 52.0.A.11.3
The bootloader can be unlocked
Sony says I have the latest firmware, but I also downloaded UK 52.0.A.11.32
I do not know the original region of the phone, and I do not know if it matters, so I did not install the firmware. Should I?
I downloaded all the relevant files from your site. (If I flash new firmware, I will download the relevant files to those, of course.)
I do not want Android 10 (for now). I do not want a custom ROM. I just want root.

Considering the above, am I correct that the procedure is:
1. Unlock bootloader
Boot into fastboot
2. fastboot –disable-verity –disable-verification flash vbmeta vbmeta.img
3. fastboot boot twrp.img
4. fastboot boot recovery
From TWPR
5. Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img (from the card, where we copied a second copy of TWPR.)
6. Wipe->Advanced Wipe -> Choose Cache Data
7. Flash magisk.zip
Reboot into system
8. Install "Magisk Manager.apk"

Is the above procedure correct? Why do some people advise to flash kernel?
Is it 100% that the camera will not be affected?

Thank you very much and rest assured that your clarification will not only help me, but many other users who have the same questions. Your hard work is highly appreciated!
Thank you very much :)

The previous region doesn't matter, but you should use your region for the best mobile experience

Just fastboot boot twrp and flash magisk
Please don't install the ramdisk for now, since the decryption did break with the November security patch.
 

Anti-root

Senior Member
Apr 27, 2018
143
38
City
www.meandros.com
The previous region doesn't matter, but you should use your region for the best mobile experience

Just fastboot boot twrp and flash magisk
Please don't install the ramdisk for now, since the decryption did break with the November security patch.

This means, I SHOULD update the firmware.
Also, OMIT step 5 (install ramdisk)... and step 6,,, but all the rest is ok.

What about the camera?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 51
    The Sony Open Devices Project is always happy about volunteers (coding, testing, etc) :)
    Also mainlining your favorite snapdragon powered xperia device into the mainline kernel is possible and we will be glad to help you!


    Code:
    #include <std_disclaimer.h>
    /*
     *
     * We are not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at us for messing up your device, we will laugh at you.
     *
     */

    Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

    FAQ:

    Known Bugs:
    • The "fastboot boot twrp.img" doesn't work, if you use the hardware buttons to open the blue fastboot bootloader mode. Only use adb, twrp or the android system to reboot into blue fastboot bootloader mode or flash the twrp.img, boot the device, reboot into bootloader and flash the original boot.img back, before booting into twrp.
      You can also "fastboot reboot bootloader" in the blue fastboot mode.
      This is a bootloader bug, maybe it gets fixed with the stock Q bootloader.

    Bugtracker:

    Bugreport:
    • A bugreport needs your device name, dmesg, the /tmp/recovery.log and a way to reproduce the issue.
    • If the TWRP is stuck at the TWRP logo, the chances are high, that the decryption didn't succeed.
      • The TWRP should be still usable if you just "fastboot boot twrp.img" it.
    • To rescue a not responding phone:
      • VOLUP+POWER for 3 Seconds -> RESTART with one Vibration.
      • VOLUP+POWER for 20 Seconds -> SHUTDOWN with 3 Vibrations.
      • VOLUP+POWER+CAMERA for 30 Seconds -> HARDWARE SHUTDOWN by discharging a capacitor.

    Thank you very much for your help, code contribution & testing! (Random order):
    • @dees_troy and his team of volunteers for the TWRP code
    • @M-ROM for his hint activating the touch in TWRP
    • @osm0sis
    • @nreuge
    • @FartyParty
    • @pandemic
    • @nasko_spasko
    • @VeixES
    • @Klaus N.
    • @old.splatterhand
    • @yanke928
    • @michele2
    • @niaboc79
    • @j4nn for hacking the kernel to make "fastboot boot twrp.img" possible
    • @shoey63 for testing @j4nn 's hack
    • @oshmoun for a better "fastboot boot twrp.img" solution
    • @dhacke thank your for providing a download server
    • Shame on me if I forgot someone after searching through the thread and my PM's!
    • And many thanks to the few donators! :)

    A telegram group for technical SODP stuff:
    https://t.me/xda_tv

    XDA:DevDB Information
    TWRP, ROM for the Xperia XZ2

    Contributors
    MartinX3, oshmoun, Marijn, Sony
    Source Code: https://github.com/MartinX3-AndroidDevelopment

    ROM OS Version: 9.x Pie
    ROM Kernel: Linux 4.x
    ROM Firmware Required: Matching to firmware in twrp name
    Based On: AOSP

    Version Information
    Status: No Longer Updated
    Current Stable Version: 3.3.1-0
    Stable Release Date: 2019-08-10

    Created 2018-07-26
    Last Updated 2020-10-23
    12
    Download & Installation

    Download:

    Installation Android 9.0:
    1. Update to newest stock firmware before unlocking!!!
    2. Enter fastboot via software, not hardware buttons. See "Known Bugs".
    3. (Optional; If you modify the system or need the camerafix.zip)
      fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    4. fastboot boot twrp.img
    5. Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img
    6. Reboot into installed TWRP
    7. Want Root? -> Magisk
    8. (Optional; Security degradation; Only if you know what you're doing) Switch SELinux to permissive (with my permissive.zip)

    In case of touch issues on the XZ2 compact:
    1. Download (try the v10 zip first, if it doesn't work try v9 or v8)
    2. Do the same steps, but with the TWRP test release.

    Installation Android 8.0:
    1. fastboot --disable-verity --disable-verification flash vbmeta vbmeta-xz2(?).img
    2. fastboot flash boot twrp.img
    3. Install stockkernel-xz2(?)-installer.zip
    4. Install twrp-3.2.3-0-xz2-xz2c-xz2p-installer-xz?-installer.zip
    5. Install Magisk-v17.1.zip
    6. (Optional; Security degradation; Only if you know what you're doing) Switch SELinux to permissive (with my permissive.zip)
    12
    @MartinX3 @sToRm// @modpunk
    I got drmfix working on enforcing selinux! ;)

    How-to:
    After reboot into system (post #3 - First time installation of TWRP & after newflasher installation), open a shell window and type:
    Code:
    su
    mount -orw,remount /vendor
    magiskpolicy --load /vendor/etc/selinux/precompiled_sepolicy --save /vendor/etc/selinux/precompiled_sepolicy "allow init domain process { noatsecure }" "allow init secd process { noatsecure }"
    mount -oro,remount /vendor
    Enjoy it!
    (you may now add it in your scripts if you want to)
    12
    09.04.2019
    stock twrp firmware 52.0.A.8.25 (april security patch level)
    fixed touch problems some people have.
    Twrp is now at version 3.3.0-0.
    12
    13.10.2019
    September security patch level:
    Stock twrp 52.0.A.10.6

    Smaller download size:
    Removed bundled magisk, since the newest one doesn't make bootloops anymore.
    Removed touch drivers from twrp, now a script greps them dynamically from the vendor partition.