Help to solve a|b partitions issue!

fabiofloyd

Member
Dec 20, 2010
9
0
0
Hi i got pixel experience installed on my Mi A1 and it comes with twrp. When i entered twrp to root i got a message saying encryption failed. Changed slot and discovered that i have android one installed on another slot. So i am confuse, i have two roms on the same device? its stuck on android one logo now!
 

kudos1uk

Senior Member
Feb 6, 2014
470
178
73
Ringwood
Every time you upgrade the slot is changed, new OS is installed on the slot not in use and following installation the slot is changed, the old OS remains on the unused slot.
If I am on Android O on slot A and upgrade to Android P, the new Android P is installed on slot B and following a reboot I will be on slot B using Android P, even though I an on Android P, Android O remains on Slot A and is not used unless the upgrade fails in which case Android has a fall back working OS on slot A.
You will always have the old OS on the other slot, its an emergency fall back.
 
  • Like
Reactions: Tiemichael

fabiofloyd

Member
Dec 20, 2010
9
0
0
Every time you upgrade the slot is changed, new OS is installed on the slot not in use and following installation the slot is changed, the old OS remains on the unused slot.
If I am on Android O on slot A and upgrade to Android P, the new Android P is installed on slot B and following a reboot I will be on slot B using Android P, even though I an on Android P, Android O remains on Slot A and is not used unless the upgrade fails in which case Android has a fall back working OS on slot A.
You will always have the old OS on the other slot, its an emergency fall back.
thx
 

_mysiak_

Senior Member
Apr 1, 2009
2,243
1,273
183
Just for curiosity... What prevents from a dual boot system?
Shared data and other partitions. Only boot and system partitions are dual A/B. Two different systems can't share the same data partition (this is why it's needed to perform a factory reset when switching ROMs).
 

Tiemichael

Senior Member
May 10, 2013
364
89
48
Every time you upgrade the slot is changed, new OS is installed on the slot not in use and following installation the slot is changed, the old OS remains on the unused slot.
If I am on Android O on slot A and upgrade to Android P, the new Android P is installed on slot B and following a reboot I will be on slot B using Android P, even though I an on Android P, Android O remains on Slot A and is not used unless the upgrade fails in which case Android has a fall back working OS on slot A.
You will always have the old OS on the other slot, its an emergency fall back.
Thanks for the explanation!
A re-flash using Mi-Flash with original FW, does it it erase/overwrite the contents of both slots?
If not, how to delete the the contents of both slots?
 

kudos1uk

Senior Member
Feb 6, 2014
470
178
73
Ringwood
Thanks for the explanation!
A re-flash using Mi-Flash with original FW, does it it erase/overwrite the contents of both slots?
If not, how to delete the the contents of both slots?
No it won't, why do you want to erase the unused slot?
The unused slot is a failsafe should the update fail, as such it remains redundant and unused following a successful update, what is your reasoning for wanting to do this?
Although a failsafe the A/B setup is more about performing a seamless update, allowing you to use Android while the phone is updating to the unused slot, ie no more watch that "updating" message, just a simple reboot, once updated the old slot is unimportant and not worth worrying about.
 
Last edited:
  • Like
Reactions: Tiemichael

_mysiak_

Senior Member
Apr 1, 2009
2,243
1,273
183
Thanks for the explanation!
A re-flash using Mi-Flash with original FW, does it it erase/overwrite the contents of both slots?
If not, how to delete the the contents of both slots?
Mi Flash script will overwrite both slots with the same FW version and set slot A as active. Check the content of flash_all_lock.bat file to see what is being flashed and how. You can remove lock command from the script to keep bootloader unlocked.

OTA update reflashes only the inactive slot.
 
  • Like
Reactions: Tiemichael

Tiemichael

Senior Member
May 10, 2013
364
89
48
@kudos1uk, @_mysiak_:
Thanks for your reply!
Background of my question is this: Somehow I might have screwed up the slot assignment ...
Before I installed Magisk, I used 'fastboot set_active a', and I see Magisk is using slot A. But maybe my OTA upgrade before went to slot B , which could explain why the OTA-upgrade became obsolete/invisible/...
 

ash_5

New member
Mar 2, 2020
3
0
0
Hi i got pixel experience installed on my Mi A1 and it comes with twrp. When i entered twrp to root i got a message saying encryption failed. Changed slot and discovered that i have android one installed on another slot. So i am confuse, i have two roms on the same device? its stuck on android one logo now!
can i get the script for repartition of Mi A1 ROM?? I'm unable to find it anywhere