yashsingh1/xdaforums huggingface dataset:
[Google Pixel 2 XL Guides, News, & Discussion] mackentosh:
That's cause it's been corrupted, I went thru the same thing for like 6 hours. You have to extract the file properly, so you can trash that patched file you currently have and download the image again. Extract it right in the download folder then go in and find the boot img copy it and paste it to your phones SD then go thru Magisk app and patch it. After you do that follow the commands in post. *The main thing that had me screwed up was the fact that the cable that came with phone didn't work as far as communicating with my laptop. I had to go get the cable out my car which was a USB to USB-C cable instead of the USB-C to USB-C cable the phone came with
[Google Pixel 2 XL Guides, News, & Discussion] krash2k:
Hmmm.... okay I can try that but right now I just need to figure out how to get this thing to boot again.

I can get to fastboot and I've been trying to use the skipsoft tool kit (I have ultimate) to flash just a stock image so I can boot but it is just fighting for some reason.
[Google Pixel 2 XL Guides, News, & Discussion] mackentosh:
Make sure you have the proper cable, if skipsoft says bootloader locked even tho it's unlocked then it's the cable.

When you open skipsoft select #4 "Root/Unroot/Disable Ecryption/flash stock boot/check root status" then select #5 Flash stock boot/Recovery image. If your cable works you shouldn't have any problems and that'll boot up your phone
[Google Pixel 2 XL Guides, News, & Discussion] slaydog:
Maybe try to push the original, non modified boot.img to your phone go get it to boot first..?
[Google Pixel 2 XL Guides, News, & Discussion] krash2k:
Tried doing this.. still wouldn't boot. I don't have anything on the phone that I'm trying to save so at this point I don't mind just wiping it and starting fresh just to get it working again.

I just tried downloading the factory image and using the flash-all script to just start over but now it's just saying my device is corrupt and hangs at the google splash screen. Was hoping that was going to work because now I'm feeling out of options.

EDIT: I'm going to start a new thread in the Q&A forum because I feel like I'm hijacking this guide with stuff that isn't really related to it.
[Google Pixel 2 XL Guides, News, & Discussion] cmexec:
Okay thanks. So, rooting will not require bootloader install and therefore unlock_critical?
[Google Pixel 2 XL Guides, News, & Discussion] nathanchance:
No, it does not. If you can afford an unlock_critical (as in wiping and setting up again), I would recommend it but if not, you'll most likely never run into any issues.
[Google Pixel 2 XL Guides, News, & Discussion] kennypasatrain:
I got it. I didnt run the initial command to unlock. I jumped strait to the critical command.

Now that i have successfully unlocked, is my next step to flash factory images or to root with magisk?
[Google Pixel 2 XL Guides, News, & Discussion] v12xke:
Unless your phone is on 8.0 there is no need to flash a factory image. If you are still on 8.0 then don't do any of this until you have updated to 8.1. Just follow the directions given on the TWRP page first and get that installed. Note it takes two files the first time .... one .img (PC) and one .zip (phone). Once you have TWRP up and running, just download and flash the latest Magisk beta (zip file) which is 15.0 right now. The first time you boot the phone may freeze on the G screen. If it does, just wait 3-4 minutes to see if it will boot. If not long press the power button until it reboots.
[Google Pixel 2 XL Guides, News, & Discussion] kennypasatrain:
I am on the latest 8.1. So i'll skip that section.

I would like to NOT use TWRP and just flash with fastboot using the instructions found on the front page of this thread. Do you have any advice on this? I've just read that the TWRP method is not currently stable, so I'd rather just do it from the CMD line, if possible.
[Google Pixel 2 XL Guides, News, & Discussion] v12xke:
Well sure, if you want to just fastboot boot the twrp img you can do that. Put the latest Magisk zip file on your phone first, fastboot boot twrp.img and then flash the Magisk zip from within twrp. When you reboot twrp will be gone. Good luck!
[Google Pixel 2 XL Guides, News, & Discussion] Az Biker:
I've flashed several Magisk and Flash kernel updates via TWRP 3.2.1.0 and it is working flawlessly for me.

Only thing still needs addressed and is a known issue, is the time displayed in TWRP being off (strictly a cosmetic issue)...

I've had no issues with the last 2 version of TWRP (3.1.1 beta2, 3.2.1.0 )
[Google Pixel 2 XL Guides, News, & Discussion] kennypasatrain:
According to this thread, the Non-TWRP method uses the Magisk Manager to patch the boot image. Then it simply says to flash this patched boot. No use of TWRP at all. I just want to make sure im not missing anything.
[Google Pixel 2 XL Guides, News, & Discussion] Anshelmo46:
I do want to use the temporary twrp method, but everytime i put fastboot boot twrp.img into the cmd, it says "FAILED (remote: unknown command)"... I have an unlocked (not critical) bootloader ... Can anyone help?

btw: Do i really have to install the twrp.zip after booting the temp twrp.img for installing magisk or can i just doing the magisk.zip without twrp.zip?
[Google Pixel 2 XL Guides, News, & Discussion] Az Biker:
Not sure it is REQUIRED to do this, but I would perform critical_unlock regardless, in the event you HAVE to in the future and you'll be wiping everything then anyway. Better to wipe sooner than later.

Follow my steps HERE, if you don't want TWRP installed, SKIP the "flash TWRP.ZIP in TWRP"

These steps cover common "failure" causing issues, like latest SDK tools, using a USB 2.0 instead of a USB 3.0 cable, and the exact commands to successfully flash via fastboot.
[Google Pixel 2 XL Guides, News, & Discussion] nldxda:
I modified the flash-all.bat to delete the -w within the text, yet my user-data got entirely wiped!! What happened??
[Google Pixel 2 XL Guides, News, & Discussion] ilal2ielli:
Didn't save the edited flash-all.bat?
[Google Pixel 2 XL Guides, News, & Discussion] nldxda:
yes, I saved the edited .txt
[Google Pixel 2 XL Guides, News, & Discussion] ilal2ielli:
That might have been your problem. If you saved it as a.txt file, the original flash-all.bat was left in the folder and you probably ran that one.
[Google Pixel 2 XL Guides, News, & Discussion] nldxda:
my mistake calling a .txt..... Its still a .bat file and all I did was click "file" then 'save" after editing
[Google Pixel 2 XL Guides, News, & Discussion] ilal2ielli:
Well if you edited it correctly, it wouldn't wipe the phone.

Did you happen to unlock the bootloader at the same time? That would wipe the phone too.
[Google Pixel 2 XL Guides, News, & Discussion] nldxda:
My bootloader is already unlocked, so no.. Dunno what else to think, it sure did wipe everything.. At least my google cloud backup saved my ass..
[Google Pixel 2 XL Guides, News, & Discussion] davschm:
Question about root on this phone.

I play Pokemon Go and plan to use android Pay. Both detect for root and will not work if the phone is rooted. The only reason i am considering root is to turn on tethering. (sprint carrier). Can anyone tell me if the root in this thread is undetectable? Or if i can root, make the change to build.prop that's needed, and then unroot and everything will still work (Android Pay and tethering)?
[Google Pixel 2 XL Guides, News, & Discussion] s1dest3pnate:
Is installing TWRP actually a requirement, or can we just boot TWRP one time for the purpose of flashing the Magisk zip?

Edit: Nevermind, I see now that installing TWRP is NOT required.

---------- Post added at 09:41 AM ---------- Previous post was at 09:15 AM ----------

Why does the Magisk link take us to the beta thread? Any reason to install latest beta vs install latest stable release?
[Google Pixel 2 XL Guides, News, & Discussion] nathanchance:
When I wrote that section, the Pixel 2 XL was only supported on the beta channel. Beta and stable are the same right now so it doesn't matter which one you choose.
[Google Pixel 2 XL Guides, News, & Discussion] Az Biker:
I don't play Pokemon or use AP, but magisk root passes Safety Net, and many users have said AP and apps that usually detect root work for them.

Install magisk, if it doesn't work for you, uninstall it.
[Google Pixel 2 XL Guides, News, & Discussion] davschm:
The process on the first post says that rooting will wipe all data on the phone. Is there a way to just install Magisk without installing TWRP or otherwise changing the bootloader and wiping all data?

Also, thank you for the reply and the information.
[Google Pixel 2 XL Guides, News, & Discussion] wtherrell:
Umm.. No, I don't think so. Rooting isn't what wipes your phone. Unlocking / locking bootloader or flashing full factory image without removing the - w from the .Bat script are the things that will do that.
[Google Pixel 2 XL Guides, News, & Discussion] davschm:
Ok, so can Magisk be installed and used without Unlocking / locking bootloader?
[Google Pixel 2 XL Guides, News, & Discussion] weedlucho:
I have the similar question, if I just want to root my phone to be able to install some apps, but I'm not going to be installing custom ROM or kernel, just need root, I will just need to install magisk? It will wipe my phone? Or there is a way to root and keep everything just like it is right now? Thanks in advance.

Enviado desde mi Pixel 2 XL mediante Tapatalk
[Google Pixel 2 XL Guides, News, & Discussion] gee2012:
No it can`t. Neither can you make an omelet without breaking an egg ;)
[Google Pixel 2 XL Guides, News, & Discussion] wtherrell:
I have always first unlocked bootloader. Then installed custom recovery. Then a kernel (if desired) then Magisk to root. The only thing of those that wipes the phone is the unlock of the bootloader.
[Google Pixel 2 XL Guides, News, & Discussion] v12xke:
You can't do anything until you unlock the bootloader and THAT is what wipes the phone, not rooting it. Until you unlock it, you cannot use Magisk to root. Obviously its better to do this as soon as possible after getting the phone.
[Google Pixel 2 XL Guides, News, & Discussion] weedlucho:
Ok man! Thanks! And official OTA updates will still work?

Enviado desde mi Pixel 2 XL mediante Tapatalk
[Google Pixel 2 XL Guides, News, & Discussion] v12xke:
Yes and no. Read THIS.
[Google Pixel 2 XL Guides, News, & Discussion] weedlucho:
Done! Thanks!

Enviado desde mi Pixel 2 XL mediante Tapatalk
[Google Pixel 2 XL Guides, News, & Discussion] Cowbell_Guy:
Do not use that method with pixel 2... Will lead to bootloops
[Google Pixel 2 XL Guides, News, & Discussion] davschm:
Ok, so don't use that OTA update fix. Is there another fix that does work? Or is OTA dead after root.
[Google Pixel 2 XL Guides, News, & Discussion] bodieism:
Dang, I probably should have read this before I upgraded to 8.1. I was playing with fire and didn't even know it. I saw the OTA update and decided to just go for it. I didn't uninstall Magisk before installing it :eek: Root was lost, but was easily regained following the steps in the OP. Everything seems to be working great so far including Android Pay.
[Google Pixel 2 XL Guides, News, & Discussion] Cowbell_Guy:
I think the best way is to flash in twrp the ota then magisk zips
[Google Pixel 2 XL Guides, News, & Discussion] simplepinoi177:
To address some of the last posts in the last 2 pages...

I've heard that FlashFire can load updates and/or install other zips (probably Magisk .zip installer) on the Pixel 2/2XL; but I've never gotten FlashFire to work with my taimen so...

Another thing that some of you might want to keep in mind is that although unlocking the bootloader

DOES

erase your phone, an unconfirmed idea I have of a way to go about it is to unlock the bootloader, install magisk and gain "root" (access) [you can temporarily boot TWRP to simply install the .zip], then lock and lock_critical back the bootloader. If I'm correct (so my deepest apologies for my very ignorant understanding), you should still have root access after this and therefore can still backup nandroid backups (if you don't wish to use TWRP, you might have to use another method; FlashFire, Nandroid Online Backup, etc.) -- also, be sure that you also understand that the default way of backing up with TWRP does not backup your internal storage/sd [usually; I use a certain method that backs up my internal sd and uses TWRP to back things up, but the method is rather convoluted]. But, I imagine, if you do everything right (and I'm correct in my assumptions), when you need an unlocked bootloader, you could do a total/nandroid backup, unlock the bootloader and then everything is wiped, load the phone anew, install magisk again, then restore your backup -- most likely just the DATA partition and the files in your original internal sd partition will do; anything

EXCEPT

the BOOT and SYSTEM partitions [I assume restoring the SYSTEM partition will undo whatever it was you were doing; i.e. ota update, etc.]. After everything is stable and back to normal, don't forget to make another new backup, then you could re-lock the bootloader again and the cycle is complete and begins again...

I dunno...just an idea...you should ask an experienced pro if this is viable and/or give it a try and see if it works (please, remember to backup everything in case things go seriously bad)...

Hope this helps...
[Google Pixel 2 XL Guides, News, & Discussion] outbackpaul:
How can I flash just the boot image? Boot into bootloader and enter "fastboot flash boot.img"?
[Google Pixel 2 XL Guides, News, & Discussion] galaxys:
It would be "fastboot flash boot boot.img"
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Pretty close: fastboot flash boot boot.img :good:
[Google Pixel 2 XL Guides, News, & Discussion] outbackpaul:
Thanks
[Google Pixel 2 XL Guides, News, & Discussion] Cowbell_Guy:
For those already w twrp installed... How are you updating to each ota?
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Factory images and fastboot for me :good:
[Google Pixel 2 XL Guides, News, & Discussion] Cowbell_Guy:
I guess what I'm asking is, if you have TWRP installed, can you just install directly the factory zip image from TWR p?
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Oh heaven forbid! NO! You have to download and extract the factory image, then fastboot the update, then fastboot twrp again, then flash your twrp, kernel, and magisk zips from within temporary twrp. Took me about 15 Minutes for the whole process :good:
[Google Pixel 2 XL Guides, News, & Discussion] Cowbell_Guy:
Wow, that sounds like a huge pain in the ass. I guess I am just wondering then what the point of TWRP is then if it really doesn't help you update?
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
It's not as bad as it sounds if you take the time to learn it. It's also great way to recover your phone if something goes awry by flashing the factory images. Twrp allows you flash mods and kernels much easier than adb or fastboot commands IMHO :good:
[Google Pixel 2 XL Guides, News, & Discussion] Az Biker:
Once you've downloaded the factory image, and unzipped, then unzipped again, DO NOT forget to edit the "flash-all.bat" file to remove the -w near the end to prevent completely wiping your device.

TWRP is still able to flash cust kernels, mods, backuos, and new versions of TWRP.

Without it, you'd have to fastboot EVERYTHING.... now THAT's a pain :p

Follow the below steps from HERE to update factory images.

*download Google 8.1 factory image

follow Updating to a new release (factory image): in OP (DON'T perform flash-all yet, do that later)

Open a COMMAND PROMPT from the same platform tools folder on your PC where the fastboot application is located, do the following:

type- fastboot devices (should see a serial number, this means you're good)

type- flash-all (this flashes 8.1 factory image), let it do its thing... (removing the -w (see "updating a new release" in PREP above) stops this from wiping your phone, leaving the -w in flash-all.bat, wipes entire device)
[Google Pixel 2 XL Guides, News, & Discussion] tzincp:
Help: Pixel 2 xl

I attempted to root via Magisk, I successfully unlocked the device and flashed the patched_boot.img using fastboot, but upon rebooting, it gets stuck on the screen with the G and the loading bar. I've tried flashing the factory boot.img, running flash-all.bat, temporarily booting twrp... I cant seem to get past this.

Anyone have any idea what to do?

Thanks

[edit]

also, when I type fastboot version for the SDK version it returns

"fastboot version 0.0.1-4500957"

shouldn't this be 27.0.0 and forward? I downloaded 27.0.1, and re-downloaded just to make sure I didn't corrupt anything by mistake and got the same version number. not sure if this could be the issue
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Have you tried flashing the magisk 15.2 zip in twrp?

That will automatically patch your boot.img(kernel)
[Google Pixel 2 XL Guides, News, & Discussion] tzincp:
Hi, forgive my being a noob and all, but how would I do that? When I temp boot into twrp, it shows what looks like the twrp boot screen (says teamwin recovery progect 3.1.1-beta2) and stays there, never showing a gui, is there a tool I should be using over usb?

Thank you for the quick response
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Once your in twrp, after you've fastbooted into it, hit the install button. That should take you to your file directory. Navigate to where you have your magisk 15.2 zip and flash it. I would also recommend that you instal the twrp-3.2.1-0.zip.

That'll make twrp permanent so you don't have to keep fastbooting into twrp.
[Google Pixel 2 XL Guides, News, & Discussion] tzincp:
fastbooting into twrp never shows a gui, it displays "teamwin recovery project 3.1.1-beta2" seemingly indefinitely
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Go to this link and download the 2 versions of twrp 3.2.1-0-taimen.img, and the other one that is the 3.2.1-0-taimen-installer.zip. They are the 1st and 4th one in the pic. https://dl.twrp.me/taimen/
[Google Pixel 2 XL Guides, News, & Discussion] tzincp:
ok, booting into the twrp-3.2.1-0-taimen.img does the same thing, except changing the version no. listed on the splash.

I just pushed the new twrp zip file to the root directory via adb

Thank you again for the help BTW
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Have you done the critical_unlock already as well?

I'm a little puzzled. Once you fastboot into twrp, you should be able to navigate the ui. Did you get prompted to allow system modifications? Also, what type of cable are you using? Also, are your device drivers up to date in your device manage on your pc?
[Google Pixel 2 XL Guides, News, & Discussion] tzincp:
I have not done the critical_unlock, is that necessary? I am using a usb 2.0 type a to mini b with a female mini b to male type c adapter on it. I also tried using the native type c to type c cable that came with the phone, but couldn't get "fastboot devices" to show anything with that cable.

device drivers look good in device manager, I got the drivers from google, and the automatic driver update in windows seems to agree that they are up to date.

Should I preform the critical_unlock now? I dont want to risk losing the ability to connect to it via fastboot, I suspect I'm being paranoid but thought I would ask.

Thanks

[edit]

SUCESS (somewhat)

I did the critical_unlock and now twrp seems to work, I navigated to and installed magisk successfully within twrp
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Well hot damn!.....VICTORY :good:
[Google Pixel 2 XL Guides, News, & Discussion] tzincp:
well now what... I am unable to boot into an os... when I restart after flashing the twrp zip and magisk I still have the same stuck on the screen with the G issue

[edit]

REAL SUCCESS!!! I have an os, and I'm rooted, and It only took me 6 hours! IDK if thats worth it, but I dont regret it so...

Thank You very much for your help, I would have had a brick otherwise, if there is anything I can do in return please let me know

tzincp
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
When you unlocked_critical, that wipes your phone. I personally would flash the factory image again, then just let your phone boot up, and do a minimal setup. Then I would go back into fastboot mode, and boot into twrp, once in temporary twrp, flash the twrp zip, then the magisk.zip. Then you should have root and be set to go.
[Google Pixel 2 XL Guides, News, & Discussion] tzincp:
that is essentialy what I ended up doing, AND IT WORKED,

Thank You very much for your help, if there is anything I can do in return, please let me know. Without your help I would have been left with a brick...
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Nah, a simple thank you is good enough for me my friend. Many folks have helped me out a lot over the years with this phone fun and madness. Just paying it forward bro. And just think, I'm one of the dumber ones on here. Many on these forums are flippin geniuses, but I love learning from all of them :good::cool:
[Google Pixel 2 XL Guides, News, & Discussion] psikic2:
so ive unlocked critical, flashed twrp, flashed magisk, im in my phone normal screen, with magisk open, how do i install the tether module? Should i install it before i attempt to flash to 8.1?
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
From personal experience, if you know how to fastboot factory images with the -w removed from the flash-all.bat script, your update and data should still be intact. Therefore, your magisk modules should be fine. Mine have all been fine :good:
[Google Pixel 2 XL Guides, News, & Discussion] psikic2:
I don't know how to add the tether module, I would like to know. Don't know how to fastboot factory images with -w removed either, unless thats at the front of the guide, but if i use that method, will i basically be able to keep my tether module, root and keep updating factory images with sideloading?
[Google Pixel 2 XL Guides, News, & Discussion] jrbxx7:
You would have to reroot but wouldn't loose your data.
[Google Pixel 2 XL Guides, News, & Discussion] psikic2:
Great, now how do I install the tether module lol.
[Google Pixel 2 XL Guides, News, & Discussion] jrbxx7:
If its the one in magisk, just open magisk manager and go to downloads and tether enabler
[Google Pixel 2 XL Guides, News, & Discussion] psikic2:
When I do this "type- flash-all (this flashes 8.1 factory image), let it do its thing... (removing the -w (see "updating a new release" in PREP above) stops this from wiping your phone, leaving the -w in flash-all.bat, wipes entire device)", am I running the cmd prompt from the folder the 8.1 image is in with the flash all script? It seems to be conflicting from OP. Does the image folder of 8.1 have to be in the sdk platform folder?
[Google Pixel 2 XL Guides, News, & Discussion] rockingondrums:
What is the "No" part of this link? Seems with a Pixel 2, it should work just fine according to these directions. Though I've also seen someone else say they ended in a boot loop.
[Google Pixel 2 XL Guides, News, & Discussion] v12xke:
The question was will OTA's still work. The "no" part is that trying to apply an OTA to a modified system CAN lead to a bootloop or worse. Some OTAs are successful. Sometimes they fail to start, sometimes they fail half way through. Sometimes they soft brick the device. What is even scarier is I see people trying to flash OTA's with TWRP. I do not use, or recommend using OTA's myself. I have always used full images. To my way of thinking, full images are much safer than trying to make an incremental update work on a modified (non-stock) device. For my money, flashing the full image with the -w removed from flash-all.bat is the only way to go. HERE is what I recommend doing.
[Google Pixel 2 XL Guides, News, & Discussion] myprecious:
Do I have to perform unlock critical in order for the images flashing to work?