TWRP for Sony XZ2c instead of Lineage Recovery?

Search This thread

tomboudiboudi

Member
Jun 26, 2018
16
0
Hi everyone :)

After some research, I can't find a succeful way to install TWRP recovery instead of Lineage stock recovery.
It's really embarasing because I'm currently setting up my brand new XZ2c compact to run the way I want it to on Lineage OS 17.1 with Magisk and Xposed modules, and I experienced 3 or 4 endless bootloop that led me to fully format my phone after bunch of hours setting it and tailoring it up... Huge waste of time, frustration overload, as you could expect. So, I really miss tremendous TWRP backup fonctionnality I used to run frequently on my old Z5c... :crying:

Does anyone here as figured out how to replace Lineage stock recovery on this device? Is so, I'd really to hear him out :D
Have a good week-end!
 

kurtn

Senior Member
Jan 28, 2017
3,927
1,688
Small town in Bavaria
Hi everyone :)

After some research, I can't find a succeful way to install TWRP recovery instead of Lineage stock recovery.
It's really embarasing because I'm currently setting up my brand new XZ2c compact to run the way I want it to on Lineage OS 17.1 with Magisk and Xposed modules, and I experienced 3 or 4 endless bootloop that led me to fully format my phone after bunch of hours setting it and tailoring it up... Huge waste of time, frustration overload, as you could expect. So, I really miss tremendous TWRP backup fonctionnality I used to run frequently on my old Z5c... :crying:

Does anyone here as figured out how to replace Lineage stock recovery on this device? Is so, I'd really to hear him out :D
Have a good week-end!
You don't install a recovery, but only temporally boot one
https://wiki.lineageos.org/devices/xz2c/install
 

tomboudiboudi

Member
Jun 26, 2018
16
0
You don't install a recovery, but only temporally boot one
https://wiki.lineageos.org/devices/xz2c/install

Thanks for your (minimalist) advice. Literally just lost 1 hour fixing the bootloop it just caused by following it, I'm delighted.

Behind my post, I was hoping to find someone who could explain a bit more the process of replacing/flashing/booting/(wateveryouwanti'mnotanexpert) a recovery, and at the same time avoiding me wasting more hours in bootlooping/formating/reinstalling. Hopefully, this time I succeed to came out of the bootloop without formating and reseting eveything, but I almost lost my nerves.

All of this is a bit cloudy for me, could you (or someone else that would give me a little of his time to) be pedagogue and explain clearly the whole proccess (and especially what you should avoid if you don't want to get stuck in a bootloop/getting scarying corrupted device message) ? :D
 

tomboudiboudi

Member
Jun 26, 2018
16
0
Hi guys!

Today I tried again to install TWRP on my Sonyh Xperia XZ2C because LineageOS Recovery doesn't provide Nandroid backup, which is a shame.
I tried many ways described over the web, none of those worked, and I ended up with a boot loop at startup with that naughty message "your device is corrupted it cannot be trusted and will not boot". I can't boot to Lineage, neither to recovery. I'm stuck.

With device turned off, I can eventually press volume down, plug it to computer, access fastboot mode (blue led), flash+boot the LineageOSrecovery.img, then the device restart, Sony logo appears... and that's all, I'm stuck with logo in boot loop, and I can't go anywhere further.
I tried to change boot slot (without knowing if it could help with this problem at all) but I alway get "unknown option".

I'm panicking right now, I can't find any way out to this bootloop, if someone could help it will be sooo appreciated!
I tried hard to find a solution for 4 hours now, I'm completly stuck and I can't even sleep. That's why I finally reached out here.
 

kurtn

Senior Member
Jan 28, 2017
3,927
1,688
Small town in Bavaria
Hi guys!

Today I tried again to install TWRP on my Sonyh Xperia XZ2C because LineageOS Recovery doesn't provide Nandroid backup, which is a shame.
I tried many ways described over the web, none of those worked, and I ended up with a boot loop at startup with that naughty message "your device is corrupted it cannot be trusted and will not boot". I can't boot to Lineage, neither to recovery. I'm stuck.

With device turned off, I can eventually press volume down, plug it to computer, access fastboot mode (blue led), flash+boot the LineageOSrecovery.img, then the device restart, Sony logo appears... and that's all, I'm stuck with logo in boot loop, and I can't go anywhere further.
I tried to change boot slot (without knowing if it could help with this problem at all) but I alway get "unknown option".

I'm panicking right now, I can't find any way out to this bootloop, if someone could help it will be sooo appreciated!
I tried hard to find a solution for 4 hours now, I'm completly stuck and I can't even sleep. That's why I finally reached out here.
In fastboot mode you should be able to flash stock rom
 

tomboudiboudi

Member
Jun 26, 2018
16
0
For an unknown reason, I succed to boot on Lineage Recovery (not TWRP) this morning. I flashed LineageOs rom.zip using adb sideload. After rebooting, the recovery tolds me that I had to wipe everything because the system partition seems to be corrupted, so I did.
I'm a bit tired to lost everything since I made all of this to do Nandroid backups with TWRP........ but I have a fresh new install, my phone works again so it's fine.

But I still need to make Nandroid backups.

Kurtn, you seem to have skills and knowledge. As you can see, I didn't succeed to boot Twrp since october 2020. I don't see why it would be impossible with my device, I'm probably messing something somewhere.
Would you share your knowledge and help me booting/flashing TWRP without bricking everything again?
 
  • Sad
Reactions: kurtn

User699

Senior Member
Feb 28, 2021
223
1
41
I didn't succeed to boot Twrp since october 2020. I don't see why it would be impossible with my device, I'm probably messing something somewhere.
Would you share your knowledge and help me booting/flashing TWRP without bricking everything again?



Btw.
Code:
fastboot flash boot recovery.img
DOES install the recovery, since it's permanently flashed. Don't know why they (lineage) didn't change that.
You don't install a recovery, but only temporally boot one
https://wiki.lineageos.org/devices/xz2c/install

However @tomboudiboudi , you could boot twrp manually using
Code:
fastboot boot twrp.img
With that, twrp should appear and ask for a password to decrypt your userdata partition.

If that works, you could try to flash boot this very same twrp.img. Maybe you need an additional twrp.zip too which will be sideloaded within twrp itself.
A note for you which might help: I wanted to update my lineage recovery manually using fastboot (older lineage recovery to newer one) and found that nothing (except fastboot) was booting at all after flashing this.
However, after dirty flashing lineageOS.zip, everything worked fine again.

Keep in mind that flashing a recovery will modify your boot.img. If this one doesn't work / is corrupt etc., your os won't boot up.
 

kurtn

Senior Member
Jan 28, 2017
3,927
1,688
Small town in Bavaria
Btw.
Code:
fastboot flash boot recovery.img
DOES install the recovery, since it's permanently flashed. Don't know why they (lineage) didn't change that.


However @tomboudiboudi , you could boot twrp manually using
Code:
fastboot boot twrp.img
With that, twrp should appear and ask for a password to decrypt your userdata partition.

If that works, you could try to flash boot this very same twrp.img. Maybe you need an additional twrp.zip too which will be sideloaded within twrp itself.
A note for you which might help: I wanted to update my lineage recovery manually using fastboot (older lineage recovery to newer one) and found that nothing (except fastboot) was booting at all after flashing this.
However, after dirty flashing lineageOS.zip, everything worked fine again.

Keep in mind that flashing a recovery will modify your boot.img. If this one doesn't work / is corrupt etc., your os won't boot up.
I fear you still haven't realized, what a/b means. The classic concept of having a recovery partition, where you can boot twrp at any time - doesn't apply.
 

User699

Senior Member
Feb 28, 2021
223
1
41
I fear you still haven't realized, what a/b means. The classic concept of having a recovery partition, where you can boot twrp at any time - doesn't apply.
You're right, there is no recovery partition.
As I said: Flashing a recovery.img will modify the boot.img.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone