[Guide] Alternative method for applying OTA to the Pixel (no ADB or fastboot needed) - Google Pixel 4 XL Guides, News, & Discussion

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.

Related

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?

[GUIDE] Install Magisk with proper support for OTA updates

Code:
* I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.
* Please do some research if you have any concerns about features included in the products you find here before flashing it!
* YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.
* Your warranty could be void if you tamper with any part of your device / software.
* Same statement for XDA.
Here's an alternative method to install Magisk that support OTA updates (copied from the Mi A1 forum and expanded )
You need a PC with Android platform tools (they exist also for MacOS and Linux). When using Windows, you should also install MiFlash tool to get the required drivers to recognize the device.
BOOTLOADER UNLOCK
First thing to do: unlock the bootloader (if you didn't already do this, obviously). Smartphones with Android One are much easier to unlock compared to other Xiaomi phones with MIUI (where you have to ask for authorization and wait for weeks).
CAUTION: when you unlock the bootloader, the phone will reset, erasing all your saved data. Backup your data before unlocking.
1. Go to Settings > System > About phone > and tap many times on "Build number" until you unlock "Developer options" (on Andoird 9 "About phone" is right at the top of the Settings app).​2. Go back to the previous page (i.e. Settings > System), where you can find now "Developer options". Go there and enable the "OEM unlocking" option (and it's better to never disable this).​3. Now you can shutdown your phone, then turn it on while holding the "Volume down" button pressed. Release it when you see the Fastboot screen You can also use the command "adb reboot-bootloader" if you already connected the phone to the PC.​4. Now connect the phone with your PC via USB cable, open an administrative command prompt, move to the directory where the Android platform tools are placed and unlock the bootloader with the following command:
Code:
fastboot oem unlock
The phone will reboot, erasing all the data.​
Now you unlocked your phone's bootloader and can continue to the next section.
MAGISK INSTALLATION
5. Download and install on the smartphone the latest version of Magisk Manager's apk available.
You need the smartphone to be connected to the internet, because Magisk won't install and won't work properly without a connection.​
6. Now you can easily download an already patched boot.img from the following list and jump straight to point 10 of this guide, or you can continue to the next point and learn to patch yourself an original boot.img
If you choose the short way, be sure that you select the patched_boot.img with the same "Build number" currently installed on your phone (see point 1 of this guide), and don't flash the file directly on the phone memory, because Magisk will not work properly (do exactly what this guide says, and you will not find problems, hopefully).
For our convenience, extract the patched_boot.img file in the same directory where Android platform tools are located.
patched_boot 9.6.4.0 (2018 July update) - patched with Magisk 17.1
patched_boot 9.6.6.0 (2018 August update) - patched with Magisk 17.1
patched_boot 9.6.8.0 (2018 September update) - patched with Magisk 17.1
patched_boot 9.6.9.0 (2018 October update) - patched with Magisk 17.1
patched_boot 9.6.10.0 (2018 November 1st update) - patched with Magisk 17.1
patched_boot 9.6.11.0 (2018 November 2nd update) - patched with Magisk 17.1
patched_boot 10.0.2.0 (2018 December upgrade to Android 9.0 Pie) - patched with Magisk 18.0
patched_boot 10.0.3.0 (2019 January update) - patched with Magisk 18.0
In case you erroneously flash those patched files directly on the phone, flash back the original boot.img via fastboot and follow the guide:
original boot.img 9.6.4.0 (2018 July update) - taken from fastboot ROM
original boot.img 9.6.6.0 (2018 August update) - taken from OTA update
original boot.img 9.6.8.0 (2018 September update) - taken from OTA update
original boot.img 9.6.9.0 (2018 October update) - taken from OTA update
original boot.img 9.6.10.0 (2018 November 1st update) - taken from OTA update
original boot.img 9.6.11.0 (2018 November 2nd update) - taken from OTA update
original boot.img 10.0.2.0 (2018 December upgrade to Android 9.0 Pie) - taken from fastboot ROM
original boot.img 10.0.3.0 (2019 January update) - taken from fastboot ROM
7. You need the original boot.img to patch. You can find it inside the official fastboot ROM zip for daisy. Check that the downloaded ROM version is the same as the "Build number" currently installed on your phone (see point 1 of this guide). If the versions are different, update (or downgrade if possible) your phone to that version. You can also download original boot.img elsewhere (for example at the point 6 of this guide), but always pick the same "Build number" of your phone.
After you get the boot.img, copy it to the phone memory (via USB or microSD, or download directly from the phone browser, as you prefer).​
8. Open the Magisk Manager app installed previously, it will ask if you want to install Magisk. Accept by tapping on "Install" > "Patch Boot Image File" and select the boot.img file that you get on the point 7 of this guide.​
9. Wait until the process completes (about 1 minute), then tap on "Close". Now in the phone memory, inside the Download directory, you should have a patched_boot.img file. Copy that file to the PC, inside the same folder where the Android platform tools are located, for our convenience.​
10. Reboot the phone in fastboot mode (as already explained in point 3 of this guide), open an administrative command prompt, move to the Android platform tools directory and then write the following command:
Code:
fastboot boot patched_boot.img
If everything works the phone should boot normally. Open Magisk Manager and it should ask to install Magisk, if not you must tap on the "Install" button. Then choose "Install" > "Direct Install (Recommended)" to install Magisk on the phone, and reboot when finished.​
11. Last step to stay safe when a new OTA update arrives: go to "Settings" > "System" > "Developer options" > and disable "Automatic system updates". From now on, you should check manually if a new OTA update is available.​
Now the installation is finished, you can use Magisk Manager to install modules and manage root permissions.
HOW TO APPLY OTA UPDATES
UPDATE 9 February 2019 It seems that with the latest Magisk (v18.1) and Magisk Manager (v7.0.0) the following procedure is working fine again. I didn't test it personally, but some users gave positive feedback.
WARNING! January 2019 Since the arrival of Android 9 Pie, the OTA update with Magisk as described in the following section, doesn't seem to work anymore. It could work, but you could also get a bootloop with the risk of losing your data.
Before upgrading from Android 8 to 9, or doing an OTA update after Android 9 you should:
- backup your data;
- remove any lockscreen password or fingerprint;
- uninstall totally Magisk and reboot.
If after doing this you get a bootloop, you could try to manually flash the vanilla boot.img via fastboot on the current slot (the same version as the last installed OTA). If you managed to fix the bootloop you can then install Magisk anew, from step 5 of this guide.
If the phone wants your PIN or password to proceed after the OTA update or after fixing the bootloop, and your PINs or passwords doesn't work, then you could have to reset the phone (or erasing the data partition, that should be the same thing), losing all your data.
Last chance if everything fails, you can flash the latest fastboot ROM from the official Xiaomi site and the phone will be working again.
IMPORTANT: OTA updates will work only if all the partitions on the smartphone are untouched. Magisk Manager can restore the original boot.img following this section of the guide, but if you tampered directly with the system partition (e.g. manually editing build.prop) or other partitions, OTA will refuse to install.
You can try to fix OTA updates without the need to flash the whole original fastboot ROM, by flashing only the tampered partitions (usually only "system") with the corresponding img file found inside the fastboot ROM zip. Check the "Troubleshooting" section of this guide for details.
12. When you know that a new OTA update is available and you want to install it, open Magisk Manager, and tap on "Uninstall" > "Restore Images" but very important: absolutely don't reboot the phone now!
Important note: Magisk Manager will restore the boot.img that was found on the phone while installing Magisk. If the boot.img was already non-vanilla (for example you flashed the boot.img with TWRP before installing Magisk), Magisk Manager will backup that modified version of boot.img, and when restored the OTA will not work, as that's not a vanilla boot.img.​
13. Close Magisk Manager and go to "Settings" > "System" > "System update" and install the OTA update. After the update is downloaded, a two-stages update will begin.​
14. When both stages of the update process completed, it will ask to restart: DON'T DO IT!. Open Magisk Manager again and tap on "Install" > "Install" > "Install to Inactive Slot (After OTA)" and after that you can tap on "Reboot".​
After the reboot you will have the updated Android version with Magisk already working.
Thanks to user @jashancheema for the Mi A1 guide and a bigger thanks to @topjohnwu for the OTA part and above all for developing Magisk.
TROUBLESHOOTING
WARNING: before attempting any of the following operations, you must disable any screen lock, PIN or password, because you risk to not get back your data (encryption issues). It is recommended to take a backup, too (as every time a custom modding is involved).
You can get errors when installing OTA updates if you didn't follow meticulously the guide.
Check this list to try to find where the problem lies:
- when a new version is found, the updater will check if all the partitions on the device are untouched. If there is a partition that has been modified, the OTA updater will not proceed with the installation;​- typically, the two partitions commonly modified by user modding are the boot partition (that's where Magisk and TWRP are installed) and the system partition (when you change a config file, add or remove a system app, etc.);​- a system partition modified only by using Magisk modules is effectively untouched, because Magisk register all changes to /system in a file in the /data partition and then trick Android to believe those changes are really applied to /system;​- boot partition instead is really modified, but if you install Magisk following this guide, Magisk will save a copy of the untouched boot partition, and restoring it before applying OTA update will make the update work.​
Now, if you didn't follow this guide to install Magisk and you installed it in other ways, Magisk could alert you that he cannot restore the original boot.img (the boot partition) when you try to apply the OTA update.
To fix this, you can flash directly the vanilla (original, unmodified, untouched) boot.img taken from the point 6 of this guide, using those commands:
Code:
fastboot getvar current-slot
fastboot flash boot_? boot.img
the first command will tell you what is the current slot in use (a or b), the second command will flash the original boot into the phone, but you have to change the "?" in the command with a or b (i.e. the current slot that the first command provided).
Remember that the boot.img file version must correspond to the Android build version currently running in your phone.
If the OTA update will still refuse to apply, probably you changed something directly in the /system partition (for example you changed something in the build.prop without using a Magisk module to do this).
In this case you have to flash the original system.img in the phone with those commands:
Code:
fastboot getvar current-slot
fastboot flash system_? system.img
and as before, the first command will tell you the right slot to use instead of the "?" in the second command.
Here you can find the system.img extracted from the OTA updates zip (along with every other .img file inside that):
9.6.6.0 (August 2018) OTA update dump as .img files
9.6.8.0 (September 2018) OTA update dump as .img files
9.6.9.0 (October 2018) OTA update dump as .img files
9.6.10.0 (November 2018) full fastboot ROM
9.6.11.0 (November 2018) OTA update dump as .img files
If you want to obtain the system.img by yourself, you can find it inside the fastboot images but usually they are not updated monthly like OTA updates. But you can extract the system.img directly from the OTA update zips found in this thread (as I did above with my dumps), using the Python scripts found here.
To make the Python scripts work in Debian/Ubuntu and derivatives, you have to download both "extract_android_ota_payload.py" and "update_metadata_pb2.py", give them execution property and then install the package "python-protobuf". After this you can give this command to unpack the payload.bin file (that you must extract from the OTA update zip):
Code:
./extract_android_ota_payload.py /path/to/payload.bin
This will extract in the current directory all the .img files inside payload.bin, including the system.img
I don't know how to proceed in Windows, probably you only need to install the latest Python2 release and the script will work.​
As the last resort, you can flash directly with MiFlash the latest fastboot image available (even if older than your current version). Use the "flash_all.bat" script but before take a backup of your data, because the phone will be fully reset.
If you don't want to take the risk of not doing a backup, use the script "flash_all_except_storage.bat" when flashing, so you will keep all your data, but be warned that sometimes you will not be able to access the data anymore, because of encryption problems.
Right after the flash, you can start following the guide from point 5 or 6.
It should not be a problem downgrading the build version via fastboot, as long as the Android main version remain the same (Oreo 8.1 at the moment).
Thx, nice work :good:
Thanks to the OP. Great post! Totally noob friendly guide. Nice work.
It should also work on mi a2, thanks!
Lione2 said:
It should also work on mi a2, thanks!
Click to expand...
Click to collapse
Sure, but you can't use the posted patched_boot.img, because they're designed for Mi A2 Lite (daisy) and not for Mi A2 (jasmine).
EDIT: I posted the patched and original boot files for Mi A2 jasmine in the second post. I don't know if I can make a thread in the Mi A2 forum section with an adapted copy of my guide, there are already two guides there (even if not polished like this) and I don't want to create more confusion with a third guide about the same argument...
i've installed magisk from previous guide - what steps should I take to apply OTA update? - 12 to 14?
Now magisk informs me that there is 17.1 version - how to update it?
krzygaj said:
i've installed magisk from previous guide - what steps should I take to apply OTA update? - 12 to 14?
Now magisk informs me that there is 17.1 version - how to update it?
Click to expand...
Click to collapse
If you flashed directly the patched_boot.img via fastboot in both slots A and B as the other guide said previously, you must flash the original boot.img to both slots, then start the guide from point 10.
BubuXP said:
If you flashed directly the patched_boot.img via fastboot in both slots A and B as the other guide said previously, you must flash the original boot.img to both slots, then start the guide from point 10.
Click to expand...
Click to collapse
I did as you wrote but still can't install August update - is there any log?
- extracted boot.img from rom: http://en.miui.com/download-354.html
- did fastboot flash boot_a boot.img and fastboot flash boot_b boot.img and rebooted
- next rebooted and did fastboot boot patched_boot.img with patched_boot 9.6.4.0 (July update) - patched with Magisk 17.1
later did steps in guide - but when i do system update it stops on first stage
Any ideas?
krzygaj said:
I did as you wrote but still can't install August update - is there any log?
- extracted boot.img from rom: http://en.miui.com/download-354.html
- did fastboot flash boot_a boot.img and fastboot flash boot_b boot.img and rebooted
- next rebooted and did fastboot boot patched_boot.img with patched_boot 9.6.4.0 (July update) - patched with Magisk 17.1
later did steps in guide - but when i do system update it stops on first stage
Any ideas?
Click to expand...
Click to collapse
You tampered the system partition? Try flashing also the system.img in that case.
Another case could be that you made an OTA update from the June build to July: in this case the partitions on the other slot (probably only the boot partition) where lost when overwrited with fastboot (and cannot be restored, as we don't have any June build ROM or OTA).
If everything fails, do a full fastboot flash with MiFlash tool, but using the flash_all_except_storage.bat script, that should keep your data intact, restore all partitions (A and B) to stock versions and you can then apply OTA (before or after installing Magisk, but I suggest after installing Magisk so you can test if the guide works fine).
BubuXP said:
If everything fails, do a full fastboot flash with MiFlash tool, but using the flash_all_except_storage.bat script, that should keep your data intact, restore all partitions (A and B) to stock versions and you can then apply OTA (before or after installing Magisk).
Click to expand...
Click to collapse
Thanks above worked :good:
Hope the next update will go smoothly

			
				
September?
When booting comes a warning message because of the unlocked boot loader. How can I disable this message?
PC295 said:
When booting comes a warning message because of the unlocked boot loader. How can I disable this message?
Click to expand...
Click to collapse
you can't turn that off with open bootloader
Guys, after i have unlocked bootloader i cannot charge my phone when is off because he go on when I insert the plug, it's normal?
proton242 said:
Guys, after i have unlocked bootloader i cannot charge my phone when is off because he go on when I insert the plug, it's normal?
Click to expand...
Click to collapse
No
ConradB said:
No
Click to expand...
Click to collapse
ConradB you have some suggestion? Thank you
proton242 said:
ConradB you have some suggestion? Thank you
Click to expand...
Click to collapse
Same problem on mine, I don't know if it's a ROM bug or it's caused by unlocked bootloader or Magisk.
The only solution at the moment is charging while the phone is switched on.
BubuXP said:
Same problem on mine, I don't know if it's a ROM bug or it's caused by unlocked bootloader or Magisk.
The only solution at the moment is charging while the phone is switched on.
Click to expand...
Click to collapse
Ciao BubuXP, provando a rimuovere Magisk (lasciando il bootloader sbloccato) tutto torna alla normalità, cosa dici, crea casino quando patcha il boot.img?

After unsuccessful TWRP+root attempt wifi and mobile service doesn't work

Hello.
Recently I encountered a problem, that I couldn't root my op7 after OTA (tried both twrp and magisk methods). Somehow managed to screw up both boot_a and boot_b partitions (probably flashed wrong img files with
Code:
fastboot flash boot_a some_boot_img.img
fastboot flash boot_b some_boot_img.img
.) I downloaded official firmware (10.0.2) and extracted boot.img and tried to flash it with
Code:
fastboot flash boot boot.img
and in result my phone doesn't have wifi and can't make any phones and calls, but can use mobile data. A solution without wiping any data would be great.
nojusmo said:
Hello.
Recently I encountered a problem, that I couldn't root my op7 after OTA (tried both twrp and magisk methods). Somehow managed to screw up both boot_a and boot_b partitions (probably flashed wrong img files with .) I downloaded official firmware (10.0.2) and extracted boot.img and tried to flash it with and in result my phone doesn't have wifi and can't make any phones and calls, but can use mobile data. A solution without wiping any data would be great.
Click to expand...
Click to collapse
Hello, you flashed wrong firmware/rom? Do you now have the correct firmware/rom? You can simply flash the rom again without wiping data.
Reflash
Try reflashing the official OTA with the Local Upgrade feature in the Software upgrade menu.
Download the update.zip file from oneplus web page, under Support-Software Upgrade.
Copy the update.zip to internal memory where all folders are located. Do not copy it inside any folder.
go to Settings>System>System Updates
Tap on Gear icon in top-right corner and Select Local Upgrade
if your file is valid it will show up in the list.
Select it and follow on screen instructions.
Then reinstall TWRP and root with the All in one tool. Remember the OOS Call Recording magisk module must be uninstalled, that also causes no sim error on Android 10.
Make sure you have downloaded full ota zip file (not incremental update zip file)..
k2ldas said:
Try reflashing the official OTA with the Local Upgrade feature in the Software upgrade menu.
Download the update.zip file from oneplus web page, under Support-Software Upgrade.
Copy the update.zip to internal memory where all folders are located. Do not copy it inside any folder.
go to Settings>System>System Updates
Tap on Gear icon in top-right corner and Select Local Upgrade
if your file is valid it will show up in the list.
Select it and follow on screen instructions.
Then reinstall TWRP and root with the All in one tool. Remember the OOS Call Recording magisk module must be uninstalled, that also causes no sim error on Android 10.
Click to expand...
Click to collapse
Thanks for the suggestion, I already fixed the problem with wiping all of my data, because I was in hurry and I was able to backup most of the data. After fixing my problem I tried to root again. Firstly I flashed stock rom using some tool that I don't remember the name for (it was some sort of chinese rom). Then I flashed Android 9 so I could unlock bootloader and root via twrp. The next thing I did is I installed the update via the update app and didn't reboot, so I could install magisk root (after OTA). I had root, but when I rebooted into android 10 - root was lost, because magisk couldn't install something it needed to.
I didn't have modules installed on magisk, so I don't think that call recording module created the problem.

[UPDATE / KEEP ROOT GUIDE] MAY 2021 (RQ2A.210505.002) - "CORAL" Magisk & Stock Boot / DTBO Images

(Sorry guys, this would have been up sooner, but Android File Host hasn't been letting me upload all day for some reason, so I just temporarily uploaded May 2021's files to my Google Drive for now instead. Enjoy! --- moved back to AFH )
IMPORTANT!! THESE FILES / THIS THREAD IS FOR PIXEL 4 XL "CORAL" ONLY, NOT PIXEL 4 "FLAME"!!
**IT IS HIGHLY RECOMMENDED TO PATCH THE STOCK BOOT IMAGE YOURSELF, FROM YOUR OWN DEVICE, USING MAGISK MANAGER. WHILE THERE'S A GOOD CHANCE THE FILE I PROVIDED BELOW WILL BE IDENTICAL (USE A FILE HASH CHECKSUM TOOL IF YOU'RE CURIOUS), THERE IS ALSO A CHANCE THEY MAY HAVE SMALL, BUT SIGNIFICANT, VARIANCES**
Thanks for the info and link, @wrongway213
Link to @topjohnwu's post: twitter dot com /topjohnwu/status/1272136975022084097?s=19 (until I figure out how to stop new XDA from forcing the URL to embed a giant twitter posting in the middle of the post...)
ALL FILES BELOW ARE FOR "RQ2A.210505.002, May 2021"!
Magisk v22.1 Patched Boot Image: https://www.androidfilehost.com/?fid=2188818919693794185
Factory Untouched Boot Image: https://www.androidfilehost.com/?fid=2188818919693794183
Factory Untouched DTBO Image: https://www.androidfilehost.com/?fid=2188818919693794180
----------------------------------------------
-------------UPDATE PROCESS BELOW-------------
----------------------------------------------​
EASY UPDATE / SEAMLESS KEEP-ROOT UPDATE PROCESS (using a PC - a very intuitive, effective, and relatively safe method).
** You can only follow this guide verbatim if coming EXACTLY from build "11.0.0 (RQ2A.210405.005, Apr 2021". But the general idea is the same for other builds, you just need the correct files for your device.
coral-rq2a.210405.005-factory-dtbo.img: https://www.androidfilehost.com/?fid=2188818919693776320
coral-rq2a.210405.005-factory-boot.img: https://www.androidfilehost.com/?fid=2188818919693776321
May 2021 sideload OTA zip: https://dl.google.com/dl/android/aosp/coral-ota-rq2a.210505.002-ca3e88b3.zip
DO NOT BOOT BACK INTO O/S UNTIL ALL STEPS ARE COMPLETED - THIS ENSURES EVERYTHING BOOTS BACK UP WITH MAGISK / EDXPOSED ALL RUNNING PROPERLY RIGHT AWAY
1. boot into bootloader
----------------
** I was on custom kernel, so I needed to flash BOTH the stock boot and dtbo images
2. fastboot flash boot coral-rq2a.210405.005-factory-boot.img
3. fastboot flash dtbo coral-rq2a.210405.005-factory-dtbo.img
......* these steps to restore stock recovery; dtbo.img also necessary for some kernel installations.
......* won't hurt to flash both anyway, so if you're unsure, go ahead and do both.
-----------------
4. use volume keys to change selection to boot to Recovery Mode
......- when you reach the android symbol with No Command, hold power button, tap volume up, in case you've forgotten
5. choose option "Apply update from ADB"
6. adb sideload coral-ota-rq2a.210505.002-ca3e88b3.zip
7. Once the OTA sideload is done, Reboot to bootloader (you'll also notice it's now on the other slot after OTA flashed)
8. fastboot flash boot coral-rq2a.210505.002-magisk_patched-22100.img
9. done, start the phone
(Optional - Flash custom kernel. If you had a custom kernel, you need to re-flash it)
This is a 100% seamless update that requires no additional / re-setup of any of my Magisk or EdX/LSposed setups. All of the factory files can be found here https://developers.google.com/android/images. boot.img and dtbo.img are in their corresponding full Factory Image zips, and the ota zip is under Full OTA Images.
-------------------------------------------------
-------------------TROUBLESHOOTING-------------------
-------------------------------------------------​
Issues after updating?
If you end up unable to boot or bootlooping afterwards, you most likely have an old Magisk module that isn't playing nice with the new build. There are 2 main things you can do:
1. Flash the new factory untouched boot image. You will of course lose root, and all modules will be disabled. However, it should at least get you able to boot back up quickly and have a working phone if you're in a bind.
2. I would recommend checking Tulsadiver's thread: https://forum.xda-developers.com/pixel-4-xl/how-to/magisk-modules-disabler-booting-magisk-t3990557
Instead of reverting to stock boot image, fastboot boot (NOT FLASH) Tulsadiver's boot image. This will boot your phone in Magisk Core-Only Mode, with all modules disabled but root retained. From here you can open Magisk Manager and disable suspect modules. Before rebooting, go to Magisk Manager's settings and disable Magisk Core-Only Mode. Once you disable the incompatible module, the phone should boot back up.
- See this post (or thread) for more tips / context / an example: https://forum.xda-developers.com/showpost.php?p=82509691&postcount=16
Since Magisk v21.x, Core Only mode has been replaced by using Android's built-in Safe Mode. Booting into Safe Mode should essentially boot you back into your system but with all modules disabled (as well as Magisk Hide). Keep in mind that even after you reboot, modules will remain disabled, unless you re-enable them first. Also remember to re-enable Magisk Hide if you had it enabled before.
Please see @Didgeridoohan's guide for more details: https://www.didgeridoohan.com/magisk/MagiskModuleIssues#hn_Core_Only_Mode
It's also worth mentioning, his guide is extremely well-made and contains a lot of useful information that could benefit all Magisk users and modders. I highly recommend looking through it anyway!
I am getting an error with unpacking the boot image with both the one provided as well as the one direct from Google. Any fix?
@AlphAndroid, I had no problem with Google's boot img. Maybe you should download the factory image again and check the SHA-256 checksum to make sure the download is not corrupt.
@i5lee8bit, thanks for the guide as always, worked fine! Just adding that the platform tools have been updated to r31.0.2 from r31.0.0: https://developer.android.com/studio/releases/platform-tools
AlphAndroid said:
I am getting an error with unpacking the boot image with both the one provided as well as the one direct from Google. Any fix?
Click to expand...
Click to collapse
What do you mean with unpacking the boot image? Are you trying to patch it yourself in Magisk Manager and talking about the step where it says unpacking the boot image? @Ghisy's advice is good, check the hash checksums. Here are various hash checksums of the untouched factory boot image for this month:
File: coral-rq2a.210505.002-factory-boot.img
CRC-32: cedb0fab
MD5: 987f7849b32f3a652c7d8378bbe0048a
SHA-1: f55f0e4a3fc7d4e321a4f8fea0cad157f371f564
SHA-256: d2a53c9527b21f51526a4343506b2617c8b78100c3e6fb90df517372493145ba
SHA-512: 9a3c027b5fdc9072c7955b01be5489060f66ff718ddf51dcd1350324f84d56219f20086cd8ce128721246d6b88c08fbb0de6642d3dec60c141f2496f42316364
SHA3-256: 74fe9d3d65f6e186dfc0c7708f12b7f308e2f014720fc8930549c7d2c349aaef
SHA3-512: 48d3890a8e014ff65d4e81fdaa9f13746aa4ab9632f6e600cebb1e697bff45ebbe22b16b205965d31e8056667361f217ad29db6f9a0b9d44927bfb065cf82f0c
Are you downloading from PC and then copying to the phone? If you're using MTP or FTP, sometimes they mess with the file in tiny, almost unnoticeable (annoying) ways. Try downloading directly from the phone (and check the hash while you're at it).
i5lee8bit said:
What do you mean with unpacking the boot image? Are you trying to patch it yourself in Magisk Manager and talking about the step where it says unpacking the boot image? @Ghisy's advice is good, check the hash checksums. Here are various hash checksums of the untouched factory boot image for this month:
File: coral-rq2a.210505.002-factory-boot.img
CRC-32: cedb0fab
MD5: 987f7849b32f3a652c7d8378bbe0048a
SHA-1: f55f0e4a3fc7d4e321a4f8fea0cad157f371f564
SHA-256: d2a53c9527b21f51526a4343506b2617c8b78100c3e6fb90df517372493145ba
SHA-512: 9a3c027b5fdc9072c7955b01be5489060f66ff718ddf51dcd1350324f84d56219f20086cd8ce128721246d6b88c08fbb0de6642d3dec60c141f2496f42316364
SHA3-256: 74fe9d3d65f6e186dfc0c7708f12b7f308e2f014720fc8930549c7d2c349aaef
SHA3-512: 48d3890a8e014ff65d4e81fdaa9f13746aa4ab9632f6e600cebb1e697bff45ebbe22b16b205965d31e8056667361f217ad29db6f9a0b9d44927bfb065cf82f0c
Are you downloading from PC and then copying to the phone? If you're using MTP or FTP, sometimes they mess with the file in tiny, almost unnoticeable (annoying) ways. Try downloading directly from the phone (and check the hash while you're at it).
Click to expand...
Click to collapse
i also used a hash checksum, checked out the same
I'm just a bit hesitant to use the provided patched boot image now that I'm getting the issue.
I also had an error at 96% sideloading the OTA (something like: sideloading failed, no error 0). I then did NOTHING, stayed in Bootloader and downloaded the latest adb platform tools (mine was 30.0.5 from nov 2020, rather old) - with the newest platform tools I sideloaded again and then it worked (even though it stayed on 90% for 3-4 minutes, idk why, after that it smoothly went to 100% and finished sideloading) - then after that just normally flash the magisk patched file and the phone booted up again and is working fine. It seems to be more important than I thought to have the most up to date adb tools - never had an issue with that before. Thankfully my phone didnt go into bootloop, lol.
So it seems that the newest Pixel 4 xl OTA file is uncompatible with (maybe specific) older adb platform tools, ergo people if you have a problem, check your platform tools version - the OTA file that is linked here in this thread is fine and is not the rootcause of any issues.
Best place a remark into the mainpost @i5lee8bit that it is very important to keep the adb platform tools up to date and always check it before trying to update. It might save some people from trouble.
Hello all.
I need a little help please.
I am coming from:
10 (QQ2A.200305.003)
Magisk 21201 / 8.0.4
It’s been a while since I have done this and I would like to update to the Android 11 May version and I would like to make sure that what I am about to do is procedurally correct.
And, I am hoping this is the correct place to post
Download 11.0.0 (RQ2A.210505.002, May 2021 (coral-rq2a.210505.002-factory-0ec4212f.zip)
Unhide/Uninstall Magisk - Restore Images
Is this necessary with a factory reset?
Factory reset
Boot phone into fastboot mode
Flash-all.bat –w
At this point, once the phone re-boots, I should have a “working” phone on Android 11?
Extract boot.img and copy to phone
Download Magisk-v23.0.apk to phone and install
Do I set the update channel to beta or canary?
Install/select & patch boot.img
Reboot
Copy patched boot.img to computer
reboot into fastboot
Should I / could I fastboot flash boot boot.img --slot all at this point just to be safe?
Fastboot flash boot patchedboot.img
Fastboot reboot
Safetynet fix
Set update channel
Enjoy.
Am i missing anything?
Thanks in advance
ƒ

No more OTA since January update

Hi all,
My bootloader is unlocked and phone rooted since November. I was able to do the OTA updates up to January with the stock boot.img technique but since February I couldn't find the update.
The update system tells me there is no update. I have obviously restarted several times, the root is inactive, I do not understand at all where the problem comes from. If anyone has an idea, I take it.
(magisk app (22.1) installed but Magisk root off)
I see a similar probleme here : https://forum.xda-developers.com/t/may-update-not-available.4272659/
If anyone had a how-to dirty flash, without loose app&data...
So, I find this from other thread from Pixel 1 (old) :
TENN3R​​
Download the entire factory image, unzip, open the folder and you'll see a "flash-all.bat" (supposed you're on windows, otherwise the other 2 script files are for mac and linux)
Edit it with notepad (or what you prefer) and remove the "-w" from the latest line, then save it.
Go in fastboot mode, then launch your edited flash-all script file. This will flash the new factory image but without wiping your device, like an ota, but without all the troubles ota has, then it will auto reboot.
Copy on phone magisk and/or kernel
Now disable lockscreen security, then go in fastboot again. Type in cmd "fastboot boot <twrp.img>" (or what it is called)
When terminal gives you "OKAY" unplug device and you should be in twrp. Flash the zips you've choosen and then reboot and re-enable lockscreen pin, password etc..
Magisk and kernel should now work, I did it just now without any problem.
Click to expand...
Click to collapse
I had to download entire factory image or just the OTA update from google website ?
EDIT : ok, full factory image
The full OTA can be applied without unlocking the bootloader.
The factory image has to have the -w removed or it wipes your data.
Both remove root so you have to re-patch your boot.img and then flash it.
Thx, I find the good way, with -w removed. Everything works.

Categories

Resources