FORUMS

 View Poll Results: Should I continue this project?

Yes, for the XZ2.
 
31 Vote(s)
40.79%
Yes, for the XZ2C.
 
25 Vote(s)
32.89%
Yes, for the XZ2P.
 
6 Vote(s)
7.89%
Yes, for the XZ3.
 
14 Vote(s)
18.42%
No.
 
0 Vote(s)
0%

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

5,072 posts
Thanks Meter: 2,608
 
By MartinX3, Recognized Contributor on 29th March 2020, 11:14 PM
Post Reply Email Thread
Announcement from MartinX3: TWRP for XZ2, XZ2C, XZ2P, XZ3 on STOCK and Custom ROM's
The Sony Open Devices Project is always happy about volunteers (coding, testing, etc)

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:
  • Just wiping your phone in TWRP lead into an encrypted & not readable userdata in the stock system.
    You need to open advanced wiping and check the entries data and internal storage.
    Of course clear the dalvik, too.
  • If you backed up system and/or vendor partitions and you want to restore them, make sure that TWRP setting "Use rm -rf instead of formatting" is set!.
  • If after the usage of NewFlasher or the OTA Updater or something else, which installs stock firmware parts you get stuck into the TWRP or SONY Logo, you need again to disable the verification with the vbmeta.img file and its parameters in fastboot.
  • fastboot & adb
  • Weird problems not easily to reproduce by other users require that you make sure, that you
    • Use the newest platform tools (adb & fastboot)
    • Downloaded the newest firmware via Xperifirm from XDA and installed the newest firmware via Newflasher from XDA
  • Newflasher from XDA
  • Xperifirm from XDA
  • Removing the stock bloat apps via titanium backup may result in a boot loop. Use a file explorer to remove them, disable them or try to use my unfinished bloat removal script at github.
  • Your phone reboots into recovery, instead of system? Maybe it crashed too often due to a wrong installation or whatever?
    In TWRP:
    • Code:
      cat /dev/block/bootdevice/by-name/misc
      shows you the reason.
    • Code:
      dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
      fix the reboot by removing the reboot flag. The "No space left on device" warning is okay.

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 possible use
    Code:
    logcat -b all
    instead of just a dmesg.
    • If ADB is not working to provide logs
      • VOLUP+POWER for 1 Seconds -> Forced crash to create a pstore
      • Boot the normal system.
      • Give me the files in
        Code:
        /sys/fs/pstore/
  • If the TWRP is stuck at the TWRP logo, the chances are high, that the decryption didn't succeed.
  • 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
  • @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, Sony
Source Code: https://github.com/MartinX3-AndroidDevelopment

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

Version Information
Status: Testing
Current Beta Version: 3.3.1-0
Beta Release Date: 2020-03-30

Created 2020-03-29
Last Updated 2020-04-28
The Following 12 Users Say Thank You to MartinX3 For This Useful Post: [ View ] Gift MartinX3 Ad-Free
29th March 2020, 11:14 PM |#2  
MartinX3's Avatar
OP Recognized Contributor
Thanks Meter: 2,608
 
