Before I begin, I am experiencing the same problems on the Github issue: https://github.com/topjohnwu/Magisk/issues/4343 and coming here for further support & starting a new topic on the same issue here.I have successfully applied the Android 12 update fine, no bootloop, no brick, everything is still here with my data intact. Because I am applying a system update and would like to still have root without wiping. I tried to apply the magisk patch thru the boot.img and every time I try to apply the patched boot.img the error "failed to load/verify boot image" pops up and cannot proceed further. A user on the issue said you can use these steps to boot the phone, while this does work, every time the phone reboots the steps must be completed again. Is there any way that I can fix the "failed to load/verify boot image" without wiping everything on the phone & keep everything or do I have to wait for an update? Thank you.
Android 12 introduced Verified Boot 2.0; the error message you are seeing means that Verified Boot has detected a modified boot image. To fix this, you'll have to reflash the vbmeta partition.
Please refer to my guide here.
V0latyle said:
Android 12 introduced Verified Boot 2.0; the error message you are seeing means that Verified Boot has detected a modified boot image. To fix this, you'll have to reflash the vbmeta partition.
Please refer to my guide here.
Click to expand...
Click to collapse
If I reflash the vbmeta partition, would that wipe the entire phone?
Aholicknight said:
If I reflash the vbmeta partition, would that wipe the entire phone?
Click to expand...
Click to collapse
No.
You actually have to be pretty deliberate to wipe the phone, namely using the -w flag when applying an update.
Related
Hello,
I have always been on root but somehow something changed.
Since I tried to flash the newest stable stock (5.0.1), nothing works anymore.
No matter if I flash dm-verity disabler, supersu or magisk, dm-verity gets triggered everytime and my phone just says "decryption unsuccessfull" and won't boot.
I've tried everything to fix this, including: different versions of supersu/magisk, reflashing TWRP recovery, even going completely back to stock, locking the bootloader and everything.
Also I read somewhere that you can flash dm-verity disabler and wipe data to completely remove the encryption, but TWRP showed an error message, something like "failed to wipe, cannot mount /data".
In the end I got stuck with no ROM and I couldn't even access stock recovery anymore because it had the weird password bug, so I had to use the unbrick tool to get it working again.
Can someone tell me what I'm doing wrong?
I have always been on root since the early Nexus 5 days, but now I feel really stupid because I must be missing something obvious, so thank you in advance for any help.
Cheers
What rom are you trying to install and what magisk version are you trying to flash over your preferred rom?
If by chance you are trying to flash OpenBeta 21, I have yet to avoid my data getting encrpyted when trying to flash. And personally, I must have been doing something incorrect ever since I got the phone, because almost every time I've flashed a stock OxygenOS ROM I have triggered encrpytion. In my situation it never seemed to matter if I flashed Magisk, SuperSU, a custom kernel, or even just a modified boot.img along with the disable encryption file... I don't know the steps you're taking, but what I do is this: once I get the "Encryption Unsuccessful" message when trying to boot, I just reboot to fastboot and type "fastboot format userdata". And since flashing stock OxygenOS usually overwrites TWRP with the stock recovery despite my best efforts to avoid it, I tend to go ahead and flash TWRP while I'm booted into fastboot. After, I boot into TWRP; at which point encryption has been removed, yet the total amount of storage available to me is less than 30GB (I have the 128GB model.) You have to go to Wipe, then hit the button on the bottom-right, "Format." Type "yes" in the box and format data. That restores my device back to 111GB free of 113GB. I then transfer over and flash Magisk and whatever other mods I wanted. After that my device is no longer encrypted and works just how I want it to. Hope that helps with your issue.
What rom are you trying to install and what magisk version are you trying to flash over your preferred rom?
Click to expand...
Click to collapse
The newest stock ROM, so this/.
Magisk is also just the newest version (15.3).
go to Wipe, then hit the button on the bottom-right, "Format." Type "yes" in the box and format data.
Click to expand...
Click to collapse
When I tried to do that, it just told me "cannot mount /data" and wipe failed...
kaeptn1 said:
The newest stock ROM, so this/.
Magisk is also just the newest version (15.3).
When I tried to do that, it just told me "cannot mount /data" and wipe failed...
Click to expand...
Click to collapse
If you're not using Blu Spark 8.61 TWRP, then I suggest you install it and try again.
If all else fails, do as @lordcheeto03 suggested and format userdata in fastboot - but note that this will completely wipe your data, including internal storage. Then install TWRP, then flash 5.0.1 and anything else you want.
Sent from my OnePlus3T using XDA Labs
kaeptn1 said:
When I tried to do that, it just told me "cannot mount /data" and wipe failed...
Click to expand...
Click to collapse
If you're getting the encryption unsuccessful error, I don't think you format data in that manner, you gotta use fastboot and fastboot format userdata to remove encryption THEN boot into TWRP to do that.
It all started when I tried to temporarily boot into the TWRP img file. It didn't work so I tried flashing the file to boot_a. Then I installed TWRP through the installer (stupidly didn't wipe the caches) and... Well. When I try to boot into System through TWRP, it gets COMPLETELY stuck at the powered by Android logo screen. No amount or combination of button holding will shut it off and I actually had to let the battery (thank you SO MUCH for non-removable batteries by the way, smartphone manufacturers >_>) drain before it would actually boot again. Rebooting it into Download mode will get it stuck in there too where every time I hold the power button and shut it off, it will just reboot right back into Download mode again. And now, here's probably the worst part. I CAN'T UNLOCK the critical partition to flash when in Download mode, so I can't use the OST tool! When I try to unlock it, it just complains that flashing unlock is not allowed even though the rest of the bootloader is completely unlocked.
TL;DR - When I power the phone up it goes straight into TWRP. Booting to System totally freezes it and the Bootloader puts it in a loop when I try to power it off. Critical partition is locked for some reason. I CAN get around the bootloader loop though and get back to TWRP by switching active slots and rebooting.
Did you flash the TWRP installer to your active boot partition or your inactive one? If you flashed it to the active one, you can't get into system anymore because TWRP is your boot partition.
If you are on Oreo, and you flashed to the inactive slot, and then patched the active slot, you have to reboot into the active slot recovery and flash the Magisk installer to disable verification of the partitions.
If you can get into the bootloader, and you still have the unlock key from nokia, do fastboot flash unlock <unlock.key>, and then fastboot oem unlock_critical. Then you should be able to flash using OST.
THMSP said:
do fastboot flash unlock <unlock.key>, and then fastboot oem unlock_critical. Then you should be able to flash using OST.
Click to expand...
Click to collapse
This unlocked it! Thank you! <3
I also did have an issue with the OST tool complaining that the updater was out of date, but changing the .mlf file and leaving it unpacked when I opened it in OST seemed to make it work perfectly. My phone is now booting just fine and back to stock!
Now I just need to solve the original problem I had. How can I install TWRP to recovery since the img file wouldn't temporarily boot last time?
EDIT: Apparently unlocking the critical partition seemed to solve the problem of the TWRP image file not temporarily booting as well!
S5Guy said:
EDIT: Apparently unlocking the critical partition seemed to solve the problem of the TWRP image file not temporarily booting as well!
Click to expand...
Click to collapse
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
THMSP said:
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
Click to expand...
Click to collapse
Yeah looks like you're right. Letting it update back to Android 9 deleted TWRP and made fastboot boot for TWRP nonfunctional again.
Wait, so can I use that TWRP boot image you specified to boot temporarily to TWRP and then run the installer zip? Or will that not work and I'll have to flash the img directly from the bootloader?
S5Guy said:
Wait, so can I use that TWRP boot image you specified to boot temporarily to TWRP and then run the installer zip? Or will that not work and I'll have to flash the img directly from the bootloader?
Click to expand...
Click to collapse
You have to flash it directly to your boot partition. fastboot boot will work for nothing (and even if it worked those images would just send you directly into the system)
THMSP said:
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
Click to expand...
Click to collapse
Alright! fastboot flash boot_a (TWRP image) worked! Thank you so much for all the help. <333
After an android update i lost my root on my phone. I tried to flash Magisk back with the same patched boot image as i did last time.
fastboot flash boot_a "boot.img"
fastboot flash boot_b "boot.img"
But now It's in a bootloop,
I tried flashing the unpatched boot.img from redfin-rd1a.200810.021.a1-factory-cd18efdf but that didn't help.
Is there a way to solve this without loosing all my data?
fr0sty said:
After a firmware update i lost my root on my phone. I tried to flash Magisk back with the same patched boot image as i did last time.
Click to expand...
Click to collapse
You lost me there, you updated firmware and then tried to use the patched image from the previous version? That's your issue if I'm reading correctly.
You can try
fastboot --set-active=a
iand see if you can at least boot, if so you'll have to extract the new boot image, patch it and see. Every time you update you need to use the new boot image. Sadly, it looks like you patched both A and B..
Edit- you can try flashing over the previous version or reflash the current version. If those all fail, I'm not sure what to suggest and some one with a bit more knowledge maybe can suggest a fix.
Ducter said:
You lost me there, you updated firmware and then tried to use the patched image from the previous version? That's your issue if I'm reading correctly.
You can try
fastboot --set-active=a
iand see if you can at least boot, if so you'll have to extract the new boot image, patch it and see. Every time you update you need to use the new boot image. Sadly, it looks like you patched both A and B..
Click to expand...
Click to collapse
Used the wrong words, Android 11 prompted me with an update, it was 1.7Gb. After that magisk was gone. So i booted into fastboot and flashed the patched magisk boot image again. The one i used for installing it the first time.
But magisk was updated in Android in the meantime. So maybe the patched version is not compatible anymore with magisk causing the boot loop? But the untouched boot image is also causing a boot loop.
Changed the boot slot, and flashed to the according letter, but no changes.
Maybe i need to flash the boot.img with a newer version of magisk. I was running the latest canary version. But i dont know how to patch the image without the phone working.
fr0sty said:
Used the wrong words, Android 11 prompted me with an update, it was 1.7Gb. After that magisk was gone. So i booted into fastboot and flashed the patched magisk boot image again. The one i used for installing it the first time.
But magisk was updated in Android in the meantime. So maybe the patched version is not compatible anymore with magisk causing the boot loop? But the untouched boot image is also causing a boot loop.
Changed the boot slot, and flashed to the according letter, but no changes.
Maybe i need to flash the boot.img with a newer version of magisk. I was running the latest canary version. But i dont know how to patch the image without the phone working.
Click to expand...
Click to collapse
If you were promoted with an update, updated, then proceeded to flash the boot image you were running prior to updating, that's not going to work. You'll need to track down a patched boot image for your current version you have flashed or reflash the update via fastboot, you can follow the guide posted and it walks you through the steps to not wipe everything.
I'm in the same position. I took the OTA update, then downloaded the 11.0.0 (RQ1A.210105.003, Jan 2021) from Google. I patched the boot.img with Magisk, put it on my laptop, and flashed it in fastboot. Now I'm getting a bootloop. I tried flashing the unpatched boot.img to try to just get back in, but I'm still bootlooping.
Did you ever find a solution? FWIW, I'm on AT&T. I noticed that sometimes there is an AT&T specific file, but that did not appear to be the case this time.
I finally fixed it. At first I didn't see that the latest factory image was on the end of the list here https://developers.google.com/android/images
I picked 11.0.0 (RQ1A.210105.003, Jan 2021), then i extraced the boot.img file from it and flashed it in fastboot with fastboot flash boot boot.img --slot all.
That resulted in a no command screen when booting. But i was able to boot in safe mode. And from there i could patch the new boot.img file with the latest magisk. After that i patched that in fastboot and now everything is working again!
You guys know that you can extract the actual boot.img from your Device after it installed the update? Should solve all problems. After the Update you can change the active Partition using fastboot (to be able to use the second Partition with the older System) just root the older System and extract the boot.img from the inactive (updated) Boot Partition. From here just Flash the Stock boot.img to the old System to remove root. Patch the extracted boot.img and flash it to the updated Boot Partition. Reboot, done.
saturday_night said:
You guys know that you can extract the actual boot.img from your Device after it installed the update? Should solve all problems. After the Update you can change the active Partition using fastboot (to be able to use the second Partition with the older System) just root the older System and extract the boot.img from the inactive (updated) Boot Partition. From here just Flash the Stock boot.img to the old System to remove root. Patch the extracted boot.img and flash it to the updated Boot Partition. Reboot, done.
Click to expand...
Click to collapse
For me my solution is easier, because i don't know all the fastboot commands to do the things you write
Well, you are not the only one with the exact same Problem (wrong boot.img or maybe broken dl) and there are several threads already. Just answering here because it was the newest.
If you or anybody else use the boot.img from your own device there will never ever be a Problem with it. I already wrote a step by step guide (with fastboot comands) for this somewhere on xda for one of my older devices. Just need to find it and i will link it here.
Hi ALL,
any chance that anyone rooted the Pixel 5 or pixel4a 5G then get the NSG working?
the device i have is rooted correctly and checked by (Root checker) however the Diag port is silent and not producing any log, need to get the NSG working...
please help !
Thanks
Hi,
My memory issues and a hard week led me to forget I needed to uninstall magisk manager adn 'restore image'. I've never had a rooted phone before, so I'd never done it before. Got lost in the 'big pile of problems' and google kept nagging to 'update'. Sigh.
Last thing I want to do is try to figure out how to migrate all my data and apps (I'm expecting Google Recorder is likely to prove a PITA to get everything 'moved'). So I'm wondering, is there a simple/easy way to get magisk root back and active without wiping apps/data on my Pixel 4a 5g since it was already rooted prior to the OTA security update?
The only consequence with applying the OTA should be that you're know updated and rootless (since the boot image would have been overwritten in the update)... Just patch the new boot image, flash it and you should be up and running again.
Didgeridoohan said:
The only consequence with applying the OTA should be that you're know updated and rootless (since the boot image would have been overwritten in the update)... Just patch the new boot image, flash it and you should be up and running again.
Click to expand...
Click to collapse
Ah. Thanks. That's simple enough and sounds like I don't have the emergency I was dreading.
Didgeridoohan said:
The only consequence with applying the OTA should be that you're know updated and rootless (since the boot image would have been overwritten in the update)... Just patch the new boot image, flash it and you should be up and running again.
Click to expand...
Click to collapse
Well, I rebooted the Pixel 4a 5g, and then it would get stuck on G logo and wouldn't load the system.
So I couldn't use latest magisk manager to create a new patched boot img. So I tried to flash the patched boot img I still had on my PC from december as the Factory image firmware is still the same right now as it was then. Now when I try to boot I get a boot loop that doesn't get to the G logo even.
Wondering what to do now... I guess it wasn't so simple after all.
Edit: I tried flashing the original boot.img. No change. Near as I can tell next option would be to try to side load an OTA update, but the Pixel 4a 5g doesn't seem to work via ADB...
What's weird is that the pixel was working before I tried to reboot it initially. Now I can't get into recovery or rescue mode either. Just have a boot loop. Can get into fastboot still.
Edit 2:
I had the wrong factory image. Got the right one, for january. Flashed boot.img via fastboot. Back to 'stuck on G logo' like before.
Edit3:
Seems stuck in fastboot mode now. When selecting 'start' fastboot just loads up again.
I tried adb sideloading OTA update. Didn't work.
I tried flashing factory image removing "-w" modifier from flash-all.bat. Stuck in boot loop on googles "G" logo with the loading status bar underneath.
Hoping there's still a way to avoid a factory reset, but wondering what next steps there are.
Is there a subforum better suited to maybe getting this question answered?
Sounds like you've gotten to a point where it's better to ask for help in your device's forum, but I've seen you're doing that already.
Hope you get things sorted...
Edit: since it's always possible that modules mess up a system update, have you tried the adb command to remove modules (if boot reaches a point where adb is recognised), or booted to safe mode to disable all modules? You've got some details here:
https://www.didgeridoohan.com/magisk/Magisk#hn_Disablinguninstalling_modules_manually
Hi,
My Pixel 4a 5g was rooted via magisk. First time I rooted a phone. I forgot I needed to uninstall magisk before security update. Google notification kept pestering to update...I updated. Phone restarted fine, but I wanted my root back. Figured I'd just need to flash patched magisk, and someone in magisk forums suggested the same. Rebooted phone and now it's in a bootloop.
I can get into Fastboot and Recovery, but if trying to load system it stays stuck on fastboot screen. Sometimes through recovery reboot or after OTA update/factory image flash it'll reboot and get to the google "G" logo with loading status bar underneath, but it's stuck there, and eventually reboots back to fastboot.
I tried flashing stock boot.img. I tried ADB sideload of OTA. I tried flashing factory image with flash-all.bat removing "-w" modifier to try to keep user data.
Only next step I can think of is to factory reset and hope it'll work. I'd prefer to keep my data though. Anyone have any ideas on what I might be able to try next?
Edit 1.21.2021:
10:40
I did a factory reset via Recovery. Upon reboot, still stuck in Fastboot. I really thought that would fix things...
10:55
I ran a factory flash via flash-all.bat, but this time with the "-w" modifier to wipe all data. Phone booting up now.
To anyone reading who has an idea of how to have salvaged things without having to do the above, please respond to the thread and provide feedback. That way anyone with similar issues might have something to work with. Who knows I might mess up again in the future; I have a lot of medical issues that cognitively impair me and the only way I can get myself to function is to stop eating (which I did trying to deal with this problem). But I'll be back to eating food and being made 'stupid' by it so mistakes might happen. So, please, if you have any idea how to fix a mess like I was in, please share that information here, or create a thread and link it in this thread.
I have messed it up once or twice but it's pretty easy to fix. The other thing that you need to be aware of is that there are two boot slots and you have to make sure that you are flashing the correct one and also that the correct boot slot is active. I always check the active boot slot before flashing the magisk-modified boot image using "fastboot getvar current-slot" and then flash to the active slot with "fastboot flash boot_a magisk_patched.img" substituting boot slot a or b as appropriate. The good thing is that an unlocked pixel is just about impossible to brick.
Are you running Android 12?
I had the same issue until I patched with Magisk Canary then disabled verity then reflashing the whole os:
fastboot update --disable-verity --disable-verification image-bramble-spp2.210219.008.zip
Is it me or this solution doesn't work since the new update ( 210219.018 )?
I can only flash without the "--disable-verity --disable-verification" options.
Edit: actually it worked but forced me to do a factory wipe after flashing with the disable options.
I get something similar to this when upgrading from the January 2021 update to the April 2021 one.
In my case, the problem is fixed by using a newer version of the "fastboot" tool from the Android SDK.
For reference, this is the version of fastboot that causes my bootloop (it also appears that it updates both slots for some reason, rather than just the active slot):
$ fastboot --version
fastboot version 28.0.2-debian
Installed as /usr/lib/android-sdk/platform-tools/fastboot
This version seems to work once I flash-all without -w:
# fastboot --version
fastboot version 29.0.6-6198805
Installed as /home/dwon/android/sdk/platform-tools/fastboot