• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Question Recovery A/B

Search This thread

Devione

Senior Member
Feb 27, 2011
56
14
Hi everybody,

I just got a ZenFone 8 16GB ram, I recently unlocked the bootloader and flashed TWRP.

So I've managed to flash LineageOS, but I'm not sure exactly what is going on. I wasn't able to flash the usual way via TWRP, but sideload via ADB. When reboot to Recovery, it reboots into Lineage Recovery.

I am somewhat aware that there is an A/B partition and this is my first A/B device, is there any way I can access TWRP? Or it has to run Lineage Recovery? Any way to only run 1x Recovery?
 

HyperCriSiS

Senior Member
Nov 23, 2010
387
80
Samsung Galaxy S7
ASUS ZenFone 8
Hi everybody,

I just got a ZenFone 8 16GB ram, I recently unlocked the bootloader and flashed TWRP.

So I've managed to flash LineageOS, but I'm not sure exactly what is going on. I wasn't able to flash the usual way via TWRP, but sideload via ADB. When reboot to Recovery, it reboots into Lineage Recovery.

I am somewhat aware that there is an A/B partition and this is my first A/B device, is there any way I can access TWRP? Or it has to run Lineage Recovery? Any way to only run 1x Recovery?
As far as I know, Lineage overwrites TWRP with its own recovery, so you have to flash it again.
 
  • Like
Reactions: Devione

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,068
16,098
Hey thanks for the quick reply. I wasn't aware that was the case.

So this means that my "A" slot is now vacant and I will now need to reflash TWRP yes?


Thanks for your time.


Edit: Lineage Recovery shows that it's on "B" slot



If you update the firmware on your device, it will flash new update to the opposite slot. usually a firmware.zip that is let´s call it a "full firmware.zip", such as lineage or the stock rom has recovery included. so you´re ending up with TWRP being "overwritten" in case you flash an update.

Unpack the payload.bin in any of those full firmware.zips via payload extractor on your pc. You´ll see all the .imgs contained. All of those partitions will be updated on the opposite slot if you flash the full firmware zip.
That means boot.img will be overwritten (magisk will be gone if you don´t choose the install magisk to inactive slot after OTA in magisk manager before rebooting the phone after the stock firmware.zip has flashed for example).
 
  • Like
Reactions: dron39 and Devione

Devione

Senior Member
Feb 27, 2011
56
14


If you update the firmware on your device, it will flash new update to the opposite slot. usually a firmware.zip that is let´s call it a "full firmware.zip", such as lineage or the stock rom has recovery included. so you´re ending up with TWRP being "overwritten" in case you flash an update.

Unpack the payload.bin in any of those full firmware.zips via payload extractor on your pc. You´ll see all the .imgs contained. All of those partitions will be updated on the opposite slot if you flash the full firmware zip.
That means boot.img will be overwritten (magisk will be gone if you don´t choose the install magisk to inactive slot after OTA in magisk manager before rebooting the phone after the stock firmware.zip has flashed for example).
Cheers thanks for your reply and explanation.

Appreciate your efforts and time taken to explain. Thanks for your time.


EDIT - just to be sure, if we were to update the firmware on our devices while running say LineageOS, the payload.bin will need to be extracted and the relevant files flashed correct?
 
Last edited:

dron39

Senior Member
Sep 20, 2009
634
83
EDIT - just to be sure, if we were to update the firmware on our devices while running say LineageOS, the payload.bin will need to be extracted and the relevant files flashed correct?
I don't know, but I guess if LOS supplied in form of payload.bin instead of many .img files then I think it's better to unpack all img's from there replace recovery and patched boot and "repack" it back if it's possible. At least that was the way I did that on Samsung phones. But there was only .tar archives, so that was much easier than .bin to repach which I think you will need some additional software.
 
  • Like
Reactions: Devione

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,068
16,098
Cheers thanks for your reply and explanation.

Appreciate your efforts and time taken to explain. Thanks for your time.


EDIT - just to be sure, if we were to update the firmware on our devices while running say LineageOS, the payload.bin will need to be extracted and the relevant files flashed correct?
I'm not sure about the current situation on unofficial lineage. I'm also not using it on my zf8 but from others phones, which should apply to zf8 as well.
I'm pretty sure official lineage builds have an inbuilt OTA mechanism. Unsure about the unofficial one. Better ask in the lineage thread.

However, you can boot to lineage recovery and flash the lineage.zip from there without wiping the device if you were previously on lineage and are just updating.
If you want to be rooted you need to patch the boot.img from this update (extract from payload.bin if not already available) and flash it via fastboot after updating.

By telling you to extract payload.bin I just wanted to visualize what's being updated during flashing a firmware.zip so you have a better idea how it works.
 
  • Like
Reactions: Devione

Devione

Senior Member
Feb 27, 2011
56
14
Hi there, thanks for the replies.

Sorry I wasn't being clear. By firmware updates I meant the official Asus firmware updates which are zips containing payload.bin.

What I really meant to ask was the possibility of updating the Asus firmware when still running a non Asus ROM eg LineageOS.

Earlier on I've tried to reflash TWRP over the existing LineageOS recovery and it didn't seem to work so not sure what I did wrong there. Device still boots to LineageOS and running Lineage Recovery on "B".


Thanks guys for your time and replies.



Edit - the goal at the end of the day I guess is to
1. run a custom ROM (LineageOS, GSI, Omni etc.)
2. run TWRP
3. able to update Asus firmware when available
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hey thanks for the quick reply. I wasn't aware that was the case.

    So this means that my "A" slot is now vacant and I will now need to reflash TWRP yes?


    Thanks for your time.


    Edit: Lineage Recovery shows that it's on "B" slot



    If you update the firmware on your device, it will flash new update to the opposite slot. usually a firmware.zip that is let´s call it a "full firmware.zip", such as lineage or the stock rom has recovery included. so you´re ending up with TWRP being "overwritten" in case you flash an update.

    Unpack the payload.bin in any of those full firmware.zips via payload extractor on your pc. You´ll see all the .imgs contained. All of those partitions will be updated on the opposite slot if you flash the full firmware zip.
    That means boot.img will be overwritten (magisk will be gone if you don´t choose the install magisk to inactive slot after OTA in magisk manager before rebooting the phone after the stock firmware.zip has flashed for example).
    1
    Hi everybody,

    I just got a ZenFone 8 16GB ram, I recently unlocked the bootloader and flashed TWRP.

    So I've managed to flash LineageOS, but I'm not sure exactly what is going on. I wasn't able to flash the usual way via TWRP, but sideload via ADB. When reboot to Recovery, it reboots into Lineage Recovery.

    I am somewhat aware that there is an A/B partition and this is my first A/B device, is there any way I can access TWRP? Or it has to run Lineage Recovery? Any way to only run 1x Recovery?
    As far as I know, Lineage overwrites TWRP with its own recovery, so you have to flash it again.
    1
    EDIT - just to be sure, if we were to update the firmware on our devices while running say LineageOS, the payload.bin will need to be extracted and the relevant files flashed correct?
    I don't know, but I guess if LOS supplied in form of payload.bin instead of many .img files then I think it's better to unpack all img's from there replace recovery and patched boot and "repack" it back if it's possible. At least that was the way I did that on Samsung phones. But there was only .tar archives, so that was much easier than .bin to repach which I think you will need some additional software.
    1
    Cheers thanks for your reply and explanation.

    Appreciate your efforts and time taken to explain. Thanks for your time.


    EDIT - just to be sure, if we were to update the firmware on our devices while running say LineageOS, the payload.bin will need to be extracted and the relevant files flashed correct?
    I'm not sure about the current situation on unofficial lineage. I'm also not using it on my zf8 but from others phones, which should apply to zf8 as well.
    I'm pretty sure official lineage builds have an inbuilt OTA mechanism. Unsure about the unofficial one. Better ask in the lineage thread.

    However, you can boot to lineage recovery and flash the lineage.zip from there without wiping the device if you were previously on lineage and are just updating.
    If you want to be rooted you need to patch the boot.img from this update (extract from payload.bin if not already available) and flash it via fastboot after updating.

    By telling you to extract payload.bin I just wanted to visualize what's being updated during flashing a firmware.zip so you have a better idea how it works.