[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.2%
  • Yes, for the XZ2P.

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

    Votes: 113 21.5%
  • No.

    Votes: 3 0.6%

  • Total voters
    525
Search This thread

apaxtc

Senior Member
Aug 6, 2012
145
29
galati
something strange
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img its ok
fastboot boot twrp.img ..can't find doesn't see img ?
what happens ...vbmeta and twrp-xz2 they are in the same folder
 

apaxtc

Senior Member
Aug 6, 2012
145
29
galati
I solved, delete -xz2 , just leave only twrp
after flashing let the phone enter in twrp alone.......then flash magisk zip
now i have root sistem with magisk 18.1 :)
thx Martin :)
 
  • Like
Reactions: MartinX3

bibibabi

Member
Aug 28, 2019
30
3
Sony Xperia XZ3
I report an error in the installation of TWRP, which DOES NOT COMPROMISE INSTALLATION.
I write only to help other people. if see this error.


TECHNICAL DATA PHONE:
XZ3 ( H8416)
BUILD 52.0.A.8.131 (August 2019)
Mobile phone unlocked bootloader
Installation package for TWRP: 2019-08-10_17-11-50_twrp_stock_xz3_52.0.A.8.131 .


In point 3.1 of the installation (which you can find on the first page of this post).
HTML:
Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img

When I run the command on TWRP (started by flashboot from pc)
Installation marks this error:
HTML:
after the words [IMAGE FLASH COMPLETED]
E: Error getting bootctrl module.
Updating partitio details....
...done
Backing up Boot...
cd /tmp/repackorig/ && /sbin/magiskboot --unpack -h 
'/tmp/repackoring/boot.img' process ended with ERROR:
Error unpacking image.

This error in red, does not block the flash of the TWRP image, in fact if you restart in recovery mode TWRP starts. So the Root is feasible by following the other points.

Except that I found that starting TWRP in recovery mode is very slow, we get to 3 minutes in which the SONY screen remains white without any colored led on.
 
Last edited:

apaxtc

Senior Member
Aug 6, 2012
145
29
galati
you just have to write rom stock with Newflasher or flashtools and try again instal twrp
try to follow the "exact" procedure from the tutorial , .......after you install "vbmeta" and "twrp" does not remove cable from phone in 10/15 seconds the phone goes into twrp alone then remove the cable and install and Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img
(get in fastboot whit "adb reboot bootloader" ) not use button combination )( not use flashtools for flash img)(I used it and it didn't work)
 
Last edited:

64801965

Member
May 29, 2017
46
2
Should I first unlock the bootloader and later wipe the internal storage?(AFAIK wiping internal storage would delete all partition including bootloader partition, which support fastboot mode and downlaod green light mode. So fastboot mode and the download mode would fail?)
 

dhacke

Senior Member
Nov 4, 2018
736
316
Should I first unlock the bootloader and later wipe the internal storage?(AFAIK wiping internal storage would delete all partition including bootloader partition, which support fastboot mode and downlaod green light mode. So fastboot mode and the download mode would fail?)


Unlocking BL only deletes the data partition so you will loose your data. And I haven't delete my internal storage ever since i own the phone.
My phone is unlocked and all modes still working (fastboot, flashmode) .
 
Last edited:

apaxtc

Senior Member
Aug 6, 2012
145
29
galati
1.any changes in the phone you make at your own risk, nobody obliges you :)
2.if you want to "benefit" from a "free" phone (root) and all the cookies it offers you must also take the risks :)
3.I personally rooted for xz2 and I have no problem with the phone - due to the fact that I strictly adhered to everything he writes in the tutorial ""Martin""
(personally I have little experience gained over time(root samsung and sony xperia ) since 2012) (when I make root for a new phone i read 10-15 hours about this ! )
 
  • Like
Reactions: MartinX3

zarbix

Member
Nov 3, 2018
42
8
Having some issues getting the new procedure (fastboot boot twrp.img) to work against Android 8 (to fix the xz2c with xperifix). I have read the FAQ thingie saying to enter blue mode by either doing "adb reboot bootloader" or "fastboot boot bootloader" before flashing vbmeta, followed by fastboot boot twrp.img, however that still doesnt seem to work.

I also remember the procedure used to be different before. I dont recall what it used to be, but the old procedure did work fine, this new one seemingly doesnt.

fastboot boot bootloader
fastboot --disable-verity --disable-verification flash vbmeta vbmeta-xz2c.img
fastboot boot twrp-3.2.3-0-xz2c.img

causes phone to reboot with blue LED still on, then show sony logo, then RED led flashes.. I think 3 times? Then it boots into normal system ("stock" (as in: Sony) android 8) instead of twrp.
 
Last edited:

MartinX3

Recognized Contributor
Sep 14, 2014
6,119
3,124
Mars
martinx3.github.io
Xperia XZ2
Having some issues getting the new procedure (fastboot boot twrp.img) to work against Android 8 (to fix the xz2c with xperifix). I have read the FAQ thingie saying to enter blue mode by either doing "adb reboot bootloader" or "fastboot boot bootloader" before flashing vbmeta, followed by fastboot boot twrp.img, however that still doesnt seem to work.

I also remember the procedure used to be different before. I dont recall what it used to be, but the old procedure did work fine, this new one seemingly doesnt.

fastboot boot bootloader
fastboot --disable-verity --disable-verification flash vbmeta vbmeta-xz2c.img
fastboot boot twrp-3.2.3-0-xz2c.img

causes phone to reboot with blue LED still on, then show sony logo, then RED led flashes.. I think 3 times? Then it boots into normal system ("stock" (as in: Sony) android 8) instead of twrp.

Didn't you unlock the device on android P?
If you did, you don't need O and xperifix.

I removed the TWRP O installation instructions.
I thought that xperias with Oreo getting unlocked are rare or zero now one year after PIE came.

Please flash the twrp.img on the boot partition, boot twrp and install the zips for kernel and for twrp, then the magisk 18.1 and the permissive.zip.
If the permissive throws an error, boot the system, install the magisk app and install the permissive.zip in this app as magisk module.

Then install xperifix.
 

zarbix

Member
Nov 3, 2018
42
8
lets just say Ive been procrastinating successfully. I bought the phone some time last year but always got stuck somewhere and have only picked it back up today to try again. State early today was phone with Pie and black camera preview as I unlocked the bootloader before Pie was a thing. I shall try what you wrote.

---------- Post added at 06:00 PM ---------- Previous post was at 05:34 PM ----------

Hi, me again.

I actually got it working now and am half-way there! I was/am following your instructions from https://github.com/MartinX3sAndroidDevelopment/bug_tracker/issues/7

So that means I do have a working camera preview on Oreo now. How do I savely execute your next step "Upgrade to PIE" without undoing what I just did? Just the normal flash 52.0.A... with xperifirm followed by your TWRP instructions from this thread again?
 
  • Like
Reactions: MartinX3

MartinX3

Recognized Contributor
Sep 14, 2014
6,119
3,124
Mars
martinx3.github.io
Xperia XZ2
lets just say Ive been procrastinating successfully. I bought the phone some time last year but always got stuck somewhere and have only picked it back up today to try again. State early today was phone with Pie and black camera preview as I unlocked the bootloader before Pie was a thing. I shall try what you wrote.

---------- Post added at 06:00 PM ---------- Previous post was at 05:34 PM ----------

Hi, me again.

I actually got it working now and am half-way there! I was/am following your instructions from https://github.com/MartinX3sAndroidDevelopment/bug_tracker/issues/7

So that means I do have a working camera preview on Oreo now. How do I savely execute your next step "Upgrade to PIE" without undoing what I just did? Just the normal flash 52.0.A... with xperifirm followed by your TWRP instructions from this thread again?

Oh, just undo everything.
Do a clean upgrade to august/september PIE with fullwipe.

IF you have a black preview, just apply the camerafix.zip. :p
 

Thetega

Member
Jul 4, 2015
39
2
So you did followed the camerafix instructions from the first page?
Did every step?
Every step was successful?

Oh, I mean, I used the old method to unlock the phone on OREO, i haven't tried xperifix yet, lots of people complaining about licence issue.

If i go ahead and just update to pie via newfasher, and just flash your camerafix..zip will that give me my camera back (even without using xperifix on oreo)
 

MartinX3

Recognized Contributor
Sep 14, 2014
6,119
3,124
Mars
martinx3.github.io
Xperia XZ2
Oh, I mean, I used the old method to unlock the phone on OREO, i haven't tried xperifix yet, lots of people complaining about licence issue.

If i go ahead and just update to pie via newfasher, and just flash your camerafix..zip will that give me my camera back (even without using xperifix on oreo)

Unlocked on Oreo it should need xperifix to modify the TA partition forever.
This modification will make the camerafix.zip workable on PIE.
 

zarbix

Member
Nov 3, 2018
42
8
hey, I got my camera preview back with the camerafix. What about Magisk, are the packages you "ship" actually any different? can we upgrade to Magisk 19.3 using normal official packages or do we need to wait for your patched ones?
 

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.