Donate to Me
More
Download & Installation
Download:
Installation:
  1. Update to newest stock firmware before unlocking!!!
  2. Unzip the *.gz files with https://7-zip.org/ or Linux.
  3. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
  4. fastboot boot twrp.img
  5. Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img -> Broken until TWRP 10.0 is ready (This is a TWRP 9.0 hack)
  6. Reboot into installed TWRP -> Broken until TWRP 10.0 is ready (This is a TWRP 9.0 hack)
  7. Want Root? -> Magisk
  8. (Optional; Security degradation; Only if you know what you're doing) Switch SELinux to permissive (with my permissive.zip)
The Following 6 Users Say Thank You to MartinX3 For This Useful Post: [ View ] Gift MartinX3 Ad-Free
29th March 2020, 11:14 PM |#3  
MartinX3's Avatar
OP Recognized Contributor
Thanks Meter: 2,608
 
Donate to Me
More
News
11.05.2020
Quote:

reuploaded sodp twrp for 2020-05 security patch level.
It didn't boot with the newest aosp.

07.05.2020
Quote:

sodp twrp for 2020-05 security patch level.

14.04.2020
Quote:

removed stock twrp for firmware 52.1.a.0.672 until sony releases the kernel sources of the new security patch level.
Otherwise the keymaster won't decrypt the userdata for twrp and twrp gets stuck on the twrp logo.

13.04.2020
Quote:

stock twrp for firmware 52.1.a.0.672
sodp twrp for 2020-04 security patch level

hopefully fixed the touch problems of the stock twrp

fixed the forced read only partition mountings of system, vendor, odm

31.03.2020
Quote:

stock twrp for firmware 52.1.a.0.618

30.03.2020
Quote:

sodp twrp for 2020-03 security patch level
installing in ramdisk (to make it persistent) is impossible at the moment, because it is a 9.0 twrp which makes its ramdisk incompatible to the rom.

Of course monthly twrp releases in sync with the current patch level need to be released or i would need to remove the userdata decryption completely.


The stock twrp will follow, after it became ready.

The Following 4 Users Say Thank You to MartinX3 For This Useful Post: [ View ] Gift MartinX3 Ad-Free
29th March 2020, 11:26 PM |#4  
MartinX3's Avatar
OP Recognized Contributor
Thanks Meter: 2,608
 
Donate to Me
More
30.03.2020
Quote:

SODP TWRP for 2020-03 security patch level
Installing in Ramdisk (to make it persistent) is impossible at the moment, because it is a 9.0 TWRP which makes its ramdisk incompatible to the ROM.

Of course monthly TWRP releases in sync with the current patch level need to be released or I would need to remove the userdata decryption completely.


The Stock TWRP will follow, after it became ready.

PS: AndroidFileHost blocked me for doing too many actions at the same time.
Maybe I can upload it there tomorrow.

Done
The Following 3 Users Say Thank You to MartinX3 For This Useful Post: [ View ] Gift MartinX3 Ad-Free
30th March 2020, 10:44 AM |#5  
slsamg7112's Avatar
Senior Member
Flag Taichung
Thanks Meter: 132
 
More
can't wait for possibility to install in ramdisk
but now there is a working recovery
The Following User Says Thank You to slsamg7112 For This Useful Post: [ View ] Gift slsamg7112 Ad-Free
31st March 2020, 09:55 PM |#6  
MartinX3's Avatar
OP Recognized Contributor
Thanks Meter: 2,608
 
Donate to Me
More
31.03.2020
Quote:

Stock TWRP for firmware 52.1.A.0.618

The Following 4 Users Say Thank You to MartinX3 For This Useful Post: [ View ] Gift MartinX3 Ad-Free
1st April 2020, 03:39 AM |#7  
Junior Member
Thanks Meter: 4
 
Donate to Me
More
xz3 twrp
Quote:
Originally Posted by MartinX3

31.03.2020

xz3 twrp won't boot, sodp version is good but there's no install on ramdisk?
1st April 2020, 09:01 AM |#8  
MartinX3's Avatar
OP Recognized Contributor
Thanks Meter: 2,608
 
Donate to Me
More
Quote:
Originally Posted by hafiidh

xz3 twrp won't boot, sodp version is good but there's no install on ramdisk?

You mean SODP TWRP works, but not the stock TWRP on your XZ3?

You are stuck on sony logo?
Or on TWRP logo?

I need a bugreport with "logcat -b all" via adb.

Install ramdisk doesn't work at the moment, because it is a TWRP 9.0 hack, since TWRP 10.0 is ready.
But I wrote it in the news :P

Edit:
Reworked the thread a bit for more clarification
2nd April 2020, 04:36 PM |#9  
Recognized Developer
Flag Chongqing
Thanks Meter: 394
 
More
First! Wonderful job!

---EDIT------
Everything works fine! So nice!
The Following User Says Thank You to Sjll For This Useful Post: [ View ]
2nd April 2020, 06:55 PM |#10  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag São Paulo - SP
Thanks Meter: 18,711
 
Donate to Me
More
@MartinX3 Great job as always bro!

I ran it on my XZ2 (stock 52.1.A.0.618).
Phone has booted to the twrp screen (till the unlock pattern), but the touch is not working (log).
I didn't start from scratch (fresh install), for the record.

Tia!
The Following 2 Users Say Thank You to serajr For This Useful Post: [ View ]
2nd April 2020, 07:42 PM |#11  
MartinX3's Avatar
OP Recognized Contributor
Thanks Meter: 2,608
 
Donate to Me
More
Quote:
Originally Posted by serajr

@MartinX3 Great job as always bro!

I ran it on my XZ2 (stock 52.1.A.0.618).
Phone has booted to the twrp screen (till the unlock pattern), but the touch is not working (log).
I didn't start from scratch (fresh install), for the record.

Tia!

Thank you

Are you sure the touch doesn't work?
I tested this release on the same firmware on my XZ2 in stock.
This confuses me now.

You booted stock .618 before and you tried to deactivate & activate the display?

Here it worked right out of the box.





And if it happens again, could you execute "start preptouch"
And if that not works, could you execute "/sbin/preptouch.sh"?
The Following User Says Thank You to MartinX3 For This Useful Post: [ View ] Gift MartinX3 Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes