Why This Thread?
I have seen several questions on the process for updating a rooted Pixel 5, since the existing guides only explain the unlock and initial rooting, I thought I'd throw together a quick HOW TO on UPDATING and Re-Rooting for anyone who might still be uncertain about "update" procedures, I've followed thie below method twice now with no issues at all,> None of my data was lost and I kept my EX kernel!.
If You Want To Unlock Your Bootloader and Root Your Pixel 5:
This guide takes you step by step through bootloader unlock, using magic to patch the boot image and get your device rooted.
If You're Already Unlocked & Rooted, and Want To Update The Factory Image And Re-Root:
If you're already rooted and want to update to the next factory image, just follow the standard update factory image routine for the Pixel series of devices, then following the below:
After extracting the primary factory zip, and the secondary zip that is created from the first extraction (all done within the platform tools folder with the fastboot app)
Edit the FLASH-ALL file.... keep the -w for a clean install that wipes everything, or remove the -w to keep your data.
This will install the latest factory image and remove root.
Now, follow these steps here, they're perfect. (these are the same instructions for unlocking bootloader, and initial install of Magisk listed above)
If you were previously rooted, and just updating the next factory image, you can skip the entire sections on installing and hiding Magisk manager in the above instructions, (these settings remained in Magisk Manager when I did this).
And you're done!
KNOWN ISSUE:
* * * MagiskHide Props Config IS NO LONGER WORKING * * *
Please follow THIS LINK for the Universal Safetynet Fix that replaces the MagiskHide Props Config process.
If you know an easier, shorter, more efficient, or UPDATED method, please share it and I'll make the necessary corrections/adjustments
My method is updating via the OTA packages. Similar to using the factory image but no editing of files.
Download the factory image for your current software version.
Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Extract the boot.img from #1
Download the factory image of the version you're updating to.
Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Download the OTA image for the version you're updating to.
Full OTA Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Turn off magisk modules
Apply the boot.img from step #2 (I save this from my previous update so I can skip steps 1 & 2 above.)
adb reboot bootloader
fastboot flash boot "path to boot.img"
fastboot reboot (this is a sanity check to make sure things are normal. The phone should be normal and without root. It can be skipped if you wish, simply use the fastboot menu on the phone and boot to recovery skipping steps 4 & 5.)
Sanity check phone
adb reboot recovery
Once in recovery hold the power button and click volume up
Use the volume keys to highlight "Apply update from ADB"
Click the power button.
On your computer run: adb sideload "path to #4" and wait for it to finish. You'll get status on the adb command and on the phone.
Once finished restart the phone and let it finish the update.
Your phone is now updated but without root.
Extract boot.img from #3 above.
Copy it to the phone
Open magisk manager and patch the boot.img you just copied
Copy the patched boot.img file created by magisk manager back to your computer
Apply this file using fastboot
adb reboot bootloader
fastboot flash boot "path to patched boot.img"
fastboot reboot
Turn on your magisk modules and test
You can now delete 1, 3, & 4. I save #12 for the next update. This eliminates the need for 1 & 2.
You should now have an updated rooted device.
l7777 said:
My method is updating via the OTA packages. Similar to using the factory image but no editing of files.
Download the factory image for your current software version.
Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Extract the boot.img from #1
Download the factory image of the version you're updating to.
Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Download the OTA image for the version you're updating to.
Full OTA Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Apply the boot.img from step #2 (I save this from my previous update so I can skip steps 1 & 2 above.)
adb reboot bootloader
fastboot flash boot "path to boot.img"
fastboot reboot (this is a sanity check to make sure things are normal. The phone should be normal and without root. It can be skipped if you wish, simply use the fastboot menu on the phone and boot to recovery skipping steps 4 & 5.)
Sanity check phone
adb reboot recovery
Once in recovery hold the power button and click volume up
Use the volume keys to highlight "Apply update from ADB"
Click the power button.
On your computer run: adb sideload "path to #3" and wait for it to finish. You'll get status on the adb command and on the phone.
Once finished restart the phone and let it finish the update.
Your phone is now updated but without root.
Extract boot.img from #2 above.
Copy it to the phone
Open magisk manager and patch the boot.img you just copied
Copy the patched boot.img file created by magisk manager back to your computer
Apply this file using fastboot
adb reboot bootloader
fastboot flash "path to patched boot.img"
fastboot reboot
You can now delete 1, 3, & 4. I save #12 for the next update. This eliminates the need for 1 & 2.
You should now have an updated rooted device.
Click to expand...
Click to collapse
Thank you. Well-written, just a few minor corrections.
Download the factory image for your current software version.
Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Extract the boot.img from #1
Download the factory image of the version you're updating to.
Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Download the OTA image for the version you're updating to.
Full OTA Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Apply the boot.img from step #2 (I save this from my previous update so I can skip steps 1 & 2 above.)
adb reboot bootloader
fastboot flash boot "path to boot.img"
fastboot reboot (this is a sanity check to make sure things are normal. The phone should be normal and without root. It can be skipped if you wish, simply use the fastboot menu on the phone and boot to recovery skipping steps 4 & 5.)
Sanity check phone
adb reboot recovery
Once in recovery hold the power button and click volume up
Use the volume keys to highlight "Apply update from ADB"
Click the power button.
On your computer run: adb sideload "path to #4" and wait for it to finish. You'll get status on the adb command and on the phone.
Once finished restart the phone and let it finish the update.
Your phone is now updated but without root.
Extract boot.img from #2 above.
Copy it to the phone
Open magisk manager and patch the boot.img you just copied
Copy the patched boot.img file created by magisk manager back to your computer
Apply this file using fastboot
adb reboot bootloader
fastboot flash boot "path to patched boot.img"
fastboot reboot
You can now delete 1, 3, & 4. I save #12 for the next update. This eliminates the need for 1 & 2.
You should now have an updated rooted device.
zeepzorp said:
Thank you. Well-written, just a few minor corrections.
Click to expand...
Click to collapse
Thanks, updated the original.
Thanks for the instructions. I was able to re-root the device, but I couldn't pass SafetyNet Attestation.
My P5 has updated to: 11.0.0 (RQ1A.210105.003, Jan 2021)
I used MagiskHide Props Config (updated) method. which is:
#su
#props
#1 (edit device fingerprint)
#f (Pick a certified finger print)
#7 (google)
#20 (pixel 3a)
#3 (Android version 11)
#y (restart)
The devices rebooted but still, no SafetyNet pass.
hamooz92 said:
Thanks for the instructions. I was able to re-root the device, but I couldn't pass SafetyNet Attestation.
My P5 has updated to: 11.0.0 (RQ1A.210105.003, Jan 2021)
I used MagiskHide Props Config (updated) method. which is:
#su
#props
#1 (edit device fingerprint)
#f (Pick a certified finger print)
#7 (google)
#20 (pixel 3a)
#3 (Android version 11)
#y (restart)
The devices rebooted but still, no SafetyNet pass.
Click to expand...
Click to collapse
Altering the model prop doesn't work for safety net any longer. There is a safetynet-fix magisk module you can use.
l7777 said:
Altering the model prop doesn't work for safety net any longer. There is a safetynet-fix magisk module you can use.
Click to expand...
Click to collapse
I have also flashed Universal SafetyNet Fix but no luck
hamooz92 said:
I have also flashed Universal SafetyNet Fix but no luck
Click to expand...
Click to collapse
I just flashed the safety net fix myself and it worked like a charm.
I also left the magisk config prop module installed (just because)
Are all your other Magisk settings in order (magisk hide, checking all the boxes under GooglePlay , etc.)?
l7777 said:
Download the factory image for your current software version.
Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Click to expand...
Click to collapse
current build number is RD1A.200810.021.A1
zeepzorp said:
Download the OTA image for the version you're updating to.
Full OTA Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
Click to expand...
Click to collapse
one the ota site there's only one "EU carrier" images different than the current one: RD1A.201105.003.B1 (NOV 2020). should i use this one or can i also use the this one f.e. RQ2A.210305.006 (nothing specified)
You may find my video helpfu too but it more pertains to installing the DP1 for Android 12, but the update process is practically the same.. For rooting Android 12, it seems we need to disable verity/verification of boot images, otherwise flashing a modified boot img will just boot immediately to fastboot again.
narf0815 said:
current build number is RD1A.200810.021.A1
one the ota site there's only one "EU carrier" images different than the current one: RD1A.201105.003.B1 (NOV 2020). should i use this one or can i also use the this one f.e. RQ2A.210305.006 (nothing specified)
Click to expand...
Click to collapse
In your case yes I'd probably use RQ2A.210305.006.
zeepzorp said:
Thank you. Well-written, just a few minor corrections.
Click to expand...
Click to collapse
l7777 said:
Thanks, updated the original.
Click to expand...
Click to collapse
Thank you, l7777 and zeepzorp. This is also the way I would have done it. Out of curiosity and to reduce manual steps in between, would it work to restore the original boot.img to unroot and then use the normal OTA updates inside Android? Without a spare phone or a TWRP backup I hesitate to try this.
Also, when following the manual update steps, is it safe to skip versions in between, e.g. update directly from January to March versions? In my past 10 years of manually updating ROMs I have never used any OTA update functionality from inside Android and I noticed that the OTA update process, which was performed in mid January 2021 when unpacking the phone, updated the ROM in the following order, each separated by reboots in between:
Shipped version: 11.0.0 (RD1A.200810.021.A1, Oct 2020, EU carriers)
1st OTA update: 11.0.0 (RQ1A.201205.011, Dec 2020, All carriers except AT&T and Verizon)
2nd OTA update and at that time current version: 11.0.0 (RQ1A.210105.003, Jan 2021)
Why did it not skip the version in between and directly update to the January version?
dhrv said:
Thank you, l7777 and zeepzorp. This is also the way I would have done it. Out of curiosity and to reduce manual steps in between, would it work to restore the original boot.img to unroot and then use the normal OTA updates inside Android? Without a spare phone or a TWRP backup I hesitate to try this.
Also, when following the manual update steps, is it safe to skip versions in between, e.g. update directly from January to March versions? In my past 10 years of manually updating ROMs I have never used any OTA update functionality from inside Android and I noticed that the OTA update process, which was performed in mid January 2021 when unpacking the phone, updated the ROM in the following order, each separated by reboots in between:
Shipped version: 11.0.0 (RD1A.200810.021.A1, Oct 2020, EU carriers)
1st OTA update: 11.0.0 (RQ1A.201205.011, Dec 2020, All carriers except AT&T and Verizon)
2nd OTA update and at that time current version: 11.0.0 (RQ1A.210105.003, Jan 2021)
Why did it not skip the version in between and directly update to the January version?
Click to expand...
Click to collapse
As far as skipping monthly updates, I only update every other month (unless there's a massive update for security) and I've had zero issues. Just updated to March from January, no problems.
I'm having a hard time understanding your instructions. I apologize in advance but, could I get a more detailed list of instructions?
philharmon said:
I'm having a hard time understanding your instructions. I apologize in advance but, could I get a more detailed list of instructions?
Click to expand...
Click to collapse
Follow these instructions, they're pretty much step for step.
https://android.gadgethacks.com/how...ide-for-beginners-intermediate-users-0348101/
They're included in my OP (hyperlinked) as well.
If you have a specific question, just ask!
Az Biker said:
Follow these instructions, they're pretty much step for step.
https://android.gadgethacks.com/how...ide-for-beginners-intermediate-users-0348101/
They're included in my OP (hyperlinked) as well.
If you have a specific question, just ask!
Click to expand...
Click to collapse
Be warned, nothing after step 20 in that guide is valid any longer. Passing safetynet requires a different magisk module.
GitHub - kdrag0n/safetynet-fix: Google SafetyNet attestation workarounds for Magisk
Google SafetyNet attestation workarounds for Magisk - GitHub - kdrag0n/safetynet-fix: Google SafetyNet attestation workarounds for Magisk
github.com
l7777 said:
Be warned, nothing after step 20 in that guide is valid any longer. Passing safetynet requires a different magisk module.
GitHub - kdrag0n/safetynet-fix: Google SafetyNet attestation workarounds for Magisk
Google SafetyNet attestation workarounds for Magisk - GitHub - kdrag0n/safetynet-fix: Google SafetyNet attestation workarounds for Magisk
github.com
Click to expand...
Click to collapse
Which is why the following warning has been written in the OP since Feb 2021:
KNOWN ISSUE:
* * * MagiskHide Props Config IS NO LONGER WORKING * * *
Please follow THIS LINK for the Universal Safetynet Fix that replaces the MagiskHide Props Config process.
Has anyone tried the Pixel update and software repair tool
Google Pixel - Update and Software Repair
to go from Android 10 to 11?
Then modify the boot image with Magisk and fastbooting that?
ƒ
Az Biker said:
Which is why the following warning has been written in the OP since Feb 2021:
KNOWN ISSUE:
* * * MagiskHide Props Config IS NO LONGER WORKING * * *
Please follow THIS LINK for the Universal Safetynet Fix that replaces the MagiskHide Props Config process.
Click to expand...
Click to collapse
That assumes that people read the OP.
biTToe said:
Has anyone tried the Pixel update and software repair tool
Google Pixel - Update and Software Repair
to go from Android 10 to 11?
Then modify the boot image with Magisk and fastbooting that?
ƒ
Click to expand...
Click to collapse
It will almost certainly perform a factory reset in the process.
Just sharing how I do it in case someone is interested in a shorter path:
1. Download the new full factory image
2. Extract the file. Then extract boot.img from the image zip file within.
3. Copy boot.img to your pixel 5
4. Patch it with magisk
5. Move back the patched file, rename it to boot.img
6. Update the original zip file titled image-redfin-r*.zip with the new boot.img file (override the older one)
7. Edit flash-all file by removing -w so it won't wipe your device clean
8. Flash with flash-all
No need to unroot and reroot.
Related
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?
(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
ƒ
If you are looking for my guide on a different Pixel, find it here:
Pixel 3
Pixel 3XL
Pixel 3a
Pixel 3aXL
Pixel 4
Pixel 4XL
Pixel 4a
Pixel 4a (5G)
Pixel 5a
Pixel 6
Pixel 6 Pro
For best results, use the latest stable Magisk release.
Discussion thread for migration to 24.0+.
Note: Magisk prior to Canary 23016 does not incorporate the necessary fixes for Android 12+.
WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.
Prerequisites:
Latest SDK Platform Tools - if Platform Tools is out of date, you WILL run into problems!
USB Debugging enabled
Google USB Driver installed
I recommend using Command Prompt for these instructions; some users have difficulty with PowerShell.
Make sure the Command Prompt is running from your Platform Tools directory!
Android Source - Setting up a device for development
Spoiler: Downloads
Pixel OTA Images
Pixel Factory Images
Magisk Stable, Magisk Canary - Magisk GitHub
Spoiler: Unlock Bootloader
Follow these instructions to enable Developer Options and USB Debugging.
Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
Connect your device to your PC, and open a command window in your Platform Tools folder.
Ensure ADB sees your device:
Code:
adb devices
If you don't see a device, make sure USB Debugging is enabled, reconnect the USB cable, or try a different USB cable.
If you see "unauthorized", you need to authorize the connection on your device.
If you see the device without "unauthorized", you're good to go.
Reboot to bootloader:
Code:
adb reboot bootloader
Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
Code:
fastboot flashing unlock
Select Continue on the device screen.
Spoiler: Initial Root / Create Master Root Image
Install Magisk on your device.
Download the factory zip for your build.
Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
Copy boot.img to your device.
Patch boot.img with Magisk: "Install" > "Select and Patch a File"
Copy the patched image back to your PC. It will be named "magisk_patched-23xxx_xxxxx.img". Rename this to "master root.img" and retain it for future updates.
Reboot your device to bootloader.
Flash the patched image:
Code:
fastboot flash boot <drag and drop master root.img here>
Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>
Spoiler: Update and Root Automatic OTA
Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
You should now be updated with root.
Spoiler: Update and Root OTA Sideload
Download the OTA.
Reboot to recovery and sideload the OTA:
Code:
adb reboot sideload
Once in recovery:
Code:
adb sideload ota.zip
When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: You can use Payload Dumper to extract the contents of the OTA if you want to manually patch the new boot image. However, I will not cover that in this guide.
Spoiler: Update and Root Factory Image
Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
Download the factory zip and extract the contents.
Reboot to bootloader.
Spoiler: Update bootloader if necessary
Compare bootloader versions between phone screen and bootloader.img build number
Code:
fastboot flash bootloader <drag and drop new bootloader.img here>
If bootloader is updated, reboot to bootloader.
Spoiler: Update radio if necessary
Compare baseband versions between phone screen and radio.img build number
Code:
fastboot flash radio <drag and drop radio.img here>
If radio is updated, reboot to bootloader.
Apply update:
Code:
fastboot update --skip-reboot image-codename-buildnumber.zip
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: If you prefer, you can update using the flash-all script included in the factory zip. You will have to copy the script, bootloader image, radio image, and update zip into the Platform Tools folder; you will then have to edit the script to remove the -w option so it doesn't wipe your device.
The scripted commands should look like this:
Code:
fastboot flash bootloader <bootloader image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot flash radio <radio image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot update --skip-reboot <image-device-buildnumber.zip>
Once this completes, you can reboot to bootloader and either boot your master patched image, or if you patched the new image, flash it at this time.
Spoiler: Update and Root using PixelFlasher <<RECOMMENDED FOR NOVICES>>
PixelFlasher by @badabing2003 is an excellent tool that streamlines the update process - it even patches the boot image for you.
The application essentially automates the ADB interface to make updating and rooting much easier. However, it is STRONGLY recommended that you still learn the "basics" of using ADB.
For instructions, downloads, and support, please refer to the PixelFlasher thread.
Spoiler: Update and Root using the Android Flash Tool
Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Spoiler: Pass SafetyNet/Play Integrity
SafetyNet has been deprecated for the new Play Integrity API. More information here.
In a nutshell, Play Integrity uses the same mechanisms as SafetyNet for the BASIC and DEVICE verdicts, but uses the Trusted Execution Environment to validate those verdicts. TEE does not function on an unlocked bootloader, so legacy SafetyNet solutions will fail.
However, @Displax has modified the original Universal SafetyNet Fix by kdrag0n; his mod is able to force basic attestation instead of hardware, meaning that the device will pass BASIC and DEVICE integrity.
Mod available here. Do not use MagiskHide Props Config with this mod.
This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.
Zygisk + DenyList enabled
All subcomponents of these apps hidden under DenyList:
Google Play Store
GPay
Any banking/financial apps
Any DRM media apps
Modules:
Universal SafetyNet Fix 2.3.1 Mod - XDA post
To check SafetyNet status:
YASNAC - GitHub
To check Play Integrity status:
Play Integrity Checker - NOTE: MEETS_STRONG_INTEGRITY will ALWAYS fail on an unlocked bootloader.
I do not provide support for Magisk or modules. If you need help with Magisk, here is the Magisk General Support thread. For support specifically with Magisk v24+, see this thread.
Points of note:
The boot image is NOT the bootloader image. Do not confuse the two - YOU are expected to know the difference. Flashing the wrong image to bootloader could brick your device.
While the Magisk app is used for patching the boot image, the app and the patch are separate. This is what you should see in Magisk for functioning root:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
"Installed" shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.
"App" simply shows the version of the app itself.
If you do not have a patched master boot image, you will need to download the factory zip if you haven't already, extract the system update inside it, then patch boot.img.
If you prefer updating with the factory image, you can also extract and manually patch the boot image if desired.
Some Magisk modules, especially those that modify read only partitions like /system, may cause a boot loop after updating. As a general rule, disable these modules before updating. You are responsible for knowing what you have installed, and what modules to disable.
Credits:
Thanks to @badabing2003 , @pndwal , @Displax , @Az Biker , @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
V0latyle said:
As many of you know by now, in order to run a patched boot image on Android 12 requires disabling Android Boot Verification.
On Android 12, disabling verity and verification will require a data wipe if it hasn't been done before. What seems to "lock" the state of boot verification is booting into system; so, if you perform an update, or flash vbmeta without the disable flags, then reboot into Android, you have essentially enabled boot verification and will require a wipe to disable it again. Confusing, I know.
Here is the appropriate update process. DO NOT take the automatic OTA if you are rooted. If you allow the phone to reboot after an update without disabling boot verification, you will have to wipe in order to disable it again, as you would need to for a patched boot image.
***Note***: The boot image doesn't have to be patched before you perform the update. Some have found it works better to update, THEN patch the boot image.
OTA Sideload:
1. Download both the OTA and the factory zip.
2. Extract vbmeta.img and boot.img from the factory zip.
3. Patch the boot image and copy it back to your computer.
4. Reboot to recovery and sideload the OTA: select Apply Update via ADB, then on your PC:
Code:
adb sideload ota.zip
5. When the OTA completes, you will be in recovery mode. DO NOT REBOOT TO SYSTEM. Select "Reboot to bootloader".
6. Reflash vbmeta to disable boot verification:
Code:
fastboot flash vbmeta --disable-verity --disable-verification --slot=all vbmeta.img
7. Flash patched boot image:
Code:
fastboot flash boot --slot=all magisk_patched-23xxx_xxxxx.img
8. Reboot to system.
Factory update:
1. Download the factory zip.
2. Extract boot.img
3. Patch the boot image and copy it back to your computer.
4. Reboot to bootloader.
5. Apply update:
Code:
fastboot update --disable-verity --disable-verification --skip-reboot image-codename-buildnumber.zip
6. Flash patched boot image:
Code:
fastboot flash boot --slot=all magisk_patched-23xxx_xxxxx.img
7. Reboot to system.
Android Flash Tool:
1. Download the factory zip.
2. Extract boot.img
3. Patch the boot image and copy it back to your computer.
4. Reboot to bootloader.
5. Follow the instructions on the Android Flash Tool to update your device. The ONLY boxes you should check are "Disable Verity" and "Disable Verification"
6. When the update completes, the phone will reboot to system without root.
7. Reboot to bootloader and flash patched boot image:
Code:
fastboot flash boot --slot=all magisk_patched-23xxx_xxxxx.img
8. Reboot to system.
REMEMBER: The most critical part of this is making sure verity and verification are disabled during the update process before the phone reboots. If you forget to patch the boot image, that's OK - you don't have to flash /boot right after update.
If you have trouble with the patched boot image, simply flash /boot back to stock and allow Android to boot, then re-patch and re-flash the boot image.
You can also, if you want, boot the patched image instead of flashing it:
Code:
fastboot boot magisk_patched-23xxx_xxxxx.img
This is considered "temporary boot" as it loads the image from your PC rather than from device storage. You can use this to confirm root works, and if you so desire, you can then perform Direct Install in Magisk.
Click to expand...
Click to collapse
You Sir are all over these forums spreading helpful advice, and knowledge. I would just like to say Thank You for all you do here. It's so greatly appreciated. You are one of the many people who make this place so special.
Also, Thank You for your service to our country.
@V0latyle can you link me to a web page that would list every adb and fastboot command that we as android modders would use. What I mean is I couldn't find a Google search that listed the fastboot command with --slot=all among other adb and fastboot commands
Krsmqn said:
You Sir are all over these forums spreading helpful advice, and knowledge. I would just like to say Thank You for all you do here. It's so greatly appreciated. You are one of the many people who make this place so special.
Also, Thank You for your service to our country.
Click to expand...
Click to collapse
I agree with @Krsmqn, @V0latyle THANK YOU FOR YOUR SERVICE !!!!! in the military and for your service in the xda community
I used the Android Flash Tool method to update to the November build, and followed the instructions precisely. It worked flawlessly. My deny list is exactly the same in Magisk, and all my modules are working perfectly. I didn't even have to disable them. I think I will use this method from now on.
Krsmqn said:
You Sir are all over these forums spreading helpful advice, and knowledge. I would just like to say Thank You for all you do here. It's so greatly appreciated. You are one of the many people who make this place so special.
Also, Thank You for your service to our country.
Click to expand...
Click to collapse
elong7681 said:
I agree with @Krsmqn, @V0latyle THANK YOU FOR YOUR SERVICE !!!!! in the military and for your service in the xda community
Click to expand...
Click to collapse
Thanks guys, I appreciate it.
elong7681 said:
@V0latyle can you link me to a web page that would list every adb and fastboot command that we as android modders would use. What I mean is I couldn't find a Google search that listed the fastboot command with --slot=all among other adb and fastboot commands
Click to expand...
Click to collapse
Boy, I wish I had that handy, because I could sure use it too! I don't have your answer but hopefully someone else does, because believe me I'll be bookmarking it!
Will this work on Android Pixel 5a?
Rafiul Bari Chowdhury said:
Will this work on Android Pixel 5a?
Click to expand...
Click to collapse
Yes. The root process is exactly the same for the 4a 5g, 5, and 5a. The update process is the same across all Pixel devices.
I patched the boot.img. Magisk 23 did not report errors. But size of the patched file is zero. This looks not promising...
nostromo12 said:
I patched the boot.img. Magisk 23 did not report errors. But size of the patched file is zero. This looks not promising...
Click to expand...
Click to collapse
What version of Magisk did you use?
The stabil one
Will this work on Android Pixel 5a?
V0latyle said:
Yes. The root process is exactly the same for the 4a 5g, 5, and 5a. The update process is the same across all Pixel devices.
Click to expand...
Click to collapse
Okay. But Should I Remove Magisk Fully before upgrading through ADB/Fastboot/AFT?
H,
I'm on Android 11 pixel 5, can I use this tutorial ?
I think it's safer to unroot/remove Magisk and modules when going from 11 to 12 right? Some modules might not be compatible with 12 causing bootloops.
thecompany said:
I think it's safer to unroot/remove Magisk and modules when going from 11 to 12 right? Some modules might not be compatible with 12 causing bootloops.
Click to expand...
Click to collapse
You're going to have to wipe /data anyway if you intend to root on Android 12. Unless you're willing to try an idea I have.
Thanks V0latyle !!
I follow the flash tool method for update from october to november on my pixel 5
Perfect update, no issues and all data ok
nico22320 said:
Thanks V0latyle !!
I follow the flash tool method for update from october to november on my pixel 5
Perfect update, no issues and all data ok
Click to expand...
Click to collapse
Did you use Magisk canary? It is not necessary to check wipe in the android flash tool?
I use standard Magisk and can not change the update path to canary
nostromo12 said:
Did you use Magisk canary? It is not necessary to check wipe in the android flash tool?
I use standard Magisk and can not change the update path to canary
Click to expand...
Click to collapse
No i use the beta version of magisk.
You need wipe only for update from Android 11 to Android 12.
Just follow the guide for update to november and enjoy
nico22320 said:
No i use the beta version of magisk.
You need wipe only for update from Android 11 to Android 12.
Just follow the guide for update to november and enjoy
Click to expand...
Click to collapse
I want to upgrade from 11 (oktober) to 12
In the first message from this thread concerning the flash tool there was no wipe mentioned.
I want to update keeping my data ! How to proceed?
The best way: save yours photos etc with your Google account and make a fresh install with Factory image on Android 12 ( with disable verity and vérification)
It's long for set up device but 100% of chance of work with no issues for futurs update
Sûre you Can try to update without wipe and disable verity and vérification but maybe bootloops or not
If you are looking for my guide on a different Pixel, find it here:
Pixel 3
Pixel 3XL
Pixel 3a
Pixel 3aXL
Pixel 4
Pixel 4XL
Pixel 4a (5G)
Pixel 5
Pixel 5a
Pixel 6
Pixel 6 Pro
For best results, use the latest stable Magisk release.
Discussion thread for migration to 24.0+.
Note: Magisk prior to Canary 23016 does not incorporate the necessary fixes for Android 12+.
WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.
Prerequisites:
Latest SDK Platform Tools - if Platform Tools is out of date, you WILL run into problems!
USB Debugging enabled
Google USB Driver installed
I recommend using Command Prompt for these instructions; some users have difficulty with PowerShell.
Make sure the Command Prompt is running from your Platform Tools directory!
Android Source - Setting up a device for development
Spoiler: Downloads
Pixel OTA Images
Pixel Factory Images
Magisk Stable, Magisk Canary - Magisk GitHub
Spoiler: Unlock Bootloader
Follow these instructions to enable Developer Options and USB Debugging.
Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
Connect your device to your PC, and open a command window in your Platform Tools folder.
Ensure ADB sees your device:
Code:
adb devices
If you don't see a device, make sure USB Debugging is enabled, reconnect the USB cable, or try a different USB cable.
If you see "unauthorized", you need to authorize the connection on your device.
If you see the device without "unauthorized", you're good to go.
Reboot to bootloader:
Code:
adb reboot bootloader
Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
Code:
fastboot flashing unlock
Select Continue on the device screen.
Spoiler: Initial Root / Create Master Root Image
Install Magisk on your device.
Download the factory zip for your build.
Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
Copy boot.img to your device.
Patch boot.img with Magisk: "Install" > "Select and Patch a File"
Copy the patched image back to your PC. It will be named "magisk_patched-23xxx_xxxxx.img". Rename this to "master root.img" and retain it for future updates.
Reboot your device to bootloader.
Flash the patched image:
Code:
fastboot flash boot <drag and drop master root.img here>
Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>
Spoiler: Update and Root Automatic OTA
Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
You should now be updated with root.
Spoiler: Update and Root OTA Sideload
Download the OTA.
Reboot to recovery and sideload the OTA:
Code:
adb reboot sideload
Once in recovery:
Code:
adb sideload ota.zip
When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: You can use Payload Dumper to extract the contents of the OTA if you want to manually patch the new boot image. However, I will not cover that in this guide.
Spoiler: Update and Root Factory Image
Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
Download the factory zip and extract the contents.
Reboot to bootloader.
Spoiler: Update bootloader if necessary
Compare bootloader versions between phone screen and bootloader.img build number
Code:
fastboot flash bootloader <drag and drop new bootloader.img here>
If bootloader is updated, reboot to bootloader.
Spoiler: Update radio if necessary
Compare baseband versions between phone screen and radio.img build number
Code:
fastboot flash radio <drag and drop radio.img here>
If radio is updated, reboot to bootloader.
Apply update:
Code:
fastboot update --skip-reboot image-codename-buildnumber.zip
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: If you prefer, you can update using the flash-all script included in the factory zip. You will have to copy the script, bootloader image, radio image, and update zip into the Platform Tools folder; you will then have to edit the script to remove the -w option so it doesn't wipe your device.
The scripted commands should look like this:
Code:
fastboot flash bootloader <bootloader image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot flash radio <radio image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot update --skip-reboot <image-device-buildnumber.zip>
Once this completes, you can reboot to bootloader and either boot your master patched image, or if you patched the new image, flash it at this time.
Spoiler: Update and Root using PixelFlasher <<RECOMMENDED FOR NOVICES>>
PixelFlasher by @badabing2003 is an excellent tool that streamlines the update process - it even patches the boot image for you.
The application essentially automates the ADB interface to make updating and rooting much easier. However, it is STRONGLY recommended that you still learn the "basics" of using ADB.
For instructions, downloads, and support, please refer to the PixelFlasher thread.
Spoiler: Update and Root using the Android Flash Tool
Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Spoiler: Pass SafetyNet/Play Integrity
SafetyNet has been deprecated for the new Play Integrity API. More information here.
In a nutshell, Play Integrity uses the same mechanisms as SafetyNet for the BASIC and DEVICE verdicts, but uses the Trusted Execution Environment to validate those verdicts. TEE does not function on an unlocked bootloader, so legacy SafetyNet solutions will fail.
However, @Displax has modified the original Universal SafetyNet Fix by kdrag0n; his mod is able to force basic attestation instead of hardware, meaning that the device will pass BASIC and DEVICE integrity.
Mod available here. Do not use MagiskHide Props Config with this mod.
This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.
Zygisk + DenyList enabled
All subcomponents of these apps hidden under DenyList:
Google Play Store
GPay
Any banking/financial apps
Any DRM media apps
Modules:
Universal SafetyNet Fix 2.3.1 Mod - XDA post
To check SafetyNet status:
YASNAC - GitHub
To check Play Integrity status:
Play Integrity Checker - NOTE: MEETS_STRONG_INTEGRITY will ALWAYS fail on an unlocked bootloader.
I do not provide support for Magisk or modules. If you need help with Magisk, here is the Magisk General Support thread. For support specifically with Magisk v24+, see this thread.
Points of note:
The boot image is NOT the bootloader image. Do not confuse the two - YOU are expected to know the difference. Flashing the wrong image to bootloader could brick your device.
While the Magisk app is used for patching the boot image, the app and the patch are separate. This is what you should see in Magisk for functioning root:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
"Installed" shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.
"App" simply shows the version of the app itself.
If you do not have a patched master boot image, you will need to download the factory zip if you haven't already, extract the system update inside it, then patch boot.img.
If you prefer updating with the factory image, you can also extract and manually patch the boot image if desired.
Some Magisk modules, especially those that modify read only partitions like /system, may cause a boot loop after updating. As a general rule, disable these modules before updating. You are responsible for knowing what you have installed, and what modules to disable.
Credits:
Thanks to @badabing2003 , @pndwal , @Displax , @Az Biker , @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
Just a caveat, this doesn't appear to work with anything other than stock Android (e.g., will not work with Lineage).
roxy1712 said:
Just a caveat, this doesn't appear to work with anything other than stock Android (e.g., will not work with Lineage).
Click to expand...
Click to collapse
Correct, this is only meant for stock ROMs and stock kernels.
@V0latyle and all you other helpful people
A few basic questions please. I intend to use your guide to unlock the bootloader and root a Pixel 4a (non-5g) which is currently on stock rom Android 12 SP2A.220405.003. (Auto system updates are currently off in Developer options).
Should I update to the latest June version of Android 12 before doing anything?
Which versions of Magisk and Magisk Manager should I use to root the device?
Which elements of Magisk do I need to activate and which modules do I need to install to pass all SafetyNet checks so I can use UK banking apps?
I've used older versions of Magisk when the repository was built in but am unfamiliar with more recent versions where apparently there is no repo. How does one install modules now?
Many thanks
largeruk said:
@V0latyle and all you other helpful people
A few basic questions please. I intend to use your guide to unlock the bootloader and root a Pixel 4a (non-5g) which is currently on stock rom Android 12 SP2A.220405.003. (Auto system updates are currently off in Developer options).
Should I update to the latest June version of Android 12 before doing anything?
Click to expand...
Click to collapse
You can, but you don't have to. You'll be downloading the factory image so you can patch the boot image anyway, so you might as well take advantage of the newest security update.
largeruk said:
Which versions of Magisk and Magisk Manager should I use to root the device?
Click to expand...
Click to collapse
The two are the same. First, make sure you are only using the authentic Magisk from John Wu's Github, linked in the OP. Secondly, you can use almost any version of Magisk, but Android 12 support wasn't included until Canary 23010, meaning any version prior, including Stable v23.0 may not work properly. Since Public Beta 25.0 is out, just use that.
largeruk said:
Which elements of Magisk do I need to activate and which modules do I need to install to pass all SafetyNet checks so I can use UK banking apps?
Click to expand...
Click to collapse
Ensure Zygisk and DenyList are enabled. Enable DenyList on the Play Store and the apps you want to hide root from; it will not work on system processes. Install the Universal SafetyNet Fix module, linked in the OP. Installing USNF will likely also install MagiskHide Props Config.
Confirm SafetyNet is passing with YASNAC.
largeruk said:
I've used older versions of Magisk when the repository was built in but am unfamiliar with more recent versions where apparently there is no repo. How does one install modules now?
Click to expand...
Click to collapse
Again, the only legitimate source for Magisk is the Magisk Github. Do not use any other version from any other site. The repository continues to be alive and well. If you're talking about the module library, that is no longer included in Magisk, so you have to install the modules manually through Magisk. For more help with this, please see the Magisk help threads, also linked in the OP
V0latyle said:
Ensure Zygisk and DenyList are enabled. Enable DenyList on the Play Store and the apps you want to hide root from; it will not work on system processes. Install the Universal SafetyNet Fix module, linked in the OP. Installing USNF will likely also install MagiskHide Props Config.
Confirm SafetyNet is passing with YASNAC.
Click to expand...
Click to collapse
@ V0latyle Thanks very much for your incredibly helpful reply - much appreciated. Just some quick follow-ups for clarity please.
Zygisk - I assume that is enabled within Magisk somewhere?
DenyList - how exactly do I enable this 'on the Play Store'?
When you say DenyList will not work on system processes, I assume you mean things like Google Play Store etc? If so, is the mere installation of Magisk through the process you describe in the op now enough to hide Magisk and root from system processes?
Thanks again for your help and patience.
largeruk said:
@ V0latyle Thanks very much for your incredibly helpful reply - much appreciated. Just some quick follow-ups for clarity please.
Zygisk - I assume that is enabled within Magisk somewhere?
DenyList - how exactly do I enable this 'on the Play Store'?
When you say DenyList will not work on system processes, I assume you mean things like Google Play Store etc? If so, is the mere installation of Magisk through the process you describe in the op now enough to hide Magisk and root from system processes?
Thanks again for your help and patience.
Click to expand...
Click to collapse
Not to be rude but these are questions you should be asking in the Magisk support thread. Also, Google is your friend.
Here's how to get to the settings:
Spoiler: Screenshots
Google Play Store is not a system process. Google Play Services on the other hand is, and blocking it in MagiskHide used to be pretty standard for passing SafetyNet attestation.
For further questions please use the Magisk support threads, linked in the OP under "Pass SafetyNet"
Apologies for raising questions that, as you rightly point out, should have been posed in other threads. Lesson learnt.
A quick follow-up to my original set of questions. Given that I will be rooting with the latest (June) Magisk-patched factory image, will I need to update the bootloader and radio prior to flashing the patched stock img?
I've compared the versions between phone screen and those contained in the stock factory zip. Both versions appear to be older the current stock one:-
bootloader version on phone is c2f2-0.4-8048765 vs bootloader-sunfish-s5-0.4-8351029 on stock image
radio version on phone g8150-00123-220122-B-8106568 vs radio-sunfish-g7150-00090-220406-b-8411773.
Thanks again for all your advice. Much appreciated.
largeruk said:
Apologies for raising questions that, as you rightly point out, should have been posed in other threads. Lesson learnt.
A quick follow-up to my original set of questions. Given that I will be rooting with the latest (June) Magisk-patched factory image, will I need to update the bootloader and radio prior to flashing the patched stock img?
I've compared the versions between phone screen and those contained in the stock factory zip. Both versions appear to be older the current stock one:-
bootloader version on phone is c2f2-0.4-8048765 vs bootloader-sunfish-s5-0.4-8351029 on stock image
radio version on phone g8150-00123-220122-B-8106568 vs radio-sunfish-g7150-00090-220406-b-8411773.
Thanks again for all your advice. Much appreciated.
Click to expand...
Click to collapse
If the build numbers are different, you should update them. Don't worry about the numbers appearing "older"; as far as I can tell it doesn't seem like Google uses consecutive numbers for bootloader and radio.
This morning, my rooted Pixel 4a informed me that there was a "Security update available," even though I have Automatic System Updates turned off in Developer Options. And because I changed the device's signature in order to pass SafetyNet, it says it's an update for a Nexus 6P.
Obviously I don't want this update to install — especially since it's for the wrong device! Will it go ahead and download/install the update the next time I restart? (Or did it already download it?!) How can I abort this process?
acspdx said:
This morning, my rooted Pixel 4a informed me that there was a "Security update available," even though I have Automatic System Updates turned off in Developer Options. And because I changed the device's signature in order to pass SafetyNet, it says it's an update for a Nexus 6P.
Obviously I don't want this update to install — especially since it's for the wrong device! Will it go ahead and download/install the update the next time I restart? (Or did it already download it?!) How can I abort this process?
View attachment 5641937
Click to expand...
Click to collapse
I would recommend immediately changing the signature back to the 4a. Changing it should not be necessary to pass SafetyNet. Installing the Nexus software at the very least may fail to boot, and at the very worst may brick your device. The update has already unpacked to the alternate slot, so tapping Restart will attempt to reboot to that slot.
V0latyle said:
I would recommend immediately changing the signature back to the 4a. Changing it should not be necessary to pass SafetyNet.
Click to expand...
Click to collapse
When I first rooted it, I tried passing SafetyNet with an unmodified signature, but it didn't work; that's why I changed it. At any rate, I just reset things in MagiskHide Props Config, but I didn't reboot yet.
What to do about the already-downloaded update? Can I delete it somehow?
acspdx said:
When I first rooted it, I tried passing SafetyNet with an unmodified signature, but it didn't work; that's why I changed it. At any rate, I just reset things in MagiskHide Props Config, but I didn't reboot yet.
What to do about the already-downloaded update? Can I delete it somehow?
Click to expand...
Click to collapse
I don't know of a way to manually wipe the alternate slot. You could dirty flash the current factory image to both slots.
I am passing SafetyNet on my otherwise stock Pixel 5 using USNF + MHPC, no "under the hood" changes, although I have DenyList enabled on banking/DRM apps as well as Play Store.
V0latyle said:
I don't know of a way to manually wipe the alternate slot. You could dirty flash the current factory image to both slots.
Click to expand...
Click to collapse
Is that what you'd recommend I'd do, to prevent installing an inappropriate update? (And do you have a link that explains how to "dirty flash to both slots"?)
acspdx said:
Is that what you'd recommend I'd do, to prevent installing an inappropriate update? (And do you have a link that explains how to "dirty flash to both slots"?)
Click to expand...
Click to collapse
OP of this thread, under Update and root factory image, except you'd want to use the --slot=all argument to overwrite both slots.
V0latyle said:
OP of this thread, under Update and root factory image, except you'd want to use the --slot=all argument to overwrite both slots.
Click to expand...
Click to collapse
That's in the "fastboot update" command?
acspdx said:
That's in the "fastboot update" command?
Click to expand...
Click to collapse
Yes.
Code:
fastboot update --skip-reboot --slot=all image-device-buildnumber.zip
OK, deep breaths... I think I can do this. It's OK that the "master root" file was created on the previous version, right?
Let me make sure I have all the steps correct:
Reboot to bootloader.
% fastboot flash bootloader bootloader-sunfish-s5-0.4-7758095.img
Reboot to bootloader.
% fastboot flash radio radio-sunfish-g7150-00078-211007-b-7801723.img
Reboot to bootloader.
% fastboot update --skip-reboot --slot=all image-sunfish-sq1a.220205.002.zip
[When the update completes, the device will be in fastbootd.]
Reboot to bootloader.
% fastboot boot master_root.img
Does that look right? There's no "fastboot flash boot" step?
acspdx said:
OK, deep breaths... I think I can do this. It's OK that the "master root" file was created on the previous version, right?
Let me make sure I have all the steps correct:
Reboot to bootloader.
% fastboot flash bootloader bootloader-sunfish-s5-0.4-7758095.img
Reboot to bootloader.
% fastboot flash radio radio-sunfish-g7150-00078-211007-b-7801723.img
Reboot to bootloader.
% fastboot update --skip-reboot --slot=all image-sunfish-sq1a.220205.002.zip
[When the update completes, the device will be in fastbootd.]
Reboot to bootloader.
% fastboot boot master_root.img
Does that look right? There's no "fastboot flash boot" step?
Click to expand...
Click to collapse
If you have a newer version of Magisk installed, you can just re-patch the new boot image.
And yes, you can choose to flash the boot image instead:
Code:
fastboot flash boot --slot=all <patched boot image>
However, this will prevent OTA updates as there will be no "original" boot image.
The reason why I suggested booting an older patched image is to save the trouble of re-patching the image every time there's an update. Any version of Magisk can use almost any patched image for root, which it can then use to patch the images that are in /boot.
OK, so doing the Magisk "direct install" or using adb tools to "flash boot" is an either/or thing? It sound like, if I have Magisk 24, that'll be easier.
How to root:
You have two options for this, 1 is the recommended way and 2 is the lazy but works way.
Option 1 (RECOMMENDED):
Download the latest factory image from: https://developers.google.com/android/images#cheetah (at the time of writing this, it's TD1A.220804.031
Unlock bootloader (If you don't know how to do this, do not proceed further)
From the downloaded image file, extract the init_boot.img file and copy it to your phone (directory shouldn't matter)
Install the Magisk apk from: https://raw.githubusercontent.com/topjohnwu/magisk-files/canary/app-release.apk
Launch the app, select install, patch a file, select the init_boot file you placed in your phone
After it's done, it should place a file in your phone's download folder called magisk_patched-<VERSION>_<XYXYXYXYXY>.img
Copy that over to your PC and now boot to bootloader
Run the following commands from Powershell/commandline:
Code:
fastboot flash init_boot magisk_init_patched-25205_EfWOu.img
And then reboot, you'll be rooted
Option 2 (LAZY BUT WORKS):
I'm sharing my magisk patched init_boot from the TD1A.220804.031 build (post 73MB update). Instructions are:
Unlock bootloader (If you don't know how to do this, do not proceed further)
Boot to bootloader
Download the patched init_boot from: https://sourceforge.net/projects/ag.../magisk_init_patched-25205_EfWOu.img/download
Run the following commands from Powershell/commandline:
Code:
fastboot flash init_boot magisk_init_patched-25205_EfWOu.img
And then reboot, you'll be rooted
Install Magisk apk from here: https://raw.githubusercontent.com/topjohnwu/magisk-files/canary/app-release.apk
To get SafteyNet working:
Open the Magisk app
Open the settings from top right, Enable Zygisk
Reboot
Flash the MODIFIED SafteyNet fix module by @kdrag0n from the attached files on this thread from within Magisk Modules
Clear Play store data and you should be good!
Voila!
FASTBOOT IMAGES:
I'm sharing the stock extracted images of the TD1A.220804.031 build, should be a good reset point from fastboot incase any of you get stuck somehwere:
DO NOT MIRROR THIS PLEASE!!!!
VERIFY THE MD5 OF THE FILE AFTER DOWNLOADING!!!!!!!
Mirror 1 | Mirror 2
MD5: 43613f520697722840ded6a15eb27459
Massive shoutout to @Some_Random_Username for Mirror 1 and @akhilnarang for Mirror 2 since SourceForge was facing issues!
Now documentation on how to do it yourself (which I'd highly recommend since you should never trust any file given, always try to do it yourself!):
How to dump your own device:
1. Download a GSI which is userdebug/eng and equal/newer Security Patch of the current build on your device from any of the unofficial community builds here: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list
2. Install the DSU Sideloader app from: https://github.com/VegaBobo/DSU-Sideloader/releases/latest
3. Follow instructions in the DSU sideloader app readme here: https://github.com/VegaBobo/DSU-Sideloader/blob/master/README.md
I'd recommend enabling the userdata toggle and typing 32GB as the size
4. Reboot into the DSU from the notification
5. When the device boots up, type the following in the terminal:
Code:
adb root
adb shell
mkdir -p /sdcard/dump
for file in /dev/block/bootdevice/by-name/*; do
if [ "${file##*/}" != "userdata" ]
then
echo Dumping "${file##*/}"
dd if=$file of=/sdcard/dump/"${file##*/}".img
fi
done
6. Once the dump is done, you'll have files in /sdcard/dump/
7. Copy those over to a PC
8. Voila
A massive thanks to @AndyYan @Some_Random_Username for their help (well hand holding) throughout the entire process <3
Also thanks to @OmkarTheAndroid for the re-brush up of the Android basics I forgot
Reserved
Thanks!
Have you had any luck with SafetyNet yet? People on another thread are saying that even the Modded version by @Displax isn't working on P7P with Canary Magisk
I'd like to remind all that, 1) the DSU method requires some Android/shell knowledge to correctly carry out, and 2) you're discouraged from actually flashing/using those GSIs (TD-based Android 13 GSIs are still in early phase, and P7/P will almost certainly get proper, fully functional device-specific ROMs shortly anyway).
Thanks for the dump! Could you maybe mirror it yourself to be sure? At least until Google's facory images are up Sourceforge is incredibly slow for me (and probably for others too).
so looks like vendor_dlkm has been replaced by vendor_kernel_boot and the init_boot is just the first-stage init. This will be interesting moving forward with AVB and custom images. I will start working on something when source drops. I will likely need to have some testers to see how much this requires to get a custom image up and running.
EDIT: vendor_boot is actually the one that has been separated out a bit between vendor_boot (holding modules) and vendor_kernel_boot, which has some ramdisk stuff like the vendor_boot has on Pixel 6 devices.
Kernel now consists of 6 images. init_boot, vendor_boot, vendor_kernel_boot, vendor_dlkm, dtbo and boot.img
I downloaded the init_boot.img file then got a big problem bricked my pixel 7 oro
mrteii1 said:
I downloaded the init_boot.img file then got a big problem bricked my pixel 7 oro
Click to expand...
Click to collapse
this is a soft brick, just flash the correct partition back using the stock image
Tahnks forbyour reply. How to get the stock image? Now it brickes. Im panicking
I think i'll hold fire on rooting until things are a little clearer. unlocking the bootloader in the usual fashion should be ok tho right?
whatsisnametake2 said:
I think i'll hold fire on rooting until things are a little clearer. unlocking the bootloader in the usual fashion should be ok tho right?
Click to expand...
Click to collapse
Yes, unlocking the bootloader is still the same and will wipe data.
Current SafetyNet Status (with modded universal SafetyNet Fix + Magisk Props):
Play Integrity API Checker:
MEETS_DEVICE_INTEGRITY: fail
MEETS_BASIC_INTEGRITY: pass
MEETS_STRONG_INTEGRITY: fail
YASNAC:
Basic integrity: pass
CTS profile match: fail
Edit: GPay does work on the Pixel Watch, even though it doesn't on the phone (when rooted).
Make sure to add your cards there if you're using the Pixel Watch and can't use GPay on your phone.
zetsumeikuro said:
Yes, unlocking the bootloader is still the same and will wipe data.
Click to expand...
Click to collapse
If you can boot to recovery try a factory reset from there or you will have to power it off and wait until Google releases the image.
mrteii1 said:
Tahnks forbyour reply. How to get the stock image? Now it brickes. Im panicking
Click to expand...
Click to collapse
In the OP, the part with:
"FASTBOOT IMAGES:
I'm sharing the stock extracted images of the TD1A.220804.031 build, should be a good reset point from fastboot incase any of you get stuck somehwere:
DO NOT MIRROR THIS PLEASE!!!!"
Misterxtc said:
If you can boot to recovery try a factory reset from there or you will have to power it off and wait until Google releases the image.
Click to expand...
Click to collapse
? unlocking is just going to do a data wipe/factory reset anyway. not sure why I would need the factory image for that? or to do an additional factory reset from recovery?
Misterxtc said:
If you can boot to recovery try a factory reset from there or you will have to power it off and wait until Google releases the image.
Click to expand...
Click to collapse
Maybe you replied to the wrong user?
Hey everyone, a slight update on the website for the image dump, SourceForge was giving people incomplete files so @Some_Random_Username is generously hosting it on his servers <3
please verify the MD5 of the downloaded zip before trying to modify any parititons using the following commands:
On windows:
Code:
certutil -hashfile cheetah-TD1A.220804.031-compressed.zip MD5
On Linux/MacOS:
Code:
md5sum cheetah-TD1A.220804.031-compressed.zip
The MD5 should be: 43613f520697722840ded6a15eb27459
whatsisnametake2 said:
? unlocking is just going to do a data wipe/factory reset anyway. not sure why I would need the factory image for that? or to do an additional factory reset from recovery?
Click to expand...
Click to collapse
I was thinking the reset would force it to boot off the other slot.