Oneplus 6 and magisk (stuck in fastboot ) - OnePlus 6 Questions & Answers

hi guys,
my op6 is running stock oos with magisk as root. My phone worked fine for several months. Today I tried switching magisk from the stable version to canary by first upgrading the manager app and then hitting the direct install option. This failed several times and I got an error saying:
! Unable to unpack boot image
I thought this could be fixed by a reboot, but well... it wasn't. Now the phone only boots into the bootloader. I booted into twrp and tried to uninstall magisk via the uninstall.zip. This fails with error
-Unpacking boot image
! Unsupported/Unknown image format
- Unmounting partitions
cd /tmp/repackorig/ && /sbin/magiskboot unpack -h '/tmp/repackorig/boot.img' process ended with ERROR: 1
Error unpacking image
I don't really know what this means. I'm guessing my boot.img is corrupted?
Is there any way I can solve this problem without a factory reset? Can I just flash the stock boot.img via fastboot?
Do you have any idea what went wrong here, so that I can avoid the error next time?

Yesterday I broke op5 during the magisk update. The repair was simple, flash stock boot.img as boot partition.
I flashed it from TWRP.

Try dirty flashing your ROM without flashing magisk.

I'm also facing the same issues. Tried updating from the Magisk App. Didn't receive any error messages. After reboot I'm stuck in fastboot mode and I cannot access recovery. I do not have a backup of the data on this phone.
Is there any way I can still (temporarily) access the data? I'm panicking a little bit. My OOS is stock and rooted and hasn't been updated in about a year. I'm not sure if I can still figure out the specific OOS version that is installed.
EDIT:
Have been trying to flash the stock boot.img with fastboot. I've tried both 10.0.1 and 10.3.0 so far. Both resulted in the "BOOTLOADER UNLOCKED" warning and got stuck there. 10.3.1 is my last option, because I don't think I've updated this device since. Would it make a difference if I tried to do it from twrp?
EDIT2:
I do however have access to the recovery mode now. If I'm not mistaken this means I might be able to extract the data.
EDIT3:
The recovery mode is not asking me for my unlock pattern (which I think it should be doing) and is not showing up under 'adb devices'. I've tried flashing the boot.img of all OOS versions I can think of with fastboot, nothing will let me boot back in or let me access adb through the recovery. Am I ****ed?

MoresM said:
I'm also facing the same issues. Tried updating from the Magisk App. Didn't receive any error messages. After reboot I'm stuck in fastboot mode and I cannot access recovery. I do not have a backup of the data on this phone.
Is there any way I can still (temporarily) access the data? I'm panicking a little bit. My OOS is stock and rooted and hasn't been updated in about a year. I'm not sure if I can still figure out the specific OOS version that is installed.
EDIT:
Have been trying to flash the stock boot.img with fastboot. I've tried both 10.0.1 and 10.3.0 so far. Both resulted in the "BOOTLOADER UNLOCKED" warning and got stuck there. 10.3.1 is my last option, because I don't think I've updated this device since. Would it make a difference if I tried to do it from twrp?
EDIT2:
I do however have access to the recovery mode now. If I'm not mistaken this means I might be able to extract the data.
EDIT3:
The recovery mode is not asking me for my unlock pattern (which I think it should be doing) and is not showing up under 'adb devices'. I've tried flashing the boot.img of all OOS versions I can think of with fastboot, nothing will let me boot back in or let me access adb through the recovery. Am I ****ed?
Click to expand...
Click to collapse
Maybe it's worth trying change the slot and see if it will start? Of course from the fastboot level.

MoresM said:
I'm also facing the same issues. Tried updating from the Magisk App. Didn't receive any error messages. After reboot I'm stuck in fastboot mode and I cannot access recovery. I do not have a backup of the data on this phone.
Click to expand...
Click to collapse
I managed to fix it as well by flashing the stock boot.img for my software version to both slot_a and slot_b using fastboot. I left the active slot setting alone otherwise.
Afterwards I booted into twrp through fastboot and installed blu spark twrp and magisk 21.4 from there as a user suggested on the Magisk github: https://github.com/topjohnwu/Magisk/issues/3924
Note that github link also has a solution to flawlessly upgrade to latest Magisk without data loss but I haven't had the time to look at it.

