[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: 179 35.3%
  • Yes, for the XZ2C.

    Votes: 204 40.2%
  • Yes, for the XZ2P.

    Votes: 67 13.2%
  • Yes, for the XZ3.

    Votes: 107 21.1%
  • No.

    Votes: 2 0.4%

  • Total voters
    507
Search This thread

MartinX3

Recognized Contributor
Sep 14, 2014
5,958
3,017
Mars
martinx3.github.io
Do I need to delete any files from the firmware folders before going through with newflasher?

---------- Post added at 12:31 PM ---------- Previous post was at 12:27 PM ----------

here is my log from newflasher.

newflasher.exe v20 by Munjeni @ 2017/2019
--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 212936 MB
Total space on current drive = 282994 MB
Free space on drive = 212936 MB

Optional step! Type 'y' and press ENTER if you need GordonGate flash driver, or type 'n' to skip.
This creates GordonGate.7z archive in the same dir with newflasher.exe!
n
Device path: \\?\usb#vid_0fce&pid_b00b#5&4547346&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: Sony sa0118
Device Instance Id: USB\VID_0FCE&PID_B00B\5&4547346&0&2


Optional step! Type 'y' and press ENTER if you want dump trim area, or type 'n' and press ENTER to skip.
Do in mind this doesn't dump drm key since sake authentifiction is need for that!
n

Optional step! Type 'y' and press ENTER if you need to flash bootloader,bluetooth,dsp,modem,rdimage to booth a,b slots, or type 'n' to skip.
By default it is NOT flashed to booth slots, do on your own risk!
n
ERROR: GetOverLapped_out_Result: failed with error code 1 as follows:
Incorrect function.

- Error write! Need nBytes: 0x18 but done: 0x0
nBytes[0x0]:


- Error writing command getvar:max-download-size!

End. You can disconnect your device when you close newflasher.exe
Press any key to continue . . .

That sounds that either your usb slot, usb cable,computer or device slot making problems.
I would try different ones and look where the hardware problem is.
 

TPlatt

Senior Member
Jun 14, 2015
142
1
Do I delete the .ta files in firmware folder or no?

---------- Post added at 02:05 PM ---------- Previous post was at 01:35 PM ----------

At this time I am flashing lastest firmware to unbrick phone. Once I get to the two step, how is it written??

Fastboot boot twrp

Then what do I type because phone will boot into recovery mode, however it's just a black illuminated screen.

---------- Post added at 02:08 PM ---------- Previous post was at 02:05 PM ----------

So I can't just type a fastboot command, because it will say waiting on available device, if I try to

"fastboot reboot bootloader "

Command you mentioned earlier
 

MartinX3

Recognized Contributor
Sep 14, 2014
5,958
3,017
Mars
martinx3.github.io
Do I delete the .ta files in firmware folder or no?

---------- Post added at 02:05 PM ---------- Previous post was at 01:35 PM ----------

At this time I am flashing lastest firmware to unbrick phone. Once I get to the two step, how is it written??

Fastboot boot twrp

Then what do I type because phone will boot into recovery mode, however it's just a black illuminated screen.

---------- Post added at 02:08 PM ---------- Previous post was at 02:05 PM ----------

So I can't just type a fastboot command, because it will say waiting on available device, if I try to

"fastboot reboot bootloader "

Command you mentioned earlier

You don't need to delete the .ta files.

Yes, just flash the newest stock and boot it once to update you baseband.

Then flash the 9.0 custom ROM you wanted and then for the SODP TWRP the v10 vendor/boot and go into fastboot mode with adb or fastboot and boot the v8 TWRP, to get your touch.
 

TPlatt

Senior Member
Jun 14, 2015
142
1
You don't need to delete the .ta files.

Yes, just flash the newest stock and boot it once to update you baseband.

Then flash the 9.0 custom ROM you wanted and then for the SODP TWRP the v10 vendor/boot and go into fastboot mode with adb or fastboot and boot the v8 TWRP, to get your touch.

I'm not really using a custom rom. I'm fine with stock room. Just need it rooted with magisk bad have twrp for recovery.
 

TPlatt

Senior Member
Jun 14, 2015
142
1
Oh, the v10/8 stuff was for the 9.0 custom rom.
Please ignore them for stock 9.0 and just use the stock 9.0 TWRP with the correct firmware version in its zip file name :)

Ok. So which files do I need to download from because I'm using firmware:
H8314_Customized UK_1313-5398_52.1.A.0.672_R3C
 

MartinX3

Recognized Contributor
Sep 14, 2014
5,958
3,017
Mars
martinx3.github.io
Ok. So which files do I need to download from because I'm using firmware:
H8314_Customized UK_1313-5398_52.1.A.0.672_R3C

The last firmware with TWRP support is the .618
I need to wait for the next sony kernel source release to create a TWRP with working decryption on newer firmwares.
And the next time I've got some free time I will create an universal TWRP without decryption which always works.

To root you could extract the boot.sin from the firmware folder with UnSin.exe from XDA and execute the Magisk Manager App bootimage patcher on it, then flash it via fastboot and deactivate the vbmeta.
 

TPlatt

Senior Member
Jun 14, 2015
142
1
The last firmware with TWRP support is the .618
I need to wait for the next sony kernel source release to create a TWRP with working decryption on newer firmwares.
And the next time I've got some free time I will create an universal TWRP without decryption which always works.


So I can just download a different firmware from another country to get by as long as it matches what you have in file name?
 

TPlatt

Senior Member
Jun 14, 2015
142
1
Downloading older firmware from Canada now. Will try and update. Also for camera fix could you message me on private messages about that. Just need to know when and how to use those files as well. Thanks.

---------- Post added at 03:44 PM ---------- Previous post was at 03:43 PM ----------

And also what do I do with the permissive zip folder under the twrp files I unzipped.
 

MartinX3

Recognized Contributor
Sep 14, 2014
5,958
3,017
Mars
martinx3.github.io
Downloading older firmware from Canada now. Will try and update. Also for camera fix could you message me on private messages about that. Just need to know when and how to use those files as well. Thanks.

---------- Post added at 03:44 PM ---------- Previous post was at 03:43 PM ----------

And also what do I do with the permissive zip folder under the twrp files I unzipped.

Since 10.0 almost everything, including the camera, works out of the box. :)
 

MartinX3

Recognized Contributor
Sep 14, 2014
5,958
3,017
Mars
martinx3.github.io
Martin, you are awesome. Thank you. I got magisk root. But no twrp for recovery and no camera, still black screen.
You're welcome :)

What?
On a full wiped phone no camera in 10.0?

Hmmm, you did unlock in on 8.0?
And option would be to boot the phone with the drmfix on 8.0 once and use the camera there, before you upgrade again to 10.0
(Fullwipes needed)
 

Harry500

Member
Jan 12, 2019
40
3
Missing folder in TWRP Backups

Hello,

I needed a single file out of one of my TWRP Backups. I checked the recovery.log file and noticed that the folder /data/misc/keystore is missing, so this folder has not been included in the backups. I am using the TWRP version 3.2.3 for Android 8. Is this a known problem in this version? Is it a bug and if so, is there a newer version of TWRP?
 

MartinX3

Recognized Contributor
Sep 14, 2014
5,958
3,017
Mars
martinx3.github.io
Hello,



I needed a single file out of one of my TWRP Backups. I checked the recovery.log file and noticed that the folder /data/misc/keystore is missing, so this folder has not been included in the backups. I am using the TWRP version 3.2.3 for Android 8. Is this a known problem in this version? Is it a bug and if so, is there a newer version of TWRP?
I don't know
I only actively support the newest 3.4 tarp for stock/sodp 10 ROMs

For backups I use titanium backup or migrate.
 

Harry500

Member
Jan 12, 2019
40
3
I don't know
I only actively support the newest 3.4 tarp for stock/sodp 10 ROMs

For backups I use titanium backup or migrate.
This is what I tried to do. After restore the app with Titanium Backup the app crashes at startup. This is because a special keyfile from the folder mentioned above is missing because Titanium Backup does not include this file in its backups. This is why I just try to restore it from a TWRP backup. What do you mean by "newest 3.4 tarp for stock/sodp 10 ROMs"? You created this modified version for XZ2 with Android 8? So you mean you don't update it anymore?
 

MartinX3

Recognized Contributor
Sep 14, 2014
5,958
3,017
Mars
martinx3.github.io
This is what I tried to do. After restore the app with Titanium Backup the app crashes at startup. This is because a special keyfile from the folder mentioned above is missing because Titanium Backup does not include this file in its backups. This is why I just try to restore it from a TWRP backup. What do you mean by "newest 3.4 tarp for stock/sodp 10 ROMs"? You created this modified version for XZ2 with Android 8? So you mean you don't update it anymore?
Yes
At the moment the supported release is twrp 10

But if I finished my work unifying the two twrp versions it probably works on any android version if the keymaster doesn't prevent it using twrp on an older android version decrypting the userdata.
 

Harry500

Member
Jan 12, 2019
40
3
Yes
At the moment the supported release is twrp 10

But if I finished my work unifying the two twrp versions it probably works on any android version if the keymaster doesn't prevent it using twrp on an older android version decrypting the userdata.

Ok, thank you. But shouldn't there currently be three TWRP-versions? One for Android 8, one for 9 and one for 10? Where should I have an eye on to get the information if the TWRP-migration was successful? Will there be a post somewhere or is there another way to get informed?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 50
    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.