[GUIDE] Pixel 4a (5G) "bramble": Unlock Bootloader, Update, Root, Pass SafetyNet

Search This thread

zubblwump

Member
Dec 29, 2008
42
7
Yea, they said change the port, but wanted $100 to do it. It's not an easy job, so that's not unreasonable, but the phone is probably worth only $200ish , so that seemed like a lot. I've tore down plenty of phones so it was a lot more economical to do it myself.
 

V0latyle

Forum Moderator
Staff member
Yea, they said change the port, but wanted $100 to do it. It's not an easy job, so that's not unreasonable, but the phone is probably worth only $200ish , so that seemed like a lot. I've tore down plenty of phones so it was a lot more economical to do it myself.
Yeah, doing your own repairs is fairly trivial if you're experienced in SMT soldering. A quality soldering station goes a long way, too.
 

proac

Member
Dec 26, 2015
22
9
Google Pixel 4a 5G
After successfully obtaining root and rebooting, open magisk (251), choose to install to an unused slot again and reboot. Is the reboot system in the current slot or an unused slot?
 

V0latyle

Forum Moderator
Staff member
After successfully obtaining root and rebooting, open magisk (251), choose to install to an unused slot again and reboot. Is the reboot system in the current slot or an unused slot?
There are only 2 slots: A and B, and your system is only running on one slot at a time. When you install the automatic OTA, the system downloads and extracts the update package to the alternate slot - meaning if you're on slot B, it installs the update on slot A. This is called an out of band update. When it's ready, it prompts you to reboot, and it will reboot to the updated slot.

If you experience a boot loop, you're most likely back on the old slot.
 

V0latyle

Forum Moderator
Staff member
Announcement:

It appears that the July update has broken out of band update patching on the 765G devices (4a 5g, 5, and 5a).

For the time being, you can either use an alternate update method (factory image, sideload OTA, etc), or you can update and re-root following these instructions (you will temporarily lose root!):
  1. Restore images in Magisk
  2. Download and install the update
  3. When prompted to reboot, do not attempt to patch alternate slot in Magisk; instead, just follow prompt to reboot normally
  4. After system reboots, verify you're on the updated firmware (bottom of notification panel or Settings > About > Build Number)
  5. Allow update to finish (there should be a notification and progress bar in the notification panel)
  6. Reboot to bootloader
  7. Live boot a previously patched Magisk image:
    Code:
    fastboot boot <patched image>
  8. When system boots, open Magisk and perform Direct Install.
 
  • Like
Reactions: proac

proac

Member
Dec 26, 2015
22
9
Google Pixel 4a 5G
Announcement:

It appears that the July update has broken out of band update patching on the 765G devices (4a 5g, 5, and 5a).

For the time being, you can either use an alternate update method (factory image, sideload OTA, etc), or you can update and re-root following these instructions (you will temporarily lose root!):
  1. Restore images in Magisk
  2. Download and install the update
  3. When prompted to reboot, do not attempt to patch alternate slot in Magisk; instead, just follow prompt to reboot normally
  4. After system reboots, verify you're on the updated firmware (bottom of notification panel or Settings > About > Build Number)
  5. Allow update to finish (there should be a notification and progress bar in the notification panel)
  6. Reboot to bootloader
  7. Live boot a previously patched Magisk image:
    Code:
    fastboot boot <patched image>
  8. When system boots, open Magisk and perform Direct Install.
good idea
 

mn1968

Senior Member
Nov 7, 2011
588
158
I have a PIxel 4a 5g . Was rooted on Android 11 and everything was great. Like an idiot I decided to update to Android 12. I used Pixel Flasher and selected to keep data. The process seems to have gone well except now my phone constantly freezes/becomes unresponsive (the screen doesn't register any touch), and then it reboots on its own. WTF?

Any advice how to fix this now? I knew not to do anything...

Thanks!
 

V0latyle

Forum Moderator
Staff member
I have a PIxel 4a 5g . Was rooted on Android 11 and everything was great. Like an idiot I decided to update to Android 12. I used Pixel Flasher and selected to keep data. The process seems to have gone well except now my phone constantly freezes/becomes unresponsive (the screen doesn't register any touch), and then it reboots on its own. WTF?

Any advice how to fix this now? I knew not to do anything...

Thanks!
Updating shouldn't cause this. Do you have Magisk modules installed? I do not know if the factory image is able to cleanly migrate from Android 11 to Android 12 because of the different system settings saved in /data; I would assume that the safest way to upgrade to a newer version of Android would be via OTA, whether automatic or sideload, OR to perform a clean flash of the factory image and start over.
 

mn1968

Senior Member
Nov 7, 2011
588
158
Updating shouldn't cause this. Do you have Magisk modules installed? I do not know if the factory image is able to cleanly migrate from Android 11 to Android 12 because of the different system settings saved in /data; I would assume that the safest way to upgrade to a newer version of Android would be via OTA, whether automatic or sideload, OR to perform a clean flash of the factory image and start over.
First, thantks for quick reply. Yes, modules are installed. I thought since I was on Magisk 25.2 (recommneded 24 or higher) that modules weren't an issue. I have since tried to reflash back to Android 11 but now the phone is stuck in an endless boot...the progress bar scrolling left to right under the Google G. Been going about 15 minutes.

Seeming more like I'll have to reflash from scratch. Yay me! Not!

FWIW, the main reason I tried this is because just a few posts above it was asked if upgrading to A12 with PIxel Flasher was possible and the answer was "yes".

UPDATE - Flashed back to A12 but the phone is still FUBAR. I'm hesitating factory resetting but it may be my only hope.
 
Last edited:

V0latyle

Forum Moderator
Staff member
First, thantks for quick reply. Yes, modules are installed. I thought since I was on Magisk 25.2 (recommneded 24 or higher) that modules weren't an issue. I have since tried to reflash back to Android 11 but now the phone is stuck in an endless boot...the progress bar scrolling left to right under the Google G. Been going about 15 minutes.
What modules did you have installed? I would have recommended that you disable them before updating.

Have you tried flashing the stock boot image (unpatched)?
Seeming more like I'll have to reflash from scratch. Yay me! Not!
Maybe...a clean start isn't a bad idea but shouldn't be necessary.
FWIW, the main reason I tried this is because just a few posts above it was asked if upgrading to A12 with PIxel Flasher was possible and the answer was "yes".

UPDATE - Flashed back to A12 but the phone is still FUBAR. I'm hesitating factory resetting but it may be my only hope.
Again...is everything stock? If you keep flashing a patched boot image then it might be a Magisk module. If everything is stock including the boot image, the problem is something else.

I would try sideloading the latest OTA package. The OTA does some things that the factory package doesn't, so it might be able to get everything running again. Don't bother with the boot image until you get your device running again.
 

mn1968

Senior Member
Nov 7, 2011
588
158
Maybe...a clean start isn't a bad idea but shouldn't be necessary.
Everything was/is stock. I wound up factory resetting and the phone is now functional. Luckily I transferred my TBU backups and all other data to the PC before doing anything. Now it's a just a matter of reinstalling and configuring everything how I like it. That's the worst part of it all, to me.

Thanks for the assistance, though.
 
  • Like
Reactions: V0latyle

V0latyle

Forum Moderator
Staff member
Everything was/is stock. I wound up factory resetting and the phone is now functional. Luckily I transferred my TBU backups and all other data to the PC before doing anything. Now it's a just a matter of reinstalling and configuring everything how I like it. That's the worst part of it all, to me.

Thanks for the assistance, though.
Sorry you had to wipe.
 

theistus

Senior Member
Mar 27, 2010
370
123
Anyone having issues taking the android 13 update? I have tried twice, uninstalling magisk and modules, taking the update, applying magisk to inactive slot, and both time it has tried to boot the the new slot, fialed, then fallen back to the (now unrooted) android 12 slot.

About to give up and just download the full update, patch it, and update from ADB.
 

V0latyle

Forum Moderator
Staff member
Anyone having issues taking the android 13 update? I have tried twice, uninstalling magisk and modules, taking the update, applying magisk to inactive slot, and both time it has tried to boot the the new slot, fialed, then fallen back to the (now unrooted) android 12 slot.

About to give up and just download the full update, patch it, and update from ADB.
Patching inactive slot has been hit and miss. Try using Pixel Flasher.
 
Sep 20, 2022
11
0
hELP! I Just unlocked the bootloader without checking my build number... will any random android 13 rom work since thats what version i had??? :cry:
apparently i need an Android 12 base to slap the NETHUNTER kernel on right f*&$ing MeOWWW!
:eek:

Well, i'm worried for sum reason that my update version isnt the curentest for some illogical reason... certaily it's gotta be the latest build offered,,, :3????

...IF i am on android 13 after updating my used unlocked 4a 5G can i still flash magisk after installing bootloader tho????? or did i fux0r up already? lol :(

...cuz the guide only mentions 12 to begin with for sum reason......

and OMG y is the xda discord so ded
 
Last edited:

V0latyle

Forum Moderator
Staff member
hELP! I Just unlocked the bootloader without checking my build number... will any random android 13 rom work since thats what version i had??? :cry:
apparently i need an Android 12 base to slap the NETHUNTER kernel on right f*&$ing MeOWWW!
:eek:

Well, i'm worried for sum reason that my update version isnt the curentest for some illogical reason... certaily it's gotta be the latest build offered,,, :3????

...IF i am on android 13 after updating my used unlocked 4a 5G can i still flash magisk after installing bootloader tho????? or did i fux0r up already? lol :(

...cuz the guide only mentions 12 to begin with for sum reason......

and OMG y is the xda discord so ded
I would recommend you try to keep your posts professional and concise on XDA. That was pretty hard to read.

Rooting Android 13 works exactly the same way as Android 12.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Anyone having issues taking the android 13 update? I have tried twice, uninstalling magisk and modules, taking the update, applying magisk to inactive slot, and both time it has tried to boot the the new slot, fialed, then fallen back to the (now unrooted) android 12 slot.

    About to give up and just download the full update, patch it, and update from ADB.
    Patching inactive slot has been hit and miss. Try using Pixel Flasher.
    2
    hELP! I Just unlocked the bootloader without checking my build number... will any random android 13 rom work since thats what version i had??? :cry:
    apparently i need an Android 12 base to slap the NETHUNTER kernel on right f*&$ing MeOWWW!
    :eek:

    Well, i'm worried for sum reason that my update version isnt the curentest for some illogical reason... certaily it's gotta be the latest build offered,,, :3????

    ...IF i am on android 13 after updating my used unlocked 4a 5G can i still flash magisk after installing bootloader tho????? or did i fux0r up already? lol :(

    ...cuz the guide only mentions 12 to begin with for sum reason......

    and OMG y is the xda discord so ded
    I would recommend you try to keep your posts professional and concise on XDA. That was pretty hard to read.

    Rooting Android 13 works exactly the same way as Android 12.
    1
    I cant install root and twrp between using platform tools on Mac and Windows. I already patched the factory boot image with magisk. Transfered file to platform tools folder and have phone in fastboot mode.
    Since we can directly flash partitions on the Pixel, and because we can patch the boot image with Magisk, there's no need to use TWRP.

    All you should have to do now is flash the patched boot image to /boot by following the instructions in the OP.

    If you have a problem while following the instructions, I will be glad to assist. If on the other hand you aren't following the instructions and run into problems, you are on your own.
    1
    I was able to root it by using command fastboot flash boot changing the command and name to master root img from magisk name.

    I was able to install a debloater magisk module app this is only way im able to remove system apps.

    Is there an alternative recovery I can use for this phone?
    I want to be able to backup and restore my device as needed. As my main phone S20+ its rooted with twrp on A12.
    Pixel devices do not have a bespoke recovery partition; recovery lives in the boot image. Personally I've never found any use for TWRP on a Pixel. There is no official recovery for the Bramble, although there is at least one unofficial TWRP project. In my experience, TWRP and Magisk do not work together, since both patch the boot image, so while you can live boot the TWRP image, attempting to install TWRP results in a bootloop.
    Also i'm finding it lags while streaming. Is this because of the ram useage?
    Could be, I don't know.
  • 11
    If you are looking for my guide on a different Pixel, find it here:
    Update 6-20-22: Magisk 25.1 is recommended as this includes fixes for OTA updates.
    Discussion thread for migration to 24.0+.

    DO NOT use any version of Magisk lower than Canary 23016 as it does not yet incorporate the necessary fixes for Android 12 and your device.


    WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.

    Prerequisites:


    Android Source - Setting up a device for development


    1. Follow these instructions to enable Developer Options and USB Debugging.
    2. Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
    3. Connect your device to your PC, and open a command window in your Platform Tools folder.
    4. Ensure ADB sees your device:
      Code:
      adb devices
      If you don't see a device, make sure USB Debugging is enabled, reconnect the USB cable, or try a different USB cable.
      If you see "unauthorized", you need to authorize the connection on your device.
      If you see the device without "unauthorized", you're good to go.
    5. Reboot to bootloader:
      Code:
      adb reboot bootloader
    6. Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
      Code:
      fastboot flashing unlock
      Select Continue on the device screen.

    1. Install Magisk on your device.
    2. Download the factory zip for your build.
    3. Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
    4. Copy boot.img to your device.
    5. Patch boot.img with Magisk: "Install" > "Select and Patch a File"
    6. Copy the patched image back to your PC. It will be named "magisk_patched-23xxx_xxxxx.img". Rename this to "master root.img" and retain it for future updates.
    7. Reboot your device to bootloader.
    8. Flash the patched image:
      Code:
      fastboot flash boot <drag and drop master root.img here>
    9. Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>

    1. Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
    2. Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
    3. Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
    4. You should now be updated with root.

    1. Download the OTA.
    2. Reboot to recovery and sideload the OTA:
      Code:
      adb reboot sideload
      Once in recovery:
      Code:
      adb sideload ota.zip
    3. When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
    4. Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
    5. Reboot to bootloader.
    6. Boot the master root image (See note 1):
      Code:
      fastboot boot <drag and drop master root.img here>
      Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
    7. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    8. Reboot your device. You should now be updated with root.
    Note: You can use Payload Dumper to extract the contents of the OTA if you want to manually patch the new boot image. However, I will not cover that in this guide.

    Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
    1. Download the factory zip and extract the contents.
    2. Reboot to bootloader.
    3. Compare bootloader versions between phone screen and bootloader.img build number
      Code:
      fastboot flash bootloader <drag and drop new bootloader.img here>
      If bootloader is updated, reboot to bootloader.
    4. Compare baseband versions between phone screen and radio.img build number
      Code:
      fastboot flash radio <drag and drop radio.img here>
      If radio is updated, reboot to bootloader.
    5. Apply update:
      Code:
      fastboot update --skip-reboot image-codename-buildnumber.zip
      When the update completes, the device will be in fastbootd. Reboot to bootloader.
    6. Boot the master root image (See note 1):
      Code:
      fastboot boot <drag and drop master root.img here>
      Note: If you prefer, you can manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
    7. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    8. Reboot your device. You should now be updated with root.
    Note: If you prefer, you can update using the flash-all script included in the factory zip. You will have to copy the script, bootloader image, radio image, and update zip into the Platform Tools folder; you will then have to edit the script to remove the -w option so it doesn't wipe your device.
    The scripted commands should look like this:
    Code:
    fastboot flash bootloader <bootloader image name>
    fastboot reboot bootloader
    ping -n 5 127.0.0.1 > nul
    fastboot flash radio <radio image name>
    fastboot reboot bootloader
    ping -n 5 127.0.0.1 > nul
    fastboot update  --skip-reboot --slot=all <image-device-buildnumber.zip>
    Once this completes, you can reboot to bootloader and either boot your master patched image, or if you patched the new image, flash it at this time.

    PixelFlasher by @badabing2003 is an excellent tool that streamlines the update process - it even patches the boot image for you.
    The application essentially automates the ADB interface to make updating and rooting much easier. However, it is STRONGLY recommended that you still learn the "basics" of using ADB.

    For instructions, downloads, and support, please refer to the PixelFlasher thread.

    1. Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
    2. When the update completes, the device will be in fastbootd. Reboot to bootloader.
    3. Boot the master root image (See note 1):
      Code:
      fastboot boot <drag and drop master root.img here>
      Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
    4. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    5. Reboot your device. You should now be updated with root.

    Please note that the SafetyNet API has been deprecated for the Play Integrity API. Because Play Integrity relies on Hardware Key Attestation for the MEETS_STRONG_INTEGRITY evaluationType, it is not possible, nor will it ever be, to pass Play Integrity on a modified system with an unlocked bootloader. More information here.

    However, @Displax has modified the original Universal SafetyNet Fix by kdrag0n; his mod forces the "old" SafetyNet attestation, as if your device were running a version of Android older than 8.0.

    Mod available here. Do not use MagiskHide Props Config with this mod.

    Please note that this is a temporary solution; any apps that remove legacy support for SafetyNet will not benefit from this; the only reason this hasn't already happened is because doing so would prevent anyone using legacy Android versions older than 8.0 from using said apps.

    This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.

    Zygisk + DenyList enabled
    All subcomponents of these apps hidden under DenyList:
    • Google Play Store
    • GPay
    • Any banking/financial apps
    • Any DRM media apps
    Modules:
    • Universal SafetyNet Fix 2.3.1 Mod - XDA post
    To check SafetyNet status:
    To check Play Integrity status:
    I do not provide support for Magisk or modules. If you need help with Magisk, here is the Magisk General Support thread. For support specifically with Magisk v24+, see this thread.

    Points of note:
    • The boot image is NOT the bootloader image. Do not confuse the two - YOU are expected to know the difference. Flashing the wrong image to bootloader could brick your device.
    • While the Magisk app is used for patching the boot image, the app and the patch are separate. This is what you should see in Magisk for functioning root:
      screenshot_20211218-194517-png.5486339
    • "Installed" shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.
    • "App" simply shows the version of the app itself.
    • If you do not have a patched master boot image, you will need to download the factory zip if you haven't already, extract the system update inside it, then patch boot.img.
    • If you prefer updating with the factory image, you can also extract and manually patch the boot image if desired.
    • Some Magisk modules, especially those that modify read only partitions like /system, may cause a boot loop after updating. As a general rule, disable these modules before updating. You are responsible for knowing what you have installed, and what modules to disable.


    Credits:
    Thanks to @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
    2
    Yea, they said change the port, but wanted $100 to do it. It's not an easy job, so that's not unreasonable, but the phone is probably worth only $200ish , so that seemed like a lot. I've tore down plenty of phones so it was a lot more economical to do it myself.
    2
    Magisk Stable is now at version 24.1, so I will no longer be providing any Magisk updates.

    You can use any version of Magisk now - Stable, Beta, or Canary. as long as it is 23016 or newer.

    Once again, if you want to switch versions of Maagisk, it is HIGHLY RECOMMENDED that you "Complete Uninstall" within Magisk before installing the new version. Multiple instances of Magisk can break root.

    If you simply want to update Magisk, the best way to do so is from within the app.


    Once the February update is out, I will perform some testing with installing to inactive slot, and if it works, I will update this guide.

    Given the low activity on this thread, I will probably close it if everything goes well with the next update.

    Thank you all for your testing and contributions.
    2
    Anyone having issues taking the android 13 update? I have tried twice, uninstalling magisk and modules, taking the update, applying magisk to inactive slot, and both time it has tried to boot the the new slot, fialed, then fallen back to the (now unrooted) android 12 slot.

    About to give up and just download the full update, patch it, and update from ADB.
    Patching inactive slot has been hit and miss. Try using Pixel Flasher.
    2
    Magisk Canary was updated to 23016 last night. This includes a fix for the vbmeta header issue, meaning that disabling verity/verification should no longer be required, and we should be able to root as we did before.
    So I did upgrading from latest 11 to latest 12 some minutes ago. Booted, patched boot.img with magisk 23016 and flashed the patched image to get back root. Worked like a charm just like any update before. So no more wipe needed.

    So, it's time for the good old pal Stinky Wizzleteats and his song about being happy. That's right, it's the happy, happy, joy, joy song:
    Happy, happy, joy, joy
    Happy, happy, joy, joy
    Happy, happy, joy, joy
    Happy, happy, joy, joy
    Happy, happy, joy, joy
    Happy, happy, joy, joy

    ┌(・。・)┘♪