Related

Mi mix 3 Global ROM bootloop

I'll start by apologizing if this has been solved elsewhere I have searched but found no answers.
I have the global variant and was rooted with twrp. I wanted the ota update so I unrooted and updated. Today I had some time so I flashed twrp wiped and entered bootloop. I attempted a full factory reset through twrp but still bootlooped. I have fastboot rom and have attempted to use miflash to fix it but get the "cannot found lock.bat" error though when first starting miflash I get the "can't find flash script" error. The drivers are properly installed yet the error persists. I cannot get adb to sideload which is, I'm guessing because of the wipe removing debugging mode? Is there any way to get the ROM image to the phone(I tried adb push command but says no device. Yet flashing recovery works so I know it's connected and recognized) so I can flash it via TWRP or the stock recovery img to flash and work from there? I'm kind of at a loss here. Am I now the proud owner of a very neat paper weight? I seriously hope not as I'm not exactly made of money and I've only owned the phone for a couple months.
Any and all help is greatly appreciated.
Update
I have managed to get adb push to start sending global v10.2.2.0 to the root folder. I'm hoping this will allow me to flash from twrp.
Mota420 said:
I'll start by apologizing if this has been solved elsewhere I have searched but found no answers.
I have the global variant and was rooted with twrp. I wanted the ota update so I unrooted and updated. Today I had some time so I flashed twrp wiped and entered bootloop. I attempted a full factory reset through twrp but still bootlooped. I have fastboot rom and have attempted to use miflash to fix it but get the "cannot found lock.bat" error though when first starting miflash I get the "can't find flash script" error. The drivers are properly installed yet the error persists. I cannot get adb to sideload which is, I'm guessing because of the wipe removing debugging mode? Is there any way to get the ROM image to the phone(I tried adb push command but says no device. Yet flashing recovery works so I know it's connected and recognized) so I can flash it via TWRP or the stock recovery img to flash and work from there? I'm kind of at a loss here. Am I now the proud owner of a very neat paper weight? I seriously hope not as I'm not exactly made of money and I've only owned the phone for a couple months.
Any and all help is greatly appreciated.
Click to expand...
Click to collapse
Update 2 phone working but still confused.
Pushing the ROM via ADB did indeed allow me to flash from twrp and restore the phone. My question now is why did it happen? Is the new OTA MIUI 10.3... update incompatible with twrp or did something anomalous happen with the flash? I flashed exactly the same method I used with the 10.2.2 ROM a few weeks ago....
OTA's should only be used when completely stock! Even though you uninstalled root, there were still system modifications that more than likely caused your issues. The fastboot version of the firmware is different than the TWRP image. You can not flash a TWRP image via fastboot, hence the missing scripts and bat files. If you had actually downloaded the fastboot image, you would have had a flash_all.bat file that would have returned your device completely to stock with a single run of that file.
Thanks for the reply and information. I actually expected my issues to begin upon installing the ota update and was quite surprised that it updated without error. What confuses me is how flashing twrp after the update caused the issues. I went through the normal process when flashing twrp and still ended up bootlooped. I made the mistake of thinking boot.img was the old stock recovery i renamed when i first rooted and flashing that as recovery. Obviously this was not the recovery file but fastboot. It was then that panic mode kicked in and things went from bad to worse. I formatted planning to flash the stock rom via adb which didn't work. Given that I never touched the fastboot image on the phone I'm confused on how the bat files and scripts weren't found.
I'll admit I'm not extremely well versed in this area.
Is it possible that the ota update contained different bat files and scripts than the previous rom had? Which would cause miflash to not recognize them when attempting to flash an older rom? I'm sorry if my questions are ignorant lol. I'm a process guy and a troubleshooter by nature which means even though I've resolved the issue, I need to figure out what caused it.
Would flashing fastboot to the phone as the recovery image have screwed up the bat and scripts? Having two instances of boot.img on the partition messed it up maybe? Was it the formatting even though I was still able to boot into fastboot after? Or was it something that happened during the unrooting and updating that messed it up and it didn't manifest until I flashed twrp? Like I said the update worked fine and the phone was fully functional until I tried to reroot.
Thanks again for taking the time to help. It's definitely appreciated.
Mota420 said:
Thanks for the reply and information. I actually expected my issues to begin upon installing the ota update and was quite surprised that it updated without error. What confuses me is how flashing twrp after the update caused the issues. I went through the normal process when flashing twrp and still ended up bootlooped. I made the mistake of thinking boot.img was the old stock recovery i renamed when i first rooted and flashing that as recovery. Obviously this was not the recovery file but fastboot. It was then that panic mode kicked in and things went from bad to worse. I formatted planning to flash the stock rom via adb which didn't work. Given that I never touched the fastboot image on the phone I'm confused on how the bat files and scripts weren't found.
I'll admit I'm not extremely well versed in this area.
Is it possible that the ota update contained different bat files and scripts than the previous rom had? Which would cause miflash to not recognize them when attempting to flash an older rom? I'm sorry if my questions are ignorant lol. I'm a process guy and a troubleshooter by nature which means even though I've resolved the issue, I need to figure out what caused it.
Would flashing fastboot to the phone as the recovery image have screwed up the bat and scripts? Having two instances of boot.img on the partition messed it up maybe? Was it the formatting even though I was still able to boot into fastboot after? Or was it something that happened during the unrooting and updating that messed it up and it didn't manifest until I flashed twrp? Like I said the update worked fine and the phone was fully functional until I tried to reroot.
Thanks again for taking the time to help. It's definitely appreciated.
Click to expand...
Click to collapse
OTA's are not a complete image. It is a partial update that only replaces what it has to replace. If MiFlash dis not recognize the image, it was either the wrong image or a corrupt image.
Sometimes updates to the system and recovery partitions fix exploits that things like root and TWRP take advantage of.
Fastboot isn't something you flash to the phone. It is a command line used to flash a dull factory image to the device properly. You do not need MiFlash to flash a fastboot factory image. All you do is extract the full image to your ADB folder unless it is system wide, boot your device into the bootloader, connect ir to your PC, and run the flash_all.bat command contained in the folder you extracted. A command prompt window will open, everything will complete after about a few minutes the window will close, and your phone will reboot.
So the "fastboot" rom is a rom designed to be flashed using fastboot? The miflash error was given because the rom I was trying to flash was corrupted. That makes sense as I'd never known of a fastboot rom before. But it has been a few years since I rooted and romd my phone. I always did the typical flash from the rom image from twrp. I'm still not sure how I got myself in a boot loop unless when I wiped after flashing twrp I accidentally selected another option that erased more than I wanted.. Which makes perfect sense. I knew it had to be an ID10T error lol.
Thanks for the explanation.

