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? - Moto G Stylus 5G

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.

Related

[Guide][EdXposed][GPay] Discussion

Get Edxposed, Magisk, and GPay to work together.
1. Install or make sure you are on latest Magisk Manger (7.5.1 or newer)
2. Install or make sure you are on latest Magisk (20.3 or newer)
3. Hide the following in Magisk Hide
-Google Pay
-Google Play services, only select the following
-com.google.android.gms
-com.google.android.gms.unstable​-Google Play Services for AR
-Google Play Store, select everything but com.android.vending
-Google Services Framework
-Nfc Service​
4. Install the following modules
-GPay SQLite Fix (Full Edition)
https://forum.xda-developers.com/showpost.php?p=79643248&postcount=176​-SQLite for Arm aarch64 devices via Magisk Manager
-hardwareoff by @Displax (Thanks to @Kris Chen for making me aware of it) or use MagiskHide Props to set check to basic and fingerprint to Pixel 3a​
5. Reboot
At this point make sure you have GPay working before installing edxposed. If for some reason you are unable to use GPay try deleting data for Google Play Services/Google Play Store/Google Pay
After you confirm that GPay is working then move on to installing edxposed
1. Download and install Riru - Core via Magisk Manager
2. Download Edxposed Manager (4.5.4 or newer) (Don't Install Yet!)
https://github.com/ElderDrivers/EdXposedManager/releases/​3. Download Edxposed (4563) (Don't Install Yet!)
I'm personally using the YAHFA version.
https://ci.appveyor.com/project/ElderDrivers/edxposed/history​
4. Once you have all these files downloaded turn on Airplane Mode and install the Edxposed Magisk Module (Magisk -> Modules and press the + sign, find the downloaded zip and select it, Magisk will install it) and Edxposed Manager APK and reboot
5. Once booted up remain in Airplane Mode
6. Open Edxposed Manger and go to Settings and turn on "App List mode"
7. Exit and reopen Edxposed Manager
8. Go to Applications on the side menu (should say "Black List" on top) and select the following apps
-Google Pay (may not be needed)
-com.android.nfc.auto_generated_rro_product_
-com.android.nfc.auto_generated_rro_vendor_
-Nfc Service
-pixelnfc (new in Android 11)​9. Go to Settings on the side menu, at the bottom of settings find and enabled "Pass SafetyNet"
10. Reboot and turn off Airplane Mode
11. Optional* Hide Magisk Manager
Note. Steps 4-9 should be done in Airplane Mode, this will keep anything tripping safety net during the setup process.
eg1122 said:
When phone detects update
1. Disable any desired Magisk modules, ex. Edxposed
2. Reboot
3. In Magisk, select Uninstall, press Restore Images
4. Do NOT Reboot
5. Install OTA Update via Settings -> System -> System Updates
6. When prompted to reboot, Do NOT Reboot
7. In Magisk Manager press Install
8. Select Install to Inactive Slot
9. Reboot
10. Enable the Magisk modules one by one
In case of bootloop after enabling a module there are 2 ways that I know of on how to retain root and fix bootloop.
One requires ADB
While phone is stuck in bootloop, connect phone to PC and run this commands via ADB.
adb wait-for-device shell magisk --remove-modules
adb reboot
This will remove all modules and you should be able to boot.
The second way is via fastboot. More information in this thread.
https://forum.xda-developers.com/pixel-4-xl/themes/magisk-modules-disabler-booting-magisk-t3990557
Click to expand...
Click to collapse
Here are some screen shots of it working
Thanks for this @eg1122.
After soft-bricking on my first try, I've been wondering what the working version combination is.
The one that is available to me is an older version maybe that's what caused my bootloop? Why does my screenshot look like crap?
Sent from my Pixel 4 XL using Tapatalk
View attachment 4858559
Finally got exposed/gravitybox installed.
Anyone know any tweaks for the home screen grid size?
Sent from my Pixel 4 XL using Tapatalk
xdeslitx said:
Finally got exposed/gravitybox installed.
Anyone know any tweaks for the home screen grid size?
Click to expand...
Click to collapse
Check my thread in Themes and Apps section
https://forum.xda-developers.com/pixel-4-xl/themes/substratum-pixel-launcher-editor-t3990687
xdeslitx said:
The one that is available to me is an older version maybe that's what caused my bootloop? Why does my screenshot look like crap?
Click to expand...
Click to collapse
Use the link I posted to get 0.4.5.5
eg1122 said:
Check my thread in Themes and Apps section
https://forum.xda-developers.com/pixel-4-xl/themes/substratum-pixel-launcher-editor-t3990687
Click to expand...
Click to collapse
That looks pretty nice...thanks
Sent from my Pixel 4 XL using Tapatalk
eg1122 said:
I've been reading a lot of our forums and many are asking about Xposed. Decided to make this thread to try to keep all discussion in one place and make it easy to find information.
I am currently running Xposed and I'll lay out the steps I took to get it working.
1. In Magisk Manager find and install Riru - Core v19.5
2. Reboot
3. Download and install Riru - EdXposed v0.4.5.5_beta (YAHFA) via Magisk
https://github.com/ElderDrivers/EdXposed/pull/354
4. Install EdXposed Installer
https://github.com/solohsu/XposedIn...d_v2.2.5/EdXposedInstaller_v2.2.5-release.apk
5. Reboot
6. Enjoy
Click to expand...
Click to collapse
This won't trip Safety net right i assume?
varun.gid said:
This won't trip Safety net right i assume?
Click to expand...
Click to collapse
Nope
Disregard...
How does using Xposed affect monthly security updates? Do you have to disable or whatever? I'm not sure I want to do this, I'd rather not cause problems.
Got xposed installed and running thanks to this thread, but the module download screen is empty - just shows the refreshing icon and "module list will be loaded in a few seconds" forever. Anyone else seeing this?
gettinwicked said:
How does using Xposed affect monthly security updates? Do you have to disable or whatever? I'm not sure I want to do this, I'd rather not cause problems.
Click to expand...
Click to collapse
I disable big modules like Xposed when I update. Then re-enable them once update is completed. I'll put a step by step here.
When phone detects update
1. Disable any desired Magisk modules, ex. Edxposed
2. Reboot
3. In Magisk, select Uninstall, press Restore Images
4. Do NOT Reboot
5. Install OTA Update via Settings -> System -> System Updates
6. When prompted to reboot, Do NOT Reboot
7. In Magisk Manager press Install
8. Select Install to Inactive Slot
9. Reboot
10. Enable the Magisk modules one by one
In case of bootloop after enabling a module there are 2 ways that I know of on how to retain root and fix bootloop.
One requires ADB
While phone is stuck in bootloop, connect phone to PC and run this commands via ADB.
adb wait-for-device shell magisk --remove-modules
adb reboot
This will remove all modules and you should be able to boot.
The second way is via fastboot. More information in this thread.
https://forum.xda-developers.com/pixel-4-xl/themes/magisk-modules-disabler-booting-magisk-t3990557
tardis_42 said:
Got xposed installed and running thanks to this thread, but the module download screen is empty - just shows the refreshing icon and "module list will be loaded in a few seconds" forever. Anyone else seeing this?
Click to expand...
Click to collapse
Try the following
Try clearing app data and cache for edxposed.
Uninstall Edxposed installer and reinstall
Reinstall any Xposed modules not showing up
eg1122 said:
Try the following
Try clearing app data and cache for edxposed.
Uninstall Edxposed installer and reinstall
Reinstall any Xposed modules not showing up
Click to expand...
Click to collapse
Clearing data did it, thanks!
How do you install edexposed via magisk? I haven't rooted since the P1 so I'm out of the loop here sorry.
madgooner2810 said:
How do you install edexposed via magisk? I haven't rooted since the P1 so I'm out of the loop here sorry.
Click to expand...
Click to collapse
In Magisk, go to Modules and press the + button, then find the zip and select it.
Thanks...
FYI, Riru - EdXposed v0.4.6.0_beta (YAHFA) via Magisk also works.
@eg1122 great instructions worked perfectly. Thanks!

[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.

[Tutorial] Unlock Bootloader, get root and valid Safetynet

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.

[GUIDE]Rooting, EDXposed and SafetyNet for Realme C12

Before doing anything to device, keep a copy of Stock ROM from here in your PC or SD Card.
Rooting with Magisk
Tutorial:
The procedure is the same whether you're on the stock RealmeUI Rom or on a custom GSI (treble) one or on a custom ROM.
Step 0 - Go to extracted platform tools folder in your PC and Shift + Right Click and choose Open Command Window here and connect the device to PC.
Step 1 - Boot to Recovery with adb reboot recovery and run below commands in command prompt by connecting the device to PC
Code:
adb root
adb pull /dev/block/by-name/boot boot.img
adb reboot
After running after commands you will get boot.img in your platform tools folder of PC. Copy the boot.img to mobile.
Note:- Above commands won't work if you are on GSI/custom ROM rom with stock recovery. So flash TWRP and follow above to get boot.img or use root debugging in ROM if available.
Step 2 - Download and install the latest Magisk app from here on your phone.
Click on the latest Magisk-vX.Y.apk you see in the list to start the download, open the file and install.
Step 3 - On your phone, open up Magisk app.
Click the Magisk Install button as shown below.
Then Select and Patch a File.
Go look for your boot.img you previously copied to your phone and pick it.
Click Let's go! and wait for Magisk to complete the process!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Step 4 - Link your phone to your PC, and grab the file the Magisk app created. It's located in your downloads folder, called magisk_patched_blAh.img.
Step 5 - Paste it where your ADB & Fastboot (Platform Tools) are located, along with the vbmeta.img by downloading from here.
You should now have a folder like this with:
adb(.exe)
fastboot(.exe)
magisk_patched.img
vbmeta.img
Extra files from the platform tools
Step 6 - Link your phone to your PC with the USB cable if not done already.
Step 7 - Shift + Right click in an empty space inside the folder we prepared in Step 7, and click Open Command window here.
Inside the Command window, input the following commands line by line, in order.
Code:
adb reboot bootloader
fastboot devices
And make sure your device shows up, should be a bunch of numbers and letters, a couple spaces, and fastboot.
If nothing does, go back to Step 7 and try again.
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot flash boot magisk_patched_blAh.img
fastboot reboot
You're done! Your phone will reboot, hopefully, without a hitch! Open up Magisk app, and check that it's installed.
That said, you will have issues leaving it like this. You need to hide the fact that your phone is rooted, there's no downside to doing it.
Check out the Passing SafetyNet tutorial further down below, it's quick and easy.
For more info, see official Magisk installation instructions at https://topjohnwu.github.io/Magisk/install.html
Passing SafetyNet (Only possible with Magisk. Not with SuperUser on GSI's)
Tutorial:
Enable Magisk Hide inside Magisk app's settings and Install Universal SafetyNet Fix module.
Reboot and enjoy! You're all set and SafetyNet should pass just fine.
Q: Hey, I rooted/edXposed my phone, and now Netflix won't even open, or doesn't work properly, what's up with that?
A:
Well, fortunately, there's an easy fix if you have Magisk. Install the liboemcrypto disabler Magisk module, activate it and reboot.​
Credits:-
@Akitake for his guide at here
Now we have root.
We can uninstall system apps with below command in Termux
Code:
su
pm uninstall --user 0 <package_name>
We can use Package Viewer app to know package names.
Getting EDXposed
Spoiler: Click to Show content
Tutorial:
I very much discourage to EdXposed your phone unless you have a very good reason for it.
It's a pain to pass SafetyNet.
It doesn't get updated often.
It has very niche use cases for which it's actually worth it.
That said, I explain it here for people who know what they're getting into and want instructions on how to do it.
This procedure requires to be rooted with Magisk.
Step 1
Inside Magisk app, go to the Modules tab.
Click the search button (bottom right) and search Riru.
Install the Riru module by Rikka.
Activate it and Reboot.
Step 2
Download and install the latest EdXposed Manager, the same way you did with Magisk app when rooting.
Step 3
Open it up, go to the ALPHA tab and click install/update.
It'll start a file download.
Step 4
Go back to Magisk app, Modules tab, except this time click Install from Storage.
Point to the .zip file you just got, located in the Downloads folder of your phone.
At the end of the installation, click reboot.
Step 5
Let's double check your installation is operational.
Go to EdXposed Manager, first tab.
It should say EdXposed Framework is active.
You're done!
You should now be able to install EdXposed modules.
That said, you will have issues with certain apps leaving it like this.
You should to hide the fact that your phone is EdXposed.
Check out the Passing SafetyNet tutorial further down below!
For more info, see https://forum.xda-developers.com/t/...or-of-xposed-oreo-pie-q-r-2020-07-19.4070199/
Passing SafetyNet With EDXposed installed
Tutorial:
Again, I highly recommend not EdXposing your phone and sticking to just Magisk if you can help it.
You should also know that this method will show you're passing SafetyNet inside Magisk but it's a pain to do and isn't as well hidden as Magisk alone.
Step 1 - Do the step for Rooted phones listed above if not done already.
Step 2 - In EdXposed Manager, get the HiddenCore Module and activate it.
Step 3 - Now, in the side-menu: Compat List > tick HiddenCore Module.
Step 4 - Then, go to Settings > Framework > Enable "App List mode".
Step 5 - Finally, Applications(Black List) and tick: Android Services Library, Chrome, Google Play services, Google Play Store, Google Services Framework
Reboot and enjoy! You're all set and SafetyNet should pass.
Sir thank you so much for the instruction i want to a custom rom for My realme C12 how to installed it thank you for Response
Randymem said:
Sir thank you so much for the instruction i want to a custom rom for My realme C12 how to installed it thank you for Response
Click to expand...
Click to collapse
For now, custom ROMs have some issues.
Try flashing GSI using https://forum.xda-developers.com/t/gsi-phh-q-r-gsi-flashing-for-realme-c12.4244979/
Thanks
HemanthJabalpuri said:
For now, custom ROMs have some issues.
Try flashing GSI using https://forum.xda-developers.com/t/gsi-phh-q-r-gsi-flashing-for-realme-c12.4244979/
Thanks
Click to expand...
Click to collapse
Thank you sir
How do you update to latest firmware without losing root, data, settings?
immortal_jerk said:
How do you update to latest firmware without losing root, data, settings?
Click to expand...
Click to collapse
I didn't tried this before, but flashing Magisk-patched boot.img after update may revive root with all previous modules.
If you got any other method, then let me know here.
Thanks
sir newbie here when i enter command (adb root)
it say access denied you dont have confimation.
wow thanks dude i succesfully rooted my phone.
Will this work for realme ui 2.0 android 11?
immortal_jerk said:
Will this work for realme ui 2.0 android 11?
Click to expand...
Click to collapse
Yes, but see the note in red colour of Step 2.
Thanks
HemanthJabalpuri said:
Yes, but see the note in red colour of Step 2.
Thanks
Click to expand...
Click to collapse
i installed THAT magisk and rooted my phone ui2.0.. but theres no magisk hide option in settings and i cant install safetynetfix module, it asks for a file called riru... and also i cant search for modules in the magisk app
immortal_jerk said:
i installed THAT magisk and rooted my phone ui2.0.. but theres no magisk hide option in settings and i cant install safetynetfix module, it asks for a file called riru... and also i cant search for modules in the magisk app
Click to expand...
Click to collapse
Can you please send screenshots of settings screen and module section of Magisk app so that I can better understand what's going wrong.
HemanthJabalpuri said:
Can you please send screenshots of settings screen and module section of Magisk app so that I can better understand what's going wrong.
Click to expand...
Click to collapse
as you can see theres no magisk hide option in settings, only the option to hide the app, tried that too but nothing works, turning Enforce DenyList on/off dont work neither... and nothing comes up when i search for modules
HemanthJabalpuri said:
Can you please send screenshots of settings screen and module section of Magisk app so that I can better understand what's going wrong.
Click to expand...
Click to collapse
i was able to manually install riru and safetynet fix modules in magisk, but i still cant pass safetynet
immortal_jerk said:
as you can see theres no magisk hide option in settings, only the option to hide the app, tried that too but nothing works, turning Enforce DenyList on/off dont work neither... and nothing comes up when i search for modules
Click to expand...
Click to collapse
Ah, got the culprit.
Magisk hide and Official Modules Repo are no longer part of Magisk from the developer.
To get those back, we can use older version of Magisk.
I have updated the Magisk apk link for UI 2.0. Uninstall Magisk by choosing 'Uninstall Magisk' in main screen and root again with the updated link.
Also, Universal SafetyNet fix older versions will just work without Riru. You can try https://github.com/kdrag0n/safetynet-fix/releases/download/v1.2.0/safetynet-fix-v1.2.0.zip
Thanks
HemanthJabalpuri said:
Ah, got the culprit.
Magisk hide and Official Modules Repo are no longer part of Magisk from the developer.
To get those back, we can use older version of Magisk.
I have updated the Magisk apk link for UI 2.0. Uninstall Magisk by choosing 'Uninstall Magisk' in main screen and root again with the updated link.
Also, Universal SafetyNet fix older versions will just work without Riru. You can try https://github.com/kdrag0n/safetynet-fix/releases/download/v1.2.0/safetynet-fix-v1.2.0.zip
Thanks
Click to expand...
Click to collapse
magisk worked but i couldn't pass CTSprofile so i installed safetynet fix v2.1.0 and Riru, now everything's fine.. thank you again Sir
i have a question. The vbmeta is "empty" or you extract it from fastboot file?
GoldenEye17 said:
i have a question. The vbmeta is "empty" or you extract it from fastboot file?
Click to expand...
Click to collapse
I took that from our device stock rom ozip

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