[Guide] Pixel 4 XL (Unlocked from Google Store) - Root and Bootloader Unlocking

Search This thread

Jake81345

Member
Oct 23, 2020
14
2
Redmi K20 / Xiaomi Mi 9T
Not knowing how you got out of your bootloop or what caused your bootloop in the first place, in my opinion it would be a good idea to either factory reset or fastboot flash the latest factory image so you can start fresh (back up any files you need to save first). After doing that you shouldn't have to specify which slot, it should flash the patched boot image to the slot you are on automatically.

Since the Beta Magisk was updated yesterday to 21.2 make sure you when you enter the command "fastboot flash boot <name> that you use the name of the patched boot image. When I updated yesterday the name of the patched boot image found in the downloads folder after patching changed from "magisk_patched.img" to "magisk_patched_aE2Jx.img". So double check to make sure you use the actual name of whatever you ended up with. Not sure if this was this case for others who updated.

So for instance, yesterday I had to use the command "fastboot flash boot magisk_patched_aE2Jx.img" (without the quotes).

EDIT: Apparently their was a commit added to Beta 21.2 where the name of the patched boot image will change every time you patch your stock boot image.

All is done and everything went perfectly that time, I appreciate it man. I'm thinking I wasn't properly updated before. either way Hell Yea!!
 
  • Like
Reactions: Lughnasadh

Lughnasadh

Senior Member
Mar 23, 2015
2,001
1,298
Google Nexus 5
LG Nexus 5X
One last question. Is there anything special I need to do now when system updates come in?
My preferred method for updating is as follows:

1. Turn off "Automatic system updates" in Developer options
2. Disable all Magisk Mods and Substratum overlays
3. Fastboot flash the new factory image with the -w removed from the flash-all.bat file to keep data
4.Patch the new stock boot image with Magisk
5. Fastboot flash the patched boot image

Here is a good guide: https://forum.xda-developers.com/t/guide-root-pixel-4-xl-android-11-r.4160441/
 
  • Like
Reactions: ginfest

Lughnasadh

Senior Member
Mar 23, 2015
2,001
1,298
Google Nexus 5
LG Nexus 5X
I have lost GooglePay yesterday. Does anyone knows or have experienced the same? I have tried to do same thing which helped me first time after rooting the phone, but none of the settings are changed. :rolleyes:
Check over in the new safetynet fix thread. Google made some server-side changes the other day and you probably need to flash the safetynet fix mod as well as clearing cache/data from Google Pay and Google Play Services. https://forum.xda-developers.com/t/magisk-module-universal-safetynet-fix-1-1-0.4217823/
 
  • Like
Reactions: 100kaa

madmartian

Senior Member
Nov 18, 2007
127
20
First time I went through the process last year it worked great. But I forgot to turn off automatic updates. No biggy, I thought, I'll just patch the boot img of the new version and I'll be back to working. Nope. I get the "G" screen with endless loading animation. I have tried both of the following commands (on different tries):

fastboot flash boot magisk_patched.img
fastboot flash boot --slot all magisk_patched.img

Same endless load screen either way. I know I am using the correct boot img and when I flash the phone with the unpatched boot img to get my phone working again, it boots just fine. I still get the warning message on boot that my bootloader is unlocked so I know my bootloader is still unlocked.

Note that I also tried removing magisk modules via adb as some people advised:

adb wait-for-device shell magisk --remove-modules

Sadly, that stops the phone from booting entirely (keeps booting back to bootloader) and I have to reflash the patched module. Which then gets stuck on the G screen as usual.

Any idea what I can do to get root working again? I definitely have the latest Canary build of Magisk, loaded just yesterday. Stock ROM I am working with is 11.0.0 (RQ1A.210105.003, Jan 2021). I've been rooting and playing with custom ROMs for more than a decade and this is the first time I've been stumped.
 
Last edited:

Lughnasadh

Senior Member
Mar 23, 2015
2,001
1,298
Google Nexus 5
LG Nexus 5X
First time I went through the process last year it worked great. But I forgot to turn off automatic updates. No biggy, I thought, I'll just patch the boot img of the new version and I'll be back to working. Nope. I get the "G" screen with endless loading animation. I have tried both of the following commands (on different tries):

fastboot flash boot magisk_patched.img
fastboot flash boot --slot all magisk_patched.img

Same endless load screen either way. I know I am using the correct boot img and when I flash the phone with the unpatched boot img to get my phone working again, it boots just fine. I still get the warning message on boot that my bootloader is unlocked so I know my bootloader is still unlocked.

Note that I also tried removing magisk modules via adb as some people advised:

adb wait-for-device shell magisk --remove-modules

Sadly, that stops the phone from booting entirely (keeps booting back to bootloader) and I have to reflash the patched module. Which then gets stuck on the G screen as usual.

Any idea what I can do to get root working again? I definitely have the latest Canary build of Magisk, loaded just yesterday. Stock ROM I am working with is 11.0.0 (RQ1A.210105.003, Jan 2021). I've been rooting and playing with custom ROMs for more than a decade and this is the first time I've been stumped.
Recently someone had a similar problem and solved it by using PowerShell instead of Command prompt. Worth a try. Also, they mentioned they ran it either as administrator or not as administrator (can't remember which one), so may be worth trying it both ways as well.

EDIT: Additionally, make sure your Platform Tools are up-to-date. If the above doesn't work may have to try fastboot flashing the factory image or doing a factory reset and then trying again.

EDIT 2: Are you using the new name of the patched boot image in the command instead of magisk_patched.img ? There is now a suffix added.
 
Last edited:

madmartian

Senior Member
Nov 18, 2007
127
20
Recently someone had a similar problem and solved it by using PowerShell instead of Command prompt. Worth a try. Also, they mentioned they ran it either as administrator or not as administrator (can't remember which one), so may be worth trying it both ways as well.

EDIT: Additionally, make sure your Platform Tools are up-to-date. If the above doesn't work may have to try fastboot flashing the factory image or doing a factory reset and then trying again.

EDIT 2: Are you using the new name of the patched boot image in the command instead of magisk_patched.img ? There is now a suffix added.

Yes, I am using the full name with the suffix. Just left it off the post for simplicity. Platform tools are the latest. Culprit is likely allowing the factory update to happen without first clearing all the modules. I will try Powershell with the module removal command and see if it makes a difference. The problem with starting over with a clean wipe is I can't use Titanium Backup until it's rooted again. :)
 

madmartian

Senior Member
Nov 18, 2007
127
20
First time I went through the process last year it worked great. But I forgot to turn off automatic updates. No biggy, I thought, I'll just patch the boot img of the new version and I'll be back to working. Nope. I get the "G" screen with endless loading animation. I have tried both of the following commands (on different tries):

fastboot flash boot magisk_patched.img
fastboot flash boot --slot all magisk_patched.img

Same endless load screen either way. I know I am using the correct boot img and when I flash the phone with the unpatched boot img to get my phone working again, it boots just fine. I still get the warning message on boot that my bootloader is unlocked so I know my bootloader is still unlocked.

Note that I also tried removing magisk modules via adb as some people advised:

adb wait-for-device shell magisk --remove-modules

Sadly, that stops the phone from booting entirely (keeps booting back to bootloader) and I have to reflash the patched module. Which then gets stuck on the G screen as usual.

Any idea what I can do to get root working again? I definitely have the latest Canary build of Magisk, loaded just yesterday. Stock ROM I am working with is 11.0.0 (RQ1A.210105.003, Jan 2021). I've been rooting and playing with custom ROMs for more than a decade and this is the first time I've been stumped.

I FIXED IT!!!

So the command "adb wait-for-device shell magisk --remove-modules" continued to cause the same problem, even after the February update and a new version of Magisk Manager. I read something about booting in safe mode automatically telling Magisk to disable all modules AND THAT WORKED!!!

So, once you experience the module-induced boot freeze at the G screen, do the following:
  1. Hold the power button until the screen blacks
  2. If it reboots into fastboot, boot again. If you can't get out of fastboot, flash the magisk patched file again and reboot
  3. As soon as the Google logo appears, press and hold Volume Down. Keep it pressed until the "safe mode" logo appears in the lower left.
  4. Wait for boot to finish. Give it an extra minute to be sure. Now reboot.
  5. This time it will boot normally. Turn off airplane mode!
  6. Run Magisk Manager and you will see all modules have been disabled.
  7. Make sure you have the latest version of each module.
  8. Enable one at a time and reboot until booting hangs again.
  9. You have found the module causing the problem,. Repeat the safemode thing and remove the bad module.
  10. Yippee! Problem solved! Root works again!
 
Last edited:

mattwheat

Senior Member
Oct 25, 2012
1,143
581
BIRMINGHAM
my bootloader is unlocked but im still getting this

target reported max download size of 268435456 bytes
sending 'boot' (65536 KB)...
OKAY [ 1.491s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 1.570s

why
 

mattwheat

Senior Member
Oct 25, 2012
1,143
581
BIRMINGHAM
my bootloader is unlocked but im still getting this

target reported max download size of 268435456 bytes
sending 'boot' (65536 KB)...
OKAY [ 1.491s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 1.570s

why
Ive extracted the boot.img from the exact build that my phone is on. I transfered it to my phone from my pc. Then opened Magisk and patched it. Then transfered back to my pc. Then did the
"fastboot flash boot magiskpatchedboot.img"

I didn't actually type magiskpatchedboot.img. I typed the name that Magisk named it after it patched it.

But I keep getting an error failed to write to remote to partition. Not found.

Any help would be greatly appreciated.
 

madmuthertrucker

Senior Member
Jan 4, 2013
175
63
Tucson, Az
Ive extracted the boot.img from the exact build that my phone is on. I transfered it to my phone from my pc. Then opened Magisk and patched it. Then transfered back to my pc. Then did the
"fastboot flash boot magiskpatchedboot.img"

I didn't actually type magiskpatchedboot.img. I typed the name that Magisk named it after it patched it.

But I keep getting an error failed to write to remote to partition. Not found.

Any help would be greatly appreciated.
Some of these guys know a lot more than me. Are you on canary version? I would flash stock boot.img to both slots then come back and try again. I say that because that is all that I know to try. But it's worth a shot.

fastboot flash boot boot.img --slot all
 
Last edited:

Lughnasadh

Senior Member
Mar 23, 2015
2,001
1,298
Google Nexus 5
LG Nexus 5X
Ive extracted the boot.img from the exact build that my phone is on. I transfered it to my phone from my pc. Then opened Magisk and patched it. Then transfered back to my pc. Then did the
"fastboot flash boot magiskpatchedboot.img"

I didn't actually type magiskpatchedboot.img. I typed the name that Magisk named it after it patched it.

But I keep getting an error failed to write to remote to partition. Not found.

Any help would be greatly appreciated.
First thing would be to make sure your platform tools are up-to-date.
 

mattwheat

Senior Member
Oct 25, 2012
1,143
581
BIRMINGHAM
Some of these guys know a lot more than me. Are you on canary version? I would flash stock boot.img to both slots then come back and try again. I say that because that is all that I know to try. But it's worth a shot.

fastboot flash boot boot.img --slot all
Yeah I didn't have the correct rooted boot.img. I still had an older patched version on my phone from when I rooted a while back. And was pulling that one from my phone to flash thru adb. I had to just clean up my inventory from all the old stuff and start over to ensure I was using all the up to date recently patched .img's. Thanks for the replies.
 

madmuthertrucker

Senior Member
Jan 4, 2013
175
63
Tucson, Az
Yeah I didn't have the correct rooted boot.img. I still had an older patched version on my phone from when I rooted a while back. And was pulling that one from my phone to flash thru adb. I had to just clean up my inventory from all the old stuff and start over to ensure I was using all the up to date recently patched .img's. Thanks for the replies.
I clear out all my old factory images and patched files before I start so I don't get mixed up. Glad you got it straightened out.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    Anyone root the Pixel 4 XL from Google Play store yet?

    Can the Pixel 3 XL Android 10 root method be used for Pixel 4 XL Android 10 root?

    *Update2 (10/24/2019 6:00PM): Factory Images have been released! :)
    They are available at below links. Multiple users say they have root working now.

    *Note: Multiple images are listed. For my Pixel 4 XL 128GB purchased directly from Google Play store, the image is the first one "10.0.0 (QD1A.190821.007, Oct 2019)". You can verify in "Settings" >> "About Phone"... near bottom you will see "Build Number"
    1. Factory: https://developers.google.com/android/images#coral
    2. OTA: https://developers.google.com/android/ota#coral

    According to @Samg381 the method to gain root is to follow the guide outlined here: https://topjohnwu.github.io/Magisk/install.html#boot-image-patching
    Below are steps I personally followed:
    1. Download latest Magisk Manager - https://github.com/topjohnwu/Magisk/releases/download/manager-v7.3.5/MagiskManager-v7.3.5.apk
    2. Install Magisk manager on my Pixel 4 XL
    3. Download latest factory image with build number that matches my phone's version from this URL: https://developers.google.com/android/images#coral
    4. Extract the zip file contents
    5. You will see one more zip file, extract those contents
    6. Copy the boot.img file to your phone (you can plugin USB to your PC and put it in your "Downloads" folder
    7. Open Magisk Manager, click "Advanced" >> "Recovery Mode"
    8. Click the top "Install" button
    9. When prompted click Install again, then "Select and Patch a file" >> Select the boot.img file you copied to your pixel 4 xl earlier.
    10. it will create a new file "/storage/emulated/0/Download/magisk_patched.img"
    11. Plugin your phone to your PC again via USB, copy this new file in same folder as your adb sdk files.
    12. open cmd prompt type:
    13. adb devices
    14. *Note: unlock your phone and approve ADB access if prompted
    15. adb reboot bootloader
    16. fastboot devices
    17. fastboot flash boot magisk_patched.img
    18. If it works you should get somthing like
      fastboot flash boot magisk_patched.img
      target reported max download size of 268435456 bytes
      sending 'boot_a' (32092 KB)...
      OKAY [ 1.167s]
      writing 'boot_a'...
      OKAY [ 0.325s]
      finished. total time: 1.494s
    19. Reboot your phone, open Magisk manager again, and verify it shows you now have root! :)


    I would recommend everyone who plans to root unlock their bootloader NOW as it does wipe your data just like other Pixel phones have when unlocking bootloader... I already unlocked my bootloader.

    FYI, the process to unlock Pixel 4 XL bootloader is easy:
    1. Boot Pixel 4 XL, go through initial setup guide (do not bother adding account as you will wipe data shortly)
    2. "Settings" >> "About Phone" >> Tap "build number" about 10 times till "You are a developer"
    3. "Settings" >> "System" >> "Advanced" >> "Developer Options"
    4. Check "OEM unlocking"
    5. If "OEM Unlocking" is greyed out, either "Bootloader is already unlocked", or you need to do factory reset, then go through steps 1-4 again. On my phone I had to wipe data once, then OEM Unlock
    6. Check "USB Debugging"
    7. Connect Pixel 4 XL to your PC with SDK tools installed
    8. adb devices
    9. unlock your Pixel 4 XL... you will see a prompt asking for ADB permissions, say yes
    10. adb reboot bootloader
    11. fastboot devices
    12. fastboot flashing unlock
    13. Pixel 4 XL will now ask if you want to unlock bootloader, press volume up or down once... then power button once to confirm. WARNING it will wipe all your data...
    8
    Lol, must be a noob

    ---------- Post added at 02:09 AM ---------- Previous post was at 02:08 AM ----------

    Looks like the process is fairly straightforward for this device as well. about as easy as any other unlocked device, I would say

    Be humble.
    4
    Yeah, I saw that also. So we should wait to sideload OTA? I'm less familiar with the scene and how fast these things develop.

    Keep checking the Google Factory Images page. The Pixel 4 should be listed in a day or so.
    When Pixel 4 images become available, check John Wu's Twitter and the Magisk forum.
    When John or a trusted user confirms Magisk as working for the Pixel 4, you can follow the Magisk boot image Installation Method.
    In the meantime, make sure your bootloader is unlocked, and you have a PC with ADB/Fastboot prepared once Magisk is ready.
    3
    No luck unlocking my Verizon XL. With a quick glance at the VZ 3 XL posts - I'm assuming I shouldn't hold my breath?

    People on the Verizon pixel 2 and P2XL are still holding their breath....so yeah! :(
    3
    Potential fix for people with AdAway troubles, here's what got mine to work:
    1) Kill AdAway, clear cache + wipe data.
    2) Uninstall AdAway.
    3) In Magisk, enable systemless hosts
    4) Install (or reinstall) busybox
    5) reboot phone
    6) Re-install and open AdAway, enable adblocking. (you won't have any hosts, this is fine)
    7) add one of your hosts, and then apply.
    Fixed it for me. You should now be able to add the rest of your hosts.
    @aNYthing24
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone