[GUIDE] Unlock/Flash/Root for the Pixel 2 (walleye)

valodya

Member
Oct 24, 2010
25
6
0
I updated to the December factory image as usual. Then I installed Magisk via TWRP. My phone is not rooted, and Magisk Manager is not on the phone. I tried to install Magisk Manager 6.0.1., I get "App not installed," and nothing happens, no Magisk Manager. I tried uninstalling and reinstalling different versions of Magisk, 17.3, 17.1, 16.1, all with the same result. How can get Magisk Manager on my phone? Please help, and thanks!
 

floepie

Senior Member
Feb 28, 2006
1,991
454
0
Amsterdam
For the first time, I cannot get this device rooted on the latest Dec update. I have the latest Magisk APK. I have repeated the entire process three times - uploading the boot.img to the device to make a patched_boot.img. This new IMG is exactly the same file as shown by file hash, so I know there are no errors. After I flash boot with the patched version, it boots into Android recovery, so I flash the entire factory image over again. This was repeated 3x. Anyone else?
 

cb474

Senior Member
Oct 25, 2010
1,042
389
0
I haven't tried it yet, but the latest version of Magisk is 18.0. The link in the OP of this thread to the Magisk beta is way out of date. That thread has been closed for a long time. The beta and stable versions are now both listed in the main Magisk thread:

https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

Nathan, you really should update the OP, because it's leading people to the wrong place for Magisk.

*

Also this might be helpful. You may need to first use the Magisk uninstaller, before installing the new Magisk:

https://forum.xda-developers.com/showpost.php?p=78382246&postcount=29484

*

[Edit: I went ahead and tried the update. First I temporarily booted into TWRP and flashed the latest Magisk uninstaller, from the main Magisk thread that I link to above. Then I booted back into the bootloader and flashed the factory image (not the OTA). Then I let the system reboot (which it does automatically after flashing the factory image). Finally I temporarily booted into TWRP again and flashed the Magisk v18.0 zip to install Magisk. Everything seems to be working okay.

From reading around, I think the step of letting the phone reboot into the system, after flashing the new factory image (and before flashing Magisk), may be important. When the phone reboots, it switches to the other boot partition. If it hasn't done this, then when you flash Magisk, you may be flashing it to the wrong boot partition, hence it will have no affect on the system you're actually booting into. In TWRP, I think, you can select which slot to flash Magisk to, but then you have to be sure what you are doing. Rebooting first may be the simpler and more foolproof solution.]
 
Last edited:

farrenicus

Senior Member
Oct 1, 2013
91
59
0
So I guess since I had to have my unlocked Pixel 2 replaced due to a faulty power button I've now joined the permanently locked warranty replacement masses. From the stories I've heard of people going through 5 or 6 replacements, never receiving an unlockable phone like their original, there is a policy in place of rendering replacements un-unlockable, and no one in customer service was told about it.
 

interestor

Senior Member
Aug 17, 2014
75
2
0
NYC
I unlocked the bootloader. Then installed new OS (February). But then the instructions break down at Magisk, as others have noted. "Patch Boot Image File" how?

I installed newest Magisk Manager on phone ( I think that's what instructions want). But it has no function to patch a boot.img.

Sheesh, what do I do to root this thing?
 

bjgood

Senior Member
May 5, 2012
54
8
0
I've had no issues flashing or rooting until this month. I just flashed February's update and got "loadimageandauth failed" on the bootloader screen when it tried to reboot after running flash_all.bat.

I had no idea what to do so I tried running flash_all.bat a second time and this time it seemed to work normally. Is there anything I should be concerned about? I don't know if this was a transient issue I can ignore or something more important.

I unlocked the bootloader. Then installed new OS (February). But then the instructions break down at Magisk, as others have noted. "Patch Boot Image File" how?

I installed newest Magisk Manager on phone ( I think that's what instructions want). But it has no function to patch a boot.img.

Sheesh, what do I do to root this thing?
Using the most up to date version of Magisk Manager on the main screen tap Install (the upper one) > Install > Patch Boot Image File > (select your file)

Then flash the patched file same as before.
 
  • Like
Reactions: interestor

interestor

Senior Member
Aug 17, 2014
75
2
0
NYC
Using the most up to date version of Magisk Manager on the main screen tap Install (the upper one) > Install > Patch Boot Image File > (select your file)

Then flash the patched file same as before.
OK good thank you.
Magisk Manager v7.0.0 on my phone does not show "install" anywhere! There is an Uninstall on the top screen, that seems to be for modules. I'll have to poke around the Magisk forums or try a different version...

edit: aha! I read that the phone must be connected to internet for magisk manager. (I'm working on a virgin phone here, no connection to anything)

Thanks again for clarifying that it all works with the new Magisk Manager.

I also used the advice from cb474 above about rebooting between steps (which requires setup then developer options...)

Success!
 
Last edited:

listeur

Member
Sep 4, 2015
15
3
3
installed twrp and then the magiscv18.1 and now what?

I followed the directions- but ran into a snag
NOTE #6: TWRP can be unstable at times given the way that security has been set up on this device (lack of decryption, failing to boot, etc).
Download both the TWRP image and zip installer from the official site. ok done.
Temporarily boot the TWRP image.
Code:
fastboot boot <path_to_twrp_image>
Flash the TWRP installer zip. installed just fine...
Reinstall Magisk and your custom kernel if you had them.<- magisc v18 installed- but now when I reboot it gets to the google splash- sits there a while and then reboots back into twrp. Do I need to start over or just load a rom from twrp now?
Do I need a custom kernel or something? what did I miss?
 

SlimSnoopOS

Senior Member
Jan 29, 2011
8,052
3,348
0
I followed the directions- but ran into a snag
NOTE #6: TWRP can be unstable at times given the way that security has been set up on this device (lack of decryption, failing to boot, etc).
Download both the TWRP image and zip installer from the official site. ok done.
Temporarily boot the TWRP image.
Code:
fastboot boot <path_to_twrp_image>
Flash the TWRP installer zip. installed just fine...
Reinstall Magisk and your custom kernel if you had them.<- magisc v18 installed- but now when I reboot it gets to the google splash- sits there a while and then reboots back into twrp. Do I need to start over or just load a rom from twrp now?
Do I need a custom kernel or something? what did I miss?
Try flashing the stock boot image to reset the process. Then start over again by booting TWRP and following the steps.
 

muyela

Member
Jul 16, 2016
9
1
0
Unable to flash factory Image

Thanks for the post it has been helpful in the past. This time though I run into the following issues:
- After flashing the patched_boot.img my Pixel 2 XL running android 9 hangs on the white screen with the G and won't boot.
- In and effort to recover I tried flashing the factory image but that fails with the error - FAILED (remote: GetVar Variable Not found).

The only way I can get back into my system is by side loading the OTA, which still leaves me unrooted and unable to use some apps that require root.

I'd appreciate any help you can offer in my situation.
 

jd1639

Recognized Contributor
Sep 21, 2012
16,836
5,398
0
Minnesota
Thanks for the post it has been helpful in the past. This time though I run into the following issues:
- After flashing the patched_boot.img my Pixel 2 XL running android 9 hangs on the white screen with the G and won't boot.
- In and effort to recover I tried flashing the factory image but that fails with the error - FAILED (remote: GetVar Variable Not found).

The only way I can get back into my system is by side loading the OTA, which still leaves me unrooted and unable to use some apps that require root.

I'd appreciate any help you can offer in my situation.
Don't flash the patched boot image.

Put the magisk zip on your phone.

Boot twrp, fastboot boot twrp.img. ( Get the twrp image and zip from twrpme, use the full name)

Install the twrp zip once booted into twrp.
 
  • Like
Reactions: GTOJim

muyela

Member
Jul 16, 2016
9
1
0
Don't flash the patched boot image.

Put the magisk zip on your phone.

Boot twrp, fastboot boot twrp.img. ( Get the twrp image and zip from twrpme, use the full name)

Install the twrp zip once booted into twrp.
Thanks for the advise. Although this approach did not work I was able to reverse the adverse effects easily. My issue is not yet resolved as I am now getting a bootloop into recovery after installing Magisk using TWRP

As per your suggestions I will move/start the post in the appropriate thread for the benefit of others. Thanks again.
 

jd1639

Recognized Contributor
Sep 21, 2012
16,836
5,398
0
Minnesota
Thanks for the advise. Although this approach did not work I was able to reverse the adverse effects easily. My issue is not yet resolved as I am now getting a bootloop into recovery after installing Magisk using TWRP

As per your suggestions I will move/start the post in the appropriate thread for the benefit of others. Thanks again.
When you're exiting out of twrp are you letting it install the twrp app? If you are, don't do that that's why it's bootlooping.
 

SCBebop

Member
Oct 8, 2013
39
1
0
Is it safe to downgrade to 8.1 Oreo from 9.0 Pie? I have a google edition of the phone coming in tomorrow but wasn't sure on what the exact steps were since it says its not recommended to downgrade factory images.

Is this still the case?
 

jd1639

Recognized Contributor
Sep 21, 2012
16,836
5,398
0
Minnesota
Is it safe to downgrade to 8.1 Oreo from 9.0 Pie? I have a google edition of the phone coming in tomorrow but wasn't sure on what the exact steps were since it says its not recommended to downgrade factory images.

Is this still the case?
You should be able to flash the oreo factory image. But you'll have to unlock the bootloader to do it.
 

Diesel_Jeremiah

Senior Member
Feb 7, 2014
194
59
0
Is it safe to downgrade to 8.1 Oreo from 9.0 Pie? I have a google edition of the phone coming in tomorrow but wasn't sure on what the exact steps were since it says its not recommended to downgrade factory images.

Is this still the case?
When you set up the phone, don't connect to wifi or install the sim right away.

Chances are it ships with 8.1

If that's the case, set it up to not update

Sent from my Pixel 2 using Tapatalk
 

btreu1

Senior Member
May 27, 2009
61
15
0
I always seem to screw something up when I'm flashing the factory image on this phone. Every single time I've tried updating, I've screwed up and had to completely wipe the phone.
First, it was themes. Then, who knows what- probably themes again. This time, I forgot to restore (replace with the original?) the boot image in Magisk. I've run "flash-all.bat" twice now, and obviously failed each time. Can anyone tell me if I have any other option besides using Deuces Bootloop-Recovery script? I'd really love to not have to start from scratch AGAIN.