Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING Magisk v22 soft bricks Oneplus 6T !!!! #3924

Closed
popy2k14 opened this issue Feb 24, 2021 · 36 comments
Closed

WARNING Magisk v22 soft bricks Oneplus 6T !!!! #3924

popy2k14 opened this issue Feb 24, 2021 · 36 comments

Comments

@popy2k14
Copy link

Hey guys.

Was running magisk over years without major issue.
Sadly v22 bricked my Oneplus 6T phone and others: https://forum.xda-developers.com/t/rom-stock-fastboot-op6t-stock-fastboot-roms-for-oneplus-6t.3862516/post-84546813

When i remember correct i have done the following:

  • Had 21.4 + Magisk Manager installed, Magisk Manager was hidden within the app (created other package name)
  • In the morning Magisk Manager want's to update itself -> done @07:00
  • It showed that magisk manager was not installed -> i was in the app. Because i had no time i leaved it
  • In the evening i returned to the issue, unhidden the magisk manager app & pressed install again -> it finishes installation -> showed me not installed -> so i left it and thougth it would be good to update magisk first from 21.4 to 22.
  • Started the update -> showed me an error like "bad image format" (i think it was the kernel)
  • Tried again -> no luck
  • Rebooted
  • now stuck in fastboot bootloop which shows "BOOTLOADER VERSION -" and "BASEBAND VERSION -" as empty!

Any hints we can recover our phones without wiping everything?

thx

@Shivelight
Copy link

Any hints we can recover our phones without wiping everything?

Restore you original boot.img, it's in /data/adb/magisk_backup_* directory.

@Oxeda
Copy link

Oxeda commented Feb 25, 2021

Any hints we can recover our phones without wiping everything?

Restore you original boot.img, it's in /data/adb/magisk_backup_* directory.

sorry for the dumb question but, when you do that does it wipe data?

@ipdev99
Copy link

ipdev99 commented Feb 25, 2021

Any hints we can recover our phones without wiping everything?

Restore you original boot.img, it's in /data/adb/magisk_backup_* directory.

sorry for the dumb question but, when you do that does it wipe data?

No, userdata is a separate partition. Should not be affected by flashing boot.

@Shivelight
Copy link

sorry for the dumb question but, when you do that does it wipe data?

It doesn't. Just make sure you flash the boot.img (you might need to exract it from boot.img.gz first) to boot partition.

@Oxeda
Copy link

Oxeda commented Feb 25, 2021

damn I did a full restore thinking it was the only way :( at least now I have a deodexed rom whatever that means. thanks guys I learn something today.

@popy2k14
Copy link
Author

Any hints we can recover our phones without wiping everything?

Restore you original boot.img, it's in /data/adb/magisk_backup_* directory.

thx a lot.
How can i access the magisk_backup in data partition when TWRP doesnt boot?
I have tried it with ""fastboot boot twrp-3.4.0-11-fajita-Q-mauronofrio.img" and the device stucked.
Also i think the data partition is encrypted.

Please help, want to recover it without data loss.

thx

@Shivelight
Copy link

What about recovery key combo? Does it work?

Anyway, if you can't access the backup, I think you can use stock boot image from your ROM file. Also, a dirty flash may help unless magisk choose to survive. CMIIW.

@popy2k14
Copy link
Author

No, doesnt work, just stucked in fastboot mode:
In the fastboot menu:

  • reboot bootloader -> brings it back straight to fastboot mode
  • Power off and on -> brings it back straight to fastboot mode
  • Start recovery -> brings it back straight to fastboot mode

Just fastboot working. Just not to brick more.
How to correctly flash boot image with fastboot.
Please note, the 6T has an a/b partition scheme.

Currently downloading OOS 10.3.8 (= latest full OTA rom) which was installed (i hope so).

thx

@popy2k14
Copy link
Author

Maybe @topjohnwu can step in to help and maybe pulling the update?
There's an similar issue: #3927
I think that was the errors i was getting.

@Shivelight
Copy link

Ohh, I don't have any experience with a/b device. I consider myself as a casual user, I don't understand that much. Let's wait for more experienced input. Goodluck anyway!

@popy2k14
Copy link
Author

Thx anyway.
Have now downloaded 10.3.8 and extrated payload.bin to the single partitions.

Dont want to brick it further.

Any hints i can revive it?

I thougth of:

fastboot flash boot_a boot.img
fastboot flash boot_b boot.img

Any hints are welcome?

@popy2k14
Copy link
Author

I am a step further.
Tried to boot TWRP again with "fastboot boot twrp-3.4.0-11-fajita-Q-mauronofrio.img" and it booted.
Can access my data partition.

What are the recommended steps to revive 21.4?
Just flash latest 10.3.8 OTA zip, twrp and magisk 21.4 afterwards?

@Trigus42
Copy link

Trigus42 commented Feb 25, 2021

Just flash latest 10.3.8 OTA zip, twrp and magisk 21.4 afterwards?

Yes. This should work. Most of the time just reflashing the ROM is the simplest solution.

However, depending on how important the data is to you, you might want to do a (NANDroid data partition and /sdcard) backup first - although it shouldn't be really necessary.

@popy2k14
Copy link
Author

popy2k14 commented Feb 25, 2021

thx, have revived the phone WIHTOUT data loss :-)
Did the following just in case anybody needs it:

  • Download the latest TWRP image file: https://forum.xda-developers.com/t/recovery-3-4-0-11-fajita-official-unofficial-twrp-recovery-for-oneplus-6t-stable.3861482/
  • Download Minimal Fastboot
  • power on phone, it should be in fastboot mode & connect it to PC
  • boot twrp -> "fastboot boot imgfile"
  • Make a nandroid backup (just in case)
  • backup all data over MTP (just in case)
  • I always keeping the last full rom OTA + TWRP + Magisk on my sd card, if you have it not tranfer it over to the phone
  • From the TWRP menu, Install > Select full ROM zip > Swipe to flash
  • From the TWRP menu, Install > Select TWRP recovery zip > Swipe to flash
  • Reboot to TWRP recovery
  • Flash the latest stable Magisk in case you want to root
  • Reboot to System

Hope this helps someone.
But one question is open (@topjohnwu ) why does this happen?
Here is an discussion about this: https://forum.xda-developers.com/t/rom-stock-fastboot-op6t-stock-fastboot-roms-for-oneplus-6t.3862516/post-84554063
Maybe it's related to the hide/unhide proccess?
Will now stay on 21.4 until this is sorted.

thx all for help

@Trigus42
Copy link

I have tried it on my OP 6T and it worked flawlessly (OOS v. 10.3.8). However it might depend on how you install/update Magisk.
I didn't have Magisk installed previously and I patched and flashed the boot.img rather than using TWRP (since I couldn't get TWRP to boot).

@popy2k14
Copy link
Author

I have flashed it over the magisk app.

@AxxxM
Copy link

AxxxM commented Mar 3, 2021

@popy2k14 thank you so much!!! everything is back to normal, all apps are there, great!

@popy2k14
Copy link
Author

popy2k14 commented Mar 3, 2021

@AxxxM glad i could help.

pOpY

@rushnaquddus
Copy link

I am a step further.
Tried to boot TWRP again with "fastboot boot twrp-3.4.0-11-fajita-Q-mauronofrio.img" and it booted.
Can access my data partition.

What are the recommended steps to revive 21.4?
Just flash latest 10.3.8 OTA zip, twrp and magisk 21.4 afterwards?

I am facing a similar issue with OnePlus 6T after a Magisk update to v22 which soft-bricked my phone too. The current status of my phone is a little different though, because it is now stuck in fastboot and does not even boot into any twrp.img. @popy2k14 Seems like you fixed that as quoted above but I'm not sure how (I tried the same twrp 3.4 version listed as well as ALL here)

When I first booted into twrp-3.4.0-0-fajita.img, it loaded the twrp splash screen and would not move past it, even after waiting for 5 mins. Then I did a hard reboot and tried to remove the magisk module using adb from fastboot. I doubt that did anything, but after rebooting again, it does not even boot the twrp.img into the twrp splash screen like before and only gives the boot error (see below). I'm stuck. Here are the commands I have entered so far:

fastboot boot twrp.img

adb wait-for-device shell magisk --remove-modules

fastboot boot twrp.img"
downloading 'boot.img'...
OKAY [  1.609s]
booting...
FAILED (remote: Failed to load/authenticate boot image: Load Error)
finished. total time: 1.675s

My priority is data recovery. It is encrypted with TWRP so the only way I can think of is to restore twrp, decrypt the phone, and then get my data off using MTP or adb pull from sdcard. Here's the plan, starting from fastboot:

  1. Flash the OxygenOS stock kernel to the boot partition
  2. Boot into twrp.img
  3. Use adb to push twrp.zip
  4. Flash twrp.zip using twrp
  5. Reboot into twrp
  6. Decrypt the data
  7. Copy data using mtp onto the pc

I cannot afford to lose data so I want to know if this plan is the only option to get my data back. Will this plan work? If yes/no why and what else could I try without wiping/corrupting any encrypted data?

Thank you!

RQ

@popy2k14
Copy link
Author

Answered you in the xda thread.
I think you are right, your main goal is to boot TWRP.
Had luck with the "mauronofrio's" latest img file.

I think you should try:

  • Flash the OxygenOS stock kernel to the boot partition
  • Boot into twrp.img
  • Proceed from the point "Make a nandroid backup (just in case)" from my guide above

But be aware, i am not responsible for anything.
Never tried that way.

@BugraAkdogan
Copy link

Hello everyone, sorry to revive a closed post but this is the most relevant post to me. Please let me know if I should create a new issue instead.

My situation is a bit different, I did OP6T firmware update first, was going to reboot from Magisk when I realized it had an update. So I updated the app to v22 but not the manager currently, it is at v21.4

I tried the install to inactive slot OTA option but it says
-unpacking boot image
!unknown/unsupported image format
!installation failed

Thus I started googling and found out about the soft bricks, since I haven't restarted my phone yet it is not bricked but it will be if I do. I read posts for hours last night but couldn't find anything similar to my issue. What can I do to prevent soft brick and proper magisk update and phone firmware update currently installed and pending a reboot?

Thank you

@popy2k14
Copy link
Author

First DO NOT REBOOT!!!
You currently don't have an working kernel image.

I think your best chance is to flash the full OTA (1.9 GB in size) again. Copy it to the root of the SD and manually update it with setting - system update - three dots manual update. When you now reboot it you work but you are unrooted.

Because I rebooted after the exact same error message I cant speak further, but you can try before rebooting :

Download newest twrp installer zip, and magisk 21.4
Unhide magisk Manager when it's hided
Flash twrp zip in magisk
Reboot to twrp and flash magisk 21.4

But as stated above, these are just guesses because in my case it was a little bit different.

Good luck and let us know

@BugraAkdogan
Copy link

I will try these tonight currently at work, meanwhile I am wondering if something like downgrading magisk v22 back to 21.4 is possible (without rebooting) and would that work to save the phone and the rest of the steps you listed?

@popy2k14
Copy link
Author

i think a downgrade will not work because something is wrong with your kernel or rather than magisk is not supporting the kernel, giving this error. i think your best chance is flash an unmodified kernel (full ota) before doing anything else.

@BugraAkdogan
Copy link

OK, I am guessing flashing TWRP from magisk is done by "select and patch a file" option? I am not familiar with all this, last time I rooted a phone was galaxy s2 times lol.

Also just thought about this, I see there have been updates in canary builds after v22 was released, could updating to canary or beta build fix this issue before reboot

@BugraAkdogan
Copy link

as you are very knowledgeable, what do you think about canary builds idea?

@popy2k14
Copy link
Author

popy2k14 commented Apr 1, 2021

I would go stable!
After 10.3.9 update I was also able to update magisk to v22 without an issue.
Don't know whats causing these 'soft bricks'.
Good luck

@rpallai
Copy link

rpallai commented Apr 8, 2021

[...] I am wondering if something like downgrading magisk v22 back to 21.4 is possible (without rebooting) and would that work to save the phone and the rest of the steps you listed?

A relative simple method to save your running phone and get magisk v22 installed:

  • Download latest full OTA in .zip and extract
  • Use payload_dumper to extract boot.img and copy it onto the phone
  • Try to update Magisk via "after OTA" method, check the log in the text window extensively and note your device name (look for something like /dev/block/sd***; mine was sde39.)
  • Start a terminal on the phone and use command su -c "dd if=/path/to/boot.img of=/dev/block/sd*** bs=4k" to restore inactive slot's boot partition - replace sd*** with your noted device name
  • Go back to Magisk and try to update via "after OTA" method again. It must succeed. Now you can reboot.

@BugraAkdogan
Copy link

**> I think your best chance is to flash the full OTA (1.9 GB in size) again. Copy it to the root of the SD and manually update it with setting - system update - three dots manual update. When you now reboot it you work but you are unrooted.

Download newest twrp installer zip, and magisk 21.4
Unhide magisk Manager when it's hided
Flash twrp zip in magisk**

Sorry been busy with work and life haven't had a chance to look into this more. I don't have the three dots to do a system update or another way I could find to manually update the full OTA again. Also could find no information at all how to flash twrp using Magisk. Do I do it as a module or patch a file option? Trying not to do anything wrong.

A relative simple method to save your running phone and get magisk v22 installed:

Thank you for detailed info, mine is sde11, this sounds like it will succeed but doesn't that end up doing the same process as the bricked phones in the end if it is v22 still? Not exactly sure what causes the bricking

@rpallai
Copy link

rpallai commented Apr 8, 2021

It is not possible to update the full OTA again manually without restarting first.

[...] but doesn't that end up doing the same process as the bricked phones in the end if it is v22 still? Not exactly sure what causes the bricking

I also don't know how I ended up with a corrupted boot image but this method worked for me - now I'm on v22 with latest OTA. If I remember correctly the "let's go" button didn't do anything at all at first so I pushed it a few times. Maybe I started more install processes in parallel which led to the corruption..? I have no idea.

@popy2k14
Copy link
Author

popy2k14 commented Apr 8, 2021

You can flash the twrp installer zip within magisk like an module.

@BugraAkdogan
Copy link

It is not possible to update the full OTA again manually without restarting first.

[...] but doesn't that end up doing the same process as the bricked phones in the end if it is v22 still? Not exactly sure what causes the bricking

I also don't know how I ended up with a corrupted boot image but this method worked for me - now I'm on v22 with latest OTA. If I remember correctly the "let's go" button didn't do anything at all at first so I pushed it a few times. Maybe I started more install processes in parallel which led to the corruption..? I have no idea.

Yes I had the same experience with lets go button, force closed the app to get it working, then got the error. Did you end up with root still on restart or had to root again?

You can flash the twrp installer zip within magisk like an module.

awesome I will try that either way thank you

@rpallai
Copy link

rpallai commented Apr 8, 2021

[...] Did you end up with root still on restart or had to root again?

I was root even after restart.

@BugraAkdogan
Copy link

You can flash the twrp installer zip within magisk like an module.

This didn't work with either .img or .zip TWRP, for zip it is saying "failed to unpack" with .img it fails right away. I also tried flashify but it keeps freezing pretty much anything I do.

@BugraAkdogan
Copy link

Just wanted to leave an update for anyone else that may have the same issue, I couldn't get TWRP flashed or Flashify to work at all so I just flashed the latest version of magisk and rebooted. It rebooted into the same partition with an error about firmware update failing, so I updated firmware and did OTA on magisk and worked fine, still have root no boot loop.

@popy2k14
Copy link
Author

popy2k14 commented Jun 8, 2021

Nice that you got it working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants