yashsingh1/xdaforums huggingface dataset:
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Twrp is a custom recovery. However, when you fastboot the factory image, or the boot.img, it returns to the stock recovery. We don't have a separate recovery on the P2XL since it's an A/B two partition device, thus making root more difficult. Keep at it, you'll get it :good:
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
OK JD, I have followed your instructions to a TEE I think. I' ve just flashed Magisk v18.0 from TWRP and have rebooted system. I'm on the splash screen now, fingers crossed.
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
The moment of truth ?
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
No luck, it booted back into TWRP...again.

---------- Post added at 12:54 PM ---------- Previous post was at 12:52 PM ----------

I have to go run errands with the wife. Is there anything I can do using only my device while on the road now that I again have all the necessary files on my internal storage?
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
OK, let's try something.

Flash magisk and then flash the kernel right after, then reboot to OS. This is just a test and won't hurt anything. I'm trying to narrow down what's going on while I go back and read all the steps you have taken.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
OK doing that now, then I gotta jam for a couple hours
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
If you need your phone while you are gone, you can flash the ota IMG using twrp if you have that IMG on your device, it's a good idea to have that in my opinion.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Dude, I'm so lost on images. Where can I get that one again?
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
https://developers.google.com/android/images
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
BTW, I flashed the magisk forst then elemental and it has been on the splash screen for quite a while. I gotta go, bbl
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Perfect, press and hold the power button till it reboots, let me know what happens. Just the power button, nothing else. We will be here when you return
[Google Pixel 2 XL Guides, News, & Discussion] post-mortem:
Read this XDA article to understand the whole A/B partition thing, and how it affects the rooting/modding procedure.

Regarding Magisk download (or any download, really), you can -- and should -- verify checksums prior to flashing, to prevent dealing with corrupted files. Corrupted files might brick your device, but they will definitely waste your time and cause confusion. For computers, I recommend installing HashTab (Windows, Mac) (pics),
[Google Pixel 2 XL Guides, News, & Discussion] jmtjr278:
I always flash kernel followed by root. Sometimes when mine twrp bootloops another flash of kernel or magisk will set it right. Also, if you need your device right now and can get to twrp just switch partitions and it should boot right up.

When you flash factory are you flashing it to a and b?

Also, don't feel stupid, this device is like voodoo and a magic trick all wrapped into one sometimes. Can be frustrating. Couple that with a new a/b partition guy and it gets tricky. Going forward you won't flinch when your device gets buggered up. Leaning experiences rule!
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Yes I already have this image on my device
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
OK, if needed, you can boot to twrp, select install, then at the bottem right, you will see an option for IMG, if you select that, you can flash the ota without needing a Pc. It won't wipe your device, and is a great life saver when on the road and in need of a fresh start due to not booting to the OS or alike.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Ok I'm back, so I need to get this rooted as I;m coming up on 36 hours since I started this.

I'm in the bootloader screen now. I don't know what to do at this point as I've done everything I can think of. Any suggestions?

---------- Post added at 02:21 PM ---------- Previous post was at 02:13 PM ----------

I remember back in the day, we had to make sure things we flashed were directly on the root of the internal storage, not in a folder on the internal storage. I think I'm going to give that a try.
[Google Pixel 2 XL Guides, News, & Discussion] jd1639:
I'm back too. If you followed the process I outlined it sounds like everything worked until you installed magisk? As others have suggested, did you redownload magisk? It might be a corrupt download. Also, when you booted twrp did you allow modifications or did you keep it read only? I always allow modifications.
[Google Pixel 2 XL Guides, News, & Discussion] jmtjr278:
Also, I know it's probably inconsequential but at the end before you reboot what are you choosing when it asks to install twrp? I always select do not install
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
1. I have downloaded and redownloaded Magisk v18.0 four times but I guess I can do it again.

2. When I 'booted' twrp I didn't see an option for read only or allow mods.
[Google Pixel 2 XL Guides, News, & Discussion] jd1639:
So, everything works up until you installed magisk so it's definitely something do with it. I'm not sure where you're getting magisk from. Are you getting it from here, https://xdaforums.com/showthread.php?t=3473445
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
You won't since you didn't wipe your device when you fastbooted the factory image like jd instructed you to do :good:
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Here is an idea, if you are up to it.

Either fastboot the ota again without - w, fastboot twrp again, flash the twrp zip and boot to OS.

Reboot to twrp and flash magisk zip, boot to OS (forget adding a kernel for now). Let's see if you can get root and twrp working without any other modifications. You are not alone, others have had issues like this but once we got it working, it was easy from then on.
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
This is a great point that I forgot about!! Make sure you don't install the twrp app from within twrp recovery.

---------- Post added at 08:41 PM ---------- Previous post was at 08:34 PM ----------

The Man in Black!!:good: You got that right bruh! The P2XL is a finicky beast to say the least. We'll just keep throwing everything we can at this poor guy until either: He gets root, or, his head explodes! ???
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Sorry, I didn't see where JD instructed me to wipe my device??

---------- Post added at 02:53 PM ---------- Previous post was at 02:52 PM ----------

Ok what do you mean the twrp app when you say don't install it from within twrp? What twrp app specifically?
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
No..no. He didn't instruct you to. That's what removing the -w does. :good:
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
JD that is exactly where I'm getting it from.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Well I already removed the -w in the taimen flash-all.bat
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
A option within twrp sometimes says "would you like to install twrp" slide slider to install..... Don't ever slide it, don't ever check that box that allows the twrp app to install twrp!!! Only use the zip you have been using.

Confused yet? Lol.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
F&%$#** yeah I'm confused.

---------- Post added at 03:00 PM ---------- Previous post was at 02:59 PM ----------

Can I wipe this whole thing and start over?

---------- Post added at 03:03 PM ---------- Previous post was at 03:00 PM ----------

Yes, when I got into twrp, I clicked INSTALL then clicked on the twrp-pixel2-installer-installer-taimen-3.2.3-1.zip and slid the bar over at the bottom of the screen. Is that what I did wrong?
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
This is the modification thing that was mentioned earlier.

There is a similar screen that asks you if you want to slide to install twrp, don't ever slide it, it doesn't work on our phones, it will cause a headache and nothing more.

I hope that makes more sense.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Ok how do I start over?

I need to be done with this.
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
If twrp works right now.

Boot to twrp

Select install

Select IMG (bottom right)

Select the ota IMG file

Let twrp do its thing.

If twrp doesn't work right now

Fast boot like before, if you don't have anything worth saving on your device, I would leave the - w intact, but that's your call, doing it without - w is just fine, this way all the stuff on the SD part will be there waiting for you.

Let us know when you are back up and running, we will start with twrp again... 1 step at a time this time
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Ok I did that and I selected boot.img which I believe is the factory ota image. It's rebooting now

---------- Post added at 03:19 PM ---------- Previous post was at 03:15 PM ----------

Ok I'm rebooted and it booted back into twrp

What now?

---------- Post added at 03:20 PM ---------- Previous post was at 03:19 PM ----------

Any chance you are on Discord? Maybe we could chat there? XDA seems to be a little slow today...
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Yes I'm on discord same name as here lol
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
The top one is the IMG you would flash if you use twrp to flash the ota
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
I can't find you on DC.

---------- Post added at 03:29 PM ---------- Previous post was at 03:28 PM ----------

l need your tag number.

---------- Post added at 03:30 PM ---------- Previous post was at 03:29 PM ----------

I'm going to have to abort this whole project if I don't have it done in the next 1.5 hours. I have WASTED too much time on this.
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
I'm there
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
I feel like I'm taking crazy pills! I can't find you one discord. HyperThred#2941 is mine
[Google Pixel 2 XL Guides, News, & Discussion] post-mortem:
You shouldn't ever have to start all the way over. You can get out of most "bricks" and bootloops by reflashing the stock boot.img file, extracted from the full factory image, though you do need access to a computer. The command is:

fastboot flash boot boot.img

As is explained in the previously linked XDA article, everything that used to be on the recovery partition is now part of the boot.img file. TWRP, Magisk, and other mods are just modifying the boot.img file on your device. If you reflash the stock file, all those attempted modifications are gone. It's also a lot faster than the flash-all script.
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
He's up and rooted now ?
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
[MENTION=259148]badger[/MENTION] [MENTION=4858937]jd1639[/MENTION] here was my problem. Not only did I not uncheck those boxes at first, but I also swiped over and installed the TWRP App. [MENTION=4020863]clothednblack[/MENTION] helped me figure that out. Damn I could've been rooted in like 1 hour yesterday. lol

Thank you all for your help!
[Google Pixel 2 XL Guides, News, & Discussion] jd1639:
I'm glad you finally got it working. You are one tenacious SOB. I'll give you credit for that.
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Any time Bro.

That's the screen mentioned a page back, it screws it all up. Welcome to the darkside. Now you can really have some fun.
[Google Pixel 2 XL Guides, News, & Discussion] Az Biker:
[MENTION=3730810]Badger50[/MENTION] [MENTION=4858937]jd1639[/MENTION] [MENTION=4020863]clothednblack[/MENTION]

Nominated for the Xda Patron Saint of Patience award :p
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Atleast that award won't be taken away from me like my RC status was ?
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
If there is one thing I hate is quitters. 4 years in the USMC taught me that! Thanks again guys!

---------- Post added at 05:37 PM ---------- Previous post was at 05:36 PM ----------

I would love to buy you all a beer. PM me your PP links when you get a chance.
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
No tips necessary for me, I'm just here to help other's enjoy this phone as much as I do ?

Thank you for your service! ??
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
I used a program called SMS Backup and Restore. I've been using it for years. Come to find out I've wasn't saving it correctly and lost all my texts during this root process. I thought I had them backed up properly. Bummer.
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Semper Fi my friend. Glad my buddy, The Man in Black, got you squared away, and very impressed with your tenacity as well! I don't like quitters either, that's why so many were trying to help you out. None of us like to be beaten by a dang piece of electronics!! Anyways, welcome to your XDA trial by fire my friend :good::laugh:
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
I forgot I set my phone in Settings/System/Advanced and turned on the Backup feature. So I retrieved all my messages and calls from a back up a couple weeks back.
[Google Pixel 2 XL Guides, News, & Discussion] jd1639:
That's good to hear. Now that you have twrp you can backup your device with that. I do that and then if I need or want to reset the device or flash other roms I'll restore just the data partition. All your apps and app data will be restored. Note that it doesn't backup your internal sdcard. But if you get the app Tipatch you'll be able to modify twrp so it'll backup your sdcard too.

PS, I got a 128 gb USB C thumb drive that I just plug into my phone and backup everything to that. It's really handy and you don't need to worry if you need to wipe your device. It was only about $30 on Amazon.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
I have a G-Suite account so I have UNLIMITED storage and I have everything I need to back up there.

Also, I'm going to take a stab at Kali Nethunter. I want to learn about ethical hacking.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Now that I'm rooted, how do I (or should I) apply the Feb 5 sec patch?
[Google Pixel 2 XL Guides, News, & Discussion] post-mortem:
You could flash the latest full image, making sure to edit out the -w from the script prior to executing it. Personally, I think it's easier (and safer) to install the OTA update, following the instructions on the top of that page.

Basically, you reboot to recovery (stock or TWRP), find the option for OTA update (in TWRP, it's under the "Advanced" button), then execute the adb sideload <filename.zip> command from your computer. Doing it this way, you will not lose data. You will lose custom recovery and root, so you'll have to reinstall those.

Make sure to verify checksums before flashing!!

Edit: You may lose other things, like substratum themes and modified boot animation.

The short, bulleted way I've been updating each month is this:

Install OTA update

Install TWRP

Reboot recovery

Install Magisk

Reboot system
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Hello again! :laugh:. Like [MENTION=4881692]post-mortem[/MENTION] said. You can also flash the OTA zip via twrp as well. When finished, flash twrp installer, reboot to recovery, flash magisk, then kernel(optional) :good:
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
That's my preferred method ?
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Excuse me for asking, but <filename.zip>? is this where I have the file stored? Could you give me an example of that yours may look like?

Also, I'm on TWRP 3.2.3-1. Where is the option for OTA Update? I don't see it under Advanced
[Google Pixel 2 XL Guides, News, & Discussion] post-mortem:
the <filename.zip> is the OTA update .zip file you downloaded from this page. Since my phone is a Pixel ("sailfish"), the command I ran was

adb sideload sailfish-ota-pq2a.190205.003-b099e842.zip

Of course, you could make things easier by renaming the file, before flashing it. At a Windows command prompt, you can type the first few letters and hit the TAB key, and the OS will cycle through all files in the current directory/folder which start with those letters.

To sideload in TWRP:

Enter the unlock code/pattern (if set)

Advanced

ADB Sideload (at the bottom)

The phone will get itself ready to receive the adb sideload command from your computer.
[Google Pixel 2 XL Guides, News, & Discussion] wabmorgan:
In my experience, everytime I tried to push the boot.img file to phone with adb it gets corrupted.

So, I downloaded the factory image to the phone and extracted the boot.img file with 7-zip app on the phone. I then used the following process. (You can delete the factory image and extracted files after rooting.)

Rooting with Magisk

NOTE #4: This section assumes you are not going to install TWRP. If you are, skip to the next section and just flash the latest Magisk zip after installing TWRP.

Download the Magisk zip from the official thread and install the manager from the zip.

Open Magisk Manager and click the Install button.

Click "Install" at the first prompt then choose "Patch Boot Image File". A file manager will pop up.

Select the boot image you want to patch and let Magisk Manager patch it.

Pull it off your device:

Code:

adb pull /sdcard/MagiskManager/patched_boot.img (make sure use storage location displayed during the Magisk install following adb pull / )

Reboot into the bootloader:

Code:

adb reboot bootloader

Flash the boot image and reboot.

Code:

fastboot flash boot patched_boot.img

fastboot reboot

Open Magisk Manager and you should be rooted!
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Ok, so I could rename the file from taimen-ota-pq2a.190205.002-1fa0246a.zip to something like feb_5_patch.zip if I want and it should still work?
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Ok I renamed the file to feb_5_secpatch and performed the cmd adb sideload feb_5_secpatch.zip

my cmd window now says

*daemon not running; starting now at tcp:5037

*daemon started successfully

My device says

Installing zip file '/sideload/package.zip'

That's all it says and it has been this way for over 5 minutes.

EDIT: forgot to check USB Debugging....lol

---------- Post added at 09:57 AM ---------- Previous post was at 09:31 AM ----------

Any idea how long this usually takes? It's been in this stage for a while now.

---------- Post added at 10:35 AM ---------- Previous post was at 09:57 AM ----------

Hmm. I can't seem to get this to work.
[Google Pixel 2 XL Guides, News, & Discussion] xMDKx:
what's the output of "adb devices"?

try changing the usb cable you are using; some types reportedly have issues with adb
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Here is the output of adb devices
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Then once I enter adb sideload <ota-filename.zip> my device says installing zip file '/sideload/package.zip' forever. Nothing happens except the blue progress bar at the bottom of TWRP slides to the right continously.
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Did you select adb sideload in twrp so your pc can send over the ota? Personally, I just use twrp to take the ota, but using a pc without "-w" is another option toake this a non stressful process
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
My friend, I'm gonna try to make this process as simple as possible for you. All the methods that you have read definitely work, if you know the methodology. My buddy, [MENTION=4020863]clothednblack[/MENTION], and I, recommend you do this....

Download the OTA zip again, and put it on your phones internal storage.

Disable your screen lock security, set it to swipe.

Fastboot into twrp, or just get into it if it's still installed.

Hit wipe, select advanced wipe, then ONLY wipe ART/cache. When done, exit out, and go back to your install button.

Select your OTA zip, then swipe to install it.

It will take a little while, so be patient.

When it's done, flash your twrp installer zip, then boot up to your OS to make sure it's ok.

If it is, then go back to twrp and flash your magisk zip, and then your custom kernel if you use one.

Then boot up to the OS, and you should be good to go again on the February update :good:
[Google Pixel 2 XL Guides, News, & Discussion] xMDKx:
did you select "Apply update from ADB" after "adb reboot recovery" step (or the corresponding option from twrp)?
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Hey Badger, I was going to try this method but wanted to give the other method a shot first. In this method, do I need to remove the -w though?

---------- Post added at 12:46 PM ---------- Previous post was at 12:45 PM ----------

Yes, I did. I'm not sure I could've made it that far if I hadn't.

---------- Post added at 12:49 PM ---------- Previous post was at 12:46 PM ----------

Yes I did. I just think it's not working for me for some reason. I followed the instructions exactly from here several times. It's just not working for me.

When you say you just use twrp to take the ota, are you referring to the method Badger is speaking of?

---------- Post added at 12:54 PM ---------- Previous post was at 12:49 PM ----------

Sorry if I seem confusing today. lol I'm in the middle of studying for the CompTIA Security+ exam and trying to flash the latest sec patch. I've only tried one method and that was adb sideload method.
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
No. There is no -w to remove from the OTA that you get from here :good: https://developers.google.com/android/ota
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
Using your method now Badger. This is the way I use to flash ROMS onto my device.
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Yep, I do it all from twrp, no pc needed. I add a couple steps but that's just how I feel comfortable doing it, hasn't failed me yet.
[Google Pixel 2 XL Guides, News, & Discussion] Digital DJ:
What are the steps you add?
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Maybe try this in adb Type fastboot oem device-info
[Google Pixel 2 XL Guides, News, & Discussion] drewski_1:
good to know! :good:

they really should add that line to the bootloader screen

> fastboot oem device-info
...
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) [COLOR="Red"][b]Device critical unlocked: true[/b][/COLOR]
(bootloader) Charger screen enabled: true
OKAY [ 0.004s]
finished. total time: 0.004s
[Google Pixel 2 XL Guides, News, & Discussion] ironLink21:
I've been trying to flash the ota image. it keeps hanging at "Verifying update package..." and doesn't go past that. I've also tried the factory images (I used the "fastboot flashing unlock" command) I didn't realize that there was a fastboot flashing unlock_critical, I thought that you ran unlock first and then unlock_critical. but I've tried flashing the latest factory image and it just hangs, doesn't even run through flashing anything so I tried to manually run the "fastboot flash bootloader <bootloader file>" but that just hangs also.

Also, If I try to run the above command (fastboot oem device-info) I get

```

...

FAILED (remote: unknown command)

finished. total time: 0.000s

```

I get that same error when I try to run "fastboot flashing unlock_critical"

I've been doing this sort of thing with my 6p for years so I'm not sure why I'm having such a problem with the pixel 2 xl.

Is there something I'm missing? Is there something I have to do differently with the pixel than the nexus?

Thanks you in advance and thank you very much for starting up this guide!