yashsingh1/xdaforums huggingface dataset:
[Google Pixel 2 XL Guides, News, & Discussion] kickenwing13:
So from 9.0 with magisk I need to get to wrp, after that I can just put the ROM on my SD and install according to instructions? TWRP is the thing I'm least comfortable with on this device because it seems so much different than it was.

---------- Post added at 12:29 AM ---------- Previous post was at 12:16 AM ----------

So from 9.0 with magisk I need to get to wrp, after that I can just put the ROM on my SD and install according to instructions? TWRP is the thing I'm least comfortable with on this device because it seems so much different than it was.
[Google Pixel 2 XL Guides, News, & Discussion] post-mortem:
The most complicated part is unlocking the bootloader. Once that's done, everything else is easy; it's just new. This was also all new to me until I got my Pixel, because it replaced an old Samsung.

TWRP involves one additional step, compared to previous devices: You have to first boot TWRP from the .img file using a computer, then install the TWRP installer .zip from within TWRP. That second step is actually optional, as you can always temporarily boot TWRP using a computer.
[Google Pixel 2 XL Guides, News, & Discussion] kickenwing13:
So is it ever fully installed? In the old days it just replaced your stock recovery and at any given point you could use the button combination to get into twrp and you could restore nandroid backups and every time you wanted to change around you just restored to a clean version of Android wiped and did the new ROM.

I'm already unlocked, even finally learned how to do it using fastboot. So now I just need to install TWRP. So is it always on there? Is there a certain way I need to go through the installation, people say it is buggy and glitchy and I definitely don't want to screw that up.
[Google Pixel 2 XL Guides, News, & Discussion] post-mortem:
Yes. If you do the second step I mentioned -- which is to install the TWRP installer .zip file from within TWRP -- TWRP will be "permanently" installed. It's different in the Pixel because there is no recovery partition; it's actually part of the boot.img file. The process of installing TWRP actually modifies the existing boot.img file. This means that every OTA OS update will eliminate TWRP, which means you'll have to install it again. This also means that bootloops can often be fixed simply by flashing the stock boot.img file.

Please read this article for more clarification. It's quite informative:

https://www.xda-developers.com/how-...ess-updates-affect-custom-development-on-xda/
[Google Pixel 2 XL Guides, News, & Discussion] kickenwing13:
Will do. Thank you
[Google Pixel 2 XL Guides, News, & Discussion] Reechings:
You may want to flash stock pie to both slots because flashing a rom in twrp changes the active slot. Once you have done that and have got back into TWRP, just do a factory reset then flash room and TWRP zip. Boot up and setup then reboot to TWRP if you want to flash magisk.
[Google Pixel 2 XL Guides, News, & Discussion] kickenwing13:
How do you flash stock to both slots? I can reflash to the most recent factory image if that's what you are saying. Sorry I know I'm Elementary
[Google Pixel 2 XL Guides, News, & Discussion] Reechings:
fastboot --set-active=_a

Run flash all bat

fastboot --set-active=_b

Run flash all bat
[Google Pixel 2 XL Guides, News, & Discussion] kickenwing13:
So this will just make both of my partitions the exact same thing, then from that you're saying install TWRP via fastboot. When it pops up on my phone swipe and then it'll allow me to wipe and install the ROM like I normally would have back in the day
[Google Pixel 2 XL Guides, News, & Discussion] Reechings:
Yeah just make sure you flash the TWRP zip as well if you don't want to have to use a computer to get back to TWRP.
[Google Pixel 2 XL Guides, News, & Discussion] kickenwing13:
I think it all makes sense. I haven't seen the commands you just told me anywhere else so thanks for sharing it. Sounds like whenever I do any of this stuff it's going to get rid of magisk, and that's going to happen every time but starting to make some sense.
[Google Pixel 2 XL Guides, News, & Discussion] Reechings:
Don't get hung up on magisk, you can always flash that later once you're up and running, it isn't needed to flash TWRP or ROMs.
[Google Pixel 2 XL Guides, News, & Discussion] post-mortem:
I'll add that if/when you lose Magisk, the Magisk Manager app (apk) will still be installed. When you launch the app, it will tell you that Magisk is not installed, and it will prompt you to install it. Hit 'yes' & reboot, and you're rooted again.
[Google Pixel 2 XL Guides, News, & Discussion] Reechings:
I don't think it lets you do it that easily when you're not already rooted, at least not the direct method.
[Google Pixel 2 XL Guides, News, & Discussion] CPngN:
You don't even technically need TWRP involved in the process at all! ;)
[Google Pixel 2 XL Guides, News, & Discussion] Chochiwpg:
Does the bootloader need to be unlocked if all I want to do is perform a manual factory reset?

Also, is there a way to flash each piece of the factory image one by one instead of the flash all script? It's been a while, but I remember back in the Nexus 6P days I would flash each piece of the image manually one after the other.

If that is still possible have the steps changed and if so what order should I flash them in?

I only ask because in the past at least I have always had issues with the flash all script.

Thanks in advance for your response.
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
No to your first question. You can factory reset from the phone settings or from stock recovery.

You can fastboot each part of the factory image if you want to. However, why would you want to? I too had, and still do, use my 6p from time to time, and the flash-all.bat script works fine for me. If you want to flash each part of the factory image separately, there is a script that does that for you if you wish to use it. Many users like to use it each month to install the factory images each month. You can find it here :good:

https://xdaforums.com/pixel-2-xl/development/tool-deuces-bootloop-recovery-flashing-t3704761
[Google Pixel 2 XL Guides, News, & Discussion] Chochiwpg:
Thanks Badger50 for your prompt response. I don't think I worded my previous question very well. I was aware that you can do a factory reset from the settings menu. What I meant to ask was, when manually flashing the factory image from scratch, does the bootloader need to be unlocked first or can I do it with a locked bootloader?

I remember in the 6P days you had to unlock first, manually flash and then relock again. But I wasn't sure if that was still the same process.

If so, no worries. I'll give the flash all a try, maybe the reboot issues my wife's 2 XL is having will finally be resolved.

Thanks again for your help.
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
No worries my friend. Yes, your bootloader needs to be unlocked before you fastboot factory images. Make sure your SDK platform-tools are up to date as well before you begin :good:
[Google Pixel 2 XL Guides, News, & Discussion] Chochiwpg:
Awesome, thanks again. After I unlock, manually flash I just have to relock the bootloader again and everything should be A Okay? Google Pay will work etc?
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
If you lock the bootloader again, yes, google pay will work. However, many would recommend that you leave it unlocked and use a custom kernel to hide the unlocked bootloader from google pay. I don't use GP, so I'm not the best one to give you advice on GP. What I know is from what I've read from other users :good:
[Google Pixel 2 XL Guides, News, & Discussion] zard:
I left it unlocked. I also fastboot unlock critical too.

I flashed Magisk and use Magisk hide to hide a few of the apps like Google Pay, VMware Horizon, HCP Anywhere and banking app.
[Google Pixel 2 XL Guides, News, & Discussion] CPngN:
The script, aside from a check to make sure your adb is new enough, is just a series of commands. The same exact commands you can type or paste on the command line. For Unix/Linux/Mac with PATH set properly, for last month's release, you just do this:

fastboot flash bootloader bootloader-taimen-tmz20k.img

fastboot reboot-bootloader

sleep 5

fastboot flash radio radio-taimen-g8998-00253-1805232234.img

fastboot reboot-bootloader

sleep 5

fastboot update image-taimen-ppr2.180905.005.zip

I tend to run them individually also, since the script is piss poor basic and only gives the user 5 seconds to notice any errors. It should have a read statement asking you to hit a key instead of "sleep 5". Always copy your commands from the script though, you never know when they might sneak something new and important in there and you miss it because you've been running your own version. Not likely, but quite possible.
[Google Pixel 2 XL Guides, News, & Discussion] Axelay.mk3:
Sorry for this (very likely) super noob question, but I just need confirmation before I take action. I'm looking at buying a Pixel 2 XL and am determined to root it. Since my carrier is Verizon, I know that this is not likely since they have a custom bootloader to prevent tinkering. If I go buy a Google Edition non-Verizon-branded Pixel 2 XL with a clear IMEI (say, a factory replacement or refurb from Swappa), then I ought to be able to unlock the bootloader without too much trouble, right? And that's the linchpin to being able to get Magisk and root functioning? And then once that's done, I can have Verizon provision the phone without them being the wiser? My current Verizon-branded Pixel XL is having some serious battery drain issues at the moment, but I can say that I was at least lucky enough to have been able to get it rooted long ago thanks to assists from this forum. Any advice would be appreciated. Thank you!
[Google Pixel 2 XL Guides, News, & Discussion] TonikJDK:
You are correct, you just need to make sure it is a Google version. You then unlock the bootloader, boot to TWRP and install the Magisk zio.

You won't need VZ to provision it. Just drop your current SIM into it.
[Google Pixel 2 XL Guides, News, & Discussion] zard:
Wondering if the following steps is correct to make use of my TWRP backup when facing issues with my Pixel 2XL:

Stock Pie ROM, stock recovery and kernel, Magisk installed, TWRP backup done.

If I boot into TWRP and wipe everything except internal storage, restore TWRP backup to Slot A and Slot B, I should be able to boot to both slots right?

Sent using Tapatalk
[Google Pixel 2 XL Guides, News, & Discussion] my370z:
What are you recommendation for unlocked the bootloader between standard unlock or critical unlock?
[Google Pixel 2 XL Guides, News, & Discussion] CPngN:
Do both.
[Google Pixel 2 XL Guides, News, & Discussion] my370z:
What's the benefit of doing both? The first page said pick one. I wonder what are you guys picked?
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
I did both, originally I only did the standard unlock but that caused some issues flashing stuff, especially roms, once I unlocked critical, everything flashed without issues.
[Google Pixel 2 XL Guides, News, & Discussion] my370z:
Thank you. I guess I can jump straight to critical unlock then. I don't have to do the standard then critical right?
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Both, standard and then critical. Either way, it will wipe your device clean, back to factory... Fyi
[Google Pixel 2 XL Guides, News, & Discussion] TonikJDK:
The first page is wrong, the OP has been asked a few times to fix it. Do both.
[Google Pixel 2 XL Guides, News, & Discussion] Az Biker:
Unless I am misunderstanding this quote from Google's page, only older bootloaders require critical unlock.

•For Pixel 2 XL only with loader version prior to TMZ20a: the critical partitions may also need to be unlocked before flashing. The unlock can be performed with this command, and should NOT be done on other devices:
[Google Pixel 2 XL Guides, News, & Discussion] TonikJDK:
You are correct, thank you for the save.
[Google Pixel 2 XL Guides, News, & Discussion] my370z:
I'm confused. I got the pixel 2 XL running latest pie. Am I supposed to do the standard first and then critical right? I'm ready to do this this Saturday when I got time.
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Like AZ Biker said 2 posts before yours. If you are already on 9.0, you no longer need to unlock critical as per the Google statement he linked to :good:
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
Never saw that before, thanks for the added info.

I unlocked mine when the device was 1st released, didn't realize Google finally came around and changed it.

Wonder if I should lock it back down then lol
[Google Pixel 2 XL Guides, News, & Discussion] Edmontonchef:
So if I have a tmz20k bootloader it shouldn't be criticaly unlocked? This is confusing.

Figured that was why I couldn't flash factory images.

Had to restore nandroid and sideload ota
[Google Pixel 2 XL Guides, News, & Discussion] Az Biker:
Bootloaders are chronologically / sequentially numbered. So your tmz20k comes long after the tmz20a mentioned on the Google page

Starting with bootloader tmz20a and all after or higher than tmz20a, (tmz20c, tmz20k, tmz21a, tmz25d etc.), critical_unlock is no longer required.

I don't think it is so much that bootloader tmz20a and higher " shouldn't " be critical_unlocked, I think it means that function or that command is no longer needed to upgrade the bootloader as before.

Hope that clears up any lingering confusion :D
[Google Pixel 2 XL Guides, News, & Discussion] CPngN:
Should be added to OP ;)

Also... if there's no apparent DOWNside, I say do both, because if you ever have to unlock critical later on after you've filled your phone with data, it's a much bigger pain in the butt than just doing it now and leaving it. I haven't read anywhere that leaving it locked will do anything special... perhaps it's more secure?? Pretty sure it doens't "pass more security checks" ...
[Google Pixel 2 XL Guides, News, & Discussion] _Crypto_:
did you roll back?

i didnt read that post or the 230+ pages of posts before that so i guess if my phone dont work its my fault, doh!

i got "fastboot too old" when installing factory image, must be me

i get "< waiting for any device >" when i try to boot the twrp img, yep me again :good:
[Google Pixel 2 XL Guides, News, & Discussion] post-mortem:
Are you using Windows? Double-check your PATH environment variable. You may well have an older version of adb/fastboot installed somewhere else on your computer. If that older version is listed earlier in your PATH than the newer one, the command prompt will always find the older one first (unless you execute the command from within the folder of the newer files).

Here is a decent guide on how to find and edit your environment variables:

https://www.java.com/en/download/help/path.xml
[Google Pixel 2 XL Guides, News, & Discussion] _Crypto_:
thanks, the version is good and executed from the folder, i deleted the version check in flash-all.sh, worked fine, not the point though... i just bought the phone and when it first turned on it wanted to update so i (and others im sure) updated making the unlock section obsolete i guess ... im finding lots of fragmented guides with outdated instructions and thought the sticked guide at xda would be the best. just want to root this 'unlocked' phone damn it
[Google Pixel 2 XL Guides, News, & Discussion] schleima:
Hey nathanchance, thank you so much for your hard work on this.

I've just bought a used Pixel 2 XL (Google store version) from swappa and the prior owner already updated to Android P.

I'm about to activate it on my carrier (Sprint) and then unlock bootloader and root.

Can you confirm that the root method you detailed so carefully on Nov 17, 2017 will play nicely with Android P in October 2018?

Just trying to get some minimal amount of assurance before I inadvertently bork up my device.

Thanks!
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
The root method with magisk has largely remained the same. Only the version has changed since then.

Unlock your bootloader

Fastboot into twrp

Flash twrp (if you want to keep custom recovery)

Flash your custom kernel (recommend)

Let system boot up

Go back to twrp and flash magisk 17.1

Boot up, and you should be rooted :good:
[Google Pixel 2 XL Guides, News, & Discussion] schleima:
Thanks for the quick reply

Generally when I root (which is not that often) I flash a custom rom like Dirty Unicorns or LineageOS that has a custom kernel baked in... how would that affect (or would it affect) the order that you've outlined above?

The A/B partition has me freaked out a little as I've never flashed a device like this before and I don't want to inadvertently end up erasing my IMEI or something
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Don't sweat the A/B partitions. That only comes into play when flashing custom roms.

Using a custom kernel was necessary for a while to keep touch response in tact while using twrp. However, other users have reported that twrp works fine with the stock kernel as of late. Most of us like the custom kernels for tweaking and enabling custom features that they support. :cool:
[Google Pixel 2 XL Guides, News, & Discussion] schleima:
My plan is to flash a custom rom-- LineageOS or Dirty Unicorns.
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
No problem. All the rom Devs have good instructions in their OP's :good:
[Google Pixel 2 XL Guides, News, & Discussion] xterminater07:
I am rooted and verified by root checker but I cannot overwrite files in vendor/lib
[Google Pixel 2 XL Guides, News, & Discussion] schleima:
After struggling with Moto G5 Plus for 4 days with loss of 3G/LTEdata after rooting, I can't believe how freaking easy it was to unlock and root Taimen. I'm done with Motorola for good.
[Google Pixel 2 XL Guides, News, & Discussion] dinamyk:
thank you for created this great guide

I just got my pixel 2 xl 128gb yesterday, flash the latest factory image on it and follow this guide to root the phone no issue.

but when it comes to twrp, i was having problem get the phone to boot into twrp from the boot loader

after typed in fastboot boot twrp.img

it returns the message below (as shown in the attachment)

creating boot image

downloading 'boot.img' (instead of twrp.img)

then phone reboots, and comes back to the bootloader screen

i had downloaded the lastest drivers and SDK package as mentioned in the OP post

pixel 2 xl did came with a USB cable to that connect to my PC type A connector, so I've used my wifes oneplus 6 USB cable which is type A to type C cable.

were able to unlock bootloader and flash the complete factory image and patch the boot image for magisk rooting

everything went well except for twrp booting / installing

anyone ran into this issue and know how to resolve this ?

Thank you
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
Did you change the full file name of the twrp.img?

Usually I just run..fastboot boot twrp-3.2.3-1-taimen.img without issue. You might also try another cable. However, it seems the one you used worked fine. Then again, the P2XL is notorious for not liking cables at any given time :cool:
[Google Pixel 2 XL Guides, News, & Discussion] dinamyk:
Thanks for the response Badger

yeah, I actually had renamed it just to make it easier to type.

I had tried again, with flashing unlock or flashing unlock_critical

neither of those solve the issue, still not able to boot into twrp.img through fastboot
[Google Pixel 2 XL Guides, News, & Discussion] Badger50:
So you've run both...

fastboot flashing unlock

And

fastboot flashing unlock_critical

Correct?
[Google Pixel 2 XL Guides, News, & Discussion] dinamyk:
Not exactly, I had ran flashing unlock the initial try out.

And after the post I had re flash all from the latest factory image again and tried with flashing unlock_critical and also tried flashing unlock after it, but it reported that is is already unlocked. So I flashing lock_critical to revert to locked boot loader and tried again with unlock first and unlock_critical , but same thing telling already unlocked, no way I can run both.

And whenever the unlock or unlock_critical was ran, the phone screen will jumped out the unlock confirmation screen, once unlocked, there were no other way ran the other unlock command
[Google Pixel 2 XL Guides, News, & Discussion] dinamyk:
Alright, guys, it turns out that the twrp img file downloaded was wrong size, download shows as completed, but only 7kb instead of 40MB and it did happened couple more time when I tried to re-download it and finally was able to get the 40MB file

now i'm able to boot into twrp and flash the zip file
[Google Pixel 2 XL Guides, News, & Discussion] ashish7adlakha:
will unlocking bootloader or rooting kill the Widevine L1? my OG Pixel XL shows L3 now and i cant play netflix and prime above 480p. can someone check using DRM Checker App in playstore
[Google Pixel 2 XL Guides, News, & Discussion] bodieism:
Rooting with Magisk

I started with the Rooting for Magisk section and everything appeared fine until I opened the MagiskManager app:

I'm not sure what to try next as I've never used Magisk before. I was going to try and download some modules to see if they worked but the download tab in the app just hangs.

Extra details:

1. I downloaded 8.0.0 (OPD1.170816.010, Sep 2017) from Google's website.

2. I unzipped the file

3. In the unzipped file I found another zip titled image-taimen-opd1.170816.010

4. From within that zip I copied the boot.img file and completed the steps in the Rooting with Magisk guide

Was that the boot.img that I needed?
[Google Pixel 2 XL Guides, News, & Discussion] Prattham:
I also did the same and have no problems so basically sequence doesn't matter

Cheers ?

---------- Post added at 11:17 PM ---------- Previous post was at 10:19 PM ----------

You can just flash the latest zip 1456 version from twrp beta 2 and it works fine
[Google Pixel 2 XL Guides, News, & Discussion] bodieism:
Thanks for the help. I actually had just gotten it working after reading this page. Specifically posts 1031 & 1036.
[Google Pixel 2 XL Guides, News, & Discussion] KelpoOrganic:
Unable to unlock bootloader

Hey guys

When I try to run "fastboot flashing unlock" while in the bootloader it fails.

The message is "FAILED(remote: unknown command)" or "FAILED (command write failed (No error))"

I have usb debugging and oem unlocking set on in developer settings and can run the command to launch into the bootloader fine. One thing I noticed is that there are no devices when I run "adb devices" while I'm in the bootloader, so maybe thats one of the issues. It's seen in fastboot devices though.

I bought the unlocked version from the Google store.

Guys I solved it, its because I was connected to usb c on my laptop instead of usb a
[Google Pixel 2 XL Guides, News, & Discussion] clothednblack:
That's crazy, I have to use Usb-c port on my laptop for everything to work right (flashing and file transfers). Standard USB port tends to forget my phone is plugged in. Glad you got it working.