Can't flash twrp

Hey. Following issue: I used to have my phone rooted and wanted to update it. Since I couldn't get a zip file from the official OnePlus webpage I used the download button from the system update and got it from there. Of course it also automatically removes your root so I had to try to flash twrp again. My bootloader is still unlocked (debugging and oem both activated) so that wasn't any issue. I got the newest enchilada and tried the flash boot command with the twrp enchilada image, however after a short message including hoot and and an ok at the end my phone goes into the fastboot icon and is stuck there until I restart it. Twrp doesn't start whatsoever. I also tried the fastboot --set-active= command but that didn't help as well. Adb is also on the newest version and I also got the newest enchilada. Any ideas?
P.S: already searched a lot on the forum but none of the aforementioned solutions did anything thanks for any help regardlessly
Gosick1337 said:
Hey. Following issue: I used to have my phone rooted and wanted to update it. Since I couldn't get a zip file from the official OnePlus webpage I used the download button from the system update and got it from there. Of course it also automatically removes your root so I had to try to flash twrp again. My bootloader is still unlocked (debugging and oem both activated) so that wasn't any issue. I got the newest enchilada and tried the flash boot command with the twrp enchilada image, however after a short message including hoot and and an ok at the end my phone goes into the fastboot icon and is stuck there until I restart it. Twrp doesn't start whatsoever. I also tried the fastboot --set-active= command but that didn't help as well. Adb is also on the newest version and I also got the newest enchilada. Any ideas?
P.S: already searched a lot on the forum but none of the aforementioned solutions did anything thanks for any help regardlessly
Click to expand...
Click to collapse
What version rom is currently installed
MrSteelX said:
What version rom is currently installed
Click to expand...
Click to collapse
Oxygenos 10.3.0 on my oneplus6.
https://forum.xda-developers.com/on...overy-unofficial-twrp-touch-recovery-t3860815 has everything you need to install twrp

Failed root, stuck on unlocked bootloader warning message.

Hi everyone,
I have tried to get root priviledges following a guide from Droidwin.com to flash Magisk throught TWRP. At the very last step, after flashing Magisk 19.3 throught TWRP when I tried to reboot my phone, it gets stuck on the "unlocked bootloader warning message", which is supposed to disappear after a few seconds and move on to the boot animation.
It seems like I can go to the stock recovery, which shows fastboot and wipe actions. At this point, I can acces the fastboot screen, but the device is not listed using the ADB command "adb devices", nothing is find.
I'm wondering, what can I try to restore the phone ? I thank you in advance for any suggestions.
Here are some additionnal informations:
---Device---
Oneplus nord running OxygenOS 10.5.5, european version.
---What I've done to get in this situation---
Unlock bootloader using ADB
Launch an TWRP image file using ADB
"Try" to root using Magisk 19.3 zip throught TWRP
Power off from recovery (using TWRP touch interface), but the guide tells to click reboot at this step ...
Get stuck on the warning message, not having any boot animation.
Try to boot in Fastboot.
Turn the Nord Off and start it with plus minus and Power.
Boot TWRP with "Fastboot boot "TWRP File name.img" and flash magisk 20.4
Thank you @denndenn.
I'm able to launch TWRP using the ADB command "fastboot boot [twrpfile].img". But when TWRP starts, it asks me for my decryption password, I type it, brief lines of code says "unable to read system/apex" before showing the home page of TWRP. Someone knows what this means, and if that can be the cause ?
I've then tried to reflash Magisk 19.3, which lead to the same result. I couldn't figure out how load Magisk 20.4 to my internal storage in order to flash it trought recovery ... Do you know how to flash a file which is not on my phone ?
Search forum....
Msm tool oneplus nord wipes phone but fixes any issues
thibdur said:
Thank you @denndenn.
I'm able to launch TWRP using the ADB command "fastboot boot [twrpfile].img". But when TWRP starts, it asks me for my decryption password, I type it, brief lines of code says "unable to read system/apex" before showing the home page of TWRP. Someone knows what this means, and if that can be the cause ?
I've then tried to reflash Magisk 19.3, which lead to the same result. I couldn't figure out how load Magisk 20.4 to my internal storage in order to flash it trought recovery ... Do you know how to flash a file which is not on my phone ?
Click to expand...
Click to collapse
Plug your phone to your PC while in TWRP, then you can use adb to push files to your phone, for example with adb push magisk.zip /sdcard. Then, flash Magisk in TWRP.
How about flashing stock boot to see if your OPN boots to system again and then simply load Magisk zip to your internal storage and then flash via TWRP?
Thank you a lot for your suggestions !
Here is the solution in my case :
Because fastboot was working, I was able to flash stock oxygen rom, and get every working, but it needs to erase all your data.
You can find a guide on the XDA topic "[ROM][STOCK][FASTBOOT][OPN] Stock Fastboot ROMs for OnePlus Nord". The rom list have the lastest roms version (09/2020), and the process is super automated.
Have a good week-end XDA !

[Guide] Flash Magisk on Android 12

Trying to root the Pixel 5 running Android 12 by flashing a magisk-patched boot image results in the phone only booting to fastboot mode ("failed to load/verify boot images")
Some users have reported that booting (instead of flashing) the patched boot image works and makes root temporarily available but i didn't have any success with that.
The phone booted up but root didn't work.
I won't explain how to unlock the bootloader or set up adb here.
!Warning! This will wipe your phone so take a backup!
Also i do not take any responsibility if you break your device.
And if anything goes wrong just factory reset your device using the Android Flash Tool or by following this tutorial.
Here's what i did to get Magisk v22.0 working on the first developer preview of Android 12:
Install A12 with disabled AVB & dm-verity:
Make sure USB-Debugging is enabled in developer-options and you have authorized the pc you're using on your phone.
Boot your phone into fastboot mode.
You can do this by turning it off and then starting it by holding Power + Volume Down
until fastboot mode appears or just adb reboot bootloader
Go here and click on the link for the Android Flash Tool.
(I didn't copy the link directly so i don't have to update it everytime google releases a new update)
It should ask you to allow the website to access ADB Keys. Click Ok.
If the website somehow doesn't work, try using Google Chrome.
Select your Pixel 5. If it's not showing up click add device.
Click on the edit symbol (pen) in the box where the selected build is shown.
Make sure Wipe Device, Disable Verity and Disable Verification are checked.
Install and boot the phone when it's finished.
Patch & flash boot.img
Download and install the Magisk Canary App from GitHub.
Download the factory image from here and extract boot.img from it.
(Inside the downloaded zip-file is another zip file containing the boot image)
Copy the extracted boot.img to your phone and open the magisk app.
Click on Install -> Select and Patch a File and let it do its magic.
Copy the magisk-patched boot image that should be found in your phones download folder back to your PC.
Reboot into fastboot mode as i explained earlier and flash the patched boot image.
(fastboot flash boot magisk_patched.img)
Then reboot the device.
Now root should be working. If it bootloops and says your phone has to be factory reset, do it.
If for some reason you still get an AVB-Error and end up stuck in fastboot mode just flash the stock image and try to patch it again.
This is my first post on here and i didn't have much time but i'm glad if it helped at least one person.
Thanks for create this post.Works perfect,
Ivixmax said:
Thanks for create this post.Works perfect,
Click to expand...
Click to collapse
Hey, thanks for this. FYI @LazerL0rd (zest kernel) detailed here (click on the spoiler) how to do this with just the command line and factory images and without the need for the AFT.
edit: formatting
I keep on getting the AVB-Error to no end.
new beta magisk not working
morpheus620 said:
new beta magisk not working
Click to expand...
Click to collapse
Make sure to disable verity & verification and use magisk canary, not beta
okay. is working. sorry für the misstake.
morpheus620 said:
okay. is working. sorry für the misstake.
Click to expand...
Click to collapse
Alles gut
Anyone able to get safety net to pass on Android 12?
greenlight63 said:
Anyone able to get safety net to pass on Android 12?
Click to expand...
Click to collapse
Unfortunately no, universal safetynet fix 2.0.0 by kdrag0n makes basicIntegrity pass but since the update to dp3 CTS still fails.
Dirty flashing newer factory images will restore the verity and verification state, so when you patch the kernel with magisk it will fail to boot again.
Installing a verity and verification disabled image without wiping from the web based flasher will also corrupt your data and not let the phone boot, forcing you to wipe.
Wonder what the flags are for flashing factory images with verity and verification state off and giving the ability to continue on without wiping and being able to boot the magisk patched kernel again.
fastboot update --disable-verity --disable-verification image-redfin-spp3210325.010.zip maybe?
Or prepatch the boot.img before flashing it with fastboot, and then flashing it back before rebooting from after flashing the factory image as an update?
tauio111 said:
Dirty flashing newer factory images will restore the verity and verification state, so when you patch the kernel with magisk it will fail to boot again.
Installing a verity and verification disabled image without wiping from the web based flasher will also corrupt your data and not let the phone boot, forcing you to wipe.
Wonder what the flags are for flashing factory images with verity and verification state off and giving the ability to continue on without wiping and being able to boot the magisk patched kernel again.
fastboot update --disable-verity --disable-verification image-redfin-spp3210325.010.zip maybe?
Or prepatch the boot.img before flashing it with fastboot, and then flashing it back before rebooting from after flashing the factory image as an update?
Click to expand...
Click to collapse
Don't know but sounds interesting. I just use
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
after every update
Works like a charm Android 12 pixel 4a 5g
I just installed the newest Public Beta via OTA. Can I root? I was rooted on 11 before and just enrolled in the beta program and installed it via OTA. Without factory reset or reflash. Now I tried patching boot.img via Magisk Manager, but it wont boot. I mean it boots, but wont unlock phone to homescreen. I'm locked out of my phone. Reverted back to stock PB1 boot image. Any ideas without factory reset?
THEVAN3D said:
I just installed the newest Public Beta via OTA. Can I root? I was rooted on 11 before and just enrolled in the beta program and installed it via OTA. Without factory reset or reflash. Now I tried patching boot.img via Magisk Manager, but it wont boot. I mean it boots, but wont unlock phone to homescreen. I'm locked out of my phone. Reverted back to stock PB1 boot image. Any ideas without factory reset?
Click to expand...
Click to collapse
I just tried it using the canary build and it won't boot either. It gets stuck at the Bootloader screen and shows "Failed to load/verify boot images". Maybe we need to wait for an update to for Magisk?
QuickInfo said:
I just tried it using the canary build and it won't boot either. It gets stuck at the Bootloader screen and shows "Failed to load/verify boot images". Maybe we need to wait for an update to for Magisk?
Click to expand...
Click to collapse
Did you try it according to the manual from the first post from @myhuky3?
kafisc said:
Did you try it according to the manual from the first post from @myhuky3?
Click to expand...
Click to collapse
Not yet, I'll wait until the end of the beta program before I reset it. I can get temporary root by booting into the patched Magisk boot image
Following the OP it worked great on the public beta been running it since last night its awesome thank you for the guide
delete

Need help needed with fastboot(loop)

I've decided to upgrade to OOS11 stable and patch the boot before going into the rom. What I did was:
1. Flash latest TWRP (3.5.2_9-0)
2. Reboot to recovery
3. Flash ONLY OOS11 boot.img
4. Flash TWRP again
5. Install Magisk and Kirisakura-R 1.1.1 kernal (for f2fs support)
6. Reboot to recovery
Here I was going to do the same on other partition but TWRP failed to boot and screen kept flashing but I noticed that ADB was connected so I rebooted to fastboot and flash stock boot I've previously extracted from stock ROM. Now I face another problem, phone doesn't boot anywhere else but fastboot.
I've tried a few stuff to get it back.
# There were some cases where the phone won't boot with bootloader unlocked and stock boot so I managed to patch boot.img with Magisk using an emulator and then flash it.
# Tried booting into TWRP but phone phone would get stuck in "Fastboot mode" screen with fastboot still connected (And taking commands from PC).
# Tried flashing TWRP to boot partition which worked previously but this time the problem stayed and kept booting into fastboot.
A few more points that I should mention,
# I've backed up my entire phone using TWRP so I can unbrick it if I somehow manage to get into TWRP
# I don't have the backup on my computer. It's on the phone.
I absolutely can't lose those data. Yeah, mistake on my side for not backing up on my computer but to my defense, this never happened before so I let my guard down this time.
What options do I have left? Any hint would be appreciated. Thanks for reading

Categories

Resources