warning dont upgrade new version of magisk 20.2 - LG V20 Guides, News, & Discussion

came out today. bricked my lg v20 h918
come up showing red text with number of times bootloader is unlocked and will not boot further..
tried direct install.
had to hold button down like going into recovery then select yes twice then getg into twrp then restore boot and lafs etc.
then when all working i tried to install the same version via twrp install same issue. apparently installing to wrong partition..
reinstalling the older 20.1 (hopefully you have it downloaded) from twrp worked fine.

Thanks for the info! Little late for me. Just wanted to post the last known good Magisk for anyone that needs it.
Search for download-magisk-20-1-stable

What did you do after booting into TWRP?

same issue, unfortunately, saw this post too late

same and now im screwed how can we recover this?
it says warranty void !!
number of times bootloader unlocked : 2 (in red
*Welcome to Fastboot mode:
* HOW TO EXIT fastboot mode
use 'fastboot reboot' command if the fastboot is available
i tried to install magisk 18 and then 20.1. they install but im still bricked at this same issue above.
HELP
h918

I was able to get up and running again by flashing H91820h.zip in TWRP, then flash Magisk-v20.1.zip and finally TWRP 3.3.1-0 2019-05-17 .img
Phone booted normally after this process. Hope this helps!

Similar situation. Fortunately, I did a nandroid backup first, so I restored it to get the phone up and running again.

My Success Story
For those of you who, like me, didn't have a known good backup to work with, here's what I did:
Determine ROM version installed if you don't know what it is (I was able to check the /system/build.prop file from TWRP under ro.lge.swversion)
Grab the appropriate ROM .zip file (I got my h910-10r zip file from the H910 Root Post)
Unzip the ROM file
Grab the "boot" file from the ROM and place on an SD card as boot.img
Flash boot.img to the boot partition using the TWRP install function (you'll have to toggle it to show Images in the install screen)
Reflash Magisk v20.1 (you can download it from github)
Wipe Dalvik and Cache
Reboot
Wait for the LONG boot process which will go through the nerve-wracking android is staring screen with the percentage bar as it rebuilds the Dalvik cache (I think that's what it's doing)
As a note, this did not clear any of my data.
Good luck, YMMV.

For anyone with this issue run the latest magisk uninstaller in twrp and restart the phone. If that doesn't work boot back into twrp and install magisk 20.1

---------- Post added at 08:47 PM ---------- Previous post was at 08:45 PM ----------
James.ptrsn said:
For those of you who, like me, didn't have a known good backup to work with, here's what I did:
Determine ROM version installed if you don't know what it is (I was able to check the /system/build.prop file from TWRP under ro.lge.swversion)
Grab the appropriate ROM .zip file (I got my h910-10r zip file from the H910 Root Post)
Unzip the ROM file
Grab the "boot" file from the ROM and place on an SD card as boot.img
Flash boot.img to the boot partition using the TWRP install function (you'll have to toggle it to show Images in the install screen)
Reflash Magisk v20.1 (you can download it from github)
Wipe Dalvik and Cache
Reboot
Wait for the LONG boot process which will go through the nerve-wracking android is staring screen with the percentage bar as it rebuilds the Dalvik cache (I think that's what it's doing)
As a note, this did not clear any of my data.
Good luck, YMMV.
Click to expand...
Click to collapse
Thanks so much, you really saved me. I was panicking for sure. These directions need to be stickied!
---------- Post added at 08:49 PM ---------- Previous post was at 08:47 PM ----------
BadToThePhone said:
For anyone with this issue run the latest magisk uninstaller in twrp and restart the phone. If that doesn't work boot back into twrp and install magisk 20.1
Click to expand...
Click to collapse
Tried didn't work, but thanks, the one above worked for sure, no lost data

lgkahn said:
came out today. bricked my lg v20 h918
come up showing red text with number of times bootloader is unlocked and will not boot further..
tried direct install.
had to hold button down like going into recovery then select yes twice then getg into twrp then restore boot and lafs etc.
then when all working i tried to install the same version via twrp install same issue. apparently installing to wrong partition..
reinstalling the older 20.1 (hopefully you have it downloaded) from twrp worked fine.
Click to expand...
Click to collapse
Unfortunately i wasn't lucky with this.. got stuck in fastboot, my sd and internal storage are both wiped, Rip years of data on that sd.. Can't get a system on the SD or internal storage, Fastboot isn't helping, ADB sideload won't load in twrp, LG Bridge won't detect my phone Am i screwed with this? I can boot to twrp but thats about it

texas7412 said:
Unfortunately i wasn't lucky with this.. got stuck in fastboot, my sd and internal storage are both wiped, Rip years of data on that sd.. Can't get a system on the SD or internal storage, Fastboot isn't helping, ADB sideload won't load in twrp, LG Bridge won't detect my phone Am i screwed with this? I can boot to twrp but thats about it
Click to expand...
Click to collapse
TWRP on my US996 automatically made the phone a usb drive when it got plugged in. Have you looked for it as a usb drive? also have you checked your usb drivers?

James.ptrsn said:
For those of you who, like me, didn't have a known good backup to work with, here's what I did:.......................
Click to expand...
Click to collapse
Fortunately there is even more easy way to recover.
My H990DS has been also affected by Magisk update. Luckily I discovered that Magisk itself makes a backup of the boot image during update from previous Magisk version. It is located in the /data/magisk_backup_<very long sequence of characters and digits>. The name of the backup archive file is boot.img.gz
So I booted to TWRP, unziped the file boot.img from the above archive and flashed it to the boot partition using TWRP. Then rebooted to system.
And that's all folks! No data loss, no need to look for original ROM.zip, no need to look for and re-flash Magisk 20.1 (the system has been restored automatically to Magisk 20.1), no need to wipe Dalvik and Cache!
I think that this solution is the most simple and easy, so need to be in sticky post.

I'm in the TWRP Recovery file manager and I can't see magisk backup folder.

pendgy said:
Fortunately there is even more easy way to recover.
My H990DS has been also affected by Magisk update. Luckily I discovered that Magisk itself makes a backup of the boot image during update from previous Magisk version. It is located in the /data/magisk_backup_<very long sequence of characters and digits>. The name of the backup archive file is boot.img.gz
So I booted to TWRP, unziped the file boot.img from he above archive and flashed it to the boot partition using TWRP. Then rebooted to system.
And that's all folks! No data loss, no need to look for original ROM.zip, no need to look for and re-flash Magisk 20.1 (the system has been restored automatically to Magisk 20.1), no need to wipe Dalvik and Cache!
I think that this solution is the most simple and easy, so need to be in sticky post.
Click to expand...
Click to collapse
Thank you. This helped a lot. Can't remember ever being without my phone for this long. Very stressful. This worked for my LG V20. Few things to add. I was super nervous to boot into twrp using the hardware "factory reset" option. Normally it just asks to wipe data once before booting into TWRP but after this happened, it asked two times. Was worried the magisk "update" wiped out my twrp and I was going to actually wipe all of my data using the recovery option. After unsuccessfully trying multiple ways to install twrp via fastboot as a safety net, I bit the bullet and did the double factory reset. Thankfully, it brought me to TWRP. Those of you worried, hope this helps ease your mind that twrp is intact after this debacle.
Next, using @pendgy help, I found the boot.img.gz but was unable to unzip in twrp. I copied the file to the internal sd so I could view on my pc. Connected to pc while in twrp and unzipped the boot.img.gz folder. Then extracted the boot.img into the internal sd. Was then able to install image to boot partition. Rebooted and everything was exactly as it was 17 hours ago when my heart sank. Yay!

Thanks to everyone for the reports and warnings. I saw the update to Magisk Manager yesterday on my Shield K1 and allowed that to update. I didn't update Magisk itself because I don't trust the direct install method through Manager. I saw the notification on my sandbox V20 this morning and dismissed it. My daily V20 hasn't received an update notification yet, but I think I disabled status bar notifications for Magisk on my daily. I'll be sure to not install 20.2 on either phone.
Magisk Manager's update notifications are pretty annoying to be honest. My devices are already rooted. An updated version of Magisk isn't going to make them rooted better.

Oh boy. Learning a lot of hard lessons this morning.
Apparently my TWRP install has been broken/corrupted for who knows how long. I'm now several hours into restoring my phone from basically scratch (had to retry a bunch of times because I'm a dumbdumb and haven't poked around at Android recoveries in ages).
Moral of the story: BACK UP EARLY and BACK UP OFTEN. If you don't have a backup (any kind of backup), the day will inevitably come when you wish you did. Sigh.
Oh well, maybe my phone will run a bit smoother now. Good luck everyone.

pendgy said:
Fortunately there is even more easy way to recover.
My H990DS has been also affected by Magisk update. Luckily I discovered that Magisk itself makes a backup of the boot image during update from previous Magisk version. It is located in the /data/magisk_backup_<very long sequence of characters and digits>. The name of the backup archive file is boot.img.gz
So I booted to TWRP, unziped the file boot.img from the above archive and flashed it to the boot partition using TWRP. Then rebooted to system.
And that's all folks! No data loss, no need to look for original ROM.zip, no need to look for and re-flash Magisk 20.1 (the system has been restored automatically to Magisk 20.1), no need to wipe Dalvik and Cache!
I think that this solution is the most simple and easy, so need to be in sticky post.
Click to expand...
Click to collapse
How did you unzip the archive with TWRP?
Edit: Nevermind, copied the archive to external SD und unzipped it with 7z on my computer.

fatappel said:
...............................
Next, using @pendgy help, I found the boot.img.gz but was unable to unzip in twrp. I copied the file to the internal sd so I could view on my pc. Connected to pc while in twrp and unzipped the boot.img.gz folder. Then extracted the boot.img into the internal sd. Was then able to install image to boot partition. Rebooted and everything was exactly as it was 17 hours ago when my heart sank. Yay!
Click to expand...
Click to collapse
In fact I did the same I didn't menioned all the stuff with connecting to PC, copying files to PC, extracting archives and copying back to the phone the boot.img file for subsequent flashing via TWRP. This is because I know the forum members here are experienced guys
The lesson learned is that TWRP is rock solid and we shall trust to it
---------- Post added at 23:37 ---------- Previous post was at 23:36 ----------
Attila17 said:
How did you unzip the archive with TWRP?
Click to expand...
Click to collapse
See my last post. I didn't. I used a PC to do that.

I got really ****ed by magisk.
Did the recommended update and now I`m stuck at the fastboot screen
I can fastboot reboot but nothing else
how do I boot into twrp (power vol button down only brings fastboot)
I tried flashing twrp via fastboot but i get failed remote (unknow command)
any help please ?

Related

Best Method to Re-flash & Re-root Plus Have Internal Storage Working

Hey Guys -
I have had my A9 for about 2 months and love it. When I first purchased it, I rooted it using the method pinned to this forum which seemed to work well. Soon afterwards, I found out that when I inserted and tried to format an SD card as "internal", it wouldn't work and result in it showing as "corrupted." I soon found out that this seemed to be due to the root replacing the original boot.img which messes with encryption. Since the root was posted, SuperSU has been updated and that step has changed supposedly.
Now that I have some time, I want to fix this issue. Before doing so, I've read through many posts and think I have a plan. I wanted to post the steps I need to follow as I understood them to make sure my plan is correct and will result in not only being able to format an SD internally and be rooted, but also a working phone Below are the specs of my phone, the steps I think it may take to resolve, and a few questions I have after reading through numerous posts. Any help is appreciated!
Phone Specs
Some as currently listed in Settings
- HTC One A9
- AT&T USA
- Rooted / s-off
- Android 6.0 / Sense 7.0g
Software Number: 1.10.502.3
Kernel: 3.10.73-perf-g28d66e0
Baseband: [email protected]_29.05_F
Build: 1.10.502.3 CL635081 release keys
Android Security Patch Level: 2015-10-01
Steps to Fix
1. Backup any data desired (I have a nightly Titanium backup)
2. Download RUU for same version (1.10.502.3) from http://forum.xda-developers.com/one-a9/general/wip-ruu-htc-one-a9-t3240344
Should I use newer version or are those for different carriers?
3. Apply RUU (via embedded EXE or try to extract and apply using adb/fastboot)
4. Once phone is restored, make a backup of boot.img from phone just in case it's needed later
5. Install TWRP via adb/fastboot
6. Install SuperSU via TWRP
At this point (if I can make it to this point), test and see if the phone's rooted and I can format the SD internally. If so, great. If not, continue with the following steps...
7. Download & flash modded boot.img from A9 Root post
8. Install TWRP via adb / fastboot
9. Install SuperSU via TWRP
10. Flash original boot.img backed up in step #4 to my phone (since modded one was only needed initially to install SuperSU) So that encryption keys match and I may successfully format sd cards for internal use
My Questions
1. Are the steps above basically the process i need to perform or is there a better / easier way? I don't know if I could flash a common boot.img from an RUU or if it needs to be flashed to phone first for encryption purposes. Even if I can, I've tried to extract it from ruu.zip before and could not
2. Should I use an RUU for a newer version (over 1.10.502.3) or are those for different carriers and not work with my AT&T phone?
3. Does it make a difference if I install the RUU via embedded EXE or extract and apply using adb/fastboot?
4. What versions of TWRP & SuperSU should I use?
Any additional suggestions would be appreciated - I just want to get this resolved once and for all! - Thanks!
bzowk said:
Hey Guys -
I have had my A9 for about 2 months and love it. When I first purchased it, I rooted it using the method pinned to this forum which seemed to work well. Soon afterwards, I found out that when I inserted and tried to format an SD card as "internal", it wouldn't work and result in it showing as "corrupted." I soon found out that this seemed to be due to the root replacing the original boot.img which messes with encryption. Since the root was posted, SuperSU has been updated and that step has changed supposedly.
Now that I have some time, I want to fix this issue. Before doing so, I've read through many posts and think I have a plan. I wanted to post the steps I need to follow as I understood them to make sure my plan is correct and will result in not only being able to format an SD internally and be rooted, but also a working phone Below are the specs of my phone, the steps I think it may take to resolve, and a few questions I have after reading through numerous posts. Any help is appreciated!
Phone Specs
Some as currently listed in Settings
- HTC One A9
- AT&T USA
- Rooted / s-off
- Android 6.0 / Sense 7.0g
Software Number: 1.10.502.3
Kernel: 3.10.73-perf-g28d66e0
Baseband: [email protected]_29.05_F
Build: 1.10.502.3 CL635081 release keys
Android Security Patch Level: 2015-10-01
Steps to Fix
1. Backup any data desired (I have a nightly Titanium backup)
2. Download RUU for same version (1.10.502.3) from http://forum.xda-developers.com/one-a9/general/wip-ruu-htc-one-a9-t3240344
Should I use newer version or are those for different carriers?
3. Apply RUU (via embedded EXE or try to extract and apply using adb/fastboot)
4. Once phone is restored, make a backup of boot.img from phone just in case it's needed later
5. Install TWRP via adb/fastboot
6. Install SuperSU via TWRP
At this point (if I can make it to this point), test and see if the phone's rooted and I can format the SD internally. If so, great. If not, continue with the following steps...
7. Download & flash modded boot.img from A9 Root post
8. Install TWRP via adb / fastboot
9. Install SuperSU via TWRP
10. Flash original boot.img backed up in step #4 to my phone (since modded one was only needed initially to install SuperSU) So that encryption keys match and I may successfully format sd cards for internal use
My Questions
1. Are the steps above basically the process i need to perform or is there a better / easier way? I don't know if I could flash a common boot.img from an RUU or if it needs to be flashed to phone first for encryption purposes. Even if I can, I've tried to extract it from ruu.zip before and could not
2. Should I use an RUU for a newer version (over 1.10.502.3) or are those for different carriers and not work with my AT&T phone?
3. Does it make a difference if I install the RUU via embedded EXE or extract and apply using adb/fastboot?
4. What versions of TWRP & SuperSU should I use?
Any additional suggestions would be appreciated - I just want to get this resolved once and for all! - Thanks!
Click to expand...
Click to collapse
First off, this isn't Development.
Secondly, I explained to you how to fix this in the very root thread you linked several times.
Thirdly, there's a newer, official RUU from HTC right on their ROM Downloads website. I'd start by installing that (though I also have a recovery-flashable version of that ROM in my Base ROM thread).
Fourthly, with access to an official RUU, and my ROM decrypt script, you have access to the stock boot.img (which is also in the firmware zip in my Base ROM thread), which you can use as your baseline for restoring the verity key to the ramdisk, thereby allowing you to use adopted storage without any issues. Note however that I was only able to use adopted storage with the "forceencrypt" flag enabled.
Fifthly, you can't just restore the stock boot image (at least not if you want to stay rooted). You can be both rooted and encrypted, but you have to first make sure SuperSU is flashed and set up prior to allowing the device to be encrypted again (adopted storage only works with an encrypted device, and then you won't be able to access your storage with TWRP).
OK, OK - sorry.... It had been a while since posting and honestly forgot about that thread - my fault.
I decided to start fresh so have already restored the phone to HTC's latest RUU (1.27.502.5 ATT) as I already had it downloaded. I've also flashed TWRP 2.8.8.1 to the phone, but am obviously prompted to enter a password when I try to enter recovery. Based off what I've read, the steps below seem to be what I need to do so that I may be rooted + still have encryption for internal sd formatting. Is it correct (or close to it)
Using an Ubuntu 14.04 x86 VM...
1. Download & extract your decrypt script to a temp folder in linux vm
2. In Windows, run same RUU I applied and copy out rom.zip from %temp%
3. Rename "rom.zip" to "rom_a9.zip"
4. Copy rom_a9.zip to the ""place_rom_zip_here" folder of your extracted script in the vm
5. Run ./decrypt-htc and wait for script to complete to get img files
On Phone (Currently has same RUU installed + TWRP but not rooted)
6. Root phone using original method of flashing modded boot.img, install SuperSU, and get rooted
7. Once done and rooted, flash boot.img I extracted using your script above to phone via adb
Once that's done, it should be rooted + have encryption thus allowing me to use internal sd card, right? Sorry to be such a bother - just want to get this fixed and done with
Thanks!
bzowk said:
OK, OK - sorry.... It had been a while since posting and honestly forgot about that thread - my fault.
I decided to start fresh so have already restored the phone to HTC's latest RUU (1.27.502.5 ATT) as I already had it downloaded. I've also flashed TWRP 2.8.8.1 to the phone, but am obviously prompted to enter a password when I try to enter recovery. Based off what I've read, the steps below seem to be what I need to do so that I may be rooted + still have encryption for internal sd formatting. Is it correct (or close to it)
Using an Ubuntu 14.04 x86 VM...
1. Download & extract your decrypt script to a temp folder in linux vm
2. In Windows, run same RUU I applied and copy out rom.zip from %temp%
3. Rename "rom.zip" to "rom_a9.zip"
4. Copy rom_a9.zip to the ""place_rom_zip_here" folder of your extracted script in the vm
5. Run ./decrypt-htc and wait for script to complete to get img files
On Phone (Currently has same RUU installed + TWRP but not rooted)
6. Root phone using original method of flashing modded boot.img, install SuperSU, and get rooted
7. Once done and rooted, flash boot.img I extracted using your script above to phone via adb
Once that's done, it should be rooted + have encryption thus allowing me to use internal sd card, right? Sorry to be such a bother - just want to get this fixed and done with
Thanks!
Click to expand...
Click to collapse
Re-read my post. If you flash the stock boot.img, you will no longer be rooted.
And as I said in the original thread, you need to pull the rooted boot.img and add the verity key from the stock one to it. Also you'll need to add the forceencrypt and verify flag back.
P.S. You also need to re-read the instructions in the decrypt thread. You don't have to rename anything anymore.
Good Afternoon -
OK - sorry to frustrate you, but I think I finally have it figured out. I started from scratch, re-read many posts, and took notes. I was a little confused on the last part so wanted to verify, please...
I've already unpacked the boot.img from the latest HTC A9 (AT&T) RUU and have the two folders. I restored the same RUU to my phone, flashed TWRP 2.8.8.1, backed up the boot.img, and unpacked it before realizing that I should have probably rooted it first.
Correct me if I'm wrong, but here's all I need to do to finish....
1. Download modified A9 boot.img from top of root thread
2. Flash modded boot.img using fastboot
3. Verify TWRP is still installed then use it to install SuperSU 2.67 (latest)
4. Back up boot partition just like I did before in TWRP
5. Unpack it on PC to create ramdisk and split_img folders
6. Copy verity_key from unpack of the actual RUU and overwrite one in rooted unpack
7. Edit the file fstab.qcom in the ramdisk folder of the rooted unpack in Notepad++ and add the "verify" flag after the wait flag on the fist uncommented line - save
8. Repack rooted boot.img
9. Flash phone with repacked boot.img using fastboot
10. Reboot & enjoy a rooted phone + encryption allowing sd internal formatting
Promise not to bug anymore if I can just get this resolved.
Thanks again for your assistance!
UPDATE
Hmm - was just prepping and went to download modded file from root thread's first post. Doesn't seem to have one that matches newest build of RUU I flashed - if I'm interpreting it correctly. Researching further, but if know of alternate method or another solution to get through steps 1 & 2 about (assuming they are correct), I'd appreciate it. Thanks
bzowk said:
Good Afternoon -
OK - sorry to frustrate you, but I think I finally have it figured out. I started from scratch, re-read many posts, and took notes. I was a little confused on the last part so wanted to verify, please...
I've already unpacked the boot.img from the latest HTC A9 (AT&T) RUU and have the two folders. I restored the same RUU to my phone, flashed TWRP 2.8.8.1, backed up the boot.img, and unpacked it before realizing that I should have probably rooted it first.
Correct me if I'm wrong, but here's all I need to do to finish....
1. Download modified A9 boot.img from top of root thread
2. Flash modded boot.img using fastboot
3. Verify TWRP is still installed then use it to install SuperSU 2.67 (latest)
4. Back up boot partition just like I did before in TWRP
5. Unpack it on PC to create ramdisk and split_img folders
6. Copy verity_key from unpack of the actual RUU and overwrite one in rooted unpack
7. Edit the file fstab.qcom in the ramdisk folder of the rooted unpack in Notepad++ and add the "verify" flag after the wait flag on the fist uncommented line - save
8. Repack rooted boot.img
9. Flash phone with repacked boot.img using fastboot
10. Reboot & enjoy a rooted phone + encryption allowing sd internal formatting
Promise not to bug anymore if I can just get this resolved.
Thanks again for your assistance!
UPDATE
Hmm - was just prepping and went to download modded file from root thread's first post. Doesn't seem to have one that matches newest build of RUU I flashed - if I'm interpreting it correctly. Researching further, but if know of alternate method or another solution to get through steps 1 & 2 about (assuming they are correct), I'd appreciate it. Thanks
Click to expand...
Click to collapse
You don't need anything from that root thread. Everything there is deprecated (which I've said several times).
If you already have the stock boot.img unpacked and ready to go, all you have to do is flash SuperSU, then back up the rooted boot.img that you now have on your device thanks to SuperSU. Unpack that boot.emmc.win and add the verity_key from the stock ramdisk and replace the fstab.qcom with the one from the stock ramdisk. Repack, flash to your device via fastboot or TWRP, and your device will encrypt on that first boot and you'll be good to go.
Just to make sure - you did a Format Data in TWRP prior to flashing SuperSU, correct?
Captain_Throwback said:
You don't need anything from that root thread. Everything there is deprecated (which I've said several times).
If you already have the stock boot.img unpacked and ready to go, all you have to do is flash SuperSU, then back up the rooted boot.img that you now have on your device thanks to SuperSU. Unpack that boot.emmc.win and add the verity_key from the stock ramdisk and replace the fstab.qcom with the one from the stock ramdisk. Repack, flash to your device via fastboot or TWRP, and your device will encrypt on that first boot and you'll be good to go.
Just to make sure - you did a Format Data in TWRP prior to flashing SuperSU, correct?
Click to expand...
Click to collapse
Thanks -
Well, that's the thing... One of the two unpacked boot.img I have currently is wrong. The two I have are:
- One unpacked boot.img extracted from latest RUU using your script in linux
- One unpacked boot.img backed up from unrooted phone which only had TWRP flashed
That was part of my question. I know that the 2nd unpacked boot.img above is worthless as the phone needed to be rooted prior to me backing it up. The question for me is how to flash superSU onto the phone (which currently has the same latest RUU + TWRP 2.8.8.1 installed) if I can only access TWRP is a read-only mode as I'm prompted for password upon booting to recovery. That's why I brought up the legacy root method as I don't know of an alternative... unless SuperSU doesn't require write permissions to whatever TWRP has locked down currently.
Once I can root it, backup it's boot, and unpack it; I just need to literally copy & overwrite the "verity_key" and "fstab.qcom" files (assuming the only difference is the fstab.qcom I'm overwriting doesn't have the verify flag), repack, then flash back to phone via fastboot, right?
Thanks for your patience!
bzowk said:
Thanks -
Well, that's the thing... One of the two unpacked boot.img I have currently is wrong. The two I have are:
- One unpacked boot.img extracted from latest RUU using your script in linux
- One unpacked boot.img backed up from unrooted phone which only had TWRP flashed
That was part of my question. I know that the 2nd unpacked boot.img above is worthless as the phone needed to be rooted prior to me backing it up. The question for me is how to flash superSU onto the phone (which currently has the same latest RUU + TWRP 2.8.8.1 installed) if I can only access TWRP is a read-only mode as I'm prompted for password upon booting to recovery. That's why I brought up the legacy root method as I don't know of an alternative... unless SuperSU doesn't require write permissions to whatever TWRP has locked down currently.
Once I can root it, backup it's boot, and unpack it; I just need to literally copy & overwrite the "verity_key" and "fstab.qcom" files (assuming the only difference is the fstab.qcom I'm overwriting doesn't have the verify flag), repack, then flash back to phone via fastboot, right?
Thanks for your patience!
Click to expand...
Click to collapse
Once you Format Data in TWRP and reboot recovery, you can flash SuperSU and you will be rooted. You just have to back up the boot.img after flashing SuperSU on the unencrypted device to re-enable verity so that adopted storage will work.
P.S. And no, the verify flag isn't the only difference. As I also said earlier (I'm constantly repeating myself), the device must be encrypted for Adopted Storage to work, so the forceencrypt flag from the stock fstab must also be present. That's why it's easier just to replace the whole file. The problem you have at the end of the day is that, while you'll be rooted and be able to use adopted storage in Android, you still won't be able to access said storage (or /data) in TWRP.
Captain_Throwback said:
Once you Format Data in TWRP and reboot recovery, you can flash SuperSU and you will be rooted. You just have to back up the boot.img after flashing SuperSU on the unencrypted device to re-enable verity so that adopted storage will work.
P.S. And no, the verify flag isn't the only difference. As I also said earlier (I'm constantly repeating myself), the device must be encrypted for Adopted Storage to work, so the forceencrypt flag from the stock fstab must also be present. That's why it's easier just to replace the whole file. The problem you have at the end of the day is that, while you'll be rooted and be able to use adopted storage in Android, you still won't be able to access said storage (or /data) in TWRP.
Click to expand...
Click to collapse
Great - Thanks!!
Just to make sure, below's my plan with a small question @ step #5. Does it get your stamp of approval?
Phone (A9) already had latest RUU restored (same RUU I ran against your script to pull boot.img from) and TWRP 2.8.8.1 flashed
1. Boot into TWRP & bypass initial screen prompting for password
2. Format Data
3. Reboot back into TWRP
4. Flash SuperSU 2.76 zip
5. Reboot to system then back to TWRP and backup boot partition? / Stay in TWRP and backup boot partition? / Reboot back into TWRP and backup boot partition?
6. Unpack backed up boot partition from phone
7. Copy "verity_key" & "fstab.qcom" files from ramdisk folder in unpacked RUU boot and paste into & overwrite same files in ramdisk folder of unpacked boot from rooted phone
8. Repack rooted phone boot (which includes both new files)
9. Flash newly packed boot.img to phone using fastboot
10. Enjoy
I really appreciate your help and patience with me!
bzowk said:
Great - Thanks!!
Just to make sure, below's my plan with a small question @ step #5. Does it get your stamp of approval?
Phone (A9) already had latest RUU restored (same RUU I ran against your script to pull boot.img from) and TWRP 2.8.8.1 flashed
1. Boot into TWRP & bypass initial screen prompting for password
2. Format Data
3. Reboot back into TWRP
Click to expand...
Click to collapse
Good so far . . .
bzowk said:
4. Flash SuperSU 2.76 zip
Click to expand...
Click to collapse
I'm sure this is just a typo, but that should be 2.67, not 76 (there is no 2.76).
bzowk said:
5. Reboot to system then back to TWRP and backup boot partition? / Stay in TWRP and backup boot partition? / Reboot back into TWRP and backup boot partition?
Click to expand...
Click to collapse
Bolded the correct one above (no need to leave TWRP as the necessary modifications have already been made).
bzowk said:
6. Unpack backed up boot partition from phone
7. Copy "verity_key" & "fstab.qcom" files from ramdisk folder in unpacked RUU boot and paste into & overwrite same files in ramdisk folder of unpacked boot from rooted phone
8. Repack rooted phone boot (which includes both new files)
Click to expand...
Click to collapse
Looks good . . .
bzowk said:
9. Flash newly packed boot.img to phone using fastboot
Click to expand...
Click to collapse
TWRP can also flash the new image, but fastboot is probably the most reliable way to do it.
bzowk said:
10. Enjoy
Click to expand...
Click to collapse
Hopefully . . . You'll likely get a reboot on the first boot (possible multiple reboots), as SuperSU needs a reboot to install the necessary files. Since your device will also encrypt on that initial boot, I'm not sure whether there will be a conflict or not.
bzowk said:
I really appreciate your help and patience with me!
Click to expand...
Click to collapse
Guess we'll see if it all works out . . .
Thanks!
I proceeded by formatting data, booting directly back intoTWRP, flashing SuperSU, backing up the boot partition, then mounting and copying it over to my PC. The boot.img size was 65,536kb - the same size as the one I unpacked from the RUU. Once unpacked, it was missing the verity_key file and the fstab.qcom file was different + missing the verify flag.
I replaced those two files, then ran repackimg.bat which created image-new.img which I renamed to boot.img. Interesting, though, that this file was only 45,890kb. If it's a repack, shouldn't it be the same or similar? Anyways, the phone was still in TWRP (hadn't booted to system since before the format data) so booted it into bootloader directly and tried flashing boot using my new 45mb boot.img.
If failed - but - my phone was only at 17% power. Don't know if that's why it failed or not so it's charging right now while still in the bootloader. Below is what was echoed when I tried flashing it:
Code:
c:\adb>fastboot flash boot boot.img
target reported max download size of 800000000 bytes
sending 'boot' (45890 KB)...
OKAY [ 3.488s]
writing 'boot'...
(bootloader) HOSD CL#656287
FAILED (remote: 4 RU_BATTERY_LOW please connect charger (17% < 30%))
finished. total time: 4.506s
The reason I didn't boot to system is that I thought that was when the encryption might take place. Going to wait until above 30% power then try flashing again. Powered down to charge, but plan to boot straight back into bootloader to flash. If you see anything that stands out or that I need to do otherwise, please let me know. Otherwise, I'll report back what the result was after getting above 30%.
Thanks again!
bzowk said:
Thanks!
I proceeded by formatting data, booting directly back intoTWRP, flashing SuperSU, backing up the boot partition, then mounting and copying it over to my PC. The boot.img size was 65,536kb - the same size as the one I unpacked from the RUU. Once unpacked, it was missing the verity_key file and the fstab.qcom file was different + missing the verify flag.
I replaced those two files, then ran repackimg.bat which created image-new.img which I renamed to boot.img. Interesting, though, that this file was only 45,890kb. If it's a repack, shouldn't it be the same or similar? Anyways, the phone was still in TWRP (hadn't booted to system since before the format data) so booted it into bootloader directly and tried flashing boot using my new 45mb boot.img.
If failed - but - my phone was only at 17% power. Don't know if that's why it failed or not so it's charging right now while still in the bootloader. Below is what was echoed when I tried flashing it:
Code:
c:\adb>fastboot flash boot boot.img
target reported max download size of 800000000 bytes
sending 'boot' (45890 KB)...
OKAY [ 3.488s]
writing 'boot'...
(bootloader) HOSD CL#656287
FAILED (remote: 4 RU_BATTERY_LOW please connect charger (17% < 30%))
finished. total time: 4.506s
The reason I didn't boot to system is that I thought that was when the encryption might take place. Going to wait until above 30% power then try flashing again. Powered down to charge, but plan to boot straight back into bootloader to flash. If you see anything that stands out or that I need to do otherwise, please let me know. Otherwise, I'll report back what the result was after getting above 30%.
Thanks again!
Click to expand...
Click to collapse
The repack is smaller because the backup uses "dd" to copy the entire block device. Not all that space is actually used after compression. That's nothing to worry about.
And these devices are very picky about flashing only when there's sufficient battery, so I'm sure that's the only reason it failed. TWRP, however, doesn't care how much battery you have, so you could always flash the new boot.img in recovery.
Captain_Throwback said:
The repack is smaller because the backup uses "dd" to copy the entire block device. Not all that space is actually used after compression. That's nothing to worry about.
And these devices are very picky about flashing only when there's sufficient battery, so I'm sure that's the only reason it failed. TWRP, however, doesn't care how much battery you have, so you could always flash the new boot.img in recovery.
Click to expand...
Click to collapse
Hey, hey, hey - think it worked!!
Once I got above 30%, I flashed without issue. I rebooted and was able to format an sd internally successfully, too. Now, I just need to verify it's rooted, but think it is. Thank you so much for your help! I'm going to write a guide for newbs like me to use in the future soon.
Thanks again!
bzowk said:
Hey, hey, hey - think it worked!!
Once I got above 30%, I flashed without issue. I rebooted and was able to format an sd internally successfully, too. Now, I just need to verify it's rooted, but think it is. Thank you so much for your help! I'm going to write a guide for newbs like me to use in the future soon.
Thanks again!
Click to expand...
Click to collapse
If your adopted storage doesn't show as corrupted, and you're able to open the SuperSU app in your app drawer and not get a message that no su binary is installed, you should be good to go .
bad topic

How to update OOS 5.1.6, Install official TWRP and magisk - tested working!

Hi guys,
Here is my complete foolproof guide on how to update your system. Please note that there may be other maybe easier ways that cut-out some steps but this worked for me. It is intended for Noobies so I apologise to more advanced users if it seems tedious and long-winded. But that's how Noobies like it with everything explained in detail.
IMPORTANT NOTE: If you have previously used parallel apps then before doing any of this process you must delete user 999 from the system, otherwise you backups will not work!!!
From a terminal window (I use terminal emulator from play store ) type su and enter. Now type the command pm remove-user 999 and enter. Now you shouldn't have to worry about parallel apps messing up your backups.
Thanks to @dgunn for this :good:
https://forum.xda-developers.com/on...estore-999-t3801632/post76760812#post76760812
Also, please note that I have NEVER previously installed an un-official twrp on my device (wanted to wait for official ), however, I was unlocked, and rooted with magisk v16.0 and on stock oos 5.1.5 before beginning this upgrade process.
If you already have an un-official twrp installed, then I cannot guarantee that this guide will work for you. It might, it might not
Disclaimer: This is a guide for helping others. It is your choice to follow it and I take no responsibility for any problems you encounter as a result of following this guide. You do it at your own risk
Ok, lets get started......................
Actually, before we do let's get one thing clear that is confusing a lot of people regarding fastboot and twrp. There are 2 ways of putting twrp recovery onto your phone. A temporary way (disappears after rebooting and goes back to stock recovery) and a permanent way (the best way that stays put - what we all want right?). This guide assumes that you don't currently have twrp on your phone.
In order to put a permanent official twrp on your phone, first we have to boot (NOT flash!) into a temporary version of twrp. The fastboot command for this is "fastboot boot path_to_temporary_twrp.img" (without the quotes of course )
The difference between temporary twrp and permanent twrp is in whether we either fastboot boot or fastboot flash.
Ok, let's begin
First of all, as a precaution, disable all security on your device like pin, pattern, password, fingerprint. Make sure that when you wake your phone it goes straight to the homescreen without any prompts for pins etc etc. May not be needed but it's what I did
1. Download the following files to the following locations....
a. Official oxygen OS 5.1.6 zip file (full zip) > to root of sdcard .
b. Official twrp installer ZIP file > to root of sdcard. (This is our permanent twrp file)
c. Magisk root zip file (I used v 16.0 but v16.4 zip file should be okay too) > to root of sdcard.
d. Official twrp installer IMG file > to your PC in the same folder as your fastboot files. (This is our temporary twrp file)
These files are available for download in other threads on XDA just search for them.
Once that is done proceed as follows.....
2. Go to settings>system updates and click the gear icon in the top right and choose "local upgrade" and then select the Oxygen 5.1.6 zip file from your sdcard. The system will now begin to update itself. Once finished it will prompt you to reboot, do this, and the system will boot back up into Oxygen OS 5.1.6 :good:
3. Now, long press your power button and select reboot and select bootloader option and your phone will reboot into bootloader (fastboot) mode.
4. On your PC go to your fastboot folder and open a command prompt in that folder (don't forget you previously put the temporary twrp image file in here)
5. Now plug your phone into the PC
6. At the command prompt enter following command fastboot devices
and your phone should show up as connected and recognised.
7. We are now going to boot the phone into the temporary twrp. Type the following command fastboot boot <name of temporary twrp file (from your fastboot folder)>.img
8. Your phone will now boot into the temporary twrp recovery and from here we can now flash the permanent version of twrp that we previously put on our sdcard.
9. On your phone, select Install, then find the twrp zip file on the root of your sdcard, select it and swipe to flash.
10. Once this has flashed successfully, we now need to reboot into this new permanent recovery. DO NOT REBOOT TO SYSTEM AT THIS POINT! Now, select "Reboot" option and select "Recovery". Your phone will now reboot into the new permanent twrp. You can now forget about the other temporary twrp from earlier
11. Once the phone goes back into recovery select Install option and find the Magisk root zip file on your sdcard and select it. Now swipe to flash it. After successfully flashing Magisk, you are now ready to enjoy the fruits of your labours
Go back to the twrp homepage and select Reboot>system.
The system will now boot normally and if you have followed these steps to a Tee you will be on OOS 5.1.6 and rooted!
I have also done a successful twrp backup without any error messages. Your previous data will be untouched and you can now set-up your security again.
One final thing to note - because the boot and recovery partitions are now combined, this means that everytime you flash something to your boot partition, your new permanent twrp recovery will be lost and you will have to re-install twrp again from scratch initially through fastboot.
Enjoy
carlos67 said:
From a terminal window (I use terminal emulator from play store ) type su and enter. Now type the command pm remove_user 999 and enter. Now you shouldn't have to worry about parallel apps messing up your backups.
Click to expand...
Click to collapse
I bet the terminal command should be:
pm remove-user 999
I've made almost the same without problem
After many years of being actively involved in unlocking, flashing, and tinkering. I feel I'm starting from scratch. This quick guide is exactly what I've been waiting for as I'm in the same situation with being simply unlocked and rooted lol. I'll be replicating these steps shortly ?.
Only thing I'm wondering, once everything is done and running... If I flash a rom with the official "permanent" twrp, it's gone gone? Let's just say, renovate ice ROM?
Maybe it's the 16 hour day I worked and lack of sleep... But having it replaced upon a single rom flash and carrying the name "permanent" seems like 2 opposing ideas lol
Kiddman said:
I bet the terminal command should be:
pm remove-user 999
Click to expand...
Click to collapse
Yes, well spotted and corrected :good:
InflatedTitan said:
After many years of being actively involved in unlocking, flashing, and tinkering. I feel I'm starting from scratch. This quick guide is exactly what I've been waiting for as I'm in the same situation with being simply unlocked and rooted lol. I'll be replicating these steps shortly ?.
Only thing I'm wondering, once everything is done and running... If I flash a rom with the official "permanent" twrp, it's gone gone? Let's just say, renovate ice ROM?
Maybe it's the 16 hour day I worked and lack of sleep... But having it replaced upon a single rom flash and carrying the name "permanent" seems like 2 opposing ideas lol
Click to expand...
Click to collapse
If you were to flash a full OTA official update then yes, your "permanent" twrp will be gone because the boot partition gets flashed to stock and you'd need to re-install twrp starting in fastboot. However, for custom rom flashes, it depends if their is a kernel bundled in with the rom. If not then twrp should remain, if yes then as with official update, re-install twrp.
It's more normal for a custom rom to simply overwrite system partition without touching boot partition and twrp, but, sometimes custom rom's like Renovate come bundled with a kernel (TBalden's) and wipe out twrp.
If I'm wrong on this I stand to be corrected.
Kiddman said:
I bet the terminal command should be:
pm remove-user 999
Click to expand...
Click to collapse
Yes you are correct because this was my finding and thank you OP for not giving credit
My findings of the 255 error (999)
https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
dgunn said:
Yes you are correct because this was my finding and thank you OP for not giving credit
My findings of the 255 error (999)
https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
Click to expand...
Click to collapse
My apologies, an oversight, corrected
carlos67 said:
My apologies, an oversight, corrected
Click to expand...
Click to collapse
Thank you sir. And great write up btw
Something to note is the Renovate ICE 1.0 magisk module messed with the text in settings on OOS 5.1.6. It went back to normal when I disabled that module.
I thought it was the VoEnabler module initially but I wasnt correct.
I put the zip in the root folder (Not the actual folder named root) but the local upgrade isn't showing anything in there.
I'm on 5.1.5 rooted with Magisk 16.0 and have 5.7 magisk manager installed along with xposed and gravity box.
Any idea why my local upgrade isn't detecting the upgrade zip? I downloaded it from Funk Wizards post. I got clicked the "official" link for OOS 5.1.6
I have a custom kernel and magisk installed, can I still follow this guide?
surface13 said:
I put the zip in the root folder (Not the actual folder named root) but the local upgrade isn't showing anything in there.
I'm on 5.1.5 rooted with Magisk 16.0 and have 5.7 magisk manager installed along with xposed and gravity box.
Any idea why my local upgrade isn't detecting the upgrade zip? I downloaded it from Funk Wizards post. I got clicked the "official" link for OOS 5.1.6
Click to expand...
Click to collapse
Figured it out, it was because the ro.product.device=OnePlus 6 instead of OnePlus6 in the build.prop file.
I had originally changed it to sailfish to see if I can get Daydream working. When I changed it back I accidentally added a space =/
Anyone done this on a phone with unofficial TWRP to start out yet?
Lownita said:
I have a custom kernel and magisk installed, can I still follow this guide?
Click to expand...
Click to collapse
Yes you can.
Considering that many of us have been rooted with patched boot image and no custom recovery, this guide is very well written.
Simple Guide is Already available | No Root | No Rom
youtube.com/watch?v=a7rh4NpYD7E
I followed the above youtube guide . Very simple .
Steps :
Install VPN app like Surf Easy Android VPN
Change Region to Canada or Germany
Again try to update the Oxygen OS
It will show in update available .
"
2. Go to settings>system updates and click the gear icon in the top right and choose "local upgrade" and then select the Oxygen 5.1.6 zip file from your sdcard. The system will now begin to update itself. Once finished it will prompt you to reboot, do this, and the system will boot back up into Oxygen OS 5.1.6
"
After that I got constant reboot with the message " System UI has stopped"
x111 said:
"
2. Go to settings>system updates and click the gear icon in the top right and choose "local upgrade" and then select the Oxygen 5.1.6 zip file from your sdcard. The system will now begin to update itself. Once finished it will prompt you to reboot, do this, and the system will boot back up into Oxygen OS 5.1.6
"
After that I got constant reboot with the message " System UI has stopped"
Click to expand...
Click to collapse
Could be a corrupt download file. I suggest you do the following.....
Re-download the file and check it's good using an MD5 checker app/tool. Then, boot your phone into bootloader (fastboot) mode by powering off first and then pressing and holding the vol up button.
Then follow steps 4-to-10 in my guide for installing (1st) temporary twrp and then (2nd) permanent twrp. Once you have permanent twrp and are booted into it you should then copy the "new" download zip for the OTA that you md5 checked from your PC onto the root of your sdcard and install it by flashing the zip file in twrp. Now you should reboot to system which will change the active slot to the updated OOS you just flashed and then if you want boot back into recovery to flash a custom kernel (if you so wish) and Magisk root zip (again if you so wish).
carlos67 said:
Could be a corrupt download file. I suggest you do the following.....
Re-download the file and check it's good using an MD5 checker app/tool. Then, boot your phone into bootloader (fastboot) mode by powering off first and then pressing and holding the vol up button.
Then follow steps 4-to-10 in my guide for installing (1st) temporary twrp and then (2nd) permanent twrp. Once you have permanent twrp and are booted into it you should then copy the "new" download zip for the OTA that you md5 checked from your PC onto the root of your sdcard and install it by flashing the zip file in twrp. Now you should reboot to system which will change the active slot to the updated OOS you just flashed and then if you want boot back into recovery to flash a custom kernel (if you so wish) and Magisk root zip (again if you so wish).
Click to expand...
Click to collapse
Thanks for response.
https://forum.xda-developers.com/showpost.php?p=76773727&postcount=153
Followed the procedure: Installed EX Kernel as well. Now I'm getting a popup message after every reboot: There's an internal problem with your device. Contact your manufacturer for details.
No issues as such but I'm getting this message everytime I reboot. Any suggestions?

Magisk creates bootloop

downloaded factory image from googles website
copied latest platform tools to the same directory as the extracted contents of the zip from google.
run the batch file, can boot into android just fine.
reboot to bootloader, use fastboot boot twrp-3.2.3-0-walleye.img
install the twrp zip
android boots fine and i can use my phone normally.
install magisk apk, reboot to recovery, install magisk 16.7 zip, android wont boot
everything was fine until i made a backup last night within twrp. ive repeated the above process idk how many times. any help would be appreciated
EDIT: https://forum.xda-developers.com/pixel-2/how-to/guide-unlock-flash-root-pixel-2-walleye-t3702417 is the guide i was using.
EDIT 2: now when i install TWRP and try to reboot to system, it just reboots back to TWRP...
EDIT 3: looking at the contents of my twrp zip, theres a file called magiskboot so what im going to do is reinstall the factory image using the bash script included in the download directly from google, then just flash twrp-pixel2-installer-walleye-3.2.3-0.zip, then install the magisk manager and see what happens. if that doesnt work ill redo the factory image, boot from twrp-3.2.3-0-walleye.img, install magisk, and see what happens without installing twrp.

[Guide] Alternative method for applying OTA to the Pixel (no ADB or fastboot needed)

Alternative Option For Applying December (or any other OTA updates) without using ADB or Fastboot.
Pros:
+ No need for fastboot or ADB
+ Can be done without a PC
+ OTA is applied from within Android, using Android's normal update process
+ Retains root
+ Retains any installed Magisk Modules
Cons:
- Until Magisk is updated, requires that you fake a backup by compressing a stock boot image and renaming the resulting file.
- Only works on phones with duel partitions
- Slightly harder to do without a PC
The Pixel 4/4XL has duel partitions. This allows for an alternative option for installing OTA updates without losing root (Magisk) or wiping data. The process is outlined in the Magisk guide here: https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The problem with following that guide is that since there is no TWRP for Pixel 4 / Android 10, most of us patched Magisk into a stock boot image manually, leaving us without an automatically created backup. Then, when you attempt to uninstall Magisk and restore the backup boot image, you get a message stating "No backup image found". However, it is easy to copy a stock boot image to your phone and have Magisk treat it as a backup. Magisk can then uninstall itself, you apply the OTA without restarting, reinstall Magisk by patching OTA image in the inactive partition, then reboot. After reboot you will be running the OTA version with Magisk patched in.
The process is a little easier if you have a PC, but it can be done completely on the phone itself, without any other hardware.
Here is a full process:
Requirements:
A rooted Pixel with Magisk Manager installed
A file explorer app that has a root broswer (I use Total Commander)
A text editor that can open arbriatry files (I used Quick Edit)
A tool to zip files (I used 7-Zip on a Windows PC, then transfered the file via USB, but you can do this completely without a computer)
The unpatched boot.img file that corresponds to your current build. (Get it from https://developers.google.com/android/images#coral
Create a backup image that Magisk can auto-restore
On your Android phone, open the following file: /sbin/.magisk/config
Copy the SHA1 hash (you want to copy everything after the = sign)
Download the factory image that corresponds to your current build. Extract the zip, then from the zip extract the boot.img file (Yes, there is a zip within a zip). This is easier to do on a computer, but can be done directly on the phone.
Create a new .gz archive that contains the boot.img file and nothing else. On Windows, I used 7zip for this, selecting gzip as the method, and using all of the defaults.
Rename the .gz achive to the following: 'stock_boot_<hash>.img.gz' where <hash> is the SHA1 hash that you coped from the Magisk config file.
Copy the .gz file to your phone and place it in the /data directory. The full path on your phone should be /data/stock_boot_<hash>.img.gz.
You can now follow the rest of the guide from https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md, but an abbreviated version is included
Uninstall Magisk and Apply the OTA
Launch Magisk Manager on your phone
Select "Uninstall", then choose "Restore Images". Magisk will be uninstalled and you will be back to running stock boot.
Go to Settings --> Systems --> Advanced --> System Update, then check for and apply updates. You will need to select "resume" to force the update to happen immediately. DO NOT RESTART THE PHONE. The December update can take a while. I was on the "optimizing apps" message for a good 20 - 30 minutes.
After the udpate has been installed, the screen will have the option to restart. Don't select it.
Install Magisk to the updated boot and restart
Start Magisk Manager
Select Install (we are installing Magisk, not Magisk Manager)
When prompted, choose to install to an inactive partition
Read the warning and confirm. The OTA boot image will be patched with Magisk.
Restart your phone.
You should now have the OTA update (verified by checking Settings --> About Phone --> Build number)
You should also have a new stock_boot_<hash>.img.gz file in your /data directory. Next time there is an OTA update, you can skip the first part of this and go straight to uninstalling Magisk and applying the OTA.
Thanks to reyqn and Nephiel for commenting on https://github.com/topjohnwu/Magisk/issues/1870.
Hi. What do you mean " Copy the SHA1 hash " because in /sbin/magisk/config. i don't see any file name SHA1 hash?
Sent from my Pixel 4 XL using Tapatalk
GrimEcho said:
...when you attempt to uninstall Magisk and restore the backup boot image, you get a message stating "No backup image found"...
...Create a backup image that Magisk can auto-restore
On your Android phone, open the following file: /sbin/.magisk/config
Copy the SHA1 hash (you want to copy everything after the = sign)
Download the factory image that corresponds to your current build. Extract the zip, then from the zip extract the boot.img file (Yes, there is a zip within a zip). This is easier to do on a computer, but can be done directly on the phone.
Create a new .gz archive that contains the boot.img file and nothing else. On Windows, I used 7zip for this, selecting gzip as the method, and using all of the defaults.
Rename the .gz achive to the following: 'stock_boot_<hash>.img.gz' where <hash> is the SHA1 hash that you coped from the Magisk config file.
Copy the .gz file to your phone and place it in the /data directory. The full path on your phone should be /data/stock_boot_<hash>.img.gz....
Click to expand...
Click to collapse
I think they fixed Magisk/Magisk Manager: Opened Magisk Manager ==> Tapped Uninstall ==> Tapped Restore images
Not getting this message: "No backup image found"
Appreciate the instructions to "Create a backup image that Magisk can auto-restore.":good:
---------- Post added at 11:44 AM ---------- Previous post was at 11:10 AM ----------
DinarQ8 said:
Hi. What do you mean " Copy the SHA1 hash " because in /sbin/magisk/config. i don't see any file name SHA1 hash?
Click to expand...
Click to collapse
Everything after SHA1= in sbin/.magisk/config (file) is the 'hash'.
Thanks for this guild.... I just wondering if we could use EX kernel Manager (or anything similar) to flash the stock boot.img (so everything returned to stock), then apply OTA, then use Magisk Manager to patch the inactive slot...
Although this requires another app, but we don't need to create backup specific for MM... Just a stock boot.img is needed...
Haven't tried this yet... Will try on Jan update.....
For some reason if the config file says recoverymode=true then magisk will still not find the backup image. If you change it to recoverymode=false then you can continue on with the rest of the steps. I wonder why?
StoicSage said:
For some reason if the config file says recoverymode=true then magisk will still not find the backup image. If you change it to recoverymode=false then you can continue on with the rest of the steps. I wonder why?
Click to expand...
Click to collapse
Or you can Open Magisk Manager, Tap Advanced Settings and uncheck Recovery Mode.
DinarQ8 said:
Hi. What do you mean " Copy the SHA1 hash " because in /sbin/.magisk/config. i don't see any file name SHA1 hash?
Sent from my Pixel 4 XL using Tapatalk
Click to expand...
Click to collapse
/sbin/.magisk/config is the name of the file. There is no extension to it, but it is a text file.
Open the file in an editor and the last line should have the SHA1 hash.
Homeboy76 said:
I think they fixed Magisk/Magisk Manager: Opened Magisk Manager ==> Tapped Uninstall ==> Tapped Restore images
Not getting this message: "No backup image found"
Appreciate the instructions to "Create a backup image that Magisk can auto-restore.":good:
---------- Post added at 11:44 AM ---------- Previous post was at 11:10 AM ----------
Everything after SHA1= in sbin/.magisk/config is the 'hash'.
Click to expand...
Click to collapse
I think it depends on what method you used to originally root the Pixel 4. If you copied over a .boot.img file to the phone, then used Magisk Manager to patch the file while you didn't have root then Magisk won't make a backup, since it doesn't have access to copy the backup /data. But if you have root when you use Magisk Manager to create a patch (via TWRP, or because root is still enabled from an in memory magisk), then it can copy the file.
lssong99 said:
Thanks for this guild.... I just wondering if we could use EX kernel Manager (or anything similar) to flash the stock boot.img (so everything returned to stock), then apply OTA, then use Magisk Manager to patch the inactive slot...
Although this requires another app, but we don't need to create backup specific for MM... Just a stock boot.img is needed...
Haven't tried this yet... Will try on Jan update.....
Click to expand...
Click to collapse
I think this would work as long as you can flash stock using Ex Kernal Manager while Magisk is still installed, and don't have to reboot. Magisk needs root access to be able to patch the OTA in the inactive slot, so if you flashed stock, then restarted, Magisk Manager couldn't access the inactive slot any longer (I think). I haven't used EX Kernal Manager though, so I'm not positive.
GrimEcho said:
I think this would work as long as you can flash stock using Ex Kernal Manager while Magisk is still installed, and don't have to reboot. Magisk needs root access to be able to patch the OTA in the inactive slot, so if you flashed stock, then restarted, Magisk Manager couldn't access the inactive slot any longer (I think). I haven't used EX Kernal Manager though, so I'm not positive.
Click to expand...
Click to collapse
O think you are absolutely right! The key is "do not reboot after flash the stock boot.img" so MM can still do the magic on patch the inactive partition. Your original idea does open a good avenue on OTA without PC.. which saves a lot of troubles......
GrimEcho said:
I think it depends on what method you used to originally root the Pixel 4. If you copied over a .boot.img file to the phone, then used Magisk Manager to patch the file while you didn't have root then Magisk won't make a backup, since it doesn't have access to copy the backup /data. But if you have root when you use Magisk Manager to create a patch (via TWRP, or because root is still enabled from an in memory magisk), then it can copy the file.
Click to expand...
Click to collapse
I did this while on the November 2019 Factory Image:
- opened MM, tapped uninstall, tapped restore images (root gone)
- downloaded December 2019 Factory Image
- extracted the boot.img
- opened MM, tapped install, tapped install, tapped patch a file, selected the December boot.img
- After, it finished patching the boot.img, there was a backup file in /data folder.
I could be wrong but I think the key to ensuring a back up file is made it to turning off Recovery Mode prior to patching the boot.img: Open MM, tap Advanced Settings, and uncheck Recovery Mode.
Amazing this worked! Thanks so much.
Just to note: I had to use QuickEdit to set the RECOVERYMODE=false unchecking the box in Magisk didn't seem to work for me.
One question, I'm now on "Security patch level: November 5, 2019". I'm pretty sure my stock boot.img was from October some time. To get the December update, should I download the latest factory image and redo the process? Therefore, everytime we want to do an OTA, we must download the latest factory image and extract the boot.img?
foaf said:
Amazing this worked! Thanks so much.
Just to note: I had to use QuickEdit to set the RECOVERYMODE=false unchecking the box in Magisk didn't seem to work for me.
One question, I'm now on "Security patch level: November 5, 2019". I'm pretty sure my stock boot.img was from October some time. To get the December update, should I download the latest factory image and redo the process? Therefore, everytime we want to do an OTA, we must download the latest factory image and extract the boot.img?
Click to expand...
Click to collapse
Short answer is yes to the factory image and extracting the boot.img every month before taking the ota. Just make sure the OTA and factory image build numbers match :good:
**UPDATE** - flashing the boot.img from the October Factory Image seems to have fixed the touch screen issue. So, now I gotta figure out why the OTA keeps failing...
I have question, I attempted this method but the update would not install... I kept getting an installation error. So, I just reinstalled Magisk from the Magisk Manager. However, when I rebooted the touch screen no longer works... So I can't unlock my phone.
What is the easiest way to fix this? I was on the original factory image (October) and I bought the phone directly from Google (non-carrier version).
I've attempted to just flash-all using the Dec factory image from fastboot (using key-combo to get into fastboot) but I get the flash in fastbootd error. I'm assuming flash-all from the correct October factory image will fix me up, but I honestly can't remember exactly which October factory image came with the device. Any help would be greatly appreciated.
ihuntinde said:
**UPDATE** - flashing the boot.img from the October Factory Image seems to have fixed the touch screen issue. So, now I gotta figure out why the OTA keeps failing...
I have question, I attempted this method but the update would not install... I kept getting an installation error. So, I just reinstalled Magisk from the Magisk Manager. However, when I rebooted the touch screen no longer works... So I can't unlock my phone.
What is the easiest way to fix this? I was on the original factory image (October) and I bought the phone directly from Google (non-carrier version).
I've attempted to just flash-all using the Dec factory image from fastboot (using key-combo to get into fastboot) but I get the flash in fastbootd error. I'm assuming flash-all from the correct October factory image will fix me up, but I honestly can't remember exactly which October factory image came with the device. Any help would be greatly appreciated.
Click to expand...
Click to collapse
Can't you flash the December image but do it manually? Pain in the ass but should get it done.
p70shooter said:
Can't you flash the December image but do it manually? Pain in the ass but should get it done.
Click to expand...
Click to collapse
I tried to flash-all the December image but it kept failing with flash with fastbootd. Even though I have the most up to date platform-tools.
I believe I know what I did though... I didn't read the instructions clearly and i used the december boot image when i uninstalled magisk.... I'm attempting it again doing the instructions exactly as it states... fingers crossed...
foaf said:
Amazing this worked! Thanks so much.
Just to note: I had to use QuickEdit to set the RECOVERYMODE=false unchecking the box in Magisk didn't seem to work for me.
One question, I'm now on "Security patch level: November 5, 2019". I'm pretty sure my stock boot.img was from October some time. To get the December update, should I download the latest factory image and redo the process? Therefore, everytime we want to do an OTA, we must download the latest factory image and extract the boot.img?
Click to expand...
Click to collapse
If you are willing to wait for the OTA updates then you don't need to keep doing the download/extract/zip process. After the first OTA update, when you use Magisk to root patch the inactive partition with the installed OTA, Magisk will create a new backup. So next time there is an OTA, you can just uninstall Magisk and restore. It should now find the backup.
ihuntinde said:
I tried to flash-all the December image but it kept failing with flash with fastbootd. Even though I have the most up to date platform-tools.
I believe I know what I did though... I didn't read the instructions clearly and i used the december boot image when i uninstalled magisk.... I'm attempting it again doing the instructions exactly as it states... fingers crossed...
Click to expand...
Click to collapse
Yep, it sounds like that is the issue. It can be easy to mix up. You need to fake a restore of the boot image for the version your phone is currently on (pre-OTA). But after you apply the OTA and install Magisk to the inactive partition, Magisk will create a new backup of a new unpatched boot image with the OTA applied, so each update will roll forward.
@GrimEcho
man, thx you so much. I've just updated from dec to jan ota build, without any issues! xD
This worked beautifully. Unfortunately it only moved me up to December. Will be great if I don't have to remake the boot.img file to go to January.
Recovery mode being on in magisk caused this to fail. I had to edit the config file as mentioned by another, kill magisk then it worked at next launch. Toggling it off within magisk left the flag active in the config file.
Appreciate the writeup.

Problems after Magisk update - can only enter download mode and recovery

Hey there,
I am currently struggeling with my Samsung Galaxy S7 (Exynos) device, running on superman rom (Android 8).
What happened?
For root I´m using Magisk Manager and for banking apps I have Magisk hide running. Then the program told me that there is an update (Magisk App) available. So, as always and recommended, I choosed "Direct Install" but that failed for some reason. OK I thought´, no problem. Later I wanted to reboot my phone but it didn´t. The screen says "Downloading.... Do not turn off device!". I only can enter "Download Mode" and "Recovery Mode via TWRP".
What I tried so far:
1) Wipe cache/dalvik --> not successful
2) Tried to do a factory reset via twrp --> not successful
3) Tried to flash BL via Odin --> not successful
At this time I realised that the same problem occured to my Galaxy Tablet SM-T580. So I came to the point that I did something wrong with updating magisk on both devides.
What I also tried next:
4) Tried to delete magisk modules via twrp --> not successful
5) Tried to uninstall magisk through twrp by downloading the latest Magisk app and rename it to "uninstall.zip" as recommended in installation guide --> Not successful because of Error installing zip file: Unsupported /Unknown image format (unpacking image format)
What can I do next?
Can anyone please help me, since I have two bricked devices now????
A simple kernel flashing would fix the problem, extract the original boot.img of your current ROM, and flash it via TWRP.
Cause it is clearly a problem with your boot.img, if that didn't work (I'm sure it will), then just dirty flash your current ROM.
P.S. If you are encrypted, you might encounter an error doing a simple factory reset, you'll have to format the whole data partition.
Hi @Mohamedkam000,
many thanks for your help. After hours of browsing the web and trying various methods I was able to get my 2nd device (Samsung Galaxy Tab A from 2016) back to life.
What I did: I installed the latest samsung mobile phone drivers on my PC then I connected the tablet to it. I was able to access the internal memory and in the folder "data" Magisk put a backup of the original boot.img. So I installed this "boot.img" via TWRP and voila.......everything works fine again
I´m very happy now.
But unfortunately this method didn´t work with my Samsung Galaxy S7. I just couldn´t find any boot.img file on the phone.
Mohamedkam000 said:
A simple kernel flashing would fix the problem, extract the original boot.img of your current ROM, and flash it via TWRP.
Cause it is clearly a problem with your boot.img, if that didn't work (I'm sure it will), then just dirty flash your current ROM.
Click to expand...
Click to collapse
How do I have to do this? Sorry I´m a little unexperienced so could I get a kind of an step by step guide please?
Mohamedkam000 said:
P.S. If you are encrypted, you might encounter an error doing a simple factory reset, you'll have to format the whole data partition.
Click to expand...
Click to collapse
Don´t understand this. Could you please explain again?
Thank you so much already.
Kind regards,
cap.
capitarider said:
Hi @Mohamedkam000,
many thanks for your help. After hours of browsing the web and trying various methods I was able to get my 2nd device (Samsung Galaxy Tab A from 2016) back to life.
What I did: I installed the latest samsung mobile phone drivers on my PC then I connected the tablet to it. I was able to access the internal memory and in the folder "data" Magisk put a backup of the original boot.img. So I installed this "boot.img" via TWRP and voila.......everything works fine again
I´m very happy now.
But unfortunately this method didn´t work with my Samsung Galaxy S7. I just couldn´t find any boot.img file on the phone.
How do I have to do this? Sorry I´m a little unexperienced so could I get a kind of an step by step guide please?
Don´t understand this. Could you please explain again?
Thank you so much already.
Kind regards,
cap.
Click to expand...
Click to collapse
Glad your tablet revived again.
Magisk creates a backup of the boot.img found just before flashing magisk, it is compressed in gzip format, so you need to pull it, extract it, and push it back to the phone, then flash it.
The file is usually in /data/stock_boot_${SHA1}.img.gz
You can extract it using the built-in terminal of TWRP, if PC is not accessible at the moment by writing and executing the following command:
gunzip {stock-boot-name}.gz
Replace {stock-boot-name} with your backed-up boot name (without the curleybrackets), or you can use the following command:
gunzip *.gz
That'll extract the gzip archive, and the boot.img will be in /data of which you can navigate to it and flash it.
There's another guaranteed method, if you have the file of the ROM you're using right now, you can just open it (it's just a zip archive) and search for the boot.img of your specific phone model and flash it.
Another guaranteed method will be by flashing a custom kernel compatible with your current ROM, like Moro AiO kernel, of which has a wide support for ROMs starting from Oreo, and up to Q, AOSP, or stock-based, just in one file.
Moro's thread: Moro Kernel
you can't access kernel backup because TWRP does not support encryption and Magisk Manager might removed encryption in boot
aIecxs said:
you can't access kernel backup because TWRP does not support encryption and Magisk Manager might removed encryption in boot
Click to expand...
Click to collapse
Doesn't seem like he's encrypted, he found the boot backup of his tablet in /data so he has probably searched for a similar file on his S7, but since it is compressed, he won't find it solely.
Also he would've told us that his /data is empty or something.
start from scratch with older magisk, current 22 has bug
https://github.com/topjohnwu/Magisk/issues/4008
Thank you for your help.
I had a n old twrp backup on another external hard drive. I extracted the boot file and repached it with 7zip to boot.img and flashed through twrp. That also didn´t work for various times. TWRP always said "failed".
In the end I didn´t manage it to bring my phone back to live. Anyway, I decided to flash the latest LineageOS (Android 11) and now its running smooth again.
Thanks again.
Try using sp flash tools flashing the boot.img

Categories

Resources