[Guide] Root Pixel 6 with Magisk + Unlock Bootloader + Pass SafetyNet + More
Android Security Bulletin—May 2023
Pixel Update Bulletin—May 2023
Android Security Bulletin—May 2023
Pixel Update Bulletin—May 2023
Introduction
This Guide is for Pixel 6 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.
- If you choose to use a Custom Kernels, Custom ROM, etc. You should read the Installation Instructions in their thread before using this guide or attempting to install them. Additionally, 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 them
.
- Prerequisites
- A Pixel 6 phone with an unlocked bootloader.
- The latest Android 13 Factory or OTA Image: "oriole" for Pixel 6
Factory Image
OTA Image
- A Computer with the latest working SDK Platform-tools r. 34.0.3 installed.
- Important Notes:
a. If you use the Linux or Windows version of SDK Platform- tools r. 34.0.3 you must set the environment variable - See Note(s) for instructions on setting the enviroment Variable
b. If you have any problems with SDK Platform-tools 34.0.3. You can get SDK Platform-tools 33.0.3 here.
c. Before installing SDK Platform-tools, check for older versions of fastboot on your computer: Open a Command prompt and typefastboot --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.
d. Update Platform Tools, regularly, for optimal performance.
- NEW
- Both Slots Bootable
@badabing2003 has found a way to Have both slots bootable.
He has automated the procedure and added it to PixelFlasher.
@Lughnasadh tested the procedure on his Google Pixel 7 Pro and Google Pixel 6 Pro phones: It works! - "...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 Threadforum.xda-developers.com
- Android 14 Beta are up.
- Builds are only available for the following Pixel devices:
- Google Pixel 4a5(G)
- Google Pixel 5 and 5a
- Google Pixel 6 and 6 Pro
- Google Pixel 6a
- Google Pixel 7 and 7 Pro
* * * 64-bit-only system images * * * - Google Pixel 4a (5G)
- Google Pixel 5
- Google Pixel 6
- Google Pixel 6 Pro
- Android 14 GSI binaries and release
- Pixel 4a5(G)
- Pixel 5 and 5a
- Pixel 6 and 6 Pro
- Pixel 6a Pro
- Pixel 7 and 7 Pro
- Builds are only available for the following Pixel devices:
- Android 13 QPR3 beta images are up.
Release notes - for QPR3 beta- Factory Images
Builds are only available for the following Pixel devices:
- Google Pixel 4a and 4a (5G)
- Google Pixel 5 and 5a
- Google Pixel 6 and 6 Pro
- Google Pixel 6a
- Google Pixel 7 and 7 Pro
* * * 64-bit-only system images * * * - Google Pixel 4a (5G)
- Google Pixel 5
- Google Pixel 6
- Google Pixel 6 Pro
- OTA Images
Builds are only available for the following Pixel devices:
- Google Pixel 4a and 4a (5G)
- Google Pixel 5 and 5a
- Google Pixel 6 and 6 Pro
- Google Pixel 6a
- Google Pixel 7 and 7 Pro
- Factory Images
- Temporary fix for rooting the Google Pixel 6/6 Pro:
https://forum.xda-developers.com/t/...der-pass-safetynet-more.4388733/post-87853193
Note: Magisk Canary 25211
@Lughnasadh said, "I was able to patch the Pixel 6 Pro boot image (instead of the Pixel 7 Pro boot image) on A14"...
- Both Slots Bootable
- Update(s)
- Factory/OTA Images - 01 May
- Android 14 DP
- Magisk Alpha - app-release_709f25f6-26101.apk 12 Apr
- Magisk Beta - Magisk v26.1.apk 11 Apr
- Magisk Canary - app-release_47d2d4e3-26102.apk 24 May
- Magisk Cygisk - Click Pages 5 for installation Instructions.
- Magisk Delta - app-release
- Magisk Stable - Magisk v26.1.apk 11 Apr
- TWRP - Waiting for T.R.W.P. for Android 12
- SafetyNet - Displax's SafetyNet Fix, v2.4.0-MOD_1.2 14Feb
- SDK Platform-tools - r34.0.4 May 22, 2023
Note: If you have any problems with SDK Platform-tools 34.0.3. You can get SDK Platform-tools 33.0.3 here. - Custom Kernels
- My Other Guides
- Credits/Thanks/Recognitions
- @topjohnwu - Magisk.
- vvb2060 - Magisk alpha.
- Those I may have, inadvertently, forgotten.
(The Instructions listed below are not steps, they are individual sets of instructions.)
- 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
- 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 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.
- Unlock Bootloader
- Manually 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 missed images in succession. Flash the latest Factory image.
- If your phone was previously rooted, open Magisk manager and disable all Magisk modules. If you hid the Magisk manager app the default name for the hidden Magisk app is settings.
- If you are uncomfortable manually flashing the factory image. Try PixelFlasher by badabing2003.
- "Updating Pixel 6, Pixel 6 Pro, and Pixel 6a devices to Android 13 for the first time
Warning: The Android 13 update for Pixel 6, Pixel 6 Pro, and the Pixel 6a contains a bootloader update that increments the anti-roll back version for the bootloader. This prevents the device from rolling back to previous vulnerable versions of the bootloader. After flashing an Android 13 build on these devices you will not be able to flash and boot older Android 12 builds. For developers who need to develop and test against an Android 12 environment, a special Developer Support Build that contains the bootloader update should be used.
After taking an Android 13 update and successfully booting the device post update, an Android 12 build resides in the inactive slot (seamless updates for more information on slots) of the device. The inactive slot contains an older bootloader whose anti-rollback version has not been incremented. If the active slot is then flashed with a build that fails to boot, the fallback mechanism of seamless updates kicks in and the device tries to boot from the inactive slot. Since the inactive slot contains the older bootloader, the device enters an unbootable state.
To avoid hitting this state, if you are flashing a Pixel 6, Pixel 6a, or Pixel 6 Pro device with an Android 13 build for the first time, please flash the bootloader partition to the inactive slot"...
- If you want to update to the Android 13 Factory image without wiping your phone: Do Flash Factory Image Keep Data (below).
- Always verify you have the latest working version of SDK Platform-Tools installed on your computer before installing the Factory Image: Pixel 6 - oriole.
- 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
- Backup your data
- Download the latest Factory Image: Pixel 6 - oriole 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
- Upgrading to Android 13
* E D I T - flash-all.bat file *
Flash to current/Active Slot.
@Echo off
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-oriole-slider-9.9-9999999.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-oriole-a9999a-999999-999999-a-9999999.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot [update image-oriole-aa9a.999999.999.zip
Note:The -w is removed to Keep Data.
echo Press any key to exit...
pause >nul
exit
Note: It is a good idea to flash the Google factory image to both slots (A & B) when Upgrading to new Android Version.
See Flash Other Slot bat file... below, to flash to the other/inactive slot.
* * * * E N D - Edit * * * * - Updating Android 13
Flash to Other/Inactive Slot.
Note: See Flash Other Slot bat file... below.
* * * * Create - Flash Other Slot bat file * * * * - Save Flash Other Slot bat file - as flash-other.bat
Note: To run this file type flash-other at the Command Prompt.
ECHO OFF
PATH=%PATH%;"%SYSTEMROOT%\System32"
echo This is the slot you are currently on.
fastboot getvar current-slot
echo Press any key to continue...
pause >nul
fastboot --set-active=other
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
echo This is the slot you switched to.
fastboot getvar current-slot
echo Press any key to continue...
pause >nul
flash-all
exit
* * E N D - Creating File * * - After, you have edited the flash-all.bat file. Copy/Move these files to the Platform-tools folder:
- bootloader-oriole-....img
- flash-all.bat
- image-oriole-....zip
- radio-oriole-....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 completed.
- Go-to Part II - INSTRUCTIONS => 5. Root/Reroot with Magisk and Pass SafetyNet, • Patching the boot.img - to root/reroot.
- Upgrading to Android 13
- Flash Factory Image Wipe Data
- This will wipe your phone's Data/Internal Storage.
- Do not edit the flash-all.bat file.
- If you need to disable Verity and Verification: See Disabling Verity and Verification below.
Disabling Verity and Verification
* E D I T - flash-all.bat file *
@Echo off
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot --set-active=other
fastboot reboot-bootloader
fastboot flash bootloader bootloader-oriole-slider-9.9-9999999.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-oriole-a9999a-999999-999999-a-9999999.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot - w update --disable-verity --disable-verification image-oriole-aa9a.999999.999.zip
echo Press any key to exit...
pause >nul
exit
Notes:- The first time you Disable Verity and Verification it will wipe your Data/Internal Storage.
- When doing Subsequent updates and disabling Verity and Verification, the -w flag can be removed to Keep Data.
- Once you start Disabling Verity and Verification you should continue doing it. If you skip disabling one time. The next time you Disable Verity and Verification it will wipe your phone.
- Some kernels require Disabling verity and verification
- To flash both slots (A & B partitions) see Flash Other Slot bat file... above.
- Open the folder you extracted the Factory Image to and Copy/Move these files to the Platform-tools folder:
- android-info.txt
- bootloader-oriole-....img
- flash-all.bat
- image-oriole-....zip
- radio-oriole-....img
- On your phone: Boot the bootloader (fastboot mode) (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 'Devloper'.
- 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.
- Important Note(s):
- Take the OTA Update and Maintain Root
- This set of instructions was written by @topjohnwu: Install Magisk to Inactive Slot , use the latest Magisk Canary, Beta, or Stable.
- NOTE: After you Open Magisk and Restore Images. If you had a Custom Kernel installed, Please check the OP of the Custom Kernel thread you install for instruction to remove the Custom Kernel and return your phone to Stock. Additionally, if you installed Mod Please check the OP of the Mod thread you installed for instruction to remove the Mod and return your phone to Stock before you download the OTA.
- 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
fastboot Reboot
- Extract Files from Factory Image: flash-all.bat boot/init_boot.img Flash boot/init_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 (oriole-a9a9a.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-oriole-aa9a.999999.999.zip) into the folder. The, stock, boot.img file should be in this folder.
- Flash boot/init_boot.img
- Flashing the boot/init_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
- Extract Files from Factory Image
- Root/Reroot with Magisk and Pass SafetyNet.
- Android 13
- Upgrade to Android 13: OP, Part II - INSTRUCTIONS, 2. Install/Update Factory Image keep data or wipe data, Keep data
- Patching the boot.img - to root/reroot.
- If your phone was previously rooted, DO NOT repeat DO NOT install another Magisk Manager app[/U]. Do this before you patch the boot/init_boot image:
- Open the Magisk Manager app and disable all Magisk modules. If you hid the Magisk manager app the default name for the hidden Magisk app is settings.
If you gave it a different name and you've forgotten the name. Use TB checker to find the name of the hidden Magisk Manager. You can also use TB Checker to check if you have more than one Magisk Manager app installed.
- Open the Magisk Manager app and disable all Magisk modules. If you hid the Magisk manager app the default name for the hidden Magisk app is settings.
- Extract the boot/init_boot.img file from the Factory Image.
- Download the latest Factory image to your phone.
- Extract the Factory Image file (oriole-a9a9a.999999.999-factory-99a9a99a.zip) to a folder.
- Open the folder you extracted the Factory image to and extract the Image file (image-oriole-aa9a.999999.999.zip) into the folder. The, stock, boot/init_boot.img file should be in this folder.
- Install Magisk Canary - Download app-release.apk
or
Magisk Beta/Stable App - Open Magisk Beta/Canary/Stable App
- The Update Channel should be set to Beta/Canary/Stable, depending on the version you Installed.
- 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 ✓ (Check Mark)
- Tap Let's Go
- When you see done, the boot.img has been patched (magisk_patched_xxxxxx.img), and stored in the download folder.
- Reboot
- Copy/Move the patched boot.img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it:
- Copy it to a USB drive and transfer it to your computer.
- Move it to your computer using adb push
- Boot fastboot mode
- Connect the phone to the Computer with USB cord.
- Open a Command Prompt 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
- Remove Modules
- 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
- fastboot Reboot.
- Flash the 'stock' boot.img to both slots:
- Important, if the Magisk Manager app has the Superuser and Module buttons greyed out:
- If your phone was previously rooted, DO NOT repeat DO NOT install another Magisk Manager app[/U]. Do this before you patch the boot/init_boot image:
- Pass Safety Net with SafetyNet Fix
- Download File(s)
- Displax's latest SafetyNet Fix, a "fork" of kdrag0n safetynet-fix.
- https://github.com/Fox2Code/Fox Magisk Module Manager
(This is the new Magisk Module repository.)
- 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.
- Download File(s)
- Android 13
- 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!
- Set Magisk App Update Channel
- Install/Update Magisk Modules
- Download Modules
- 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 Fox2Code/Fox Magisk Module Manager
- Open Fox2Code/Fox Magisk 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 Fox2Code/Fox Magisk 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
- Download Modules
- 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.
- Open a Command Prompt on Computer
- 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
- Custom Recovery TWRP
- Waiting for Android 12 (R) T.W.R.P
- Stock Recovery
- Custom ROMs
- Need help with a Custom ROM?
- If you are 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.
- 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
- Need help with a Custom ROM?
- Themes, Apps, and Mods
- T.W.R.P. Backup/Restore
- Waiting for Android 13 T.W.R.P.
Attachments
Last edited: