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

Search This thread

yekrut

Member
Mar 24, 2022
7
1
@Volatyle I may have taken these words out of context but is there any way I can donate to you?

I want to thank everyone who has given me advice or taken the time to read my posts. I was able to put A11 back on my phone and root, then finally found the right Magisk module to restore the cell network access to my phone. And it only took 5hours from a to z :p

Now that I'm back on A11 is there any way to block or disable the system update from appearing? I never want to update my phone again because I'll lose connectivity again.
 

V0latyle

Forum Moderator
Staff member
@Volatyle I may have taken these words out of context but is there any way I can donate to you?
While I absolutely appreciate your support, everything I do here, including my moderator duties, is strictly volunteer only.
I want to thank everyone who has given me advice or taken the time to read my posts. I was able to put A11 back on my phone and root, then finally found the right Magisk module to restore the cell network access to my phone. And it only took 5hours from a to z :p
Glad you're up and running.
Now that I'm back on A11 is there any way to block or disable the system update from appearing? I never want to update my phone again because I'll lose connectivity again.
That's the million dollar question for a lot of folks. The only thing I can suggest is disable Automatic System Updates in Developer Options.
 

zubblwump

Member
Dec 29, 2008
42
7
Does the "Update and Root Automatic OTA" method still work? I don't have a "Download and Install" option, only a "Restart now" button, so I can't install to inactive slot after update but before reboot. I'm not sure if this is something new with the OTAs, or if it's something else.
 

V0latyle

Forum Moderator
Staff member
Does the "Update and Root Automatic OTA" method still work? I don't have a "Download and Install" option, only a "Restart now" button, so I can't install to inactive slot after update but before reboot. I'm not sure if this is something new with the OTAs, or if it's something else.
The OTA has caused a lot of problems so if you can manage the factory image, use that.

However, you should be able to install to inactive slot which will then reboot to the updated slot.
 

zubblwump

Member
Dec 29, 2008
42
7
The OTA has caused a lot of problems so if you can manage the factory image, use that.

However, you should be able to install to inactive slot which will then reboot to the updated slot.
That's my concern, though. I'm sure I never told it to install. I did restore stock boot image but then when I went to the OTA update, it was already at the "restart now". So I went back to Magisk and reinstalled because I didn't want to lose root. Would it auto install as soon as I removed root?
 

V0latyle

Forum Moderator
Staff member
That's my concern, though. I'm sure I never told it to install. I did restore stock boot image but then when I went to the OTA update, it was already at the "restart now". So I went back to Magisk and reinstalled because I didn't want to lose root. Would it auto install as soon as I removed root?
You might have automatic updates enabled in Developer Options. When you get the restart prompt, all you need to do is go into Magisk and perform Install to Inactive slot. Magisk will then reboot your device into the updated slot with root.
 

zubblwump

Member
Dec 29, 2008
42
7
You might have automatic updates enabled in Developer Options. When you get the restart prompt, all you need to do is go into Magisk and perform Install to Inactive slot. Magisk will then reboot your device into the updated slot with root.
I definitely don't have auto updates enabled. I ended up restarting, and lost root. Worse is I also lost adb/fastboot to root with PC. I've tried 3 different PCs and multiple cables, and the PC doesn't show anything connected. The phone screen flashes and the phone starts charging, but USB preferences notification does not show to change to data transfer mode. I can manually open USB preferences, but all options are grayed out. Changing default USB mode doesn't do anything. It's like it's attached to a charger, not a PC. I even did a factory reset and it's still not recognized. without PC connections, is there anything I can do to regain root at this point? Incidentally, the April update notification showed up a couple weeks ago, and I ignored it over and over again, hoping I could still somehow boot to the inactive slot (which still should have root). Today the update notification changed to "reboot to finish installing the update" again, so I assume that slot has now been overwritten too.
 

V0latyle

Forum Moderator
Staff member
I definitely don't have auto updates enabled. I ended up restarting, and lost root. Worse is I also lost adb/fastboot to root with PC. I've tried 3 different PCs and multiple cables, and the PC doesn't show anything connected. The phone screen flashes and the phone starts charging, but USB preferences notification does not show to change to data transfer mode. I can manually open USB preferences, but all options are grayed out. Changing default USB mode doesn't do anything. It's like it's attached to a charger, not a PC. I even did a factory reset and it's still not recognized. without PC connections, is there anything I can do to regain root at this point? Incidentally, the April update notification showed up a couple weeks ago, and I ignored it over and over again, hoping I could still somehow boot to the inactive slot (which still should have root). Today the update notification changed to "reboot to finish installing the update" again, so I assume that slot has now been overwritten too.
Make sure the USB port isn't clogged with debris. Use a dental pick or something to clean it out. Failing that, the port is probably bad.

This is all assuming USB debugging didn't somehow get turned off.
 

zubblwump

Member
Dec 29, 2008
42
7
Make sure the USB port isn't clogged with debris. Use a dental pick or something to clean it out. Failing that, the port is probably bad.

This is all assuming USB debugging didn't somehow get turned off.
Debugging is still on. I've tried to clean out the port, but there is nothing in there. I'm afraid it might be a bad port too, but that seems so weird; it worked for adb/fastboot just a couple months ago when I first rooted and it still charges just fine.
 

V0latyle

Forum Moderator
Staff member
Debugging is still on. I've tried to clean out the port, but there is nothing in there. I'm afraid it might be a bad port too, but that seems so weird; it worked for adb/fastboot just a couple months ago when I first rooted and it still charges just fine.
Sorry, I didn't see this.

I agree that it's likely the USB port on the device. Are you able to see the device in fastboot when connected?
 

zubblwump

Member
Dec 29, 2008
42
7
Well, I'll know soon enough. I'm planning to replace the port tomorrow. Just hope I don't crack the glass or mess up the digitizer taking it apart.
 
  • Like
Reactions: V0latyle

zubblwump

Member
Dec 29, 2008
42
7
Did you have any luck?
Only the bad kind. I disassembled the screen successfully without breaking it, then proceeded to tear it down to the port. It's a lengthy process, but I got there, replaced the port and reassembled. Phone did not recognize a USB cable inserted, even for charging, and displayed a message that the port was not functioning and to remove the cord. So I tore it all down again just in case and very carefully made sure the port was connected correctly and reassembled. Same error. Tore down a third time, replaced with original port, and now it's functioning just like before:. Charges fine, but data connection not recognized. Returned the defective port and debating if I want to order another from somebody else or just leave it alone.
 

V0latyle

Forum Moderator
Staff member
Only the bad kind. I disassembled the screen successfully without breaking it, then proceeded to tear it down to the port. It's a lengthy process, but I got there, replaced the port and reassembled. Phone did not recognize a USB cable inserted, even for charging, and displayed a message that the port was not functioning and to remove the cord. So I tore it all down again just in case and very carefully made sure the port was connected correctly and reassembled. Same error. Tore down a third time, replaced with original port, and now it's functioning just like before:. Charges fine, but data connection not recognized. Returned the defective port and debating if I want to order another from somebody else or just leave it alone.
Where did you get the port from? Sounds like a bad component. Try a new supplier?
 

zubblwump

Member
Dec 29, 2008
42
7
It was through a place on Amazon, so the return was easy at least. Part came rattling around in a box. There was bubble wrap but it wasn't around the part. No antistatic bag either. I'm sure it was defective. Yea, may try someplace else but needed a break from it
 
  • Like
Reactions: V0latyle

Homeboy76

Senior Member
Aug 24, 2012
3,213
1,765
Google Pixel XL
It was through a place on Amazon, so the return was easy at least. Part came rattling around in a box. There was bubble wrap but it wasn't around the part. No antistatic bag either. I'm sure it was defective. Yea, may try someplace else but needed a break from it
Have you given any thought to taking it to a repair shop and have them acertain what is needed to fix the USB Port on your phone?
ubreakifix
BatteriesPlus+
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    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.

    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.

    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:
    To check SafetyNet 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
    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

    ┌(・。・)┘♪
    1
    DO NOT take the automatic OTA if you are rooted.

    Well, that explains why I haven't been able to update boot with my patched file.

    First I've heard of it and not sure I'm ready to wipe everything and start over.

    Sucks to be an early adopter.

    Thanks for the post.