Mi A2: Pie upgrade + Magisk upgrade = bricked - Magisk

Steps on my Xiaomi Mi A2:
Started the OTA from Oreo to Pie, officially being offered via settings.
While the OTA was downloading / installing, I uninstalled Magisk 17 (“restore images”). Note that after uninstalling Magisk, I did not see an option to install it again. In fact, the Magisk app still reported Magisk as being installed.
In the meantime, the OTA showed the restart button. This I did not tap, since I want Magisk to work.
I went back into the Magisk app. So far I had ignored the popup window offering an upgrade to Magisk 18. Now I accepted it, and I selected to install Magisk to the other slot (A/B). As advertised, this was followed by an automatic reboot.
The device at first continuously reset itself, i.e. it was in a boot loop. Eventually, I think I disconnected it from power or I pressed the power button. Now the boot process would move on to the boot animation with the colored horizontal stripe. There is got stuck. I waited for perhaps half an hour, then accepted that something is broken.
What could’ve gone wrong? Any idea what to do now or how to diagnose the issue? (there is data on the device that I don’t want to lose, text messages and other stuff)
Modifications that I did later:
Code:
fastboot set_active a
fastboot reboot
This enters a boot loop. Another time, I think after disconnecting the USB cable, it went back into Fastboot mode. Weird.
And:
Code:
fastboot set_active b
fastboot reboot
This boots to the colored stripe animation mentioned in the last of the steps above. So I assume slot b is the one that was last active.
I also tried booting other images, but to no avail:
Code:
fastboot boot boot.img
Among the images that I tried booting was Xiaomi’s 9.6.16.0 Oreo image as well as the images from the 10.0.1 built that Ricardo linked to in another post.

Bootloop usually occurs when you uninstall Magisk without uninstalling modules first.
Try installing Magisk via adb sideload with TWRP.
Sent from my Mi A2 using Tapatalk

hank81 said:
Bootloop usually occurs when you uninstall Magisk without uninstalling modules first.
Click to expand...
Click to collapse
Had no modules installed. But there was something odd about the upgrade process, especially that at first I didn’t get an option to install Magisk again.
Try installing Magisk via adb sideload with TWRP.
Click to expand...
Click to collapse
Thanks for the suggestion! Have to look into TWRP.
Anyhow, at the moment I would be happy for the phone to boot again, even without Magisk. Can install Magisk later.

feklee said:
Had no modules installed. But there was something odd about the upgrade process, especially that at first I didn’t get an option to install Magisk again.
Thanks for the suggestion! Have to look into TWRP.
Anyhow, at the moment I would be happy for the phone to boot again, even without Magisk. Can install Magisk later.
Click to expand...
Click to collapse
If you can access TWRP, I hope that you can search for the OTA firmware zip that the System Updater downloaded & you can try manually flashing that zip using TWRP. It would restore the Pie boot image which would make the device boot up.
Sent from my #FlagshipKiller3T using Tapatalk

DarkSJ1998 said:
If you can access TWRP, I hope that you can search for the OTA firmware zip that the System Updater downloaded & you can try manually flashing that zip using TWRP.
Click to expand...
Click to collapse
OK, so I booted into TWRP 3.2.3-0:
Code:
# fastboot boot TWRP-3.2.3-jasmine-20181201.img
I played with the command line in TWRP. However, I didn’t find the zip. Cache was not mounted, and it was not possible to mount it. Then I read a little bit about A/B (Seamless) System Updates. This is a cool concept, but somehow it failed miserably here. Neither slot does boot.
Slot B:
It looks like the Android version is still Oreo:
Code:
# grep version.i /system/system/build.prop
[…]
ro.build.version.incremental=V9.6.17.0.0DIMIFE
So I obtained the image files for that version. There is a post with links to dumps. I then tried to boot the V9.6.17.0 boot image:
Code:
fastboot boot boot.img
Again, booting hangs at the animation with the horizontal colored stripe.
SLOT A:
As mentioned before, booting that doesn’t work either: The system enters a boot loop, repeatedly reseting itself before it even gets to the horizontal colored stripe animation.
This one has Pie:
Code:
# grep version.i /system/system/build.prop
[…]
ro.build.version.incremental=V10.0.2.0.PDIMIFJ
As above, I obtained the image files for that version, and I did:
Code:
$ fastboot set_active a
Setting current slot to 'a'...
OKAY [ 0.017s]
Finished. Total time: 0.020s
$ fastboot boot boot.img
Downloading 'boot.img'
OKAY [ 2.633s]
booting
Boot loop!
I repeated:
Code:
$ fastboot boot boot.img
Downloading 'boot.img'
OKAY [ 2.633s]
booting
It’s always like that: When you’re not expecting anything anymore, it works! The A2 booted into Pie.
Noteworthy:
It’s weird that explicitly selecting the slot made it not work, or maybe it required another reboot.
Magisk remained installed: After the initial boot into Pie, I rebooted the phone, and it booted into Pie again although I did not flash boot.img.
Perhaps the phone didn’t do the initial boot into Pie because Magisk was still installed.

feklee said:
OK, so I booted into TWRP 3.2.3-0:
Code:
# fastboot boot TWRP-3.2.3-jasmine-20181201.img
I played with the command line in TWRP. However, I didn’t find the zip. Cache was not mounted, and it was not possible to mount it. Then I read a little bit about A/B (Seamless) System Updates. This is a cool concept, but somehow it failed miserably here. Neither slot does boot.
Slot B:
It looks like the Android version is still Oreo:
Code:
# grep version.i /system/system/build.prop
[…]
ro.build.version.incremental=V9.6.17.0.0DIMIFE
So I obtained the image files for that version. There is a post with links to dumps. I then tried to boot the V9.6.17.0 boot image:
Code:
fastboot boot boot.img
Again, booting hangs at the animation with the horizontal colored stripe.
SLOT A:
As mentioned before, booting that doesn’t work either: The system enters a boot loop, repeatedly reseting itself before it even gets to the horizontal colored stripe animation.
This one has Pie:
Code:
# grep version.i /system/system/build.prop
[…]
ro.build.version.incremental=V10.0.2.0.PDIMIFJ
As above, I obtained the image files for that version, and I did:
Code:
$ fastboot set_active a
Setting current slot to 'a'...
OKAY [ 0.017s]
Finished. Total time: 0.020s
$ fastboot boot boot.img
Downloading 'boot.img'
OKAY [ 2.633s]
booting
Boot loop!
I repeated:
Code:
$ fastboot boot boot.img
Downloading 'boot.img'
OKAY [ 2.633s]
booting
It’s always like that: When you’re not expecting anything anymore, it works! The A2 booted into Pie.
Noteworthy:
It’s weird that explicitly selecting the slot made it not work, or maybe it required another reboot.
Magisk remained installed: After the initial boot into Pie, I rebooted the phone, and it booted into Pie again although I did not flash boot.img.
Perhaps the phone didn’t do the initial boot into Pie because Magisk was still installed.
Click to expand...
Click to collapse
Great to see you fixed your issue
Maybe your post will help somebody else
Sent from my #FlagshipKiller3T using Tapatalk

Related

[ROOT] EU LMV405EBW - Magisk

I couldn't find any guide for rooting the V40, so I thought I'd write down the steps I took to root my new EUR V40 - LMV405EBW. Maybe it will help others. Sorry if this is somewhat confusing, I didn't have time to make a polished version. It's basically made from my notes during the process with the commands copied from bash history.
-First, unlock the bootloader following LG's instructions here: https://developer.lge.com/resource/mobile/RetrieveBootloader.dev
There's no TWRP for the V40 and the one made for G7 doesn't work. I don't have the time and knowledge to even attempt to compile TWRP for the V40, so I proceeded with just patching an original boot image with Magisk.
You can get the patched boot images that I used from here:
Oreo 10e: boot_a_magisk_patched_10e.img
Oreo 20f: boot_a_magisk_patched_10f.img
Pie 20a: boot_a_magisk_patched_20a.img
Pie 20b: boot_a_magisk_patched_20b.img
Pie 20f: boot_a_magisk_patched_20f.img
Pie 20g: boot_a_magisk_patched_20g.img
Q 30b: boot_a_magisk_patched_30b.img (this requires flashing to the active boot partition).
Q 30c: boot_a_magisk_patched_30c.img (this requires flashing to the active boot partition)
Q 30d: boot_a_magisk_patched_30d.image (this may or may not work with "fastboot boot" and could require flashing to the active boot partition. I haven't tested if live boot still works. I just did fastboot flash boot_x img_file).
You can try to boot it with with fastboot if you have a LNV405EBW and skip the KDZ extraction part.
Installing Magisk:
Flashing this image isn't necessary, just straight boot should be sufficient and safe.
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
Code:
adb reboot bootloader
fastboot boot boot_a_magisk_patched_10e.img
After the phone boots the OS with the external boot image, open Magisk Manager and tap on Install. Select the option to Direct install to the active slot. I played it safe and decided to NOT flash also on the inactive slot. I've left it alone so I can use it in case of need of recovery.
You'll probably notice that you don't have a connection to the carrier. Just ignore it, it will back once the phone is booted normally.
Reboot and you will have permanent root until you switch the A/B slots.
In case my patched boot image doesn't work, you can just make your own.
Tools needed:
Magisk Manager 7.0.0 installed on the phone
LG Bridge installed on a Windows machine.
a Linux machine or VM (I used the latest ubuntu desktop), python3 with the zstandard module installed and kdztools from steadfasterX's repo. Maybe kdztools would work on Windows too, I haven't tried it.
adb, fastboot
You need to procure an original ROM file for your phone model. It can be downloaded easily with LG Bridge. Just connect the phone to a Windows PC, start LG bridge, go to the Software update tab and click on Update error recovery. Wait for the download to start and disconnect the phone. Ignore LG Bridge complains about not being able to flash after the downloading stage is completed. Don't click anything in Bridge and before closing it go to C:\Users\<your_username>\AppData\Local\LG Electronics\LG Bridge\SWUpgrade and copy your KDZ somewhere else. Preferably send it to the Linux VM to the LG work folder, it'll be needed there.
On Linux open a terminal:
Code:
cd ~/Documents
mkdir LG
cd LG
git clone https://github.com/steadfasterX/kdztools.git
cd kdztools
nano undz.py -c
For kdztools to be able to extract the V40 images, I needed to edit undz.py and comment the lines 88-90. So, this block should all be commented or undz will fail to extract the boot partitions.
Code:
#if len(dz_item['pad']) != 0:
# print("[!] Error: pad is not empty", file=sys.stderr)
# sys.exit(1)
To extract, with the KDZ copied to ~/Documents/LG/
Code:
cd ~/Documents/LG/kdztools
./unkdz.py -f ../V405EBW10e_00_OPEN_EU_DS_OP_0109.kdz -x
cd kdzextracted/
List the partitions contents and look for the IDs of boot_a and/or boot_b. In my case they were 44 for boot_a and 63 for boot_b
Code:
../undz.py -f V40510e_00.dz -l
Extract boot_a or boot_b or both, they're identical:
Code:
../undz.py -f V40510e_00.dz -s 44
../undz.py -f V40510e_00.dz -s 63
You can find the extracted boot images in the dzextracted subfolder. Get boot_a.image or boot_b.image or both from there and send them to the phone in a location accessible by Magisk Manager. The Download folder should do fine.
Open Magisk Manager and tap Install, select Patch Boot Image file and patch the image file(s) you extracted. Get the patched_boot.img that Magisk Manager saves in the Download folder and send it to a PC where you have adb and fastboot.
Go to the beginning of the post to the Installing Magisk section.
Damned tempting, but I'll wait until after Pie drops.
Sent from my LM-V405 using Tapatalk
Glad to see this, hopefully it's a start for all of us.
If anything, at least a way to unlock the bootloader via legitimate channels! Gonna be generating that string, next chance I get, to be ready.
Sent from my LM-V405 using Tapatalk
Once runningnak3d gets a hold of this, we should be good with the v40. Cool beans.
Hey do the unlock codes online work for $ 12-15 on sprint? I used to flash phones back in the day and got a great deal on a bad IMEI sprint lg v40, but so far I can see there isn’t a way yet. On top off all that I m in Europe and don’t want to get the error message that I m out of the Region. I would have to go to USA just to unlock the phone.
@runningnak3d
Can't I install the firmware on a different device?
V version can not unlock BL, so envious
Getting a boot image like that works but I find it stupid to not upload it so that the others don't have to do it. Besides only one model can be bl unlocked so there won't be any model mismatch (except firmware versions but keeping up with them is not that hard)
LameMonster82 said:
Getting a boot image like that works but I find it stupid to not upload it so that the others don't have to do it. Besides only one model can be bl unlocked so there won't be any model mismatch (except firmware versions but keeping up with them is not that hard)
Click to expand...
Click to collapse
Or I could find you stupid for not noticing the patched image is in my first post.
DLS123 said:
I find you stupid for not noticing the patched images are in my first post.
Click to expand...
Click to collapse
I recommend labeling the boot images with their firmware since future firmwares won't be able to run the same boot image but other than that I'm really sorry.
LameMonster82 said:
I recommend labeling the boot images with their firmware since future firmwares won't be able to run the same boot image but other than that I'm really sorry.
Click to expand...
Click to collapse
I mentioned in the description 1 line below the link that it's for 10e. There was no other update in a long time. I don't think there can be any confusion for now. I can edit and label the file when there's will be another fw update.
It looks like unlocking the bootloader breaks Widevine L1 on the V40 and downgrades is to L3. No more HD or UHD Netflix.
I couldn't find any other solution than to re-lock the bootloader to restore L1.
This doesn't happen on the V30.
@DLS123
Thank you for all!
I ask you for more details; i'm stuck at flashing first image in adb; it returns an error; have LMV405EBW with 10f. unlocked bootloader of course
Thx again for your support!
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
DLS123 said:
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
Click to expand...
Click to collapse
Thx for answer; i not have too much experience in working with Magisk;
i just folowed your steps:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img
when i run fastboot comand for flash, is runing, but is returning "an error at line x"
i suppose is something wrong in this instructions.
daphix said:
Thx for answer; i not have too much experience in working with Magisk;
i just folowed your steps:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img
when i run fastboot comand for flash, is runing, but is returning "an error at line x"
Anyway; understand now what to do;
Steps are below:
- first install magisk manager
- download magisk zip from magisk site or from magisk manager himself on phone
- download patched_boot_a.img to phone from our good contributor
- use magisk manager and select inslall image of patched_boot_a.img from phone
- magisk manager will generate a magisk patched image
- transfer this magisk patched image (not patched_boot_a.img) to pc in ADB folder
- flash with Adb this magisk patched image from pc to phone.
Thx to our friend!
---------- Post added at 09:53 AM ---------- Previous post was at 09:21 AM ----------
DLS123 said:
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
Click to expand...
Click to collapse
Hi;
using Magisk mamanger and your file was generated a file: magisk_patched.img
pls support; trying to flash that image from PC with adb not work:
fastboot flash partition_a magisk_patched.img
Click to expand...
Click to collapse
@daphix
Whatver you're trying to do, is nowhere in the procedure I used. If you already booted with my boot image why are you making another boot image with Magisk and why are you trying to flash that? I never wrote anything of the sort.
if you booted with my patched image you already have temporary root and can use Magisk Manager to Direct install Magisk itself.
DLS123 said:
@daphix
Whatver you're trying to do, is nowhere in the procedure I used. If you already booted with my boot image why are you making another boot image with Magisk and why are you trying to flash that? I never wrote anything of the sort.
if you booted with my patched image you already have temporary root and can use Magisk Manager to Direct install Magisk itself.
Click to expand...
Click to collapse
Hi , thank you for reply;
I tried many combinations of your commands;
maybe due that am noob, but succesion below simply is not working:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img

I bricked my OnePlus 7 Pro (was stuck and fastboot) and how I fixed it

Hi, I'm writing this to guide those who faced - and will face similar situation in the future - the problem of being stuck on the fastboot screen, where the recovery or booting in EDL is not available.
So, after failing to get root after upgrading to android 10 I was fiddling with TWRP to try to get it to recognize my storage so I can reflash it and flash Magisk, but I couldn't get it to mount the storage, so my stupid brain decided to go to the wipe page and wiped everything in the hope it might magically work!! well.. it didn't!! and I got stuck in the fastboot screen and I thought that I bricked my phone for good.
after hours of searching online and trying everything nothing helped... but finally I managed to fix it.
and btw when I tried to flash TWRP by (fasboot boot twrp.img) I got the following message:
"remote: Failed to load/authenticate boot image: Load Error"
So here is what I did to get my phone working again:
Download and install Tool All in One
Download Fastboot ROM for your phone from here
In the Tool All in One app click on the Flash Factory Images button.
Select the ROM and let it do its work,
hopefully this will work and your device will reboot into a fresh android.
Also it's good to know that the official TWRP of twrp.me does not support Android Q at the moment, that's why you couldn't decrypt and mount the storage. TWRP in Oneplus 7 Pro thread here on XDA does support Q, you just have to remember to boot into the inactive/upgraded slot before booting back to TWRP to flash Magisk as it only installs to the active slot and not the upgraded slot.
Skickat från min GM1913 via Tapatalk
vegatr0n said:
Hi, I'm writing this to guide those who faced - and will face similar situation in the future - the problem of being stuck on the fastboot screen, where the recovery or booting in EDL is not available.
So, after failing to get root after upgrading to android 10 I was fiddling with TWRP to try to get it to recognize my storage so I can reflash it and flash Magisk, but I couldn't get it to mount the storage, so my stupid brain decided to go to the wipe page and wiped everything in the hope it might magically work!! well.. it didn't!! and I got stuck in the fastboot screen and I thought that I bricked my phone for good.
after hours of searching online and trying everything nothing helped... but finally I managed to fix it.
and btw when I tried to flash TWRP by (fasboot boot twrp.img) I got the following message:
"remote: Failed to load/authenticate boot image: Load Error"
So here is what I did to get my phone working again:
Download and install Tool All in One
Download Fastboot ROM for your phone from here
In the Tool All in One app click on the Flash Factory Images button.
Select the ROM and let it do its work,
hopefully this will work and your device will reboot into a fresh android.
Click to expand...
Click to collapse
Or just use the MSM tool. Job done
All with varying levels of interpretation, steps, descriptions, and the solution. Not all are useful.
I had the same issue and this worked perfectly to get my device up and running again. Thanks again!!
Hi all!
Here is plan B!
First of all - BEFORE you do some upgrade - make OPSwitch backup and copy to PC !!!!!
If you stuck - it's mean that something is badly damaged and wrong. Some of the files reside in the areas where upgrade tools (including Fastboot!) can't change and repair them.
We don't have time, knowledge to sort out WHAT was damaged.
We make all straight from beginning:
1. MSM tools - make your phone like from the Factory with "clean" install (ver 9 for now)
2. "FlashAll" то ver 10E
3. If you need - install "global"
4. If you need - install TWRP and Magisk
5. Restore your backup from PC
At the end you will have "clean" phone with all programs working
EASY!!!
Same as OP, I wanted to flash twrp.img.
I had my OP7Pro stuck in 'fastboot mode', I thought. It wouldn't respond to any commands from console (device not found) and I couldn't turn it off with the power button any more.
For noobs, just like me, I learned that I just had to press the powerbutton + volume up button. My phone rebooted after this.
Now making a backup before rooting and such, phew.
vegatr0n
I was stuck in Fastboot after switching slots. Excelent stuf! 2,3 clicks , done! Thank you!
vegatr0n said:
Hi, I'm writing this to guide those who faced - and will face similar situation in the future - the problem of being stuck on the fastboot screen, where the recovery or booting in EDL is not available.
So, after failing to get root after upgrading to android 10 I was fiddling with TWRP to try to get it to recognize my storage so I can reflash it and flash Magisk, but I couldn't get it to mount the storage, so my stupid brain decided to go to the wipe page and wiped everything in the hope it might magically work!! well.. it didn't!! and I got stuck in the fastboot screen and I thought that I bricked my phone for good.
after hours of searching online and trying everything nothing helped... but finally I managed to fix it.
and btw when I tried to flash TWRP by (fasboot boot twrp.img) I got the following message:
"remote: Failed to load/authenticate boot image: Load Error"
So here is what I did to get my phone working again:
Download and install Tool All in One
Download Fastboot ROM for your phone from here
In the Tool All in One app click on the Flash Factory Images button.
Select the ROM and let it do its work,
hopefully this will work and your device will reboot into a fresh android.
Click to expand...
Click to collapse
Many people have found this problem. Thank you, I am working again.
i am not even able to flash the twrp in android 10 always getting stuck at fastbootlogo after flashing the recovery cmd
nitinvaid said:
i am not even able to flash the twrp in android 10 always getting stuck at fastbootlogo after flashing the recovery cmd
Click to expand...
Click to collapse
Then you have to use the MSM unbrick tool:
https://forum.xda-developers.com/oneplus-7-pro/how-to/op7pro-collection-unbrick-tools-t3956595/amp/
vegatr0n said:
Then you have to use the MSM unbrick tool:
https://forum.xda-developers.com/oneplus-7-pro/how-to/op7pro-collection-unbrick-tools-t3956595/amp/
Click to expand...
Click to collapse
Nope...
I was able to reboot holding both vol+ and - and power
I bricked my tmobile oneplus 7 pro and dont know which file is safe to try can anyone please point me in the right direction?
I already tried the steps using the tool and downloading the FASTBOOK os file and I get this error
"CreateProcess failed: %1 is not a valid Win32 application. (193)
fastboot: error: Cannot generate image for userdata"
Tried booting the device but boots to OOS recovery always.
---------- Post added at 11:54 PM ---------- Previous post was at 11:21 PM ----------
vegatr0n said:
Hi, I'm writing this to guide those who faced - and will face similar situation in the future - the problem of being stuck on the fastboot screen, where the recovery or booting in EDL is not available.
So, after failing to get root after upgrading to android 10 I was fiddling with TWRP to try to get it to recognize my storage so I can reflash it and flash Magisk, but I couldn't get it to mount the storage, so my stupid brain decided to go to the wipe page and wiped everything in the hope it might magically work!! well.. it didn't!! and I got stuck in the fastboot screen and I thought that I bricked my phone for good.
after hours of searching online and trying everything nothing helped... but finally I managed to fix it.
and btw when I tried to flash TWRP by (fasboot boot twrp.img) I got the following message:
"remote: Failed to load/authenticate boot image: Load Error"
So here is what I did to get my phone working again:
Download and install Tool All in One
Download Fastboot ROM for your phone from here
In the Tool All in One app click on the Flash Factory Images button.
Select the ROM and let it do its work,
hopefully this will work and your device will reboot into a fresh android.
Click to expand...
Click to collapse
I am getting the error
"Erasing 'userdata' OKAY [ 0.243s]
CreateProcess failed: %1 is not a valid Win32 application. (193)
fastboot: error: Cannot generate image for userdata"
I dont know how to proceed with this :crying:
moonbosques said:
I already tried the steps using the tool and downloading the FASTBOOK os file and I get this error
"CreateProcess failed: %1 is not a valid Win32 application. (193)
fastboot: error: Cannot generate image for userdata"
Tried booting the device but boots to OOS recovery always.
---------- Post added at 11:54 PM ---------- Previous post was at 11:21 PM ----------
I am getting the error
"Erasing 'userdata' OKAY [ 0.243s]
CreateProcess failed: %1 is not a valid Win32 application. (193)
fastboot: error: Cannot generate image for userdata"
I dont know how to proceed with this :crying:
Click to expand...
Click to collapse
Sounds like you're having problems with Windows Defender. I also got the same error messages suddenly once week ago. I did sfc /scannow and all that but all files were intact. After rebooting the PC two times the problem was gone, really strange.
Skickat från min GM1913 via Tapatalk
Anyone here know what fastboot rom i can use to fix my bricked tmobile oneplus 7 pro?
Can you explain this strange effect, please
pitrus- said:
Also it's good to know that the official TWRP of twrp.me does not support Android Q at the moment, that's why you couldn't decrypt and mount the storage. TWRP in Oneplus 7 Pro thread here on XDA does support Q, you just have to remember to boot into the inactive/upgraded slot before booting back to TWRP to flash Magisk as it only installs to the active slot and not the upgraded slot.
Skickat från min GM1913 via Tapatalk
Click to expand...
Click to collapse
After an update to Android Q twrp an root was lost.
I was going the normal way like this:
1. In fastboot boot twrp.img
2. In twrp install twrp.zip
3. Reboot to twrp
4. In twrp install magisk.zip
After this the phone stuck a while on this orange splash screen and then reboot to bootloader.
Reboot --> the same effect
Then:
1. Boot into twrp
2. install twrp.zip
3. Reboot system
Everything ok, but no root
Just one method is working for me:
1. Download the full package of OOS 10.x.x
2. Extract the boot.img
3. Patch boot.img with Magisk
4. Flash on fastboot boot magisk_patched.img
5. reboot
My phone is rooted now but without twrp.
Why can twrp an Magisk not work together?
And why I can´t find any information for this problem on the internet?
Well, since TWRP lives in the boot partition on this phone, you will have to boot TWRP using fastboot boot TWRP. Then you flash the unofficial TWRP build 74 installer zip downloaded from the link below (the one from twrp.me only works on OOS 9 and not 10). Reboot phone back into Magisk to switch slot, flash Magisk installer zip which will then install Magisk to both boot slot a and boot slot b. Reboot phone and you should have both Magisk root and working TWRP.
https://r.tapatalk.com/shareLink/to...2&share_fid=3793&share_type=t&link_source=app
Skickat från min GM1913 via Tapatalk
Fails anyway
Bricked my OnePlus and now I'm left with bootloader (no os, no twrp). Everything leads back to bootloader. Any attempts to apply fastboot boot lead to "Load Error". Now I tried with that tool and ended up with this:
Sending 'odm' (102400 KB) OKAY [ 2.576s]
Writing 'odm' FAILED (remote: '(odb_b) No such partition')
fastboot: error: Command failed
Press any key to exit...
P.S. Full log:
--------------------------------------------
Bootloader Version...:
Baseband Version.....:
Serial Number........: e434a4c8
--------------------------------------------
extracting android-info.txt (0 MB) to RAM...
android-info.txt syntax error: я╗┐require product=msmnile
Setting current slot to 'b' OKAY [ 0.002s]
extracting boot.img (96 MB) to disk... took 0.776s
archive does not contain 'boot.sig'
Sending 'boot_b' (98304 KB) OKAY [ 2.389s]
Writing 'boot_b' OKAY [ 0.406s]
extracting dtbo.img (16 MB) to disk... took 0.151s
archive does not contain 'dtbo.sig'
Sending 'dtbo' (16384 KB) OKAY [ 0.393s]
Writing 'dtbo' OKAY [ 0.047s]
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting vbmeta.img (0 MB) to disk... took 0.001s
archive does not contain 'vbmeta.sig'
Sending 'vbmeta' (8 KB) OKAY [ 0.008s]
Writing 'vbmeta' OKAY [ 0.002s]
archive does not contain 'vbmeta_system.img'
archive does not contain 'super_empty.img'
archive does not contain 'boot_other.img'
extracting odm.img (100 MB) to disk... took 0.395s
archive does not contain 'odm.sig'
Sending 'odm' (102400 KB) OKAY [ 2.576s]
Writing 'odm' FAILED (remote: '(odm_b) No such partition')
fastboot: error: Command failed
Press any key to exit...
I am getting this error, any ideas what is going wrong? (please see attachment)
vegatr0n said:
Hi, I'm writing this to guide those who faced - and will face similar situation in the future - the problem of being stuck on the fastboot screen, where the recovery or booting in EDL is not available.
So, after failing to get root after upgrading to android 10 I was fiddling with TWRP to try to get it to recognize my storage so I can reflash it and flash Magisk, but I couldn't get it to mount the storage, so my stupid brain decided to go to the wipe page and wiped everything in the hope it might magically work!! well.. it didn't!! and I got stuck in the fastboot screen and I thought that I bricked my phone for good.
after hours of searching online and trying everything nothing helped... but finally I managed to fix it.
and btw when I tried to flash TWRP by (fasboot boot twrp.img) I got the following message:
"remote: Failed to load/authenticate boot image: Load Error"
So here is what I did to get my phone working again:
Download and install Tool All in One
Download Fastboot ROM for your phone from here
In the Tool All in One app click on the Flash Factory Images button.
Select the ROM and let it do its work,
hopefully this will work and your device will reboot into a fresh android.
Click to expand...
Click to collapse

Not allowed to flash recovery anymore?

I am trying to flash the LineageOS recovery for LineageOS 18. I have previously already installed LineageOS 17 on my phone with no issues like 2 or 3 weeks ago. However, I am now trying to update to LineageOS 18 and I am now not allowed to flash the new recovery to my phone. Nothing has changed since I was last able to flash a recovery to my phone except I just changed my battery out today (since the old one was faulty), but I doubt that would interfere with the software or firmware, right? I have verified my phone is unlocked, I have verified my ADB and Pixel drivers are all up to date, and I have tried flashing on two computers, Linux and Windows. An additional thing to note that may or may not give you a clue as to what is going on is that I am able to boot into a TWRP img, but it no longer prompts me for a decryption password, and when I go to mount > decrypt and enter my pin, it says the password is incorrect.
You guys got any clue how I can fix this?
EDIT:
Here is my terminal output:
Code:
[[email protected] ~]$ sudo fastboot flash recovery /home/chris/Downloads/lineage-18.1-20210409-microG-coral-recovery.img
[sudo] password for user:
Sending 'recovery' (65536 KB) OKAY [ 1.710s]
Writing 'recovery' FAILED (remote: 'Not allowed to flash (recovery)')
fastboot: error: Command failed
I have to use sudo because it doesnt detect my device when I dont use sudo for some dumbass reason...
Deleted
cray12399 said:
I am trying to flash the LineageOS recovery for LineageOS 18. I have previously already installed LineageOS 17 on my phone with no issues like 2 or 3 weeks ago. However, I am now trying to update to LineageOS 18 and I am now not allowed to flash the new recovery to my phone. Nothing has changed since I was last able to flash a recovery to my phone except I just changed my battery out today (since the old one was faulty), but I doubt that would interfere with the software or firmware, right? I have verified my phone is unlocked, I have verified my ADB and Pixel drivers are all up to date, and I have tried flashing on two computers, Linux and Windows. An additional thing to note that may or may not give you a clue as to what is going on is that I am able to boot into a TWRP img, but it no longer prompts me for a decryption password, and when I go to mount > decrypt and enter my pin, it says the password is incorrect.
You guys got any clue how I can fix this?
EDIT:
Here is my terminal output:
Code:
[[email protected] ~]$ sudo fastboot flash recovery /home/chris/Downloads/lineage-18.1-20210409-microG-coral-recovery.img
[sudo] password for user:
Sending 'recovery' (65536 KB) OKAY [ 1.710s]
Writing 'recovery' FAILED (remote: 'Not allowed to flash (recovery)')
fastboot: error: Command failed
I have to use sudo because it doesnt detect my device when I dont use sudo for some dumbass reason...
Click to expand...
Click to collapse
There is no "recovery" partition anymore, it is in the boot.img. The "recovery" is a virtual partition that doesnt exist as its own partition. Review the steps in LOS 18.1 and it points out to flash the boot.img, then reboot to recovery once you have flashed boot.img and rebooted
Reboot to bootloader
Flash the provided boot.img to both slots (fastboot flash --slot all boot boot.img)
Reboot into recovery and factory reset for initial install
Sideload the latest build of Lineage OS (adb sideload lineage.zip)
I will also note that you seem to be using the MicroG (no GAPPs) version so I dont know if the steps are different than official LOS, but I dont think so. I would follow the dev steps to the T and not try older methods (I did the same thing I am warning against), I used my old and trusty, time tested steps, that always worked in previous devices, but do not anymore on Pixels.
It sounds like whatever happened broke your decryption of /data (but its a guess without knowing more). You might be stuck and need to format /data, or you can try to sideload the update and see if it works. Without enough info, I am guessing so provide more info and we can try to help better.
Also to note, if you use the boot.img / sideload method, you do not need TWRP, nor to mount anything. Its all done from the "native recovery" provided by LOS but you might have screwed up the/data decryption, IDK.
If this were me, and in your shoes, I would restore a FULL FACTORY image (not an OTA) with the -W left intact on BOTH slots so it rewrites my partition layout and undoes whatever funkiness' happened. You would lose everything, but it would get you back into working shape.
If you do not want to start over (and I dont disagree, it sucks), then follow the TWRP forum for coral (PX4):
TWRP Coral [Official]
[RECOVERY] TWRP 3.5.0_10-0 - TeamWin Recovery Project [/B] Introduction: Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP...
forum.xda-developers.com
GROOVYJOSHCLARK said:
There is no "recovery" partition anymore, it is in the boot.img. The "recovery" is a virtual partition that doesnt exist as its own partition. Review the steps in LOS 18.1 and it points out to flash the boot.img, then reboot to recovery once you have flashed boot.img and rebooted
Reboot to bootloader
Flash the provided boot.img to both slots (fastboot flash --slot all boot boot.img)
Reboot into recovery and factory reset for initial install
Sideload the latest build of Lineage OS (adb sideload lineage.zip)
I will also note that you seem to be using the MicroG (no GAPPs) version so I dont know if the steps are different than official LOS, but I dont think so. I would follow the dev steps to the T and not try older methods (I did the same thing I am warning against), I used my old and trusty, time tested steps, that always worked in previous devices, but do not anymore on Pixels.
It sounds like whatever happened broke your decryption of /data (but its a guess without knowing more). You might be stuck and need to format /data, or you can try to sideload the update and see if it works. Without enough info, I am guessing so provide more info and we can try to help better.
Also to note, if you use the boot.img / sideload method, you do not need TWRP, nor to mount anything. Its all done from the "native recovery" provided by LOS but you might have screwed up the/data decryption, IDK.
If this were me, and in your shoes, I would restore a FULL FACTORY image (not an OTA) with the -W left intact on BOTH slots so it rewrites my partition layout and undoes whatever funkiness' happened. You would lose everything, but it would get you back into working shape.
If you do not want to start over (and I dont disagree, it sucks), then follow the TWRP forum for coral (PX4):
TWRP Coral [Official]
[RECOVERY] TWRP 3.5.0_10-0 - TeamWin Recovery Project [/B] Introduction: Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP...
forum.xda-developers.com
Click to expand...
Click to collapse
Where are you getting the boot.img for lineage? I don't see one anywhere. All I've seen is recovery.img as me the rom zip.
Thanks in advance Josh.
flash713 said:
Where are you getting the boot.img for lineage? I don't see one anywhere. All I've seen is recovery.img as me the rom zip.
Thanks in advance Josh.
Click to expand...
Click to collapse
If using the official, it's provided in the download section. If not, and it's unofficial, then usually the devs of that ROM provide it. If that's not being done by the devs of the version you are using, then you need to use python and dumper script. It uses python and script (dumper) to pull out the boot.img from the payload.bin (within the zip).
Just keep in mind that I do not use the MicroG version so it's possible the steps vary but I doubt it. What I stated above is usually the method for custom, LOS, even official firmware versions to pull out the boot.img.
Send me the link to download what you're using to try and reproduce it so I can advise better (ROM/recovery/ETC).

One partition is dead.

I have pixel 4 xl in stock rom.
No matter what i do one partition stays corrupted.
I have flashed rom on partition A with wiping out whole device hoping it would restore but partition B was still corrupted. So i change partition in fastboot mode and tried to flash stock rom with flash all.sh without any kind of modification Hoping it would fix it and device booted but while doing so it corrupted partition A. Than i tried using googles online flashing tool with wiping my device but still experienced same issue. Anyone have any idea what might have gone wrong or how to restore both partition.
I can not use magisk update on inactive partition because i dont see that option, maybe because of this I'm also unable to use viper4android for some reason. Please if anyone have same issue or had same issue let me know how to solve it
Scytherblack said:
I have pixel 4 xl in stock rom.
No matter what i do one partition stays corrupted.
I have flashed rom on partition A with wiping out whole device hoping it would restore but partition B was still corrupted. So i change partition in fastboot mode and tried to flash stock rom with flash all.sh without any kind of modification Hoping it would fix it and device booted but while doing so it corrupted partition A. Than i tried using googles online flashing tool with wiping my device but still experienced same issue. Anyone have any idea what might have gone wrong or how to restore both partition.
I can not use magisk update on inactive partition because i dont see that option, maybe because of this I'm also unable to use viper4android for some reason. Please if anyone have same issue or had same issue let me know how to solve it
Click to expand...
Click to collapse
Without cat logs, errors, pics, or system clarity on what was done to the partitions to land you here, we cant really help. I suspect tho, you may have tried Android 12 preview, and you are stuck now?
If not, and 12 wasnt used, explain what's been done and how you feel the partition is broken.
GROOVYJOSHCLARK said:
Without cat logs, errors, pics, or system clarity on what was done to the partitions to land you here, we cant really help. I suspect tho, you may have tried Android 12 preview, and you are stuck now?
If not, and 12 wasnt used, explain what's been done and how you feel the partition is broken
Click to expand...
Click to collapse
GROOVYJOSHCLARK said:
Without cat logs, errors, pics, or system clarity on what was done to the partitions to land you here, we cant really help. I suspect tho, you may have tried Android 12 preview, and you are stuck now?
If not, and 12 wasnt used, explain what's been done and how you feel the partition is broken.
Click to expand...
Click to collapse
I was not using any other rom but i was trying to install twrp recovery by first booting into it, first thing i noticed was i couldn't decrypt my phone even though i put the right password, so i went back to bootloader and tried to flash stock boot img to see if i could get into twrp but same thing happened so i thought let me change to boot partition and try, but it wasn't even booting into partition B it shows me google logo and than boot back to bootloader and than no matter what i restart or power off it goes straight back to bootloader, unless i change back to partition A.
So i left twrp behind thinking i can still flash whatever i like using commands but to repair partition B i used command "fastboot --set-active=b" and than i flashed latest og stock file with flash-all.bat.
And phone booted into partition B but just to make sure i rebooted back to bootloader and tried changing partition again to A using "fastboot --set-active=a" and it booted into google logo and went back to bootloader and stuck.
So as you can see doen here i dont see option of updating using inactive partition,
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
So please let me know what logs so i can provide em here.
Thanks
Scytherblack said:
I was not using any other rom but i was trying to install twrp recovery by first booting into it, first thing i noticed was i couldn't decrypt my phone even though i put the right password, so i went back to bootloader and tried to flash stock boot img to see if i could get into twrp but same thing happened so i thought let me change to boot partition and try, but it wasn't even booting into partition B it shows me google logo and than boot back to bootloader and than no matter what i restart or power off it goes straight back to bootloader, unless i change back to partition A.
So i left twrp behind thinking i can still flash whatever i like using commands but to repair partition B i used command "fastboot --set-active=b" and than i flashed latest og stock file with flash-all.bat.
And phone booted into partition B but just to make sure i rebooted back to bootloader and tried changing partition again to A using "fastboot --set-active=a" and it booted into google logo and went back to bootloader and stuck.
So as you can see doen here i dont see option of updating using inactive partition, View attachment 5298203
So please let me know what logs so i can provide em here.
Thanks
Click to expand...
Click to collapse
Wait, back up, what are you trying to do now? Install MAGISK, or fix the partitions?
You noted the partition and slot issues, but then went into MAGISK. You do not need to select anything in MAGISK for boot or slots, you simply need to patch the boot.img (in the pic you posted), then patch the boot.img with magisk, then:
fastboot flash boot magisk_patched.img --> (whatever is saved to your download folder) FROM MAGISK app patching it.
You must use the patched boot.img (now renamed with MAGISK and the string it adds) and fastboot it, then boot normally and you are ROOT'd. Do not mess with slots when doing this process, just use the command I laid out once you patch it. MAGISK patching isnt the same as installing GAPPs and a ROM, you do not switch slots to install.
This is all assuming you are only trying to ROOT the device and not fix your issues with the partitions. If you want to fix the partition layout, use the flash-all with the -W left intact on both slots (I force it to reboot after it erases userdata), then boot into fastboot and change to slot B (first flash-all was done to slot A). Afterwards both slots are refreshed and you can go for it. Back EVETYTHING up first as you will lose everything but it will get you back in shape.
Dont bother installing TWRP, but I dont think its ready for 11 yet anyways (decryption) but I havent used TWRP in months. Fastboot it instead of installing it:
fastboot boot twrp-BLAHBLAHBLAH.img
GROOVYJOSHCLARK said:
Wait, back up, what are you trying to do now? Install MAGISK, or fix the partitions?
You noted the partition and slot issues, but then went into MAGISK. You do not need to select anything in MAGISK for boot or slots, you simply need to patch the boot.img (in the pic you posted), then patch the boot.img with magisk, then:
fastboot flash boot magisk_patched.img --> (whatever is saved to your download folder) FROM MAGISK app patching it.
You must use the patched boot.img (now renamed with MAGISK and the string it adds) and fastboot it, then boot normally and you are ROOT'd. Do not mess with slots when doing this process, just use the command I laid out once you patch it.
This is all assuming you are only trying to ROOT the device and not fix your issues with the partitions. If you want to fix the partition layout, use the flash-all with the -W left intact on both slots (I force it to reboot after it erases userdata), then boot into fasttboot and change to slot B (first flash-all was done to slot A). Afterwardss both slots are refreshed and you can go for it. BackEVETYTHING up first as you will lsoe everything but it iwll get you back in shape.
Dont bother installing TWRP, but I dont think its ready for 11 yet anyways (decryption) but I havent used TWRP in months. Fastboot it instead of installing it:
fastboot boot twrp-BLAHBLAHBLAH.img
Click to expand...
Click to collapse
I'm trying to fix my partition, but i show magisk because before this partition problem i had third method for monthly patch update for os NAMED INSTALL IN INACTIVE BOOT SLOT which have disappeared from my magisk
Scytherblack said:
I'm trying to fix my partition, but i show magisk because before this partition problem i had third method for monthly patch update for os NAMED INSTALL IN INACTIVE BOOT SLOT which have disappeared from my magisk
Click to expand...
Click to collapse
you are way past that now, when you flashed the boot.img manually from stock, you overwrote MAGISK TWRP and anything else you had in the boot partition. Patch the boot.img for your ROM (MAGISK), then fastboot it. Its the only way to get ROOT back with what you have done.
You F'd up the A partition when you tried to install TWRP, failed, then overwrote the boot partition manually.
To fix the partitions now, force SLOT A, factory firmware with -W left, then after A completes when erasing USERDATA, interrupt the boot (before SLOT A goes into OS), and switch to slot B, and redo.
GROOVYJOSHCLARK said:
Wait, back up, what are you trying to do now? Install MAGISK, or fix the partitions?
You noted the partition and slot issues, but then went into MAGISK. You do not need to select anything in MAGISK for boot or slots, you simply need to patch the boot.img (in the pic you posted), then patch the boot.img with magisk, then:
fastboot flash boot magisk_patched.img --> (whatever is saved to your download folder) FROM MAGISK app patching it.
You must use the patched boot.img (now renamed with MAGISK and the string it adds) and fastboot it, then boot normally and you are ROOT'd. Do not mess with slots when doing this process, just use the command I laid out once you patch it. MAGISK patching isnt the same as installing GAPPs and a ROM, you do not switch slots to install.
This is all assuming you are only trying to ROOT the device and not fix your issues with the partitions. If you want to fix the partition layout, use the flash-all with the -W left intact on both slots (I force it to reboot after it erases userdata), then boot into fastboot and change to slot B (first flash-all was done to slot A). Afterwards both slots are refreshed and you can go for it. Back EVETYTHING up first as you will lose everything but it will get you back in shape.
Dont bother installing TWRP, but I dont think its ready for 11 yet anyways (decryption) but I havent used TWRP in months. Fastboot it instead of installing it:
fastboot boot twrp-BLAHBLAHBLAH.img
Click to expand...
Click to collapse
I've been rooting my devices for 4-5 years amd been using magisk for last 3 years at least i remember how to do that but i just put magisk as example to show that there's something wrong with my boot partitions
GROOVYJOSHCLARK said:
you are way past that now, when you flashed the boot.img manually from stock, you overwrote MAGISK TWRP and anything else you had in the boot partition. Patch the boot.img for your ROM, then fastboot it. Its the only way to get ROOT back with what you have done.
Click to expand...
Click to collapse
So there is no way to get both of my partition back up and running??
Because now what happens is i cant update my phone with built in system update like normal phone, my phone always download the whole file of update like 2 GB instead of just the patch of few MBs.
Scytherblack said:
I've been rooting my devices for 4-5 years amd been using magisk for last 3 years at least i remember how to do that but i just put magisk as example to show that there's something wrong with my boot partitions
Click to expand...
Click to collapse
I am telling you exactly what happened and how to fix it, its not about how long anyone has been rooting anything. Pixels use A/B, so its much different than ever before. There is no recovery partition anymore, it now lives in the BOOT.
Redo the factory firmware on BOTH slots, and start over. Then you will be golden.
Scytherblack said:
So there is no way to get both of my partition back up and running??
Because now what happens is i cant update my phone with built in system update like normal phone, my phone always download the whole file of update like 2 GB instead of just the patch of few MBs.
Click to expand...
Click to collapse
No idea, because I have no idea what you truly did. I would redo both partitions, you mis-stepped with the manual flashing of the boot.img during the TWRP process so I have no idea how damaged it is now.
I also have no idea what ROM you are using, or if official, or even what internal updater you are using so its lacking info.
GROOVYJOSHCLARK said:
I am telling you exactly what happened and how to fix it, its not about how long anyone has been rooting anything. Pixels use A/B, so its much different than ever before. There is no recovery partition anymore, it now lives in the BOOT.
Redo the factory firmware on BOTH slots, and start over. Then you will be golden.
Click to expand...
Click to collapse
I have tried that in past so here's what i have tried to fix step by step.
1. I downloaded the latest Android 11 factory images from google developer site, unzip, connected my phone copied adb files to unzipped factory images and than used flash-all.bat
2.it flashed it on active slot A, since everything was wiped clean i had to boot device and enable developer options for adb support than rebooted back to bootloader.
3. Used command fastboot --set-active=B to change the boot slot and than install the factory images.
4. Booted enable developer options and rebooted back to bootloader to see if both boot A/B works and used command fastboot --set-active=A. tried to reboot it went to google logo for once and back to bootloader. Now whatever i do reboot or power off when it turns on it goes back to bootloader unless i switched back to Boot slot B
Now if i flash everything again on slot A it will work just fine but after slot A works fine slot B will be bricked or corrupted.
So i was thinking if i could manage to find EDL files for pixel 4 XL it would probably fix everything .
Scytherblack said:
I have tried that in past so here's what i have tried to fix step by step.
1. I downloaded the latest Android 11 factory images from google developer site, unzip, connected my phone copied adb files to unzipped factory images and than used flash-all.bat
2.it flashed it on active slot A, since everything was wiped clean i had to boot device and enable developer options for adb support than rebooted back to bootloader.
3. Used command fastboot --set-active=B to change the boot slot and than install the factory images.
4. Booted enable developer options and rebooted back to bootloader to see if both boot A/B works and used command fastboot --set-active=A. tried to reboot it went to google logo for once and back to bootloader. Now whatever i do reboot or power off when it turns on it goes back to bootloader unless i switched back to Boot slot B
Now if i flash everything again on slot A it will work just fine but after slot A works fine slot B will be bricked or corrupted.
So i was thinking if i could manage to find EDL files for pixel 4 XL it would probably fix everything .
Click to expand...
Click to collapse
Thats not how I laid it out. You are booting BEFORE doing slot B so its not repairing it to factory.
Why Emergency Download Mode? You replace the fastboot and all files needed to run and boot Android WITH the factory image. You do not need EDL, you are overthinking this a lot.
ALL you need to do is to successfully flash the FACTORY firmware with -W on BOTH slots before booting and its back to factory fresh. Do not use the web (chrome) version at all, that wont work to fix your issue, and do not use an OTA. ONLY use the factory firmware and reset both slots BEFORE the OS. Once slot B completes, let it boot, go through the OS, then prepare it for a ROM, or use ROOT with the stock OS.
Enabling ADB in dev options ONLY enables you to use ADB from a PC. You do NOT need to enable ADB in dev options to flash a firmware/TWRP/ROM.
Everything changed with A/B partitions, so a lot is different than how it used to be.
GROOVYJOSHCLARK said:
Thats not how I laid it out. You are booting BEFORE doing slot B so its not repairing it to factory.
Why Emergency Download Mode? You replace the fastboot and all files needed to run and boot Android WITH the factory image. You do not need EDL, you are overthinking this a lot.
ALL you need to do is to successfully flash the FACTORY firmware with -W on BOTH slots before booting and its back to factory fresh. Do not use the web (chrome) version at all, that wont work to fix your issue, and do not use an OTA. ONLY use the factory firmware and reset both slots BEFORE the OS. Once slot B completes, let it boot, go through the OS, then prepare it for a ROM, or use ROOT with the stock OS.
Enabling ADB in dev options ONLY enables you to use ADB from a PC. You do NOT need to enable ADB in dev options to flash a firmware/TWRP/ROM.
Everything changed with A/B partitions, so a lot is different than how it used to be.
Click to expand...
Click to collapse
Okay I'll try this Tonight thank you, I'll post the result
Scytherblack said:
Okay I'll try this Tonight thank you, I'll post the result
Click to expand...
Click to collapse
Trust me when I tell you this, I was VERY confused when I first got my Pixel 2XL with A/B (coming from an older HTC 10 that was a single slot). I was so used to having a recovery partition, single slot, and system (not system-less), that I knew all the ins and outs of Android, writing code / ROMs, ROOT, ETC., so I could advise from memory.
When A/B came along, I didn't have it until my 2XL, then 3XL, and now my 4XL so I had to learn it.
At first, I kept screwing up the device (almost exactly the scenario you are in). 1 slot worked, the other slot was F'd. It wasn't until I figured out how they actually worked, then it all made sense and why I kept damaging one or the other (or both slots). The slots are great for updates, but terrible for ROM development, and firmware flashing due to issues like this. It is no longer a simple, easy peasy process that is once was, BUT there is a light at the end of tunnel. Once you familiarize yourself with the A/B partitions, and how to recover from mistakes, or failed updates, or ROM install issues, you will become an Android A/B genius. It will make sense the more you use it, but there is a decent amount of changes to re-learn if/when coming from an older device so don't give up. You can recover from this with a factory firmware (assuming BOOTLOADER is truly unlocked which it sounds like it is), so keep at it.
I have had my 2XL and 4XL so bad, it wouldn't boot at times, but eventually you will figure it out and fix it. Factory images are a saving grace, they will undo the damage. My 3 XL is a verizon piece of junk (LOCKED BOOTLOADER) so it doesnt get used and sits brand new in the box waiting to be off lease and sold for the garbage it is. My 2XL/4XL were both bought outright from Google, my 3XL was a lease package my wife needed to sign up her daughter so I got a free 3XL I dont use (and wont use). I REFUSE to use anything from verizon with a locked BL. Its the main reason for Android, so why cripple it? F verizon, I hate them!
GROOVYJOSHCLARK said:
Trust me when I tell you this, I was VERY confused when I first got my Pixel 2XL with A/B (coming from an older HTC 10 that was a single slot). I was so used to having a recovery partition, single slot, and system (not system-less), that I knew all the ins and outs of Android, writing code / ROMs, ROOT, ETC., so I could advise from memory.
When A/B came along, I didn't have it until my 2XL, then 3XL, and now my 4XL so I had to learn it.
At first, I kept screwing up the device (almost exactly the scenario you are in). 1 slot worked, the other slot was F'd. It wasn't until I figured out how they actually worked, then it all made sense and why I kept damaging one or the other (or both slots). The slots are great for updates, but terrible for ROM development, and firmware flashing due to issues like this. It is no longer a simple, easy peasy process that is once was, BUT there is a light at the end of tunnel. Once you familiarize yourself with the A/B partitions, and how to recover from mistakes, or failed updates, or ROM install issues, you will become an Android A/B genius. It will make sense the more you use it, but there is a decent amount of changes to re-learn if/when coming from an older device so don't give up. You can recover from this with a factory firmware (assuming BOOTLOADER is truly unlocked which it sounds like it is), so keep at it.
I have had my 2XL and 4XL so bad, it wouldn't boot at times, but eventually you will figure it out and fix it. Factory images are a saving grace, they will undo the damage. My 3 XL is a verizon piece of junk (LOCKED BOOTLOADER) so it doesnt get used and sits brand new in the box waiting to be off lease and sold for the garbage it is. My 2XL/4XL were both bought outright from Google, my 3XL was a lease package my wife needed to sign up her daughter so I got a free 3XL I dont use (and wont use). I REFUSE to use anything from verizon with a locked BL. Its the main reason for Android, so why cripple it? F verizon, I hate them!
Click to expand...
Click to collapse
i got error saying failed! partition should be flash in fastbootd
and now my phone is stuck on bootloop
Scytherblack said:
i got error saying failed! partition should be flash in fastbootd
and now my phone is stuck on bootloop
Click to expand...
Click to collapse
Again, we need more info. You did something wrong because it automatically reboots into fastboot during the process to update the firmware.
We need to find out why it didn't it reboot into fastboot so if you prevented that from happening, don't. Start over and let it go through the process. The batch file automatically reboots to fastboot during the system image push (so if it didnt do that), then its your reason for the boot failure.
GROOVYJOSHCLARK said:
Again, we need more info. You did something wrong because it automatically reboots into fastboot during the process to update the firmware.
We need to find out why it didn't it reboot into fastboot so if you prevented that from happening, but don't. Start over and let it go through the process.
Click to expand...
Click to collapse
Update i did manage to get it all installed without me interfering. But still the same issue only one partition works.
And you did both slots A/B with the firmware? Can you confirm you are on the absolute latest ADB and drivers? Also run this command to see if you are stuck in a snapshot update and cant write:
fastboot snapshot-update cancel
Then try to redo the slot thats failing. I have had something like this happen a long time ago but not quite the same. It was due to the snapshot. I cant remember if this needs to be run after switching slots so try it, and if it doesnt do anything, then switch to A, run it, switch to B, and run it, then try the firmware over again on the failed slot.
target reported max download size of 268435456 bytes
sending 'bootloader_a' (8833 KB)...
OKAY [ 0.327s]
writing 'bootloader_a'...
(bootloader) Flashing Pack version c2f2-0.3-7062597
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition table for Lun = 1
(bootloader) Flashing partition table for Lun = 2
(bootloader) Flashing partition table for Lun = 4
(bootloader) Flashing partition table for Lun = 5
(bootloader) Flashing partition xbl_a
(bootloader) Flashing partition xbl_config_a
(bootloader) Flashing partition aop_a
(bootloader) Flashing partition tz_a
(bootloader) Flashing partition hyp_a
(bootloader) Flashing partition abl_a
(bootloader) Flashing partition keymaster_a
(bootloader) Flashing partition devcfg_a
(bootloader) Flashing partition qupfw_a
(bootloader) Flashing partition uefisecapp_a
(bootloader) Flashing partition msadp_a
(bootloader) Flashing partition logfs
OKAY [ 0.269s]
finished. total time: 0.597s
rebooting into bootloader...
OKAY [ 0.070s]
finished. total time: 0.071s
target reported max download size of 268435456 bytes
sending 'radio_a' (82708 KB)...
OKAY [ 2.127s]
writing 'radio_a'...
(bootloader) Flashing Pack version SSD:g8150-00082-210106-B-7065218
(bootloader) Flashing partition modem_a
OKAY [ 0.487s]
finished. total time: 2.617s
rebooting into bootloader...
OKAY [ 0.070s]
finished. total time: 0.071s
extracting android-info.txt (0 MB) to RAM...
extracting boot.img (64 MB) to disk... took 0.396s
target reported max download size of 268435456 bytes
archive does not contain 'boot.sig'
archive does not contain 'boot_other.img'
extracting dtbo.img (8 MB) to disk... took 0.040s
archive does not contain 'dtbo.sig'
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting system.img (782 MB) to disk... took 8.684s
archive does not contain 'system.sig'
extracting system_other.img (23 MB) to disk... took 0.162s
archive does not contain 'system.sig'
extracting vbmeta.img (0 MB) to disk... took 0.006s
archive does not contain 'vbmeta.sig'
extracting vendor.img (730 MB) to disk... took 7.530s
archive does not contain 'vendor.sig'
archive does not contain 'vendor_other.img'
wiping userdata...
Erase successful, but not automatically formatting.
File system type raw not supported.
--------------------------------------------
Bootloader Version...: c2f2-0.3-7062597
Baseband Version.....: g8150-00082-210106-B-7065218
Serial Number........: 9A231xxxxxxxxxx
--------------------------------------------
checking product...
OKAY [ 0.070s]
checking version-bootloader...
OKAY [ 0.069s]
checking version-baseband...
OKAY [ 0.069s]
sending 'boot_a' (65536 KB)...
OKAY [ 1.549s]
writing 'boot_a'...
OKAY [ 0.336s]
sending 'dtbo_a' (8192 KB)...
OKAY [ 0.292s]
writing 'dtbo_a'...
OKAY [ 0.107s]
sending sparse 'system_a' 1/4 (262140 KB)...
OKAY [ 5.982s]
writing 'system_a' 1/4...
FAILED (remote: Partition should be flashed in fastbootd)
finished. total time: 8.839s
this is what i get when i tried to install factory images using flash-all.bat
GROOVYJOSHCLARK said:
And you did both slots A/B with the firmware? Can you confirm you are on the absolute latest ADB and drivers? Also run this command to see if you are stuck in a snapshot update and cant write:
fastboot snapshot-update cancel
Then try to redo the slot thats failing. I have had something like this happen a long time ago but not quite the same. It was due to the snapshot. I cant remember if this needs to be run after switching slots so try it, and if it doesnt do anything, then switch to A, run it, switch to B, and run it, then try the firmware over again on the failed slot.
Click to expand...
Click to collapse
fastboot: usage: unknown command snapshot-update this is what i got for snap shot

How To Guide How to manually switch the active slot

How to manually switch the active slot
Switching the active slot on phones with A/B slots is normally only used by the updater to install a new OS update (see https://source.android.com/docs/core/ota/ab for details)
This functionality can also be quite useful if you have two different operating systems on your phone and want to switch between them without reinstalling.
Since the data on all partitions that do not belong to the A/B partitions is used by both operating systems (the one in slot A and the one in slot B), this functionality is limited by the installed operating systems.
The data in most partitions that are only present once should be usable for all operating systems (see here), but this does not apply to the data in the partition that is mounted to /data.
Switching the active slot does work if the OS (including the OS version) installed in slot A and B are equal. It does work most of the time if the OS installed in slot A and B are equal but with different OS versions.
And it should work if the OS installed in slot A and slot B use different directories in /data, e.g. in slot A is a Android based OS installed and in slot B a not on Android based OS (like for example pocketMarketOS)
It does not work (most of the times) if there are different Android distributions in slot A and B: e.g. I did not get it to work if the OS in slot A is the original Android 12 from ASUS and the OS in slot B is OmniROM 12.
(Probably it would work after removing one or more OS related directories from /data but I do not know which - infos on how to use these OS in parallel are welcome)
The instructions below where done on an ASUS Zenfone 8 but I believe they should work with other phones with A/B slots also.
Please note that you should have a working TWRP image for your phone on hand to restore the active slot in case of boot problems.
To get the current slot while the OS is running use the shell command getprop, e.g. execute in a shell on the phone or in an adb shell:
Code:
[email protected]_I006D:/ # getprop ro.boot.slot_suffix
_a
[email protected]_I006D:/ #
To get the active slot in fastboot mode or while the phone is booted into the bootloader execute on the PC connected to the phone:
Code:
sudo fastboot getvar current-slot
There are various methods to manual switch the active slot:
1. Switching the slot using fastboot
Switching the slot via fastboot works if TWRP is installed in the boot partition.
To use it connect the phone to an USB port of the PC and issue these commands on the PC:
Bash:
# boot the phone into fastboot either if in the bootloader
#
sudo fastboot reboot fastboot
#
# or if the phone is booteind into the recovery or in the normal mode
#
adb reboot fastboot
# wait until the phone is booted in fastboot mode
# get the current slot
#
sudo fastboot getvar current-slot
# change the current slot
#
sudo fastboot set_active b
# check the result
#
sudo fastboot getvar current-slot
# reboot the phone from new current-slot
#
sudo fastboot reboot
Example:
Code:
[email protected] /data/develop/android/scripts_on_linux]$ sudo fastboot reboot
Rebooting OKAY [ 0.000s]
Finished. Total time: 0.201s
[[email protected] /data/develop/android/scripts_on_linux]$ adb reboot fastboot
[[email protected] /data/develop/android/scripts_on_linux]$ sudo fastboot getvar current-slot
current-slot: a
Finished. Total time: 0.001s
[[email protected] /data/develop/android/scripts_on_linux]$
[[email protected] /data/develop/android/scripts_on_linux]$ sudo fastboot set_active b
Setting current slot to 'b' OKAY [ 0.042s]
Finished. Total time: 0.043s
[[email protected] /data/develop/android/scripts_on_linux]$
[[email protected] /data/develop/android/scripts_on_linux]$
[[email protected] /data/develop/android/scripts_on_linux]$ sudo fastboot getvar current-slot
current-slot: b
Finished. Total time: 0.000s
[[email protected] /data/develop/android/scripts_on_linux]$
[[email protected] /data/develop/android/scripts_on_linux]$ sudo fastboot reboot
Rebooting OKAY [ 0.000s]
Finished. Total time: 0.251s
# check the result
#
[[email protected] /data/develop/android/scripts_on_linux]$ adb shell getprop ro.boot.slot_suffix
_b
[[email protected] /data/develop/android/scripts_on_linux]$
Notes:
Switching the active slot in fastboot mode does not work if the boot image from the original Android 12 from ASUS or from the OmniROM is installed:
Code:
[[email protected] /data/develop/android/scripts_on_linux]$ sudo fastboot set_active b
Setting current slot to 'b' FAILED (remote: 'Unable to set slot')
fastboot: error: Command failed
[[email protected] /data/develop/android/scripts_on_linux]$
The same is true it the phone is booted into the bootloader:
Code:
[ OmniRomDev - [email protected] /data/develop/android/test ] $ sudo fastboot --set-active=a
Setting current slot to 'a' FAILED (remote: 'Slot Change is not allowed in Lock State')
fastboot: error: Command failed
[ OmniRomDev - [email protected] /data/develop/android/test ] $
Be aware that changing the lock state via
Code:
fastboot flashing lock|unlock
will do a factory reset.
2. Switching the slot using TWRP
The active slot for the next reboot can also be changed in the reboot dialog from TWRP.
This can also be done if the phone is booted from the TWRP image.
Note:
This is the fallback to get the phone booting again in case the reboot of the other slot fails for whatever reason.
3. Switching the Slot via Magisk
The active slot can also be changed in the Magisk App. This is used to update the boot partition after an OTA (see here https://topjohnwu.github.io/Magisk/ota.html for details) but can also be used to manual change the active slot.
Open the Magisk App and choose the "install" button to install Magisk into the boot partition. In the next dialog use the method "Install to inactive Slot (After OTA)".
This works also if no update (OTA) was installed and it does not change the Magisk config - it just replaces the Magisk files in the inactive boot partition and activates the inactive boot partition. To reboot the phone then from the now active partition press the "Reboot" button after the update of the boot partition by Magisk is done.
This only works if the OS in both slots is supported by Magisk, of course.
4. Using the binary bootctl
There is binary called bootctl that can be used to switch the active slot. The source code of bootctl is part of the source for the Android OS but as far as I know the binary is not compiled by default and therefor also not installed on the phone.
But there is Magisk module to install the bootctl binary; that Magisk Module can be downloaded from here:
https://github.com/roihershberg/bootctl-binary
Unfortunately the current version of the Magisk Module with bootctl does not install and work out of the box on Android 12 or OmniROM 12 for the ASUS Zenfone 8. Therefor I created a corrected version of the Magisk Module.
The corrected Magisk Module can be downloaded here:
https://bnsmb.de/files/public/Android/bootctl-binary-v2.1.1.zip
The Changelog for the corrected Magisk module for bootctl is:
Update 21.09.2022 /bs
- changed the max. API version in customize.sh to 32 so that the module can be installed in Android 12
- renamed the binary to bootctl.bin
- added the wrapper script bootctl to start bootctl because the directory /vendor/lib64 with the necessary libraries for the binary is not in the default library path in Android 12
Click to expand...
Click to collapse
bootctl must be executed by the root user in a shell on the phone or in an adb shell.
To change the active slot with bootctl use
Code:
bootctl set-active-boot-slot SLOT
SLOT is either 0 (for slot A) or 1 (for slot B); the next reboot will then boot from that slot.
To get the active booted slot with bootctl use
Code:
bootctl get-current-slot
Notes:
The usage help for bootctl is:
Code:
[email protected]_I006D:# bootctl -h
./bootctl - command-line wrapper for the boot HAL.
Usage:
./bootctl COMMAND
Commands:
hal-info - Show info about boot_control HAL used.
get-number-slots - Prints number of slots.
get-current-slot - Prints currently running SLOT.
mark-boot-successful - Mark current slot as GOOD.
get-active-boot-slot - Prints the SLOT to load on next boot.
set-active-boot-slot SLOT - On next boot, load and execute SLOT.
set-slot-as-unbootable SLOT - Mark SLOT as invalid.
is-slot-bootable SLOT - Returns 0 only if SLOT is bootable.
is-slot-marked-successful SLOT - Returns 0 only if SLOT is marked GOOD.
get-suffix SLOT - Prints suffix for SLOT.
set-snapshot-merge-status STAT - Sets whether a snapshot-merge of any dynamic
partition is in progress. Valid STAT values
are: none, unknown, snapshotted, merging,
or cancelled.
get-snapshot-merge-status - Prints the current snapshot-merge status.
SLOT parameter is the zero-based slot-number.
The source code for bootctl is here:
https://android.googlesource.com/platform/system/extras/+/master/bootctl/bootctl.cpp
https://android.googlesource.com/pl...ware/+/master/include/hardware/boot_control.h
There is also a simple app to change the active slot via the bootctl binary: Switch-My-Slot-Android
Note that the app can only be installed after the Magisk Module for bootctl is installed.
Trouble Shooting
If you get an error like this after rebooting from the previously inactive slot
Code:
Cannot load Android System. Your data may be corrupt. if you continue o get this message, you may need to perform a factory data reset and erase all user data storeed on this device
or if the phone boots only in the bootloader after the reboot from the previously inactive slot boot the phone from the TWRP image to activate the previous slot again.
e.g. for the phone ASUS Zenfone 8:
Code:
sudo fastboot boot /data/backup/ASUS_ZENFONE8/twrp/twrp-3.6.1_12-1-I006D.img
Then in TWRP select to reboot the phone and in the dialog to reboot switch the slot back to the previous active slot. You can ignore the error messages printed by TWRP after changing the active slot - just continue rebooting the phone.
Note:
On the ASUS Zenfone 8 press the buttons Up, Down, and Power at the same time for about 10 or more seconds to turn off the phone. Afterwards you can boot into the bootloader.
History
06.11.2022 /bs
The section about changing the slot in fastboot mode was not correct: fastboot mode and bootloader mode are differents states of the phone.
06.11.2022 /bs (2)
Switching the slot in fastboot mode does only work if TWRP is installed in the boot partition
Can i change slot via wifi adb? I'm not root
xaloundros said:
Can i change slot via wifi adb? I'm not root
Click to expand...
Click to collapse
If connecting via Wifi adb you can only change the current slot using a CLI command while the Android OS is running . And as far as I know changing the active slot in an adb session can only be done by the user root.
regards
Bernd
bnsmb said:
If connecting via Wifi adb you can only change the current slot using a CLI command while the Android OS is running . And as far as I know changing the active slot in an adb session can only be done by the user root.
regards
Bernd
Click to expand...
Click to collapse
Thank you for answer, i have problem with my phone and my pc doesn't recognize when is fastboot mode that's I ask if I can change the slot via wifi
xaloundros said:
Thank you for answer, i have problem with my phone and my pc doesn't recognize when is fastboot mode that's I ask if I can change the slot via wifi
Click to expand...
Click to collapse
Hi
just out of curiosity:
so why do you want to change the slot?
I'm assuming you've already done the obvious, like changing the cable or using a different operating system on your PC via LIve CD or something similar to get the USB connection working.
Without root access and without a working USB connection IMHO the only method to change the active slot is to install an OS update.
regards
Bernd
bnsmb said:
Hi
just out of curiosity:
so why do you want to change the slot?
I'm assuming you've already done the obvious, like changing the cable or using a different operating system on your PC via LIve CD or something similar to get the USB connection working.
Without root access and without a working USB connection IMHO the only method to change the active slot is to install an OS update.
regards
Bernd
Click to expand...
Click to collapse
I try everything cable other pc different ports because i have rog 3 but because I was playing around with diag mode i believe that i make damage on Motherboard.
I like to change slot because i was android 11 with Root and TWRP and i make ota update to android 12 and I'm thinking if i change slot maybe i still have root and TWRP installed on inactive slot.
xaloundros said:
I try everything cable other pc different ports because i have rog 3 but because I was playing around with diag mode i believe that i make damage on Motherboard.
I like to change slot because i was android 11 with Root and TWRP and i make ota update to android 12 and I'm thinking if i change slot maybe i still have root and TWRP installed on inactive slot.
Click to expand...
Click to collapse
which recovery is installed in your working slot?
bnsmb said:
which recovery is installed in your working slot?
Click to expand...
Click to collapse
Stock rocovery
xaloundros said:
Stock rocovery
Click to expand...
Click to collapse
then I'm out of ideas here
bnsmb said:
then I'm out of ideas here
Click to expand...
Click to collapse
Thank you for your help
Thanks much.
I softbricked oneplus 8 pro last night after I tried to flash a boot.img patched with Magisk.
I successfully changed the slot to b using
sudo ./fastboot set_active b.
The phone can boot with slot b now but it start from the Hello screen which means I have to set up the phone from scratch. Will it erase everything if I set up the phone again? I am a bit hesitating if I will lose all data.
huangjqiu said:
Thanks much.
I softbricked oneplus 8 pro last night after I tried to flash a boot.img patched with Magisk.
I successfully changed the slot to b using
sudo ./fastboot set_active b.
The phone can boot with slot b now but it start from the Hello screen which means I have to set up the phone from scratch. Will it erase everything if I set up the phone again? I am a bit hesitating if I will lose all data.
Click to expand...
Click to collapse
Will it erase everything if I set up the phone again? I am a bit hesitating if I will lose all data.
Click to expand...
Click to collapse
It shouldn't ... but I recommend to power off the phone, boot the phone from a TWRP recovery image, backup your data and then reboot the Android OS again to finish the config
regards
Bernd
bnsmb said:
It shouldn't ... but I recommend to power off the phone, boot the phone from a TWRP recovery image, backup your data and then reboot the Android OS again to finish the config
regards
Bernd
Click to expand...
Click to collapse
Unfortunately, there is no TWRP recovery image for Oneplus 8 Pro on Android 13. It took me hours to set up the phone and customize it. Luckily most data can be recovered from google backup.
huangjqiu said:
Unfortunately, there is no TWRP recovery image for Oneplus 8 Pro on Android 13. It took me hours to set up the phone and customize it. Luckily most data can be recovered from google backup.
Click to expand...
Click to collapse
Is there a recovery from LineageOS for that phone?
There is also adb support in the recovery from the LineageOS (at least for the Asus Zenfone 8) but it must be enabled manually in the booted Recovery
regards
Bernd
I am not familiar with custom ROMs. I have always been using stock ROM with this phone. Thanks for the suggestion! I will keep that in mind next time when updates go wrong.
bnsmb said:
Is there a recovery from LineageOS for that phone?
There is also adb support in the recovery from the LineageOS (at least for the Asus Zenfone 8) but it must be enabled manually in the booted Recovery
regards
Bernd
Click to expand...
Click to collapse
Stealing the thread a bit here
I moved from MIUI to LOS20 on my Mi mix 4 which uses A/B, after using it for a while some bugs were found (probably due to dirty flashing 2-3 times across the updates). Is there any way to completely format the system partition (wherever that is) so I can install the latest LOS again cleanly? I noticed that by installing without wiping system (which isn't possible on A/b for what I tried) the install isn't clean. Some apps are logged in right after re-install
abcezx said:
Stealing the thread a bit here
I moved from MIUI to LOS20 on my Mi mix 4 which uses A/B, after using it for a while some bugs were found (probably due to dirty flashing 2-3 times across the updates). Is there any way to completely format the system partition (wherever that is) so I can install the latest LOS again cleanly? I noticed that by installing without wiping system (which isn't possible on A/b for what I tried) the install isn't clean. Some apps are logged in right after re-install
Click to expand...
Click to collapse
AFAIK the installation of a new OS image with Android will always overwrite the system partition. The system partition is read-only after the installation so new applications will never be written to the system partition. Instead installed applications are written into directories in the data partition . That's the reason why your application and configuration survives an OS upgrade (the OS upgrade will never touch the files in the data partition)
So to get rid of your applications either deinstall them before installing the new OS or do a factory reset (but be aware that a factory reset will delete ALL applications and user data)
There is an option to do a factory reset in the LineageOS recovery used for the installation of LOS.
IMHO it's recommended to do a factory reset before switching from one OS distribution to another (I assume MIUI is the original Android that is most probably only partially compatible with LOS)
And for the records:
In the latest Android version /system and some other partitions are not physical partitions anymore -- they are now "dynamic" partitions. Dynamic partitions are in the end only logical volumes on one of the physical volumes.
Hope this helps
regards
Bernd
bnsmb said:
AFAIK the installation of a new OS image with Android will always overwrite the system partition. The system partition is read-only after the installation so new applications will never be written to the system partition. Instead installed applications are written into directories in the data partition . That's the reason why your application and configuration survives an OS upgrade (the OS upgrade will never touch the files in the data partition)
So to get rid of your applications either deinstall them before installing the new OS or do a factory reset (but be aware that a factory reset will delete ALL applications and user data)
There is an option to do a factory reset in the LineageOS recovery used for the installation of LOS.
IMHO it's recommended to do a factory reset before switching from one OS distribution to another (I assume MIUI is the original Android that is most probably only partially compatible with LOS)
And for the records:
In the latest Android version /system and some other partitions are not physical partitions anymore -- they are now "dynamic" partitions. Dynamic partitions are in the end only logical volumes on one of the physical volumes.
Hope this helps
regards
Bernd
Click to expand...
Click to collapse
Bernd, you just enlightened me better than my 3-day-self-digging on the interwebz. Thanks a lot!
I did use LOS's factory reset feature right after this reply and while it seemed to have done it (strangely, by some operations on TWRP), it seems like the old problem still occurs: some apps are logged in right after re-install, the bugs associated with them are there as well (little bugs like videos can't play in apps, Gmail not loading chat properly).
This drove me crazy because even after re-flashing stock ROM in Fastboot, wipe internal multiple times, i believe some partition (likely data?) has never been wiped cleanly, leaving the bugs intact after every re-flash, no matter what ROM I picked.
So my question is, is there anyway to make sure I have a clean Flash? Like REALLY clean.
Again, thank you for your reply, while it didn't immediately solve my problem for now, it helped me a lot with understanding this A/B super device thingy.
abcezx said:
Bernd, you just enlightened me better than my 3-day-self-digging on the interwebz. Thanks a lot!
I did use LOS's factory reset feature right after this reply and while it seemed to have done it (strangely, by some operations on TWRP), it seems like the old problem still occurs: some apps are logged in right after re-install, the bugs associated with them are there as well (little bugs like videos can't play in apps, Gmail not loading chat properly).
This drove me crazy because even after re-flashing stock ROM in Fastboot, wipe internal multiple times, i believe some partition (likely data?) has never been wiped cleanly, leaving the bugs intact after every re-flash, no matter what ROM I picked.
So my question is, is there anyway to make sure I have a clean Flash? Like REALLY clean.
Again, thank you for your reply, while it didn't immediately solve my problem for now, it helped me a lot with understanding this A/B super device thingy.
Click to expand...
Click to collapse
Hi
This drove me crazy because even after re-flashing stock ROM in Fastboot, wipe internal multiple times, i believe some partition (likely data?) has never been wiped cleanly, leaving the bugs intact after every re-flash, no matter what ROM I picked.
Click to expand...
Click to collapse
If the errors also occurs if the original ROM is installed it might be a general (Hardware?) problem with the phone.
So my question is, is there anyway to make sure I have a clean Flash? Like REALLY clean.
Click to expand...
Click to collapse
AFAIK a factory reset should delete all apps and user data on all phones. The default partition for all user data and apps is the partition mounted to /data.
To check that the factory reset was done you might boot your phone from the TWRP image connect via adb and check that /data is mounted to the data partition and that there are no files or directories except /data/recovery in /data.
On the other hand nowadays there are a lot of partitions with device specific files on the phones. There should be no user data or apps in these partitions but you newer know.
For the ASUS Zenfone 8 ASUS provides a "raw" image that will overwrite every partition on the phone with the original data but I doubt that this also exists for other phones.
regards
Bernd
bnsmb said:
Hi
If the errors also occurs if the original ROM is installed it might be a general (Hardware?) problem with the phone.
AFAIK a factory reset should delete all apps and user data on all phones. The default partition for all user data and apps is the partition mounted to /data.
To check that the factory reset was done you might boot your phone from the TWRP image connect via adb and check that /data is mounted to the data partition and that there are no files or directories except /data/recovery in /data.
On the other hand nowadays there are a lot of partitions with device specific files on the phones. There should be no user data or apps in these partitions but you newer know.
For the ASUS Zenfone 8 ASUS provides a "raw" image that will overwrite every partition on the phone with the original data but I doubt that this also exists for other phones.
regards
Bernd
Click to expand...
Click to collapse
Thanks again Bernd, I think I might have to check if a factory reset was properly done using the command you mentioned, can you show me how to do that?

Categories

Resources