[Tutorial] Unlock Bootloader, get root and valid Safetynet - Google Pixel 5 Guides, News, & Discussion

04/09/21 v2​Just install this Module via magisk manager:
https://forum.xda-developers.com/attachments/hardwareoff_1-1-zip.5058405/
which is mentioned by this thread:
Magisk General Support / Discussion
This is the place for general support and discussion regarding "Public Releases", which includes both stable and beta releases. All information, including troubleshoot guides and notes, are in the Announcement Thread
forum.xda-developers.com
You need it + safetynetfix from kdrag0n then you have valid safetynet.
04/09/21​For the last two days there has been an update on Google's site that causes Safetynet to fail on your phone. It didn't work on my phone and a colleague's phone, but it worked on another colleague's phone with no problems. So it may or may not fail on your end.
If you have the problem with safetynet failing. First update magisk to v.23 and the manager to the latest version.
Then we need lsposed with a separate module for lsposed. You can use edxposed, but for most users it laggs much more than lsposed.
If you don't have lsposed. You need to install the following two Magisk modules in the order described.
1. riru
2. riru - LSposed
Otherwise you will get an installation error because the core is missing.
After the installation, restart the phone.
Then the LSposed manager should be visible in your launcher. If not, download the full zip package from here:
Releases · LSPosed/LSPosed
LSPosed Framework. Contribute to LSPosed/LSPosed development by creating an account on GitHub.
github.com
Extract the manager.apk from it and install it.
Inside the manager, you should get a green message with "activated". If not, you have not installed the module.
Inside the Lsposed manager, install the XprivacyLua module from the repo. The search function is located at the bottom.
Go to Modules and click on XprivacyLua. And tick the two items for the recommended applications:
System Framework
settings storage
Then click on the 3 dots at the top right.
There, uncheck the item in "Hide -> System apps".
Now you can search in the app list for
Google play Services and set the hook.
Then click on the gear icon on the top right and the app XprivacyLua will open.
In it, search for Google play Services again and set the checkmark next to the gear icon so that each sub-checkmark is set.
Now we need to hide the Magisk Manager. To do this, open the Magisk Manager.
Click on the gear icon at the top right of the main menu. Then click on hide magisk manager. Enter the desired name and wait until the Magisk Manager opens again.
If you have not installed the Safetynet fix from kdrag0n, you can download it here:
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
Then install it from the "modules" menu in magisk manager using the "install module from storage" function.
Once you have installed the Safetynet Fix module, restart the phone.
Then open the Settings app and navigate to the Apps section. Then search for Google Play Services, open it and in the storage option, use the function to clear the cache memory.
Now you can check Safetynet again in Magisk and it should be valid.
19/04/21:​There is currently a problem with magisk checking safetynet. When you check safetynet in magisk, you get a safetynet API error. Either use an alternative Safetynet app e.g. Safetynet Test or install the magisk canary app. I heard it was fixed there, but don't know for sure.​
SafetyNet Test - Apps on Google Play
SafetyNet device compatibility test
play.google.com
I wrote this entire tutorial already in this Thread, but I think it should be separated, so everyone can find it easier:
https://forum.xda-developers.com/showpost.php?p=83736713&postcount=89
This Tutorial descripes 3 Points:
Unlock Bootloader - which is necessary for root
Get root via Magisk
Valid Safetynet
Enable Developer mode in settings
Open Settings App
Move to About The Phone
7 Taps on the Build-Number
Enable OEM-Unlock in settings
Go back to Main Menu of Settings
move to system
Unfold Extended
Open Developer options
Enable OEM-Unlock
If you go further, you should either have a clean phone or backup your data. Because if you unlock the bootloader, the entire phone will be wiped.
Reboot Phone in Fastboot
Turn off Phone with long press on Power Button and click turn off
Press Power Button + Lower Volume together for some seconds and you are in fastboot mode
Use Fastboot to unlock Phone
If you don't have it download at first the needed adb and fastboot files for your system:
https://developer.android.com/studio/releases/platform-tools
Extract it to a path where you want it.
Connect your P5 with your PC with an USB cable
Open the path where you have extracted the adb tools.
On Windows press Shift + Right click and in the context menu click on open commandline Window
If you enter the following console command you should see an listed device about it's serial number:
Code:
fastboot devices
If you get an empty result, you have to check if P5 is correct connected via usb and p5 is in fastboot mode (you see it onscreen)
It could be that you have to install the usb drivers at first for recognizing it via fastboot.
If a Serial was listed in the Previous step, go further.
Enter the following command to start to unlocking your phone
Code:
fastboot flashing unlock
On your Phone you see a message to "not unlock your phone", with volume up you switch it to "unlock your phone". With the Power Button you accept it.
It will reboot now and at this moment it wipes the entire phone, so you start again from scratch to configure the p5.
if you have a Pixel 5 without the KDDI Version, you can use the following boot image, which is already a prepatched boot image including magisk 21 (Build 21005).
Download it at first:
http://www.mediafire.com/file/8ll4mlzt3l9njph/magisk_patched+Build+21005.img/file
KDDI variant: http://www.mediafire.com/file/widag4w5s02itq5/magisk_patched+KDDI.img/file
Copy the img-file to the path where you had extracted the adb files.
After you have configured your phone so you can use it, turn off p5 again and go again into fastboot mode.
Ensure your phone is connected via usb to the PC.
In the opened command line Window enter the following command:
Code:
fastboot flash boot "magisk_patched Build 21005.img"
For windows powershell Users check this out, if the above command failed:
cubandanger05 said:
A suggestion, please add that those having issues with the flash command failing to WRITE can try putting ./ before the command and that should work.
morpheus620 said:
hm not working for me. P5 is unlocked.
C:\>fastboot flash boot "magisk_patched Build 21005.img"
target reported max download size of 268435456 bytes
sending 'boot' (98304 KB)...
OKAY [ 2.419s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 2.500s
Click to expand...
Click to collapse
Do:
./fastboot flash boot "magisk_patched Build 21005.img"
Click to expand...
Click to collapse
After it finished you can reboot your phone into android system and you will see the magisk manager logo.
Open it and you should see magisk 21005 is installed, then you know root access is granted.
For Safetynet you have to do the following steps
In Magisk Manager open settings gear.
under Magisk enable MagiskHide
Above MagiskHide is a menupoint called "Hide Magisk Manager", click on it, give the magisk manager a new name, click ok and wait until it's reopend.
Go to main menu of the magisk manager. On bottom is a "shield icon" open it.
Go to "MagiskHide"
On Top is the item "Google Play Services" unfold it and set every hook on it.
It's recommended to set the hook on every google Service you find.
Go Back to main menu of magisk manager
Download the latest universal safetynet fix for your P5:
Release v2.4.0 · kdrag0n/safetynet-fix
Highlights Play Integrity bypass without breaking device checks or causing other issues Disabled use of hardware attestation on Pixel 7 and newer (@anirudhgupta109) Other changes Updated instruc...
github.com
Then in magisk manager under modules click on the "Install from memory" button and then select the zip file you just downloaded and magisk manager will then install the module.
After finished installation reboot your P5.
After reboot check safetynet state in Magisk Manger, it should be OK.
Now you have a rooted phone and a valid safetynet.

This post describes how to patch magisk to a new firmware as long as no twrp recovery is available:
At first download the specific rom:
https://developers.google.com/android/images
You need only the "Link". Flash is only for flashing the rom over an chromium browser.
After downloaded the zip file open it, and you find another zip file. This zip file has to be extracted.
Into the extracted zip is the file boot.img, extract it.
Copy the boot.img to your p5 by usb.
Install the last magisk manager Canary version on your p5:
https://github.com/topjohnwu/Magisk
Open magisk manager. In main menu click on install. In the new menu click on "select a file and patch it". Search for the copied boot.img on your p5 and select it.
Wait for flash completion. And check if it's successful.
Copy the file /sdcard/download/magisk_patched.img to your pc in the adb files directory.
If you on the step to flash the boot image, you have to use the new file name.

Great write up, It will help many. As for me, it will make a nice reference to ADB.
Sent from my Pixel 3a XL using Tapatalk

flashing img doesn't work
Hi,
I tried it exactly as written here:
In the opened command line Window enter the following command:
Code:
fastboot flash boot "magisk_patched Build 21005.img"
After it finished you can reboot your phone into android system and you will see the magisk manager logo.
Somehow flashing the img does not work for me.
Terminal output:
❯ fastboot flash boot "boot.img"
Sending 'boot_a' (98304 KB) OKAY [ 0.480s]
Writing 'boot_a' OKAY [ 0.312s]
Finished. Total time: 1.152s
Even though the output on the terminal looks fine. At least it doesn't give me an error.
Tried installing magisk manually and flashing the img through the app, but that gave me an error:
!installation failed
-repacking boot image
!Unable to repack boot image
Ahh and btw I'm based in germany so I guess I have to use the non KDDI version.
Appreciate the help
Cina

What is the KDDI-Version?
Thanks for your tutorial

Thanks alot for this!!! This will be the first thing I do when I get my Pixel 5

Sh0X31 said:
What is the KDDI-Version?
Thanks for your tutorial
Click to expand...
Click to collapse
As far as I understood it, it's the japanese version...

Yup KDDI its a Japanese telecoms company, and that version is specially built for them.

I tried it exactly as written here:
In the opened command line Window enter the following command:
Code:
fastboot flash boot "magisk_patched Build 21005.img"
After it finished you can reboot your phone into android system and you will see the magisk manager logo.
Somehow flashing the img does not work for me.
Terminal output:
❯ fastboot flash boot "boot.img"
Sending 'boot_a' (98304 KB) OKAY [ 0.480s]
Writing 'boot_a' OKAY [ 0.312s]
Finished. Total time: 1.152s
Even though the output on the terminal looks fine. At least it doesn't give me an error.
Click to expand...
Click to collapse
Same here
I tried all ways thrice and then again
It is not that difficult, usually.
But Magisk Manager says Installed N/A
Thanks for any idea
edit:
I set up everything again on another computer.
Patched the boot.img myself with the MM Canary version
and then it worked.
Looks like my other PC has an unknown problem

Thanks <3
But will it be possible to have the phone identified as P5 instead of P3a in the future?
A bit scared of doing this.

Frost Storm said:
Same here
I tried all ways thrice and then again
It is not that difficult, usually.
But Magisk Manager says Installed N/A
Thanks for any idea
Click to expand...
Click to collapse
Are you sure you are on the correct boot.img ? i have a pixel 5 from a french carrier and the build number is the same as the "KDDI" version but i'm pretty sure my phone has nothing to do with japanese telecoms.

Great! thanks

SOSODU13016 said:
Are you sure you are on the correct boot.img ? i have a pixel 5 from a french carrier and the build number is the same as the "KDDI" version but i'm pretty sure my phone has nothing to do with japanese telecoms.
Click to expand...
Click to collapse
Yes, I can second this. Looks like a lot of devices shipped to Europe are indeed preloaded with the KDDI version. I contacted Google support about this to better understand, awaiting their response.

Hecke92 said:
Thanks <3
But will it be possible to have the phone identified as P5 instead of P3a in the future?
A bit scared of doing this.
Click to expand...
Click to collapse
I went back and done it again and changed it to original and now got Nexus 5 and still works Nexus is better then 3a lol

jaythenut said:
I went back and done it again and changed it to original and now got Nexus 5 and still works Nexus is better then 3a lol
Click to expand...
Click to collapse
You can have issues on Playstore ( no compatibel apps on your device) by using Nexus

cultofluna said:
You can have issues on Playstore ( no compatibel apps on your device) by using Nexus
Click to expand...
Click to collapse
All good so far but will keep my eye on it thanks

cultofluna said:
You can have issues on Playstore ( no compatibel apps on your device) by using Nexus
Click to expand...
Click to collapse
Is it possible to have this fixed in the future? So that we don't have to change the identity?

Hecke92 said:
Is it possible to have this fixed in the future? So that we don't have to change the identity?
Click to expand...
Click to collapse
I won't think so if we can use the p5 fingerprint to get valid safety net. Because we have to switch from basic authentication to hardware key. AFAIK if the hardware method is used, the hardware sensor can check if bootloader is unlocked and give the results to the safety net validator. And you will get automatically false cts profile if the hardware sensor detect that your bootloader is open.
This is a very interesting question about rooting and using custom roms in the future when no other device with newer android version use basic authentication.

2 + Enter
f + Enter
7 + Enter
20 + Enter
y + Enter
y + Enter
Click to expand...
Click to collapse
This I type in adb shell or terminal on Android. But what they do?

Sh0X31 said:
This I type in adb shell or terminal on Android. But what they do?
Click to expand...
Click to collapse
If you had entered "props" in adb shell you see a menu which is navigated by key inputs. The code section you mentioned are for navigating through the props menu to get the specific p3a fingerprint on basic authentication activated on your phone including reboot.

Related

[Guide] Root Pixel 3 XL Android 10.0 (Q)

[Guide] Root Pixel 3 XL Android 11 (R) Unlock/Lock Bootloader + Install Stock Images/Systemless Root2021
Android Security Bulletin—June 2021
Pixel Update Bulletin—June 2021​
Introduction
This Guide is for Pixel 3 XL owners that want to Root their phone, and enjoy the benefits of rooting it without installing a Custom ROM. However, for those that just can't live without a Custom ROM, take a look at 'Custom ROMs for Pixel 3 XL'.
This Guide also works for Pixel 3 owners: If, they download the Pixel 3 files.
New
Android 12 Developer Preview - Beta 2
Factory Images: Downloads for Google Pixel 06/09
OTA Images: Apply a device OTA image 06/09
CalyxOS
GrapheneOS
Update(s)
Factory/OTA Images - 06/07
Magisk Stable - Magisk-23.0 05/12
Magisk Beta - Magisk-23.0 05/12
Magisk Canary - Magisk-23xxx
TWRP - Waiting for Android 11 (Q) TWRP
SafetyNet - SafetyNetFix v1.1.1 01/16
SDK Platform-tools - r31.0.2 April
Custom Kernels
ElementalX (Check his Kernel Manager for latest update.)
Kirisakura v3.0.8_R 06/11
Custom ROMs
[ROM][11][OFFICIAL] lineage-18.1 for Pixel 3/XL (blueline/crosshatch) - Nightly by razorloves
[OFFICIAL][11]ScorpionROM v4.x 05/04
Disclaimer
I assume no responsibility for the malfunctioning/bricking of your phone.
The order of listed items i.e., Custom Kernels, Custom ROMS, etc. Does not indicate my preference for them. It is your responsibility to do the research before selecting an item.
Prerequisites
A Pixel 3 XL phone with an unlocked bootloader.
The latest Android 11 (R) Factory or OTA Image: "crosshatch" for Pixel 3 XL
Factory Image
11.0.0 (RQ3A.210605.005, Jun 2021)
Which one should I use?
OTA Image
11.0.0 (RQ3A.210605.005, Jun 2021)
Which one should I use?
Computer - With the latest SDK Platform-Tools: r31.0.2 installed.
Important: Update Platform Tools, regularly, for optimal performance.
Other Pixel XL Guides
[Guide] Pixel 4 XL Android 11 (R)
Credits/Thanks/Recognitions
@topjohnwu - Magisk Canary
@sliding_billy - His help editing this thread.
Those I may have, inadvertently, forgotten.
Index
(NOTE: Numbers 1-11 are not steps, they are individual sets of instructions).
Open a Command Prompt/Boot Fastboot Mode/Boot Recovery
Open Command Prompt on Computer
Option 1 - Open File Explorer, click the platform-tools folder, press shift, right click, and select open command prompt here.
Option 2 - Open File Explorer, click the platform-tools folder, highlight the directory information in the address bar or click the folder (left side of address bar) to highlight it type cmd and press enter.
Notes:
If your computer only has 'open powershell here' in the context menu. Use option 2.
If you do not want to open a Command Prompt every time you want to use fastboot, Add the path to the Platform-tools folder to Windows environment variables.
Boot fastboot mode:
Power off phone, press and hold the power and volume down buttons until you see Start.
Boot Recovery
Power off phone, press and hold the power and volume down buttons until you see Start. Use volume up/down button until you see Recovery mode. Press power button.
Test fastboot
Enable Developer Options - Tap Settings > About phone > Build number 7 times or until you should see 'you are a Developer'.
Enable USB Debugging - Tap Settings > System > Advanced > Developer options >
Enable USB Debugging.
Open a Command Prompt on your computer in the Platform-tools folder.
Boot fastboot mode on your phone (#1)
Connect the phone to the Computer.
At the prompt type: fastboot devices to verify communication with phone. It should return your phone's serial number.
Unlock Bootloader/Return Phone to Stock/Lock Bootloader
Unlock Bootloader
This will erase all user data from the device!
Backup your data
Activate Developer Options: Tap Settings > About Phone > Tap Build Number 7 times or until you see you are a Developer. Tap back > System > Advanced > Developer Options. Enable OEM Unlock and, USB Debugging.
Boot fastboot mode
Connect the phone to the Computer with USB cord.
Open a Command Prompt on your computer and type fastboot flashing unlock and press enter.
You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
Allow the process to complete and then type fastboot reboot at the Command Prompt and press enter.
When your phone reboots disconnect your usb cable.
After unlocking your bootloader, every time you reboot you'll see a warning: You will see this warning until, you relock the bootloader.
Important: Do not relock your bootloader until you have returned the device to Stock..
Return Phone to Stock
Backup your data/Internal storage
Settings > System > Advanced > Reset Options > Erase all data (factory reset)
Log in
Set up phone
Lock Bootloader
Do not lock the bootloader until you have returned the phone to stock. Failure to do so causes bricked phones.
This will erase all user data from the device!
Boot fastboot mode
Open a Command Prompt and type this at the Prompt: fastboot flashing lock
You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
Allow the process to complete, then type this at the Command Prompt: fastboot reboot
Enable Developer Options: Settings > About phone > Tap Build number 7 times or until you see 'you are a developer'.
Tap Back > Developer options and toggle OEM Unlock off.
Install/Update Factory Image keep or wipe data
Important Note(s):
When doing a major upgrade i.e., Android 10 (Q) to Android 11 (R): I recommend doing a clean install. What is a clean install?:
Doing a Factory reset prior to installing, major, update.
Using flash-all.bat file with the -w (Wipe Data).
Always verify you have the latest version of SDK Platform-Tools installed on your computer before installing the Factory Image: Pixel 3 XL - crosshatch.
If your phone was rooted, and you want to 'Keep Data'. Do this first unhide Magisk App (if you hid it) then Uninstall Magisk - Restore Images prior flashing the Factory image. Why? The changes in the Factory image may cause Magisk modules to fail. This will cause boot loops.
If you get an error:when flashing, try one of these options:
Change the USB port to a non charging USB port.
Change the USB cord.
Change Computers.
Backup your data
Download the latest Factory Image: Pixel 3 XL - crosshatch to your Computer.
Extract the factory Image to a folder.
Flash Factory Image Keep Data
Open the folder with the extracted the Factory Image and Edit the flash-all.bat file with a file editor i.e., Notepad. Remove -wfrom this command: fastboot -w update image-crosshatch-aa9a.999999.999.zip
Note: If you do not remove the -w your Internal Storage will be wiped.
Copy/Move these files to the Platform-tools folder:
bootloader-crosshatch-....img
flash-all.bat
image-crosshatch-....zip
radio-crosshatch-....img
At the Command Promp type: flash-all and press enter.
System will reboot when flashing is complete.
Do #7 to root/reroot.
Flash Factory Image Wipe Data
This will wipe your Internal Storage.
Open the folder with the extracted the Factory Image.
Copy/Move these files to the Platform-tools folder:
bootloader-crosshatch-....img
flash-all.bat
image-crosshatch-....zip
radio-crosshatch-....img
Open a Command Prompt on your computer in the Platform-tools folder.
At the Command Prompt type: flash-all and press enter.
System will reboot when flashing is complete.
Do #7 to root/reroot.
ADB Sideload
Stock Recovery
Full OTA Images for Nexus and Pixel Devices - Updating instructions
Custom Recovery - TWRP
Important notes:
Charge your device.
Enable USB Debugging on your phone.
Install the latest version of SDK Platform-tools on your computer.
Open a command prompt in the computer's ADB folder: the folder with ADB.exe in it.
Put the (flashable zip) file you want to sideload in the computer's ADB folder.Copy the Zip file you want to install on your device to the ADB folder.
Connect your device to your computer using a USB cable.
Boot T.W.R.P.
T.W.R.P installed: Boot fastboot mode ==> use volume buttons up/down until you see Recovery mode ==> press power botton.
T.W.R.P. not installed: Boot T.W.R.P: Put twrp.img file in the computer's ADB folder ==> open a command prompt in ADB folder ==> at the prompt type fastboot flash boot "Name of twrp file.img" without the quotation marks.
When T.W.R.P boots tap Advanced ==> ADB Sideload.
✓ the wipe Dalvik cache box
Swipe to start
On your Computer: Enter the following command at the command prompt. adb sideload <filename.Zip> i.e., adb sideload myfile.zip
You will see the progress of the sideloaded file.
When the file finishes sidloading, reboot your device.
Done!
Extract/Flash boot.img
Extract boot.img
Download the latest Factory image to your phone.
Extract the Factory Image file (crosshatch-pda1a.999999.999-factory-99a9a99a.zip) to a folder.
Open the folder and, extract the Image file (image-crosshatch-aa9a.999999.999.zip).
Flash boot.img
Note: Flashing this file removes root.
Open the folder you extracted the 'image...zip' file to and copy the boot.img file to your computer's platform-tools folder or to the folder that has fastboot.exe in it.
Boot fastboot mode
Connect the phone to the Computer
At the Command Prompt type: fastboot flash boot --slot all boot.img
Reboot
Root/Reroot with Magisk and Pass SafetyNet.
Important Notes:
When doing a major upgrade i.e., Android 10 (Q) to Android 11 (R). I recommend doing a clean install. What is a clean install?
Doing a Factory reset prior to installing, major, update.
Using flash-all.bat file without removing the -w.
If your phone was rooted. Do this first unhide Magisk App (if you hid it) then Uninstall Magisk - Restore Images. Why? The changes in the Factory image may cause Magisk modules to fail. This will cause boot loops.
Download files:
Magisk App - Download to your phone
Magisk Beta/Stable App
Magisk Canary App
Custom Kernels - Download to your phone - install with Kernel Manager
Important: Unless otherwise directed by Kernel Developer, Flash the Kernel after Magisk.
[Kernel][11.06.2021][4.9.272] Kirisakura_R 3.0.8 for Pixel 3/XL aka Bluecross by Freak07
Kernel Manager - Download to your phone
EX Kernel Manager
Patch the boot.img
Do #6 - Extract boot.img
Install Magisk (Beta, Canary or Stable) App
Open Magisk App
Depending on the version of Magisk App installed: Set the Update Channel to Beta, Canary or Stable.
Tap Install (next to Magisk)
Tap, Select and Patch a File
Select the boot.img file you extracted from the latest factory image.
Tap the ✓
Tap Let's Go
When you see done, the boot.img has been patched (magisk_patched_xxxxx.img), and stored in the download folder.
Reboot
Copy the patched boot.img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it.
Boot fastboot mode (#1)
Connect the phone to the Computer with USB cord.
Open a Command Prompt (#1) in the folder you copied the patched boot.img to.
Type fastboot flash boot "name of patched boot".img without the quote marks at the Prompt and press enter.
Type fastboot reboot at the Prompt and press enter.
Important:If your phone boot loops try one of the following options.
Flash the stock boot.img to both slots. fastboot flash boot boot.img --slot all
Boot Safe Mode - Press Power Off button ==> Press Power Off until you see boot Safe Mode ==> Press Ok == > wait for it to boot ==> Reboot.
Pass SafetyNet: MAGISK MODULE ❯ Universal SafetyNet Fix 1.1.0
Download SafetyNetFix from the link above.
Open Magisk Canary App
Tap Modules icon.
Tap Install from storage
navigate to the SafetyNetFix file
Hightlight the file (tap it)
Tap the check mark (✓) to start the installation.
After it installs tap the Save icon to save the log
Tap Reboot.
Open Magisk Canary App
Tap the Setup icon.
Scroll down to Magisk - MagiskHide and enable it.
Tap back arrow => tap Superuser icon => tap MagiskHide => Scroll to the bottom of the page => Tap Search icon => Tap Show system apps (Under Filters) => check (✓): Google play services (com.google.android.gms).
Close Magisk Manager.
Open Settings
Tap Apps & notifications
Tap see all 999 apps
Tap the three dot menu
Tap Show system
Scroll down to Google Play Store
Tap it
Tap Storage & cache
Tap Clear cache
Tap Clear storage
Exit settings
reboot
Open Google Play Store app
Tap Menu
Tap Settings
Scroll down to Play protect certification
check for Device certification.
Set Magisk App Update Channel/Update Magisk
Set Magisk App Update Channel
Open Magisk App > Tap menu icon > Settings > Update Channel > Select Stable, Beta Canary or Custom.
Update Magisk
When Magisk App notifies you of an update:
Tap install.
Select, Direct Install (Recommended)
When it finishes installing
Tap, Save Log
Log location: /storage/emulated/0/MagiskManager/logs/install_log_
Tap, Reboot
Done
Custom ROMs
Need help with a Custom ROM?
Read and follow the Installation Instructions. The installation instructions are in the OP.
If you have a problem Installing the ROM, Search the thread of the Custom ROM you are trying to install for a solution to problem: If you don't find a solution post your request for help on the thread.
ROMs
Alpha/Beta
None
Official
[ROM][OFFICIAL][Android 11]ScorpionROM v4.x[Google Pixel 3/XL][Blueline/Crosshatch] by NepoRood
ROM][11][OFFICIAL] lineage-18.0 for Pixel 3/XL (blueline/crosshatch) by razorloves
Unofficial
None
Mods/Scripts/Themes
Tulsadiver's Mods
Android 10 ADB Installer-Zip Installer, creates magisk module by Tulsadiver
Android 10 Accents Mod by Tulsadiver
Others
[MODULE] MagiskHide Props Config - SafetyNet, prop edits, and more - v5.3.6 by Didgeridoohan
[Substratum][Magisk]Pixel Launcher Editor for P3XL by eg1122
[MOD][MAGISK][ANDROID 11] Addon Features for Pixel Devices - Pixel 3 XL Thread
T.W.R.P. Backup/T.W.R.P Update
Waiting for Android 11 (R) T.W.R.P.
Why on earth would anyone go through all these steps AND lock their bootloader when just using flashall.bat with -w intact also wipes your entire phone?!
@Homeboy76 did this work for you? Was getting ready to do a clean install and while researching what the delta of 19 and 20 was, I see talk of sensors not working?
I always appreciate using your guide(s). Thanks a lot!
guide works, thanks for helping me root android 10 on first day of official release
I've Magisk patched the boot.img using the Canary build and flashed.... it's been stuck on the bootscreen for about 20 minutes. Is this normal? How long should I leave it?
Has anyone gotten Adaway working?
Hi,
Great guide, appreciate it.
I'm on Android 9 rooted with magisk. when I try to install Android 10 I get an error below. Latest platform tools, Bonito .20 Any ideas what is wrong? Flashed multiple time through the Pie security updates etc and never had an issue.
_________________________________________________________________________________
F:\platform-tools>flash-all
Sending 'bootloader_a' (8349 KB) OKAY [ 0.298s]
Writing 'bootloader_a' (bootloader) Flashing Pack version b4s4-0.2-5736883
(bootloader) xbl signature verify fail
FAILED (remote: 'Validate packed image fail')
fastboot: error: Command failed
Rebooting into bootloader OKAY [ 0.048s]
Finished. Total time: 0.051s
Sending 'radio_a' (73196 KB) OKAY [ 1.798s]
Writing 'radio_a' (bootloader) Flashing Pack version SSD:g670-00025-190805-B-5781381
(bootloader) Flashing partition modem_a
OKAY [ 0.298s]
Finished. Total time: 2.376s
Rebooting into bootloader OKAY [ 0.048s]
Finished. Total time: 0.051s
--------------------------------------------
Bootloader Version...: b1c1-0.1-5191736
Baseband Version.....: g670-00025-190805-B-5781381
Serial Number........: 8A5Y0F91G
--------------------------------------------
extracting android-info.txt (0 MB) to RAM...
Checking 'product' FAILED
Device product is 'crosshatch'.
Update requires 'bonito' or 'sargo'.
fastboot: error: requirements not met!
Press any key to exit...
_________________________________________________________________
Looks like I screwed it up. Now it boots to the spinning G than back to Fastboot - "no valid slot to boot". Now what?
Reflashed Pie, all set -phone boots up. Now to figure out how to get to Android 10.
ginfest said:
Hi,
Great guide, appreciate it.
I'm on Android 9 rooted with magisk. when I try to install Android 10 I get an error below. Latest platform tools, Bonito .20 Any ideas what is wrong? Flashed multiple time through the Pie security updates etc and never had an issue.
........
Device product is 'crosshatch'.
Update requires 'bonito' or 'sargo'.
Click to expand...
Click to collapse
You've downloaded the wrong image. Are you on a 3a XL (Bonito) or regular 3 XL (Crosshatch)??
Download the correct image from here: https://developers.google.com/android/images
krs360 said:
You've downloaded the wrong image. Are you on a 3a XL (Bonito) or regular 3 XL (Crosshatch)??
Download the correct image from here: https://developers.google.com/android/images
Click to expand...
Click to collapse
Oh **** what a dummy I am! I'm on a Pixel 3XL not 3a XL. Sorry, I'll try again
---------- Post added at 08:49 AM ---------- Previous post was at 08:17 AM ----------
Ok, reflashed the correct Crosshatch 0.20, flashed the Magisk patched .img et viola, Android 10 rooted and no loss of data!
Thanks for all the help.
not to be that guy who asks for ETAs but any idea how long TWRP takes for a new version of android to come out? never really been around for a version release like this and just curious. waiting for TWRP to come out before i go through this process.
Homeboy76 said:
OP
Click to expand...
Click to collapse
Great write up! Thank you! I would suggest adding "--slot all" command to the magisk instructions. Root wasn't appearing to be working for me until I added that in.
pr0adam said:
not to be that guy who asks for ETAs but any idea how long TWRP takes for a new version of android to come out? never really been around for a version release like this and just curious. waiting for TWRP to come out before i go through this process.
Click to expand...
Click to collapse
This twrp works
https://forum.xda-developers.com/showpost.php?p=80017781&postcount=1152
---------- Post added at 06:17 PM ---------- Previous post was at 06:16 PM ----------
Has anyone been able to edit build.prop? I have root, but cannot mount the build.prop w/r.
lawtalking said:
This twrp works
https://forum.xda-developers.com/showpost.php?p=80017781&postcount=1152
---------- Post added at 06:17 PM ---------- Previous post was at 06:16 PM ----------
Has anyone been able to edit build.prop? I have root, but cannot mount the build.prop w/r.
Click to expand...
Click to collapse
even though it says its for blueline(pixel 3) and we are on crosshatch(pixel 3xl)?
I'm not able to flash the 10 factory image. I can flash pie just fine, but it always gives an error when trying to push the system image. I can flash Pie just fine. Anyone else have this issue?
jmartin72 said:
I'm not able to flash the 10 factory image. I can flash pie just fine, but it always gives an error when trying to push the system image. I can flash Pie just fine. Anyone else have this issue?
Click to expand...
Click to collapse
Are you getting an error saying that you need to use fastbootd?
airmaxx23 said:
Are you getting an error saying that you need to use fastbootd?
Click to expand...
Click to collapse
No it doesn't say that. I'd have to do it again to get the exact wording, but it makes my phone boot to some screen that says fastboot up at the top
pr0adam said:
even though it says its for blueline(pixel 3) and we are on crosshatch(pixel 3xl)?
Click to expand...
Click to collapse
Yes. The code paths are the same, so it works. Used it myself.
lawtalking said:
Yes. The code paths are the same, so it works. Used it myself.
Click to expand...
Click to collapse
Are you using just the .img each time or flashing an installer after?

[Guide] Root Pixel 4 XL with Magisk Android 13

[Guide] Root Pixel 4 XL With Magisk Android 13
Android Security Bulletin—Feburary 2023
Pixel Update Bulletin—Feburary 2023​
Introduction
This Guide is for Pixel 4 XL owners that want to Root their phone, and enjoy the benefits of rooting it. The Guide is divided into three parts: Information, Instructions, and Other.
~ ~ ~ Part I - INFORMATION ~ ~ ~
Disclaimer
I assume no responsibility for the malfunctioning/bricking of your phone.
The order of listed items i.e., Custom Kernels, Custom ROMS, etc. Does not indicate my preference for them. It is your responsibility to do the research before selecting an item.
Prerequisites
A Pixel 4 XL phone with an unlocked bootloader.
A Computer with the latest working SDK Platform-tools 33.0.3 installed.
Important Notes:
a. Before installing SDK Platform-tools, check for older versions of fastboot on your computer: Open a Command prompt and type fastboot --version at the prompt. If a adb/fastboot is found delete the folder containing them. Also, check the path environment for paths to them and remove it.​
b. Update Platform Tools, regularly, for optimal performance.​
c. Need Google's USB Drivers for your Pixel Phone?​
NEW
"...make a 100% clean install of ANY Magisk version or fork without PC or TWRP."
Magisk General Support / Discussion
This is the place for general support and discussion regarding "Public Releases", which includes both stable and beta releases. All information, including troubleshoot guides and notes, are in the Announcement Thread
forum.xda-developers.com
Update(s)
Magisk Alpha - app-release_709f25f6-26101.apk 12 Apr
Magisk Beta - Magisk v26.1.apk 11 Apr
Magisk Canary - app-release_a8c4a33e-26103.apk 23 Jun
Magisk Cygisk - Click Pages 5 for installation Instructions.
Magisk Delta -
app-release
Magisk Stable - Magisk v26.1.apk 11 Apr
SafetyNet - Displax's SafetyNet Fix, v2.4.0-MOD_1.3 17Jun
SDK Platform-tools 33.0.3 Aug 2022
Custom Kernels
Note: If you are using a Custom Kernel, please update using the method in the OP, Index, 4. Install/Update Factory Image keep data or wipe data, • Flash Factory Image Keep Data
Google Pixel 4 XL ROMs, Kernels, Recoveries, & Other
My Other Guides
Pixel 7 Pro
Pixel 6
Pixel 5
Pixel 4a (5G)
Pixel 3 XL
Pixel 1 XL
Credits/Thanks/Recognitions
bradical711 - Instructions to Pass Safety Net
Those I may have, inadvertently, forgotten.
~ ~ ~ Part II - INSTRUCTIONS ~ ~ ~
(The Instructions listed below are not steps, they are individual sets of instructions.)
Open a Command Prompt/Boot Fastboot Mode/Boot Recovery
Open a Command Prompt on Computer
Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type cmd and press enter.
Open a Powershell Command Prompt on Computer: Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type powershell and press enter.
Notes:
Enable USB Debugging, on your phone: Settings ==> System ==> Advanced ==> Developer options ==> Scroll down to USB debugging and enable it.
When using the Powershell Command Prompt Commands must be preceeded with ./: i.e, ./fastboot devices
If you do not want to open a Command Prompt every time you want to use the fastboot command, add the path to the Platform-tools folder to Windows environment variables.
Boot fastboot mode (bootloader):
Power off phone, press and hold the power and volume down buttons until you see Start.
Boot Recovery
Power off phone, press and hold the power and volume down buttons until you see Start. Use volume up/down button until you see Recovery mode. Press power button.
Test fastboot
Enable Developer Options - Tap Settings > About phone > Build number 7 times or until you should see 'you are a Developer'.
Enable USB Debugging - Tap Settings > System > Advanced > Developer options >
Enable USB Debugging.
Open a Command Prompt on your computer in the Platform-tools folder.
Boot fastboot mode on your phone (#1)
Connect the phone to the Computer.
At the prompt type: fastboot devices to verify communication with phone. It should return your phone's serial number.
Unlock Bootloader/Return Phone to Stock/Lock Bootloader
Unlock Bootloader
This will erase all user data from the device!
Backup your data
Activate Developer Options: Tap Settings > About Phone > Tap Build Number 7 times or until you see you are a Developer. Tap back > System > Advanced > Developer Options. Enable OEM Unlock and, USB Debugging.
Boot fastboot mode
Connect the phone to the Computer with USB cord.
Open a Command Prompt on your computer and type fastboot flashing unlock and press enter.
You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
Allow the process to complete and then type fastboot reboot at the Command Prompt and press enter.
When your phone reboots disconnect your usb cable.
Notes: After unlocking your bootloader, you'll see a warning: The bootloader is unlocked and... You will see this warning until, you relock the bootloader.
Do not relock your bootloader until you have returned the device to Stock.
Return Phone to Stock
Backup your data/Internal storage
Settings > System > Advanced > Reset Options > Erase all data (factory reset)
Log in
Set up phone
Lock Bootloader
Return the phone to Stock before locking the bootloader, failure to do so could brick your phone
This will erase all user data from the device!
Boot fastboot mode
Open a Command Prompt and type this at the Prompt: fastboot flashing lock
You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
Allow the process to complete, then type this at the Command Prompt: fastboot reboot
Enable Developer Options: Settings > About phone > Tap Build number 7 times or until you see 'you are a developer'.
Tap Back > Developer options and toggle OEM Unlock off.
(NEW) Make Both Slots Bootable: Manually, Flash the OTA Image to Both Slots - One bootable and rooted, the other slot bootable without root.
Before you start
Backup your data
Make sure that there is no pending OTA update, by going to Settings > About phone > System updates, which should say Your system is up to date.
Download the latest Factory and OTA image for your device.
Verify the checksum of the Factory and OTA image. The last portion of the filename is the first 8 digits of its SHA-256 checksum; the full SHA-256 checksum is shown next to the download link.
Extract the boot/init_boot.image from the Factory image:
Extract the Factory Image file that you downloaded (coral-a9a9a.999999.999-factory-99a9a99a.zip) into a folder.
Open the folder you extracted the Factory image to and extract the Image file (image-coral-aa9a.999999.999.zip) into a folder. The stock boot/init_boot.img file should be in this folder.
Patch the boot/init_boot.img:
Open the Magisk Alpha/Beta/Canary/Delta/Stable App
The Update Channel should be set to Alpha/Beta/Canary/Delta/Stable, depending on the version you installed.
Tap Install (next to Magisk)
Tap, Select and Patch a File
Select the boot/init_boot.img file you extracted from the factory image.
Tap the ✓ (Check Mark)
Tap Let's Go
When you see done, the boot/init_boot.img has been patched (magisk_patched_xxxxxx.img), and is stored in the download folder.
Reboot
Copy/Move the magisk_patched....img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it:
Boot Recovery mode
With the device powered on and USB debugging enabled, type: adb reboot recovery
If you're unable to use adb to reboot into recovery, you can use the key combination for your device: Press and hold Volume Down button, then press and hold Power button then use the Volume Down/Up button to select the Recovery option from the menu.
The device is now in recovery mode an Android logo with red exclamation mark should be on the screen.
Access the recovery menu:
Hold the Power button and press Volume button up once. The recovery text menu will appear.
Enter sideload mode:
Select the Apply update from ADB option from the recovery text menu
Run the following command: adb devices check that your device shows up with "sideload" next to its name.
Sideload the OTA zip file
Connect the phone to the PC via USB cable
On the phone: boot bootloader/fastboot mode
On the PC:
Open a command prompt in the SDK Platform-tools folder.
Type:
adb sideload coral-ota-tq3a.230605.012-f32168af.zip and press enter.
Once sideloading finishes, reboot the phone by choosing Reboot system now option on the The recovery text menu.
Sideload the OTA zip file to the other slot and Root it.
Boot Recovery mode
With the device powered on and USB debugging enabled, type: adb reboot recovery
If you're unable to use adb to reboot into recovery, you can use the key combination for your device: Press and hold Volume Down button, then press and hold Power button then use the Volume Down/Up button to select Recovery option from the menu.
The device is now in recovery mode an Android logo with red exclamation mark should appear on screen.
Access the recovery menu:
Hold the Power button and press Volume up button once.
The recovery text menu will appear.
Enter sideload mode:
Select the Apply update from ADB option on the recovery text menu.
[*]Sideload the OTA zip file
Connect the phone to the PC via USB cable
On the phone: boot bootloader/fastboot mode
On the PC:
Open a command prompt in the SDK Platform-tools folder.
Type: adb sideload coral-ota-tq3a.230605.012-f32168af.zip at the prompt and press enter.
Once sideloading finishes, choose Reboot system now option on the The recovery text menu.
Flash boot/init_boot.img to root
On the phone: Boot bootloader/fastboot mode
Connect the phone to the Computer with USB cord.
On the PC:
Open a Command Prompt in the SDK Platform-tools folder.
Type: fastboot flash boot/init_boot magic_patched....img at the Prompt and press enter.
Type: fastboot reboot at the Prompt and press enter.
Disconnect the phone from the PC.
Notes:
This slot is bootable and rooted. The other slot is bootable without root.
Check that the other slot is bootable and not rooted
On the Phone: Boot bootloader/fastboot mode
Connect the phone to the PC via USB cable
On the PC:
Open a command prompt in the SDK Platform-tools folder.
Type: fastboot --set-active=other at the prompt and press enter.
Type: fastboot reboot and press enter.
Disconnect the phone from the PC.
To return to the other slot that is bootable and rooted
On the Phone: Boot bootloader/fastboot mode
Connect the phone to the PC via USB cable
On the PC:
Open a command prompt in the SDK Platform-tools folder.
Type: fastboot --set-active=other at the prompt and press enter.
Type: fastboot reboot and press enter.
Disconnect the phone from the PC.
Done!
ADB Sideload
Stock Recovery
Full OTA Images for Nexus and Pixel Devices - Updating instructions
Custom Recovery TWRP
Waiting for Android 11 (R) T.W.R.P
Flash boot.img
Flashing the boot.img removes root.
Copy/Move the boot.img file to your computer's platform-tools folder or to the folder that has fastboot.exe in it.
Boot fastboot mode
Connect the phone to the Computer
Open a Command Prompt and type the following command at the prompt:
fastboot flash boot --slot all boot.img
Reboot
Pass SafetyNet with Magisk module.
Pass Safety Net with SafetyNet Fix Magisk Module
Download File(s)
Displax's latest SafetyNet Fix, a "fork" of kdrag0n safetynet-fix.
These are the NEW Magisk Module repositories:
Androidacy Module Manager
Androidacy Module Manager - Releases
Androidacy Download Center
This is the old Magisk Module repository:
https://github.com/Fox2Code/Fox Magisk Module Manager
Install Displax's safetyNet Fix
Open Magisk
Tap Modules icon
Tap Install from storage
Navigate to the Displax's SafetyNet Fix file you downloaded.
Tap the Displax's SafetyNet Fix file.
Tap the check mark (✓ at the bottom) to start the installation.
After it installs tap the Save icon to save the log
Tap Reboot.
Settings for Magisk Canary
Open Magisk App
Tap the Setup icon.
Scroll down to App and set the Update Channel to Canary.
Scroll down to Check Updates and enable it.
Scroll down to Magisk and enable Zygisk.
Enable Denylist
Tap Configure DenyList => Tap 3 Dot Menu => Check ✓ Show system apps => Check ✓ Google Play Store, Google Pay, Google Wallet etc.
(Optional) Scroll down to Superuser and enable Enable Biometric Authentication.
Get Device Certified
Turn Airplane mode on
Open Settings
Tap Apps & notifications
Tap see all...
Tap three dot menu
Tap Show system
Scroll to Google Play Store
Tap Storage and Cache
Tap Clear storage
Note: Repeat the 3 steps above for any app that needs Device Certification i.e., Google Play Services, Google Pay, Google Wallet, etc.
reboot
Turn Airplane mode off
Check Device Certification
Open Google Play Store app
Tap Menu - Circle top right
Tap Settings
Tap About
Check Play protect certification
It may take 24 hours for Device Certification to be updated.
Note: If after completeting Get Device Certified and Check Device Certification you've waited 24 hours your Device is not Certifed or your Device is Certified and certain Google Store apps (Google Pay, NetFliks, etc.) are not working. Use the Play Integrity API Checker app or the TB Checker - Safetynet and Root app to verify you are passing Play Integrity.
Set Magisk App Update Channel/Update Magisk
Set Magisk App Update Channel
Open Magisk App > Tap Settings icon > Update Channel > Select Stable, Beta, Canary or Custom.
Update Magisk
When Magisk App notifies you of an update:
Tap install.
Select, Direct Install (Recommended)
When it finishes installing
Tap, Save Log
Log location: /storage/emulated/0/Download
Tap, Reboot
Done!
Install/Update Magisk Modules
Download File(s)
Displax's latest SafetyNet Fix, a "fork" of kdrag0n safetynet-fix.
These are the NEW Magisk Module repositories:
Androidacy Module Manager
Androidacy Module Manager - Releases
Androidacy Download Center
This is the old Magisk Module repository:
https://github.com/Fox2Code/Fox Magisk Module Manager
LSposed Releases
Shamiko Releases
Install Modules from Storage
Open Magisk
Tap the Modules icon
Tap Install from storage
Navigate to the folder with the Module you want to install.
Tap the Module to highlite it and tap Select.
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
Install Modules from Androidacy Module Manager
Open Androidacy Module Manager
Tap the Modules icon
Locate the Module you want to install
Tap Install
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
Update Modules
Open Androidacy Module Manager
You, will see the Modules that have Updates.
Tap the Module you want to update.
Tap install.
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
~ ~ ~ Part III - OTHER ~ ~ ~
Custom ROMs
Need help with a Custom ROM?
If you are trying to install or have installed a Custom ROM, read and follow the Installation Instructions in the OP of the Custom ROM thread or Try installing it with PixelFlasher, a GUI tool for flashing / updating / rooting / managing Pixel phones..
Search the thread of the Custom ROM you are trying to install or have installed for answer(s)/solution(s) to your question(s)/problem(s): If you don't find a answer(s)/solution(s) to your question(s)/problem(s). Post your question(s)/request(s) for help in the Custom ROM thread you are trying to install or have installed.
If you are trying to install a Addon(s) {Custom Kernel, Magisk, etc.} to the Custom ROM you installed: Search the thread of the Custom ROM you installed or the thread of the Addon you want to add to your Custom ROMfor answer(s)/solution(s) to your question(s)/problem(s). If you don't find an answer(s)/solution(s) to your question(s)/problem(s). Post your question(s)/request(s) for help in the Custom ROM or Addon (Custom Kernel, Magisk, etc.) thread.
ROMs
Google Pixel 4 XL ROMs, Kernels, Recoveries, & Other
Themes, Apps, and Mods
Google Pixel 4 XL Themes, Apps, and Mods
T.W.R.P. Backup/Restore
Waiting for Android 13 T.W.R.P.
U da man Homeboy76. Really appreciate all the work you did putting this together. Thanks.
fastboot flash boot magisk_patched.img.--slot all
i have to remove the period after the patched.img. if not i get a no such file in directory
mikepopo99 said:
fastboot flash boot magisk_patched.img.--slot all
i have to remove the period after the patched.img. if not i get a no such file in directory
Click to expand...
Click to collapse
:good:
Worked like a charm for me. I did a clean a clean install. No issues. Just like flashing a monthly update.
Bootlooping
no matter what I do I keep bootlooping. I'm doing everything on the instructions list. IM trying to root android 11 on my pixel 4 xl. I just flashed the update with the flash all and wiped everything. But when i try to root it gets stuck at the google logo. i have the Magisk Canary Channel installed and patched the boot image and everything. I get the no valid slot to boot in the bootloader.
mikepopo99 said:
no matter what I do I keep bootlooping. I'm doing everything on the instructions list. IM trying to root android 11 on my pixel 4 xl. I just flashed the update with the flash all and wiped everything. But when i try to root it gets stuck at the google logo. i have the Magisk Canary Channel installed and patched the boot image and everything. I get the no valid slot to boot in the bootloader.
Click to expand...
Click to collapse
Curious
- SDK Platform-tools r 30.0.4?
- What slot did the September 2020 Factory image flash to?
I'm not sure what slot. But yes I am using the newest platform tools. How can I check. I just did the flash all script from Google and did a clean install.
mikepopo99 said:
I'm not sure what slot. But yes I am using the newest platform tools. How can I check. I just did the flash all script from Google and did a clean install.
Click to expand...
Click to collapse
Check: Boot fastboot mode (#1 in the guide) see boot slot.
Best guide on xda.
I just wonder: Can I flash Android 11 on top of Android 10 and keep my data (by removing -w) or is it recommended to clean flash Android 11?
Utini said:
Best guide on xda.
I just wonder: Can I flash Android 11 on top of Android 10 and keep my data (by removing -w) or is it recommended to clean flash Android 11?
Click to expand...
Click to collapse
I recommend clean flashing.
Utini said:
Best guide on xda.
I just wonder: Can I flash Android 11 on top of Android 10 and keep my data (by removing -w) or is it recommended to clean flash Android 11?
Click to expand...
Click to collapse
I would never try to tell anyone which way is the correct way since opinions vary. Having said that, I updated without the -w and have had zero problems thus far. However, I would take all necessary precautions as usual:
1. Update your platform-tools.
2. Remove/disable all magisk modules.
3. Remove your face unlock before starting.
4. You'll need to be on the latest canary magisk if you want to root.
5. If you patch your boot.img, make sure the finished image is 32.55 mb. I personally patch the new boot.img before even starting the update process so it's ready to go.
Again, this is how I like to update my device, and is not the be all end all method that others may like to use. Best of luck to you no matter which method you may choose to use. :good:
Badger50 said:
I would never try to tell anyone which way is the correct way since opinions vary. Having said that, I updated without the -w and have had zero problems thus far. However, I would take all necessary precautions as usual:
1. Update your platform-tools.
2. Remove/disable all magisk modules.
3. Remove your face unlock before starting.
4. You'll need to be on the latest canary magisk if you want to root.
5. If you patch your boot.img, make sure the finished image is 32.55 mb. I personally patch the new boot.img before even starting the update process so it's ready to go.
Again, this is how I like to update my device, and is not the be all end all method that others may like to use. Best of luck to you no matter which method you may choose to use. :good:
Click to expand...
Click to collapse
A second opinion is good.
Any tricks to getting Safetynet to pass? I did a clean install and build updated everything and safetynet is still failing.
Thanks all.
great guide! i almost messed up bad when i flashed first time it froze up and stalled i realised my ssd main drive ran out of space. freed up some space and retried and all worked great! (its a lot bigger than i thought when installing)
Great guide. Boot image is patched and flashed on Android 11.
I can't pass SafetyNet however. Is anyone on Android 11 and passing? Any tips?
madmaverickmatt said:
Any tricks to getting Safetynet to pass? I did a clean install and build updated everything and safetynet is still failing.
Thanks all.
Click to expand...
Click to collapse
ucantescape1992 said:
Great guide. Boot image is patched and flashed on Android 11.
I can't pass SafetyNet however. Is anyone on Android 11 and passing? Any tips?
Click to expand...
Click to collapse
Safetynet
https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228
Post deleted!
So, I've been out of the flashing game for a long minute but I had to do something about all the ads I was getting. Blockada seemed to work okay but always left something to be desired. I missed Adaway, so....
I had a hard time getting Magisk installed in Android 11 on my Pixel 4xl. I followed this well written tutorial to a tee but when I flashed magisk_patched.img to boot, then "fastboot reboot," it would kick me back to fastboot after the "G" screen and spit out the error "no valid slot to boot." Three times in a row after clean flashing the factory image too!
I did end up getting it working. What I ended up doing was instead of "fastboot flash boot magisk_patched.img --slot all" I "fastboot flash boot magisk_patched.img" and for whatever reason that seemed to work.
I did not take the OTA update if it matters. I had intended to wipe the device with a clean install of Android 11, then Magisk (just for ad blocker) from the get so, I'm guessing slot b wasn't used? I'm honestly not really sure how it works.
Even then though, I had some trouble getting the order right from flashing the factory image to being rooted, so this is also what I found.
First, unlock the bootloader of your device, then clean install Android 11 and get it set up. Download Magisk manager canary, then adb push the boot.img from your computer to your device. Use Magisk manager to patch it, then adb pull magisk_patched.img back to your computer. From there, fastboot flash boot your magisk_patched.img and you're golden. Fastboot reboot should put you back in to Android and then Magisk manager will recognize root.
I had tried several times to use a boot.img I had already patched some days earlier but it never seemed to work. It would boot okay, once I figured out not to "--slot all," but Magisk would never recognize it was rooted unless Magisk manager patched it and I flashed that particular patched file. If I tried to flash any other patched file, Magisk manager wouldn't recognize root. Even recently patched boot.img's that were flashed to the device (not the days old one I had pre-prepped) wouldn't work. Magisk manager only seemed to recognize patched boot.img's that were made by it in that particular install. If I tried to use a boot.img from any other Magisk Manager install it wouldn't recognize it. Weird? I dunno, but, I got it up and running!
Thanks Homeboy76 for making this tutorial. Without it I would have been lost. :good:
TheDiabolicaL1 said:
...I did end up getting it working. What I ended up doing was instead of "fastboot flash boot magisk_patched.img --slot all" I "fastboot flash boot magisk_patched.img" and for whatever reason that seemed to work... :good:
Click to expand...
Click to collapse
@TheDiabolicaL1
Thanks for the kind words.
Glad you got it working and, thanks for posting this information: fastboot flash boot magisk_patched.img
It provides an alternative method of flashing the magisk_patched boot.img for the members getting boot loops.
However, fastboot flash boot magisk_patched.img --slot all does work without boot loops:
C:\android-sdk_windows\image-coral-rp1a.200720.009\platform-tools_r30.0.4-windows>fastboot flash boot magisk_patched.img --slot all
Sending 'boot_a' (33336 KB) OKAY [ 0.234s]
Writing 'boot_a' OKAY [ 0.326s]
Sending 'boot_b' (33336 KB) OKAY [ 0.234s]
Writing 'boot_b' OKAY [ 0.335s]
Finished. Total time: 2.509s

[Guide] Root Pixel 3 XL Android 12

[Guide] Root Pixel 3 XL Android 12 Unlock/Lock Bootloader + Install/Flash Custom ROMs​
Introduction
This Guide is for Pixel 3 XL owners that want to Instal a Custom ROM, and enjoy the benefits of rooting it. The Guide is divided into three parts: Information, Instructions, and Other.
~ ~ ~ Part I - INFORMATION ~ ~ ~
Disclaimer
I assume no responsibility for the malfunctioning/bricking of your phone.
The order of listed items i.e., Custom Kernels, Custom ROMS, etc. Does not indicate my preference for them. It is your responsibility to do the research before selecting an item.
Prerequisites
A Pixel 3 XL phone with an unlocked bootloader.1
A Computer with the latest working SDK Platform-tools 33.0.3 installed.
Important Notes:
a. Before installing SDK Platform-tools, check for older versions of fastboot on your computer: Open a Command prompt and type fastboot --version at the prompt. If a adb/fastboot is found delete the folder containing them. Also, check the path environment for paths to them and remove it.​
b. Update Platform Tools, regularly, for optimal performance.​
c. Need Google's USB Drivers for your Pixel Phone?​
Before installing SDK Platform-tools, check for older versions of fastboot on your computer: Open a Command prompt and type fastboot --version at the prompt. If a adb/fastboot is found delete the folder containing them. Also, check the path environment for paths to them and remove it.
Update Platform Tools, regularly, for optimal performance.
Need Google's USB Drivers for your Pixel Phone?
NEW
Waiting . . .
Update(s)
Magisk Alpha - app-release_709f25f6-26101.apk 12 Apr
Magisk Beta - Magisk v26.1.apk 11 Apr
Magisk Canary - app-release_a8c4a33e-26103.apk 23 Jun
Magisk Cygisk - Click Pages 5 for installation Instructions.
Magisk Delta -
app-release
Magisk Stable - Magisk v26.1.apk 11 Apr
SafetyNet - Displax's SafetyNet Fix, v2.4.0-MOD_1.3 17Jun
SDK Platform-tools 33.0.3 Aug 2022
Custom Kernels
Note: If you want to use a Custom Kernel, please follow the Installation instructions in the OP of the Custom Kernel you want to install.[[/I][/U]​a. Google Pixel 3 XL ROMs, Kernels, Recoveries, & Other​b. ElementalX Kernel Manager​
My Other Guides
Pixel 7 Pro
Pixel 6
Pixel 5
Pixel 4a (5G)
Pixel 4 XL
Pixel 1 XL
Credits/Thanks/Recognitions
Those I may have, inadvertently, forgotten.
~ ~ ~ Part II - INSTRUCTIONS ~ ~ ~
(The Instructions listed below are not steps, they are individual sets of instructions.)
Unlock Bootloader/Return Phone to Stock/Lock Bootloader
Unlock Bootloader
Notes:
This will erase all user data from the device!
Backup your data
Activate Developer Options: Tap Settings > About Phone > Tap Build Number 7 times or until you see you are a Developer. Tap back > System > Advanced > Developer Options. Enable OEM Unlock and, USB Debugging.
Boot fastboot mode
Connect the phone to the Computer with USB cord.
Open a Command Prompt on your computer and type fastboot flashing unlock and press enter.
You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
Allow the process to complete and then type fastboot reboot at the Command Prompt and press enter.
When your phone reboots disconnect your usb cable.
Notes:
After unlocking your bootloader, you'll see a warning: The bootloader is unlocked and... You will see this warning until, you relock the bootloader.
Do not relock your bootloader until you have returned the device to Stock.
Return Phone to Stock
Backup your data/Internal storage
Use the Android flash tool:
select Wipe => Force Flash Partitions => Lock Bootloader.
Lock Bootloader
If your phone is not 100 percent stock do Return Phone to Stock. If you don't you may brick your phone.
This will erase all user data from the device!
Boot fastboot mode
Open a Command Prompt in the SDK Platform- tools folder, and type this at the Prompt: fastboot flashing lock
You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
Allow the process to complete, then type this at the Command Prompt: fastboot reboot
Enable Developer Options: Settings > About phone > Tap Build number 7 times or until you see 'you are a developer'.
Tap Back > Developer options and toggle OEM Unlock off.
Install/Update Factory Image keep data or wipe data
Important Note(s):
If you haven't updated your phones Factory image in awhile. It is not necessary to flash all the images in succession. Flash the latest Factory image.
If you are uncomfortable manually flashing the factory image, Try installing it with PixelFlasher, a GUI tool for flashing / updating / rooting / managing Pixel phones..
If the previous factory image was rooted (you used Magisk to patch the boot.img of the previous factory image). Open Magisk manager and disable all Magisk modules.
If you want to Upgrade to Android 13 or update the Factory Image without wiping your phone: Do Flash Factory Image Keep Data (below).
Always verify you have the latest version of SDK Platform-Tools installed on your computer before installing the Factory Image: Pixel 3 XL - crosshatch.
If you get an error: while flashing, try one of these options:
Change the USB port to a non charging USB port.
Change the USB cord.
Change Computers.
If you phone bootloops
Press the Power button until the phone turns off.
Press the Power and Volume Down to boot the bootloader.
Open a Command Prompt in the SDK-Platform-tools folder or the folder that has adb.exe in it, and type adb wait-for-device shell magisk --remove-modules
Then type: fastboot Reboot
If you are uncomfortable manually flashing the factory image. Try PixelFlasher by badabing2003.
Please post Comments/Discussions/Questions about PixelFlasher on that thread.
Backup your data
Download the latest Factory Image: Pixel 3 XL - crosshatch to your Computer.
Go to Part II - INSTRUCTIONS => 4. Extract Files from the FactoryImage/Flash boot.img and extract the flash-all.bat file.
Flash Factory Image Keep Data
Navigate to the folder you extracted the Factory Image to and open the flash-all.bat file with a file editor i.e., Notepad app and edit the flash-all.bat file:
Change this line: fastboot -w update image-crosshatch-aa1a.999999.999.zip
to this: fastboot update image-crosshatch-tp1a.999999.999.zip
Note: This removes the -w so your Internal Storage will NOT be wiped.
After, you have edited the flash-all.bat file. Copy/Move these files to the [U[Platform-tools[/U] folder:
bootloader-crosshatch-....img
flash-all.bat
image-crosshatch-....zip
radio-crosshatch-....img
On your phone: Boot the bootloader (Power off the phone => Press the Power and Down buttons until you see Start)
Connect your phone to the computer.
Open a Command Prompt on your computer in the Platform-tools folder and type: flash-all at the Command Prompt and press enter.
The phone will reboot when flashing is complete.
Go-to Part II - INSTRUCTIONS => 5. Root/Reroot with Magisk and Pass SafetyNet, • Patching the boot.img - to root/reroot.
Flash Factory Image Wipe Data
This will wipe your phone's Internal Storage.
Open the folder you extracted the Factory Image to and Copy/Move these files to the Platform-tools folder:
bootloader-crosshatch-....img
flash-all.bat
image-crosshatch-....zip
radio-crosshatch-....img
On your phone: Boot the bootloader (Power off the phone => Press the Power and Down buttons until you see Start)
Connect your phone to the computer.
Open a Command Prompt on your computer in the Platform-tools folder and type: flash-all at the Command Prompt and press enter.
The phone will reboot when flashing is complete.
Setup phone
Enable Developer Mode and USB Debugging
Setup => About phone => Tap Build number 7 times or untill you see you are a 'Developer'.
Setup => System => Developer options => Enable Developer options => enable USB Debugging
Go-to Part II - INSTRUCTIONS => 5. Root/Reroot with Magisk and Pass SafetyNet, • Patching the boot.img - to root/reroot.
(NEW) Make Both Slots Bootable: Manually, Flash the OTA Image to Both Slots - One bootable and rooted, the other slot bootable without root.
Before you start
Backup your data
Make sure that there is no pending OTA update, by going to Settings > About phone > System updates, which should say Your system is up to date.
Download the latest Factory and OTA image for your device.
Verify the checksum of the Factory and OTA image. The last portion of the filename is the first 8 digits of its SHA-256 checksum; the full SHA-256 checksum is shown next to the download link.
Extract the boot/init_boot.image from the Factory image:
Extract the Factory Image file that you downloaded (crosshatch-a9a9a.999999.999-factory-99a9a99a.zip) into a folder.
Open the folder you extracted the Factory image to and extract the Image file (image-crosshatch-aa9a.999999.999.zip) into a folder. The stock boot/init_boot.img file should be in this folder.
Patch the boot/init_boot.img:
Open the Magisk Alpha/Beta/Canary/Delta/Stable App
The Update Channel should be set to Alpha/Beta/Canary/Delta/Stable, depending on the version you installed.
Tap Install (next to Magisk)
Tap, Select and Patch a File
Select the boot/init_boot.img file you extracted from the factory image.
Tap the ✓ (Check Mark)
Tap Let's Go
When you see done, the boot/init_boot.img has been patched (magisk_patched_xxxxxx.img), and is stored in the download folder.
Reboot
Copy/Move the magisk_patched....img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it:
Boot Recovery mode
With the device powered on and USB debugging enabled, type: adb reboot recovery
If you're unable to use adb to reboot into recovery, you can use the key combination for your device: Press and hold Volume Down button, then press and hold Power button then use the Volume Down/Up button to select the Recovery option from the menu.
The device is now in recovery mode an Android logo with red exclamation mark should be on the screen.
Access the recovery menu:
Hold the Power button and press Volume button up once. The recovery text menu will appear.
Enter sideload mode:
Select the Apply update from ADB option from the recovery text menu
Run the following command: adb devices check that your device shows up with "sideload" next to its name.
Sideload the OTA zip file
Connect the phone to the PC via USB cable
On the phone: boot bootloader/fastboot mode
On the PC:
Open a command prompt in the SDK Platform-tools folder.
Type:
adb sideload crosshatch-ota-tq3a.230605.012-f32168af.zip and press enter.
Once sideloading finishes, reboot the phone by choosing Reboot system now option on the The recovery text menu.
Sideload the OTA zip file to the other slot and Root it.
Boot Recovery mode
With the device powered on and USB debugging enabled, type: adb reboot recovery
If you're unable to use adb to reboot into recovery, you can use the key combination for your device: Press and hold Volume Down button, then press and hold Power button then use the Volume Down/Up button to select Recovery option from the menu.
The device is now in recovery mode an Android logo with red exclamation mark should appear on screen.
Access the recovery menu:
Hold the Power button and press Volume up button once.
The recovery text menu will appear.
Enter sideload mode:
Select the Apply update from ADB option on the recovery text menu.
[*]Sideload the OTA zip file
Connect the phone to the PC via USB cable
On the phone: boot bootloader/fastboot mode
On the PC:
Open a command prompt in the SDK Platform-tools folder.
Type: adb sideload crosshatch-ota-tq3a.230605.012-f32168af.zip at the prompt and press enter.
Once sideloading finishes, choose Reboot system now option on the The recovery text menu.
Flash boot/init_boot.img to root
On the phone: Boot bootloader/fastboot mode
Connect the phone to the Computer with USB cord.
On the PC:
Open a Command Prompt in the SDK Platform-tools folder.
Type: fastboot flash boot/init_boot magic_patched....img at the Prompt and press enter.
Type: fastboot reboot at the Prompt and press enter.
Disconnect the phone from the PC.
Notes:
This slot is bootable and rooted. The other slot is bootable without root.
Check that the other slot is bootable and not rooted
On the Phone: Boot bootloader/fastboot mode
Connect the phone to the PC via USB cable
On the PC:
Open a command prompt in the SDK Platform-tools folder.
Type: fastboot --set-active=other at the prompt and press enter.
Type: fastboot reboot and press enter.
Disconnect the phone from the PC.
To return to the other slot that is bootable and rooted
On the Phone: Boot bootloader/fastboot mode
Connect the phone to the PC via USB cable
On the PC:
Open a command prompt in the SDK Platform-tools folder.
Type: fastboot --set-active=other at the prompt and press enter.
Type: fastboot reboot and press enter.
Disconnect the phone from the PC.
Done!
Extract Files from Factory Image/Flash boot.img
Extract Files from Factory Image
Extract flash-all.bat and boot.img file
Download the latest Factory image to your phone.
Extract the Factory Image file (crosshatch-r2d1a.999999.999-factory-99a9a99a.zip) to a folder. The, stock, flash-all.bat file should be in this folder.
Open the folder you extracted the Factory image to and, extract the Image file (image-crosshatch-aa9a.999999.999.zip) into the folder. The, stock, boot.img file should be in this folder.
Flash boot.img
Flashing the boot.img removes root.
Open the folder you extracted the 'image...zip' file to and copy the boot.img file to your computer's platform-tools folder or to the folder that has fastboot.exe in it.
Boot fastboot mode
Connect the phone to the Computer
Open a Command Prompt and type the following command at the prompt:
fastboot flash boot --slot all boot.img
Reboot
Pass SafetyNet with Magisk moduke.
Pass Safety Net with SafetyNet Fix with Magisk module
Download File(s)
Displax's latest SafetyNet Fix, a "fork" of kdrag0n safetynet-fix.
These are the NEW Magisk Module repositories:
Androidacy Module Manager
Androidacy Module Manager - Releases
Androidacy Download Center
This is the old Magisk Module repository:
https://github.com/Fox2Code/Fox Magisk Module Manager
Install Displax's safetyNet Fix
Open Magisk
Tap Modules icon
Tap Install from storage
Navigate to the Displax's SafetyNet Fix file you downloaded.
Tap the Displax's SafetyNet Fix file.
Tap the check mark (✓ at the bottom) to start the installation.
After it installs tap the Save icon to save the log
Tap Reboot.
Settings for Magisk Canary
Open Magisk App
Tap the Setup icon.
Scroll down to App and set the Update Channel to Canary.
Scroll down to Check Updates and enable it.
Scroll down to Magisk and enable Zygisk.
Enable Denylist
Tap Configure DenyList => Tap 3 Dot Menu => Check ✓ Show system apps => Check ✓ Google Play Store, Google Pay, Google Wallet etc.
(Optional) Scroll down to Superuser and enable Enable Biometric Authentication.
Get Device Certified
Turn Airplane mode on
Open Settings
Tap Apps & notifications
Tap see all...
Tap three dot menu
Tap Show system
Scroll to Google Play Store
Tap Storage and Cache
Tap Clear storage
Note: Repeat the 3 steps above for any app that needs Device Certification i.e., Google Play Services, Google Pay, Google Wallet, etc.
reboot
Turn Airplane mode off
Check Device Certification
Open Google Play Store app
Tap Menu - Circle top right
Tap Settings
Tap About
Check Play protect certification
It may take 24 hours for Device Certification to be updated.
Note: If after completeting Get Device Certified and Check Device Certification you've waited 24 hours your Device is not Certifed or your Device is Certified and certain Google Store apps (Google Pay, NetFliks, etc.) are not working. Use the Play Integrity API Checker app or the TB Checker - Safetynet and Root app to verify you are passing Play Integrity.
Set Magisk App Update Channel/Update Magisk
Set Magisk App Update Channel
Open Magisk App > Tap Settings icon > Update Channel > Select Stable, Beta, Canary or Custom.
Update Magisk
When Magisk App notifies you of an update:
Tap install.
Select, Direct Install (Recommended)
When it finishes installing
Tap, Save Log
Log location: /storage/emulated/0/Download
Tap, Reboot
Done!
Install/Update Magisk Modules
Download File(s)
Displax's latest SafetyNet Fix, a "fork" of kdrag0n safetynet-fix.
These are the NEW Magisk Module repositories:
Androidacy Module Manager
Androidacy Module Manager - Releases
Androidacy Download Center
This is the old Magisk Module repository:
https://github.com/Fox2Code/Fox Magisk Module Manager
LSposed Releases
Shamiko Releases
Install Modules from Storage
Open Magisk
Tap the Modules icon
Tap Install from storage
Navigate to the folder with the Module you want to install.
Tap the Module to highlite it and tap Select.
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
Install Modules from Androidacy Module Manager
Open Androidacy Module Manager
Tap the Modules icon
Locate the Module you want to install
Tap Install
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
Update Modules
Open Androidacy Module Manager
You, will see the Modules that have Updates.
Tap the Module you want to update.
Tap install.
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
Open a Command Prompt/Boot Fastboot Mode/Boot Recovery
Open a Command Prompt on Computer
Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type cmd and press enter.
Open a Powershell Command Prompt on Computer: Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type powershell and press enter.
Notes:
Enable USB Debugging, on your phone: Settings ==> System ==> Advanced ==> Developer options ==> Scroll down to USB debugging and enable it.
When using the Powershell Command Prompt Commands must be preceeded with ./: i.e, ./fastboot devices
If you do not want to open a Command Prompt every time you want to use the fastboot command, add the path to the Platform-tools folder to Windows environment variables.
Boot fastboot mode (bootloader):
Power off phone, press and hold the power and volume down buttons until you see Start.
Boot Recovery
Power off phone, press and hold the power and volume down buttons until you see Start. Use volume up/down button until you see Recovery mode. Press power button.
Test fastboot
Enable Developer Options - Tap Settings > About phone > Build number 7 times or until you should see 'you are a Developer'.
Enable USB Debugging - Tap Settings > System > Advanced > Developer options >
Enable USB Debugging.
Open a Command Prompt on your computer in the Platform-tools folder.
Boot fastboot mode on your phone
Connect the phone to the Computer.
At the prompt type: fastboot devices to verify communication with phone. It should return your phone's serial number.
ADB Sideload
Stock Recovery
Full OTA Images for Nexus and Pixel Devices - Updating instructions
Custom Recovery TWRP
Waiting for Android 11 (R) T.W.R.P
~ ~ ~ Part III - OTHER ~ ~ ~
Custom ROMs
Need help with a Custom ROM?
If you are trying to install or have installed a Custom ROM, read and follow the Installation Instructions in the OP of the Custom ROM thread or try installing it with PixelFlasher, a GUI tool for flashing / updating / rooting / managing Pixel phones..
Search the thread of the Custom ROM you are trying to install or have installed for answer(s)/solution(s) to your question(s)/problem(s): If you don't find a answer(s)/solution(s) to your question(s)/problem(s). Post your question(s)/request(s) for help in the Custom ROM thread you are trying to install or have installed.
If you are trying to install a Addon(s) {Custom Kernel, Magisk, etc.} to the Custom ROM you installed: Search the thread of the Custom ROM you installed or the thread of the Addon you want to add to your Custom ROMfor answer(s)/solution(s) to your question(s)/problem(s). If you don't find an answer(s)/solution(s) to your question(s)/problem(s). Post your question(s)/request(s) for help in the Custom ROM or Addon (Custom Kernel, Magisk, etc.) thread.
ROMs
Google Pixel 3 XL ROMs, Kernels, Recoveries, & Other
Other Custom ROMs
[ROM] [Android 13] [blueline/crosshatch] ArrowOS 13.0 | UNOFFICIAL | BETA by ReallySnow
Themes, Apps, and Mods
Google Pixel 3 XL Themes, Apps, and Mods
T.W.R.P.
Android 12 - 370_12.0... 10Oct
Attempted the update last night, when flashing Magisk Canary Patched boot.img, the touchscreen is non-responsive on boot.
Flashing the stock boot.img and the touchscreen works.
Tried flashing the full image (no -w) and OTA with same result both times. Tried switching between active slots as well, no dice.
Any ideas?
JONBOY345 said:
Attempted the update last night, when flashing Magisk Canary Patched boot.img, the touchscreen is non-responsive on boot.
Flashing the stock boot.img and the touchscreen works.
Tried flashing the full image (no -w) and OTA with same result both times. Tried switching between active slots as well, no dice.
Any ideas?
Click to expand...
Click to collapse
Are you using:
- Magisk 20-4.zip (Stable)?
- Magisk Manager Canary 424 to patch September 2020 boot.img?
Homeboy76 said:
Are you using:
- Magisk 20-4.zip (Stable)?
- Magisk Manager Canary 424 to patch September 2020 boot.img?
Click to expand...
Click to collapse
Yes. Using Magisk 20-4.zip stable, but I've not used that zip in anyway...
Magisk Manager app is Canary from: https://github.com/topjohnwu/magisk_files/find/canary?q= and using it to patch the boot.img
Also updated platform tools to latesst.
JONBOY345 said:
Yes. Using Magisk 20-4.zip stable, but I've not used that zip in anyway...
Magisk Manager app is Canary from: https://github.com/topjohnwu/magisk_files/find/canary?q= and using it to patch the boot.img
Also updated platform tools to latesst.
Click to expand...
Click to collapse
Ok. I guess it's the Gremlins are preventing it from working.
Seriously, I don't know why it is not working.
Maybe @sliding_billy has some advice.
Homeboy76 said:
Ok. I guess it's the Gremlins preventing it from working.
Seriously, I don't know why it is not working.
Maybe @sliding_billy has some advice.
Click to expand...
Click to collapse
For giggles, can anyone share a patched boot.img?
JONBOY345 said:
For giggles, can anyone share a patched boot.img?
Click to expand...
Click to collapse
Sure, Let me know if this works for you!
Edit: posted an actual patched img. Grabbed the wrong file at first
https://drive.google.com/file/d/13VhMOr3XqFsIQUmZo3sG3LRATlV-hju8/view?usp=sharing
laxattack said:
Sure, Let me know if this works for you!
https://drive.google.com/file/d/1dcXyMv0sttfyGno496Tbo6MFuUIuii2w/view?usp=sharing
Click to expand...
Click to collapse
Hmm. That one didn't work. It booted, touchscreen worked, but no root.
For giggles I reran by steps again this morning, and now the new Magisk patched image works.
Here's a link: https://drive.google.com/file/d/127G2MZ_Jq8cPPKs50rtTiOijSkk7DbtU/view?usp=sharing
I noticed that your patched image is 67.1MB, while the one that Magisk created/patched on my phone (and I uploaded just above), is only 32.8MB...
Thanks for your help!
JONBOY345 said:
Hmm. That one didn't work. It booted, touchscreen worked, but no root.
For giggles I reran by steps again this morning, and now the new Magisk patched image works.
Here's a link: https://drive.google.com/file/d/127G2MZ_Jq8cPPKs50rtTiOijSkk7DbtU/view?usp=sharing
I noticed that your patched image is 67.1MB, while the one that Magisk created/patched on my phone (and I uploaded just above), is only 32.8MB...
Thanks for your help!
Click to expand...
Click to collapse
I uploaded the wrong one at first and edited my original post, lol sorry about that
Is anyone that is on latest android 11 able to use Google Pay? Mine won't work and CTS Profile fails safetynet check. Bootloader is unlocked but not rooted.
Homeboy76 said:
Ok. I guess it's the Gremlins are preventing it from working.
Seriously, I don't know why it is not working.
Maybe @sliding_billy has some advice.
Click to expand...
Click to collapse
JONBOY345 said:
Hmm. That one didn't work. It booted, touchscreen worked, but no root.
For giggles I reran by steps again this morning, and now the new Magisk patched image works.
Here's a link: https://drive.google.com/file/d/127G2MZ_Jq8cPPKs50rtTiOijSkk7DbtU/view?usp=sharing
I noticed that your patched image is 67.1MB, while the one that Magisk created/patched on my phone (and I uploaded just above), is only 32.8MB...
Thanks for your help!
Click to expand...
Click to collapse
Sorry I missed all this. I just got back in front of a computer and got no emails of the @ mention. Is everything working now? My two thoughts for what it's worth would have been to sideload the OTA twice so that it hit both slots and to be sure to update the Magisk path to canary after installing the .apk and then to be sure to update magisk after changing the path.
berndt_toast said:
Is anyone that is on latest android 11 able to use Google Pay? Mine won't work and CTS Profile fails safetynet check. Bootloader is unlocked but not rooted.
Click to expand...
Click to collapse
are you using a custom kernel to hide the unlocked bootloader?
laxattack said:
are you using a custom kernel to hide the unlocked bootloader?
Click to expand...
Click to collapse
Nope, I was on stock. I realized that I wasn't using any rooted apps anymore, so the need to have my bootloader unlocked was null and void. I re-locked my bootloader and now google pay works like a charm.
I'll add my observation here:
OTA update via magisk OTA update method works, but for some reason I kept having frozen screen after a few minutes usage. Rebooted at least 4-5 times and it worked.
I was using Taichi and its Magisk module doesn't work. Reflashing the module causes bootloop.
So I flashed again factory image without "-w", booted fine. But installing root via magisk_patched.img from R boot.img causes bootloop.
Don't understand why.
EDIT: Is there a way to clean up magisk modules now that I am on stuck on bootloader whenever I flash magisk_patched.img?
ultimatepichu said:
I'll add my observation here:
OTA update via magisk OTA update method works, but for some reason I kept having frozen screen after a few minutes usage. Rebooted at least 4-5 times and it worked.
I was using Taichi and its Magisk module doesn't work. Reflashing the module causes bootloop.
So I flashed again factory image without "-w", booted fine. But installing root via magisk_patched.img from R boot.img causes bootloop.
Don't understand why.
EDIT: Is there a way to clean up magisk modules now that I am on stuck on bootloader whenever I flash magisk_patched.img?
Click to expand...
Click to collapse
Tulsadiver's [Guide] Magisk Modules Disabler for Modules gone wrong by tulsadiver would fix it. I don't know if he has had the time to update it for Android 11 (R).
Maybe Support Safe Mode detection would help.
Do you have to use Magisk canary with Android 11? I just updated to 11, lost root, and want to add it back.
Thanks,
Rick
C5Longhorn said:
Do you have to use Magisk canary with Android 11? I just updated to 11, lost root, and want to add it back.
Thanks,
Rick
Click to expand...
Click to collapse
Magisk Canary Manager 20424
Yes!
I upgraded from like June 2020 build to 11 via OTA, do I just have to sideload patched boot.img as I always have been for previous monthly Android 10 updates? The only difference is using the canary version of Magisk (i'm on stable channel at the moment)
walle4893 said:
I upgraded from like June 2020 build to 11 via OTA, do I just have to sideload patched boot.img as I always have been for previous monthly Android 10 updates? The only difference is using the canary version of Magisk (i'm on stable channel at the moment)
Click to expand...
Click to collapse
pretty much
Android 11, Magisk & SafetyNet
berndt_toast said:
Is anyone that is on latest android 11 able to use Google Pay? Mine won't work and CTS Profile fails safetynet check. Bootloader is unlocked but not rooted.
Click to expand...
Click to collapse
I lost root when I upgraded to Android 11 Beta and I forgot to uninstall Magisk beforehand. I left it that way with the Magisk Manager app still installed because I didn't want to do a full wipe. I didn't have any SafetyNet problem until I took the latest rp1a.200720.009 OTA and got a warning message on the first boot. I decided to try installing the latest Canary Magisk again by sideloading the patched boot.img and now I have root again and can pass the SafetyNet check.

Question Trying to root my Moto Stylus 5G XT2131-1 without TWRP, how did you guys root this phone? How did you get the boot.img file?

I have seen some of you guys successfully rooted this phone. How did you do that since TWRP doesn't have this model yet. I heard that I need to have the boot.img file but I don't even know where to get that. Please help me in getting that. Thank you.
First unlock your bootloader, I don't remember the exact procedure but there's a toggle in developer options, and a website you have to use, this also requires resetting your phone unfortunately
After that, get the Motorola (Lenovo) smart assistant from support.motorola.com, and "rescue" your device,
This is done for a few reasons, 1. It downloads the boot.img you need, and 2. it updates your phone, this is important because you can't do system updates anymore.
Once it's "rescued", install the magisk apk, copy the boot.img from C:\ProgramData\RSA\ROM Files\etc to your phone, use the magisk app to patch it, and it will create a patched file
Then download and extract the android sdk platform tools (fastboot/adb), and copy the patched boot.img to that folder
Plug your phone in and put it in bootloader mode (same as the rescue required, Vol - & plug in)
Then "fastboot flash boot patched_boot.img"
This is possible without all of this, using some third party website that collects firmware files, but I prefer this way because I want to make sure I have the latest updates, having an update popup every time I turn my screen on is very annoying.
Also a tip, when you set your phone up, make sure you turn off any auto updating when it asks you, and turn it off in developer options too, if you never check for updates automatically or manually it will never know there's updates to apply and never annoy you, to update you'd have to do another rescue and patch/flash
Smart assistant is also how you unbrick, if you happen to do that like I did with some random commands for a different phone
ShayBox said:
First unlock your bootloader, I don't remember the exact procedure but there's a toggle in developer options, and a website you have to use, this also requires resetting your phone unfortunately
After that, get the Motorola (Lenovo) smart assistant from support.motorola.com, and "rescue" your device,
This is done for a few reasons, 1. It downloads the boot.img you need, and 2. it updates your phone, this is important because you can't do system updates anymore.
Once it's "rescued", install the magisk apk, copy the boot.img from C:\ProgramData\RSA\ROM Files\etc to your phone, use the magisk app to patch it, and it will create a patched file
Then download and extract the android sdk platform tools (fastboot/adb), and copy the patched boot.img to that folder
Plug your phone in and put it in bootloader mode (same as the rescue required, Vol - & plug in)
Then "fastboot flash boot patched_boot.img"
This is possible without all of this, using some third party website that collects firmware files, but I prefer this way because I want to make sure I have the latest updates, having an update popup every time I turn my screen on is very annoying.
Also a tip, when you set your phone up, make sure you turn off any auto updating when it asks you, and turn it off in developer options too, if you never check for updates automatically or manually it will never know there's updates to apply and never annoy you, to update you'd have to do another rescue and patch/flash
Click to expand...
Click to collapse
Thank you for that detailed response. I was reading some posts on here and some people are saying that rooting this phone isn't a full root since they are not able to go Read/Write, is that true? Should I just wait indefinitely for a TWRP root?
cwgzz said:
Thank you for that detailed response. I was reading some posts on here and some people are saying that rooting this phone isn't a full root since they are not able to go Read/Write, is that true? Should I just wait indefinitely for a TWRP root?
Click to expand...
Click to collapse
This is true, and depending on what you want to do with root that may be a deal breaker, but I don't care for changing boot animation and stuff, I haven't run into any problems with read only system, root still works just fine, magisk modules work, etc
ShayBox said:
This is true, and depending on what you want to do with root that may be a deal breaker, but I don't care for changing boot animation and stuff, I haven't run into any problems with read only system, root still works just fine, magisk modules work, etc
Click to expand...
Click to collapse
What exactly is that though? To be able to Read/Write? I basically want to root my device so I can change the language of certain apps and not all apps and I need Xposed or something in order to do that. Also, I want to be able to change my location withouth having to use "mock location" under the developer settings.
cwgzz said:
What exactly is that though? To be able to Read/Write? I basically want to root my device so I can change the language of certain apps and not all apps and I need Xposed or something in order to do that. Also, I want to be able to change my location withouth having to use "mock location" under the developer settings.
Click to expand...
Click to collapse
I don't know anything about fake locations, I've only ever used mock location a couple times
To get xposed afaik you get the Riru and Riru - LSPosed magisk modules, reboot and you get an LSPosed shortcut, which is your xposed control that lets you manage your xposed modules
For adblock, adaway works great, for theming you can get substratum (not substratum lite) from the playstore, and themes from the playstore, that works off a substratum magisk module and will theme the entire UI
If you need busybox for anything get the magisk module and app because of the read only system, you have to use the magisk module that loads it every boot
ShayBox said:
I don't know anything about fake locations, I've only ever used mock location a couple times
To get xposed afaik you get the Riru and Riru - LSPosed magisk modules, reboot and you get an LSPosed shortcut, which is your xposed control that lets you manage your xposed modules
For adblock, adaway works great, for theming you can get substratum (not substratum lite) from the playstore, and themes from the playstore, that works off a substratum magisk module and will theme the entire UI
If you need busybox for anything get the magisk module and app because of the read only system, you have to use the magisk module that loads it every boot
Click to expand...
Click to collapse
Thank you again, hey, I don't understand one of the steps that you said.
"Then download and extract the android sdk platform tools (fastboot/adb), and copy the patched boot.img to that folder"
I have the platform tools folder on my computer already, do you mean put the patched file in the entire platform tools folder?
cwgzz said:
Thank you again, hey, I don't understand one of the steps that you said.
"Then download and extract the android sdk platform tools (fastboot/adb), and copy the patched boot.img to that folder"
I have the platform tools folder on my computer already, do you mean put the patched file in the entire platform tools folder?
Click to expand...
Click to collapse
Yes, it can be anywhere but you'll have to provide the path to it in the fastboot flash command
such as "fastboot flash boot patched_boot.img" or "fastboot flash boot C:\Users\Admin\Desktop\patched_boot.img"
putting it in the folder makes it easier to type
ShayBox said:
Yes, it can be anywhere but you'll have to provide the path to it in the fastboot flash command
such as "fastboot flash boot patched_boot.img" or "fastboot flash boot C:\Users\Admin\Desktop\patched_boot.img"
putting it in the folder makes it easier to type
Click to expand...
Click to collapse
Okay I am not finding how the phone will find the file when I am recovery mode... I patched the rom now and I can't figure out how to load the patched rom. The only options I have is reboot to bootloader, enter fastboot, apply update from adb/sd card, wide data, mount system,
Going into fastboot, the only options are reboot system now, enter recovery, reboot to bootloader, power off
Download the Android SDK Platform Tools from Google here https://developer.android.com/studio/releases/platform-tools
Extract that, then copy the patched boot img to that extracted folder
Turn off your phone, then hold volume down and plug it into your computer, this should boot it into bootloader mode
Then open a command prompt, powershell, or windows terminal inside the extracted folder
This is most easily done by holding shift and rightclicking in the empty area of the folder, and a new option will show in the rightclick menu for a command prompt, powershell, or windows terminal (depending on your version of windows)
Once you have that open, type "fastboot" and press tab, it should autocomplete the .exe part, which means you have the correct window open and it's in the correct folder
after that, add "flash boot <filename_patched_boot.img>", the file name may start with magisk, or you can rename it to something easier to type like "boot.img"
Press enter and it should start flashing it to the phone, if there's any problems please post a screenshot of the window
ShayBox said:
Download the Android SDK Platform Tools from Google here https://developer.android.com/studio/releases/platform-tools
Extract that, then copy the patched boot img to that extracted folder
Turn off your phone, then hold volume down and plug it into your computer, this should boot it into bootloader mode
Then open a command prompt, powershell, or windows terminal inside the extracted folder
This is most easily done by holding shift and rightclicking in the empty area of the folder, and a new option will show in the rightclick menu for a command prompt, powershell, or windows terminal (depending on your version of windows)
Once you have that open, type "fastboot" and press tab, it should autocomplete the .exe part, which means you have the correct window open and it's in the correct folder
after that, add "flash boot <filename_patched_boot.img>", the file name may start with magisk, or you can rename it to something easier to type like "boot.img"
Press enter and it should start flashing it to the phone, if there's any problems please post a screenshot of the window
Click to expand...
Click to collapse
It keeps saying fastboot: usage: no command (This is so complicated...)
ShayBox said:
Download the Android SDK Platform Tools from Google here https://developer.android.com/studio/releases/platform-tools
Extract that, then copy the patched boot img to that extracted folder
Turn off your phone, then hold volume down and plug it into your computer, this should boot it into bootloader mode
Then open a command prompt, powershell, or windows terminal inside the extracted folder
This is most easily done by holding shift and rightclicking in the empty area of the folder, and a new option will show in the rightclick menu for a command prompt, powershell, or windows terminal (depending on your version of windows)
Once you have that open, type "fastboot" and press tab, it should autocomplete the .exe part, which means you have the correct window open and it's in the correct folder
after that, add "flash boot <filename_patched_boot.img>", the file name may start with magisk, or you can rename it to something easier to type like "boot.img"
Press enter and it should start flashing it to the phone, if there's any problems please post a screenshot of the window
Click to expand...
Click to collapse
Okay I understand what you mean. Now it is saying cannot load boot.img, no such file or directory. It did autocomplete to .exe like you said.
cwgzz said:
It keeps saying fastboot: usage: no command (This is so complicated...)
Click to expand...
Click to collapse
cwgzz said:
Okay I understand what you mean. Now it is saying cannot load boot.img, no such file or directory. It did autocomplete to .exe like you said.
Click to expand...
Click to collapse
You're missing the end of the filename (.img)
ShayBox said:
You're missing the end of the filename (.img)
Click to expand...
Click to collapse
Oh... duh... what an idiot... hahah thank you so much for spending your time helping me out, I sincerely appreciate it so much. Alright so it's done flashing, am I good to turn on my phone and it's now rooted?
Yes you're now rooted, you can check with any root checker app or any app that uses root
Inside the magisk app settings make sure to click the "Hide Magisk app" button, then install this safetynet fix 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
This is the direct link to the version you need https://github.com/kdrag0n/safetynet-fix/releases/download/v2.1.2/safetynet-fix-v2.1.2.zip
This requires the Riru magisk module, available in the magisk app, and then you can install this zip in the magisk app on the same page
After both Riru and Safetynet fix are installed and you reboot, the safetynet check button in magisk should pass and be blue
For xposed support also install the Riru - LSPosed magisk module, or the older Riru - EdXposed magisk module (I recommend LSPosed)
ShayBox said:
Yes you're now rooted, you can check with any root checker app or any app that uses root
Inside the magisk app settings make sure to click the "Hide Magisk app" button, then install this safetynet fix 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
This is the direct link to the version you need https://github.com/kdrag0n/safetynet-fix/releases/download/v2.1.2/safetynet-fix-v2.1.2.zip
This requires the Riru magisk module, available in the magisk app, and then you can install this zip in the magisk app on the same page
After both Riru and Safetynet fix are installed and you reboot the safetynet check button in magisk should pass and be green
For xposed support also install the Riru - LSPosed magisk module, or the older Riru - EdXposed magisk module (I recommend LSPosed)
Click to expand...
Click to collapse
Man you are so helpful, thank you so much for all of your help!!! Do I do all of this on my phone? Do I still need to use my computer?
You shouldn't need your computer anymore, everything is done, you just have to install all your apps now
Hopefully this helps other people in the future
ShayBox said:
Yes you're now rooted, you can check with any root checker app or any app that uses root
Inside the magisk app settings make sure to click the "Hide Magisk app" button, then install this safetynet fix 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
This is the direct link to the version you need https://github.com/kdrag0n/safetynet-fix/releases/download/v2.1.2/safetynet-fix-v2.1.2.zip
This requires the Riru magisk module, available in the magisk app, and then you can install this zip in the magisk app on the same page
After both Riru and Safetynet fix are installed and you reboot, the safetynet check button in magisk should pass and be blue
For xposed support also install the Riru - LSPosed magisk module, or the older Riru - EdXposed magisk module (I recommend LSPosed)
Click to expand...
Click to collapse
It shows that safetynet is installed, I don't see the blue, lol what exactly is safetynet?
cwgzz said:
It shows that safetynet is installed, I don't see the blue, lol what exactly is safetynet?
Click to expand...
Click to collapse
There's apps that google will mark as "not compatible" if you have root, such as all nintendo games like mario run, this is for that I believe, what does the checker say for the 3 sections
ShayBox said:
There's apps that google will mark as "not compatible" if you have root, such as all nintendo games like mario run, this is for that I believe, what does the checker say for the 3 sections
Click to expand...
Click to collapse
Oh wow, would this also fix banking apps as well? I know my bank checks for root and won't work. And I am sorry, I don't know what you mean about the checker and 3 sections.

How To Guide [Unofficial] Unlocking the bootloader, rooting, and installing TWRP on Nokia 2.2 with Android 11

to moderators: this is my first thread ever, and thought a complete guide like this really has to be done. if it's not right or not in the right place, do what is right
Click to expand...
Click to collapse
Since there are only 3 useful guides about modifying this specific phone, and some really don't answer a few barriers placed in our way by HMD Global and its ridiculous OEM unlocking restrictions (-_-), and also Google probably dropped making OTA updates for it (which was very important to me, because Android 9 and 10 had bugs), I decided to mix them all up (I will give credits, obv) and add some more info I found and create a thread which will work on Android 11, which worked on my phone, not tested on another Nokia 2.2.
Hope it helps y'all!!
Part 0: Preparations
WARNING: Your storage will be wiped completely!! so make sure to back everything you need up before doing anything. Unless you have bricked/soft locked your phone, then in that case you can use MTK Client app to backup userdata.bin (more info on Part 1-2, marked with a )
Requirements:
A good computer
Obviously a network connection on your computer for downloading files, and on your phone if you wanna update thru OTA
USB cable, capable of transferring data, and without any annoying repeated disconnections or "has to be put in the right angle and position". Just use a fresh one
VCOM and adb drivers, which can be a little annoying getting them to work. Best option is to install 15 seconds minimal ADB and make sure you say Yes when it asks if you want to install device drivers.
Android SDK Platform tools, which can be downloaded from here (NOTE: You have to use Platform tools. minimal adb will NOT work with fastboot on this device. So go to C:\adb and delete everything in there, then extract platform tools in that folder instead)
and the most important of them all: MTK Client by Bkerler which can be downloaded from here. Follow the installation instructions in the link, install Git and Python and also usbdk installer featured in the Github instructions for MTK Client
All done? Great! moving to the next part
Part 1: Unlocking the bootloader
The most annoying part. Thanks to hikari_calyx for their awesome guide on how to unlock the bootloader for this phone. We will follow it step by step until we reach step 6, where we are about to flash all those backed up img's back using mtk-su. Here's the problem, you can use mtk-su only on Android 9. it doesn't work on Android 11 sadly. so we just make sure we have unlocked sec1.img and seccfg.img in a safe place, then install a fresh stock Android 9 rom om our phone with any method we are most comfortable with, like SP Flash tool like in the guide, or booting into recovery and sideloading thru adb or from sdcard. just search the net and I'm sure you will find a loooot of sites explaining how you can flash a stock android on your phone. Just make sure you won't mess IMEI and Serial Number up!!!
**There is a "unlock bootloader" option in the flash tools tab of MTK Client. haven't tried it out myself but you can give it a try**
Extra: Booting into stock recovery
There is another detailed guide on how to enter recovery mode, by foobar1123321 which you can see in here. You might need it to apply updates to your phone
After flashing and updating your OS to latest version of Android 11, it's time for Unlocking the bootloader again. but sadly, Unlocked OEM doesn't let OTA updates to be received, and trying to flash sec1.img and seccfg.img on Android 11 is not possible without root, and root is not possible without OEM unlocking :\
So here comes the neat part, MTK Client
Part 1-2: Unlocking the bootloader again
Go to the folder where you installed MTK Client (hopefully you know how git works and got it cloned and working, if no, then read Installation instructions carefully in their Github page), and open a CMD window there by typing in cmd in the address bar. then write python mtk_gui and hit enter. Do not use mtk_gui.bat since it will close the cmd and not work. Do NOT close this cmd tab. After a while, the app will start and asks you to connect your phone.
Shut down the phone, and after 5 seconds, press and hold both volume up and down keys (without the power button) and connect the phone to your computer via cable while still holding the volume buttons. If you have installed the drivers successfully, then you'll see some texts generate in the cmd window, and will (probably) wait for the Preloader VCOM.
you can let go of the volume keys.... but not for so long. Disconnect the USB cable, hold volume keys, and connect the phone again and you'll see that MTK Client successfully gets access to your phon. YAAAY!!
now you can let go of the volume keys
Go to "Read partitions" tab, and select Boot_a, Boot_b, sec1, and seccfg (make sure you wouldn't mistake them with unlocked sec1 and seccfg)
And then click on Read partitions button in the right side, and choose a location to save these partitions
You can also check userdata, if you have bricked/soft locked your phone and wanna backup your Internal storage data. You can flash it again with this app after you have fixed your phone. and if the problem wasn't caused by your data, you can use them again like you never wiped your phone
After everything is backed up, go to "Write partitions" tab, and find sec1 and seccfg, click on "set", browse and select the respective unlocked partitions we got in Part 1 (you may need to change their extension from .img to .bin for them to show up)
Click on "Write partitions", and done! You have unlocked your OEM on Android 11!! and if everything is done correctly, you'll see
Orange state Your device is unlocked and cannot be trusted Your device will boot in 5 seconds...
Click to expand...
Click to collapse
or something like this when powering it on, congrats!!
Part 2: Installing TWRP
from the official TRWP page for Nokia 2.2, download the latest TWRP image file and move it to c:\adb on your computer and rename it to twrp.img
you will also need to download a stock vbmeta image, which can be found here or simply by reading it from your phone via MTK Client (there will be two A/B partitions, any of them works) and rename the downloaded/grabbed file into vbmeta.img and move it to c:\adb
power off your phone, then boot into fastboot by holding Volume down + Power for a few seconds, until it says FASTBOOT MODE => then connect the phone to a PC, and write:
fastboot –disable-verity –disable-verification flash vbmeta vbmeta.img
Click to expand...
Click to collapse
and then
fastboot flash boot twrp.img
Click to expand...
Click to collapse
Now we have the latest TWRP on our Nokia 2.2 , but seems like accessing TWRP is only possible by either rebooting to recovery when the phone is powered on, via Magisk, Termux, or any other app with power options (after rooting the phone), or writing this when the phone is in fastboot mode:
fastboot reboot recovery
Click to expand...
Click to collapse
You can use TWRP and all of its awesome features now, except for MTP, backup, reading userdata partition, etc. to fix that, you gotta wipe internal storage, so make a backup of your files before processing.
**IMPORTANT: Do not flash TWRP after rooting the phone or it will unroot it**
Part 3: Rooting via Magisk
I'm gonna use Magisk because... it's better than other SU apps. Get it from here and install it on your phone. Now that you have your OEM unlocked and boot partitions too, you just have to copy the partitions we got via MTK Client on your device, launch Magisk app, select Install Magisk, then choose a file, which is gonna be Boot_a.
Wait until patching is finished, and after it's done, go into downloads folder and rename it to Boot_a or you will get confused later
After that you can choose Boot_b to be patched, and after it's done, rename it to Boot_b too
Copy them both to C:\adb from your phone to your pc, and power off your phone
after you get sure device is not connected to the computer via cable, and is powered off, hold down the volume down key with power button, until your phone boots into fastboot mode
Now open a cmd in C:\adb, and write
fastboot flash boot_a boot_a.img
fastboot flash boot_b boot_b.img
Click to expand...
Click to collapse
when done, disconnect your device, and restart. You can check the Magisk app, and realize you now have superuser permissions!!!
**UPDATE** Part 3-2: Hiding Magisk
Hiding Magisk and bypassing SafetyNet is another challenging problem on this phone. Cause when you try to Hide the Magisk app, you'll come to a simple "Failed!" error which is most probably caused by SELinux status. To fix this we gotta install some modules
First of all, install Busybox from Google Play or any other source. It's not necessary, but it's good to have. simply just install it, no need to restart
Then we need to install a module called SELinux permissive (wow, how unique ;w; ) by evdenis, which can be found here. download the zip in your phone, open the Magisk app, and in the modules tab browse for our newly downloaded zip and wait until the operation is done. Reboot your phone, and you are now able to hide Magisk app without any problem.
So do so, open Magisk -> settings -> hide the Magisk app. Choose a name (settings by default) and wait until app launches itself, asking you to add a shortcut to your home screen (optional). This way, your Magisk app now has a random package name and signature and can't be detected by other apps. Now moving to the next part
Bypassing the SafetyNet:
First, in Magisk settings, enable Systemless hosts. it will add its module to the modules tab. check if it's enabled
Then toggle Zygisk in Magisk settings, and restart your phone again (2 restarts? alright no problem)
Once your phone booted up, on the main screen of Magisk, check if it says Yes in front of Zygisk. if yes, than congrats! we are not down yet tho
Go to Magisk settings and toggle Enforce DenyList, don't reboot for now (yes, there is a 3rd one coming ), but go to Configure DenyList and choose the following apps
Google Play Service
Google Play Store
Google Service Framework
Google Play Protect Service (which is probably not present, but wrote it just in case it is on your phone)
Click to expand...
Click to collapse
and also you can choose your banking apps, or any app that prevents you from using them like Netflix or some games. Now you gotta restart (third time is the charm )
Now we gotta install another module which is Universal SafetyNet fix by kdrag0n which can be found here. Download it to your phone, choose it in Magisk module browser, wait for it to finish, and restart (I'm losing my control!!! Hmph!)
Now that we did all this, we have to clear data of apps in our DenyList so they would never remember if we ever had root or no
Go to settings (the actual settings, not our now hidden Magisk app) -> Apps -> all apps -> tap the 3 dots on top -> show system apps, then find all the apps you added to your DenyList and clear their data (not cache, data itself)
Now that this is down, restart your phone ((╯°□°)╯︵ ┻━┻) it's the last time, so you can stop raging now (┬─┬ノ( º _ ºノ))
Now we can install an app like YASNAC and run SafetyNet attestation, if the results showed two pass checks, Congratulations, you bypassed SafetyNet!!!
Totally worth the restarts. (Thanks to Droidwin for their article)
And that's it!! Hope you enjoy your now rooted Nokia 2.2 phone with Android 11
Great guide, and yes mtkclients unlock will work but it may put Ur device into verity eio mode
¿Can I use the Part 3-2 to hide Magisk in Android 9 instead of 11?, I find stock Android 11 very laggy and unstable on my phone (using the camera on any app can take from 1 to 3 or 4 tries to get it working, for example), and Android 9 has served me waaaaay better. However, my banking app refuses to work with root.

Categories

Resources