[Guide] Root Pixel 4a (5G) Android 11 (R) Unlock/Lock Bootloader + Systemless ROOT
Android Security Bulletin—February 2021
Pixel Update Bulletin—February 2021
Android Security Bulletin—February 2021
Pixel Update Bulletin—February 2021
Introduction
This Guide is for Pixel 4a 5(G) owners that want to Root their phone, and enjoy the benefits of rooting it without installing a Custom ROM. However, for those that just can't live without a Custom ROM, take a look at 'Custom ROMs for Pixel 4a 5(G)'.
New
- CalyxOS
- Android 12 Developer Preview
- Factory Images: Downloads for Google Pixel
- OTA Images: Apply a device OTA image
Update(s)
- Factory/OTA Images - 02/01
- Magisk Stable - Magisk-22.0 0/23
- Magisk Beta - Magisk-22.0 02/23
- Magisk Canary - Magisk-22001
- TWRP - Waiting for T.R.W.P. for Android 11 (R)
- SafetyNet - SafetyNetFix v1.1.1 01/16
- SDK Platform-tools - r30.0.5 11/04
- Custom Kernels
- Proton Kernel v1.1 01/07
- CleanSlate R v1.7.5 02/11
- Zest Kernel ꜰᴏʀ ʙʀᴀᴍʙʟᴇ 02/21
- Custom ROMs
- ProtonAOSP v11.3.2 02/04
- UNOFFICIAL LineageOS v18.1-microG 02/07
- UNOFFICIAL LineageOS 18.1 02/17
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 4a 5(G) phone with an unlocked bootloader.
- The latest Android 11 (R) Factory or OTA Image: "bramble" for Pixel 4a 5(G)
- Factory Image
- OTA Image
- Computer - With the latest SDK Platform-Tools: r30.0.5 installed.
- Important: Update Platform Tools, regularly, for optimal performance.
Other Guides
[Guide] Pixel 5 Android 11 (R)
Credits/Thanks/Recognitions
- @topjohnwu - Magisk Canary
- Those I may have, inadvertently, forgotten.
Index
(NOTE: Numbers 1-11 are not steps, they are individual sets of instructions).
- Open a Command Prompt/Boot Fastboot Mode/Boot Recovery
- Open Command Prompt on Computer
- Option 1 - Open File Explorer, click the platform-tools folder, press shift, right click, and select open command prompt here.
- Option 2 - Open File Explorer, click the platform-tools folder, highlight the directory information in the address bar or click the folder (left side of address bar) to highlight it type cmd and press enter.
Notes:- If your computer only has 'open powershell here' in the context menu. Use option 2.
- If you do not want to open a Command Prompt every time you want to use fastboot, add the path to the Platform-tools folder to Windows environment variables.
- Boot fastboot mode:
- Power off phone, press and hold the power and volume down buttons until you see Start.
- Boot Recovery
- Power off phone, press and hold the power and volume down buttons until you see Start. Use volume up/down button until you see Recovery mode. Press power button.
- Open 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 (#1)
- Connect the phone to the Computer.
- At the prompt type:
fastboot devices
to verify communication with phone. It should return your phone's serial number.
- Unlock Bootloader/Return Phone to Stock/Lock Bootloader
- Unlock Bootloader
- This will erase all user data from the device!
- Backup your data
- Activate Developer Options: Tap Settings > About Phone > Tap Build Number 7 times or until you see you are a Developer. Tap back > System > Advanced > Developer Options. Enable OEM Unlock and, USB Debugging.
- Boot fastboot mode
- Connect the phone to the Computer with USB cord.
- Open a Command Prompt on your computer and type
fastboot flashing unlock
and press enter. - You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
- Allow the process to complete and then type
fastboot reboot
at the Command Prompt and press enter. - When your phone reboots disconnect your usb cable.
Notes: After unlocking your bootloader, you'll see a warning: You will see this warning until, you relock the bootloader.
Do not relock your bootloader until you have returned the device to Stock..
- Return Phone to Stock
- Backup your data/Internal storage
- Settings > System > Advanced > Reset Options > Erase all data (factory reset)
- Log in
- Set up phone
- Lock Bootloader
- Return the phone to Stock before locking the bootloader, failure to do so could brick your phone
- This will erase all user data from the device!
- Boot fastboot mode
- Open a Command Prompt and type this at the Prompt:
fastboot flashing lock
- You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
- Allow the process to complete, then type this at the Command Prompt:
fastboot reboot
- Enable Developer Options: Settings > About phone > Tap Build number 7 times or until you see 'you are a developer'.
- Tap Back > Developer options and toggle OEM Unlock off.
- Unlock Bootloader
- Install/Update Factory Image keep or wipe data
- Important Note(s):
- When doing a major upgrade i.e., Android 10 (Q) to Android 11 (R): I recommend doing a clean install. What is a clean install?
- Doing a Factory reset prior to installing, major, update.
- Using flash-all.bat file without removing the -w.
- Always verify you have the latest version of SDK Platform-Tools installed on your computer before installing the Factory Image: Pixel 4a 5(G) - bramble.
- If your phone was rooted, and you want to 'Keep Data'. Do this first unhide Magisk App (if you hid it) then Uninstall Magisk prior flashing the Factory image. Why? The changes in the Factory image may cause Magisk modules to fail. This will cause bootloops.
- 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 to one that doesn't have the blue color head.
- Change Computers.
- When doing a major upgrade i.e., Android 10 (Q) to Android 11 (R): I recommend doing a clean install. What is a clean install?
- Backup your data
- Download the latest Factory Image: Pixel 5 - bramble to your Computer.
- Extract the factory Image to a folder.
- Flash Factory Image Keep Data
- Open the folder you extracted the Factory Image to and Edit the flash-all.bat file with a file editor i.e., Notepad. Remove the -w from this command: fastboot -w update image-bramble-aa9a.999999.999.zip
Note: If you do not remove the -w your data and internal storage will be wiped. - After, you have edited the flash-all.bat file. Copy/Move these files to the Platform-tools folder:
- bootloader-bramble-....img
- flash-all.bat
- image-bramble-....zip
- radio-bramble-....img
- Open a Command Prompt on your computer in the Platform-tools and type:
flash-all
at the Command Prompt and press enter. - System will reboot when flashing is complete.
- Do #7 to root/reroot.
- Open the folder you extracted the Factory Image to and Edit the flash-all.bat file with a file editor i.e., Notepad. Remove the -w from this command: fastboot -w update image-bramble-aa9a.999999.999.zip
- Flash Factory Image Wipe Data
- This will wipe your phones Internal Storage.
- Open the folder you extracted the Factory Image to and Copy/Move these files to the Platform-tools folder:
- bootloader-bramble-....img
- flash-all.bat
- image-bramble-....zip
- radio-bramble-....img
- 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.
- Do #7 to root/reroot.
- Important Note(s):
- ADB Sideload
- Stock Recovery
- Custom Recovery TWRP
- Waiting for Android 11 (R) T.W.R.P
- Stock Recovery
- Extract/Flash boot.img
- Extract boot.img
- Download the latest Factory image to your phone.
- Extract the Factory Image file (bramble-r2d1a.999999.999-factory-99a9a99a.zip) to a folder.
- Open the folder and, extract the Image file (image-bramble-aa9a.999999.999.zip) into the 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
- Extract boot.img
- Root/Reroot with Magisk and Pass SafetyNet.
- Important Note(s):
- When doing a major upgrade i.e., Android 10 (Q) to Android 11 (R): I recommend doing a clean install. What is a clean install?
- Doing a Factory reset prior to installing, major, update.
- Using flash-all.bat file without removing the -w.
- Obtaining ROOT using the Magisk App Beta, Canary or Stable to patch the Stock boot.img.
- When doing a major upgrade i.e., Android 10 (Q) to Android 11 (R): I recommend doing a clean install. What is a clean install?
- Download files:
- Magisk App - Download to your phone
- Custom kernels - Download to your phone - install with Kernel Manager
- Important: Unless otherwise directed by Kernel Devloper, Flash the Kernel after Magisk.
- KERNEL ❯ PIXEL 4A 5G ❯ Proton Kernel v1.1
- [KERNEL] CleanSlate
R 1.7.5 |KCal|AdBlock|SafetyNet|FlashLight|S2S|FingPr [11Feb]
- Zest Kernel ꜰᴏʀ ʙʀᴀᴍʙʟᴇ by LazorL0rd
- Kernel Manager - Download to your phone
- Patching the boot.img
- Do #6 - Extract boot.img
- Install Magisk (Beta, Canary or Stable) App
- Open Magisk App
- Depending on the version of Magisk App installed: Set the Update Channel to Beta, Canary or Stable.
- Tap Install (next to Magisk)
- Tap, Select and Patch a File
- Select the boot.img file you extracted from the latest factory image.
- Tap the ✓ (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 the patched boot.img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it.
- 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 Notes: If your phone boot loops try one of the following options:
- Flash the 'stock' boot.img to both slots:
fastboot flash boot boot.img --slot all
- Boot Safe Mode - Press Power Off button ==> Press Power Off until you see boot Safe Mode ==> Press Ok.
- Flash the 'stock' boot.img to both slots:
- Pass SafetyNet: #10 Apps/Mods/Scripts/Tethering/Themes - Other
- Important Note(s):
- Set Magisk App Update Chanel/Update Magisk
- Set Magisk App Update Chanel
- 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 Chanel
- Custom ROMs
- Need help with a Custom ROM?
- First, read and follow the Installation Instructions. The installation instructions are in the OP.
- Second, if you have a problem Installing it, Search the thread of the Custom ROM you are trying to install for a solution to problem: If you don't find a solution post your request for help on the thread.
- ROMs
- Alpha/Beta
- Waiting
- Official
- Unofficial
- Alpha/Beta
- Need help with a Custom ROM?
- Apps/Mods/Scripts/Tethering/Themes
- Tulsadiver's Mods
- Other Mods
- [MODULE] MagiskHide Props Config - SafetyNet, prop edits, and more - v5.3.6 by Didgeridoohan
- MAGISK MODULE ❯ Universal SafetyNet Fix 1.1.0
- Download Universal Safety Fix 1.1.1 from the link above.
- Open Magisk App => tap Modules icon => tap Install from storage => navigate to the file => tap Select.
- When it finishes installing tap Save log => tap Reboot
- Open Magisk App tap Setup icon => enable MagiskHide => tap back arrow => tap Superuser icon => tap MagiskHide => Hide all Google apps => Exit Magisk App => Reboot.
- Open Settings => Apps & Notifications => See all apps => Google Play Store => Stirage & cache => Clear Cache => Clear Storage => Reboot.
- (Module) 2-Button Navigation mode
- Disable left back gesture
- (Substratum) Pixel gesture navbar theme
- Tulsadiver's Mods
- T.W.R.P. Backup/Restore
- Waiting for Android 11 (R) T.W.R.P.
Attachments
-
13.8 KB Views: 7
-
12.4 KB Views: 6
Last edited: