[RECOVERY] TWRP 3.3.1-0 (lilac) [UPDATE: 2019-09-16]

Search This thread

troubas

Member
Oct 3, 2018
5
0
BootLoop

Hei modpunk,

Thank you for all your hard work on the sony xperia device. I'm very happy to use your system instead of stock!

I was trying to update to Android 9.0 from Android 8.0. I've updated the Firmware and flashed the TWRP Recovery.
Now I've tested backwards and the only bootable recovery for me is twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img
all later versions always end up in a bootloop. Any suggestions?
 

j4nn

Senior Member
Jan 4, 2012
1,237
2,450
@modpunk, could you please merge the attached patch into your 'android_device_sony_yoshino' repository 'twrp-9.0' branch?

[PATCH] fix twrp fstab to avoid mount of oem and dsp in rw mode
mounting in rw mode changes the partitions even if not changing
any file there, making eventual fota update not possible only
because twrp has been just one time booted without flashing anything

Thank you.
 

Attachments

  • fix-twrp-fstab-to-avoid-mount-of-oem-and-dsp-in-rw-mode.patch
    2 KB · Views: 69

j4nn

Senior Member
Jan 4, 2012
1,237
2,450
my still locked xz1c is running twrp as normal/permanent recovery

Please see my post in the Security Discussion forum subsection:
Android PIE VerifiedBoot Bypass: sony xperia XZ1 locked bootloader permanently rooted
Showing video recordings of xz1c still locked bootloader rooting, getting permanent twrp recovery and permanent magisk and installing Lineage OS 16.0 as a secondary OS to SD card with dual-boot option via recovery boot or just replacing sony stock fw fully with LOS16, having bootloader still locked (as shown, no bootloader unlocked warning screen) keeping Android Key and ID Attestation still working (the android attest key).
Big thanks to you @modpunk and @derf elot for your work on LOS and TWRP for xz1c - my builds for still locked bootloader are based on your codebase obviously.
Once again, thank you both.
 

nussbaum

Senior Member
Feb 18, 2011
309
220
Bielefeld
You dont need to flash it - you can just boot it once via fastboot:


Why flash TWRP in boot partition?
There is no flash command in the quoted code. And that is right, else you would have to find the call option in TWRP?
"fastboot boot twrp.img" just loads twrp as a kernel into RAM and starts it ONCE, without changeing the installed boot.img, so it is save.
 

troubas

Member
Oct 3, 2018
5
0
Hei modpunk,

Thank you for all your hard work on the sony xperia device. I'm very happy to use your system instead of stock!

I was trying to update to Android 9.0 from Android 8.0. I've updated the Firmware and flashed the TWRP Recovery.
Now I've tested backwards and the only bootable recovery for me is twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img
all later versions always end up in a bootloop. Any suggestions?

Well it turns out that removing the SD-card enables me to boot TWRP. It's a 16GB Kingston, not quite sure what's going on there.
 

troubas

Member
Oct 3, 2018
5
0
If you're using PIE you're flashing the wrong recovery, you need one from the PIE folder.

Yep, thanks for the hint. I just knew that there was some version that used to work so I tested backwards (including releases for 8.0) to maybe include useful information concerning my problem. Something in twrp must have changed after the twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img release that now prevents it to boot if I have said SD-Card inserted in my phone.
 

SXUsr

Senior Member
Jul 11, 2010
8,157
2,875
Here =)
Something in twrp must have changed after the twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img release that now prevents it to boot if I have said SD-Card inserted in my phone.
There is a TWRP folder on the internal storage, try removing that and see if that helps. I've upgraded to PIE a few times and never had this issue.
 

jkepler1571

New member
Dec 23, 2019
1
0
Hello, I've recently picked up an xz1c, and I'm about to flash TWRP onto it. Do I need
twrp-3.2.3-0-lilac-pie-1.img or twrp-3.2.3-0-lilac-pie-2.img ? I'm not sure what the difference is between those files.

Thanks!
 

moridin1983

Member
Nov 6, 2018
20
4
Hello,

I have a problem with the backup and restore functionality, that i can't figure out. Whenever I restore a backup in twrp and restart the phone, it will go into an infinite bootloop.
I can even boot into twrp, create a backup of a perfectly working phone, immediately restore this backup and will still get a bootloop.
Does anyone have the same problem, or maybe even a fix?
I'm running LineageOS 16.0 UNOFFICIAL - 1.0 and twrp-3.3.1-0-lilac-pie-5.img.

Thanks.
 
  • Like
Reactions: SGH-i200

Nakopa

Member
Dec 26, 2016
10
1
Hey, thanks for your hard work, but im facing issues with your recovery. I need to access my phone over adb, but it remains on unauthorized while in twrp. Every single thread on this topic says that twrp should auth'd when you auth'd it in the rom, but it just doesn't.
Could you take a look in this?
 

modpunk

Recognized Contributor
Oct 14, 2011
1,718
6,643
Sony Xperia XZ1 Compact
Samsung Galaxy S10
Hey, thanks for your hard work, but im facing issues with your recovery. I need to access my phone over adb, but it remains on unauthorized while in twrp. Every single thread on this topic says that twrp should auth'd when you auth'd it in the rom, but it just doesn't.
Could you take a look in this?

Works just fine if you decrypt your /data partition where this information is stored.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I want to return to Lineage OS again but I can no longer flash the TWRP recovery; the terminal just hangs on the fastboot flash
    Did you find any solution?
    Not sure why this is happening, perhaps an insufficient or incompatible power supply issue, but the solution is to try different computers/USB ports. Also, in my case it only worked with Linux, EndeavourOS to be specific, but should work on Ubuntu or any other "complete" Linux OS/distro.

    Will there be a TWRP update for 11?
    Any ideas on why is failing to boot with the flashed recovery? Could this be related with the fact that there's no TWRP for Android 11 for the XZ1 Compact? Is there any alternative to TWRP?
    Don't wait on TWRP updates in this thread, get the latest version from the source and reflash it, it works for me on ROMs with Android 11 and 12: https://twrp.me/sony/sonyxperiaxz1compact.html

    Is there any alternative to TWRP?
    I'm using Pie 9 TWRp 3310. It work fine. But after the reboot, I tried to flash something and all folder suddenly showing weird name, probably encrypted?
    I am also in trouble. (Lineage 19.1)
    It's because of the encryption. Files on LineageOS 19 are encrypted if accessed via TWRP recovery, LineageOS 19 (maybe 18 also) has its own alternative recovery that can be installed during the first boot, perhaps the files are not encrypted if accessed from there. Either way, it's a security measure against unauthorized access to files. I'm pretty sure I've read somewhere that it's a default feature in Android 12.

    How do I resolve TWRP error 255?
    The error 255 is caused due to insufficient space. One solution is to backup or restore one or several partitions at a time instead of all at once, alternative solution is to back up to external memory card.
    1
    But error 255 means low storage space
    Thank you.
    If you back up by excluding only data, it will finish without error.
    Perhaps there is something wrong with the data?
    I formatted the 32gb sd card and tried backing up only the data.
    But the result is the same with an error.
    When I backed up the data with adb, it was 20.8gb.

    postscript
    With Havoc-OS 4.6, I was able to back up without any problems.
    I think it's probably a problem with LOS 19.1.
  • 57
    TWRP

    This project provides the TWRP recovery for for the Sony Xperia XZ1 Compact (lilac).

    twrp-lilac.jpg


    FEATURES

    • File-Based Encryption (FBE) support
    • EXT4 support
    • F2FS support
    • EXFAT support
    • Provides unzip
    • Additional languages

    This recovery will use the security patch level from the system partition to decrypt data. It should not be tied to a security patch level anymore.

    DOWNLOAD

    Make sure you download the .img and corresponding .asc.txt file (see INTEGRITY)!

    You can always find the latest version of the recovery HERE.

    INTEGRETY

    The recovery images also come with an GPG armor file (.asc). With that file you verify that the image I created hasn't been altered.

    How do you do that?

    1. Download my gpg keyring here: https://cryptomilk.org/gpgkey-8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D.gpg.
    2. Download the recovery.img and recovery.img.asc.txt file
    3. Rename the recovery.img.asc.txt file to recovery.img.asc
    4. Verfiy the signature using the following command:
      Code:
      gpg --keyring ./gpgkey-8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D.gpg --verify recovery.img.asc

    A good tutorial is: How to verify signatures for packages from the Tor Project.

    SECURITY ADVICE

    Don't flash ROMs or Magisk modules which set SELinux to permissive or you welcome malware on your device!

    XDA:DevDB Information
    recovery_twrp_sony_lilac, Tool/Utility for the Sony Xperia XZ1 Compact

    Contributors
    modpunk, Dees_Troy
    Source Code: https://github.com/cryptomilk/android_device_sony_lilac


    Version Information
    Status: Stable
    Current Stable Version: 3.3.1-0
    Stable Release Date: 2019-09-16

    Created 2017-11-18
    Last Updated 2019-09-16
    13
    I've uploaded a new recovery. This should not be tied to the security patch level anymore. It reads the values from the system partition and uses that.
    13
    I've uploaded a new TWRP recovery version 3.2.3-0

    • enable md5sum digest verification
    • adb backup fixes
    • OTA style update zips will now install automatically without prompting for decrypt
    • minor tweaks to handling date/time on Qualcomm devices
    • updates to some language translations
    13
    New recovery released.
    13
    I've uploaded a TWRP for Android 9.0 (Pie).