yashsingh1/xdaforums huggingface dataset:
[Google Pixel 2 XL Questions & Answers] Icyou:
"For Pixel 2 XL only: 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:

fastboot flashing unlock_critical

If you are updating an older device, run this command:

fastboot oem unlock "

Above quote is from Google Factory Image page.
[Google Pixel 2 XL Questions & Answers] Az Biker:
thanks for the responses.

Since I already ran fastboot unlock, can I just run fastboot unlock_critical? Or do I need to do anything additional prior to running critical?

I've read [MENTION=6842057]nathanchance[/MENTION] 's guide where it says run one or the other, but haven't seen anything about running unlock prior to critical.

Thanks again!
[Google Pixel 2 XL Questions & Answers] Badger50:
You can just run it again. However, it WILL wipe your phone. Which is why I did mine back to back when I got the device. :good:
[Google Pixel 2 XL Questions & Answers] Az Biker:
What all have you done to your phone so far?

Once I get home tonight, I plan to:

-start fresh with unlock_critical

Then follow nathanchamce's guide to

-sideload nov update

-root,

-install Nathan's kernel
[Google Pixel 2 XL Questions & Answers] Badger50:
Just flashed the November update with fastboot, rooted with magisk using Snoke kernel, got V4A, AdAway, and TiBu up and running. Going to give Nathan's kernel a try in the next couple of days :good:
[Google Pixel 2 XL Questions & Answers] Wickidmasshole:
I ran the basic fastboot unlock when i first got the phone before i knew about the unlock_critical, so I went back recently to run the fastboot unlock critical and it would fail each time telling me the boot loader was already unlocked, even after i went and re-locked it just to run this command. Very interested to know if you can get it to work if you've already previously unlocked your bootloader because i had no luck
[Google Pixel 2 XL Questions & Answers] Az Biker:
Did you use a guide? A tool (wugs or skips)?

Did you run into any issues?
[Google Pixel 2 XL Questions & Answers] Az Biker:
This is why I asked the question. I wasn't sure if doing the basic unlock prior to the critical unlock would be an issue.

I'm running the critical unlock when I get home tonight (I want to be able to update the bootlader in the future), I'll let you know what I run into, if anything.
[Google Pixel 2 XL Questions & Answers] Badger50:
Didn't use any toolkits, just these 2 guides....

https://xdaforums.com/pixel-2-xl/development/2017-11-6-root-pixel-2-xl-t3701176 https://xdaforums.com/pixel-2-xl/how-to/guide-magisk-root-snoke-kernel-t3701930

....and didn't run into any problems at all. My P2XL is just humming right along. The battery on this thing is phenomenal! Takes me a good 2 days to knock it down to 10% :good:

Now we just need some TWRP to get Beans up and running :good::good:
[Google Pixel 2 XL Questions & Answers] iamjimmy:
Could you please tell me where you got Adaway and Viper4Android from? If I go to the OPs of these, the versions don't work on Pixel 2 XL. Thanks in advance.
[Google Pixel 2 XL Questions & Answers] Badger50:
I'm using the AdAway from here.....https://androidfilehost.com/?fid=817550096634744719

Using the V4A module that I downloaded from the Magisk Manager app. To use V4A, you'll need to disable Music FX app that comes from the factory images :good:
[Google Pixel 2 XL Questions & Answers] slaydog:
Which V4A module did you download, if you don't mind? There are 3 in Magisk...
[Google Pixel 2 XL Questions & Answers] Badger50:
This one :good:
[Google Pixel 2 XL Questions & Answers] marbertshere:
Hey, I have this exact same question. I originally unlocked it with the regular unlock command. Can I just run the critical command or do i have to relock the bootloader? How did you do it? Thanks!
[Google Pixel 2 XL Questions & Answers] MariuxReloaded:
I've unlocked the ordinary bootloader first, then the bootloader_critical without any problems :good:
[Google Pixel 2 XL Questions & Answers] jaybird779:
I got a replacement Pixel 2 XL and wanted to do unlock_critical from the outset. So, I enabled oem unlock, booted to bootloader, ran the command, the phone prompted me to unlock, which I did. I rebooted and it wiped my data. I thought I was all set. So, I setup my phone. I then went to root with Magisk and it told me I wasn't unlocked. I booted back into OS and it also showed that the bootloader wasn't unlocked. It's definitely a Google version (not Verizon). I rebooted into bootloader and ran the regular fastboot flashing unlock command and it wiped and rebooted to an unlocked bootloader. SO... what happened the first time? Has anyone seen this? Confused, I searched around online and found this link:

https://android.gadgethacks.com/how-to/unlock-bootloader-your-pixel-2-pixel-2-xl-0180707/

It says that when you send the fastboot flashing unlock_critical, you *also* need to send the fastboot flashing unlock command when you are prompted to confirm the unlock on the phone. Did anyone else have to do this? The instructions on XDA do not indicate this step and I don't see comments that others' phones still showed as locked when only using the unlock_critical command.

I tried booting into bootloader to run the unlock_critical command again and it says my bootloader is already unlocked, but there's no indication whether I have critical unlock or regular. I know I could lock it again and try to enter the instructions as provided on that site. However, I'd prefer not to reset my phone again.

Thoughts?
[Google Pixel 2 XL Questions & Answers] MariuxReloaded:
The bootloader_critical unlock has to be performed only if you want to flash the bootloader (e.g. when you flash a factory image), but, if you want to perform all the other operations, such as rooting, kernel flashing, etc., you have to unlock the ordinary bootloader, too.

So, these are the two Fastboot commands:

fastboot flashing unlock_critical (for bootloader flashing, you've already performed this)

fastboot flashing unlock (for all the other operations)

The request which appears on your phone, when you enter these two commands, is the same, and you have to allow the bootloader unlock in both cases :good:
[Google Pixel 2 XL Questions & Answers] ACiDxCHRiST:
The same thing happened to me. I switched from using the USB-C to C cable that came with the phone to a USB-C to A cable that I had previously. The USB-C to A cable seems much more reliable and stable for PC data connection. I also had to rapid fire the command 3 times to get it to work. I just typed the command and hit enter and then hit up arrow then enter, up arrow then enter. After the third time, the prompt showed up on my phone. Also, make sure you are using the latest platform tools. That unlock_critical command is new and won't work if you have an old version of fastboot.exe
[Google Pixel 2 XL Questions & Answers] rockingondrums:
As somebody has stated that unlock critical wiped their phone, I'm inferring that both commands are permanent states that are toggled once and they both wipe. So the wording that should be in the guide that lead me here should advise that if we EVER want to update the bootloader, without wiping down the road, is to run both commands at the same time. Right? Screw it, I'm running both now. I just got it in the mail today. I'm sure there will be a bootloader update between now and Pixel 3 XL. If not, better safe than sorry.
[Google Pixel 2 XL Questions & Answers] ACiDxCHRiST:
Bootloader updates are very common. Most of the time if it is just a monthly security update then it will stay the same. If it is a new version of Android such as v7.1.0 to v7.1.2, there will be a bootloader update. 8.0 September and 8.0 November had the same bootloader but 8.1 December is different.

If you want to flash Factory Images, then you should unlock both. Both will cause a data wipe so it is best to do them back to back and get it over with.
[Google Pixel 2 XL Questions & Answers] MariuxReloaded:
ACiDxCHRiST answered you in my place, rockingondrums ;)
[Google Pixel 2 XL Questions & Answers] rockingondrums:
Definitely. My crack flashing days are over but I hedged my bets on this one!
[Google Pixel 2 XL Questions & Answers] AdamT6:
Unlock critical needed for factory image update from DP2 to Stable. Documented.

Unlocked my bootloader just now for the first time. I hadn't seen the most recent posts above so I thought unlocking critical wasn't necessary based on what all I had read (including this thread a day or two ago).

With USB Debugging and OEM Unlocking enabled in Developer Settings here's what I did.

PS C:\adb> adb reboot bootloader
PS C:\adb> fastboot flashing unlock

Here's what happened (of note).

PS C:\Users\ME\Downloads\Pixel 2 XL\December\taimen-opm1.171019.011> .\flash-all.bat
target reported max download size of 536870912 bytes
sending 'bootloader_a' (36344 KB)...
OKAY [ 0.094s]
[B]writing 'bootloader_a'...
FAILED (remote: Flashing is not allowed for Critical Partitions)[/B]
finished. total time: 0.109s
rebooting into bootloader...

Maybe I got lucky here, as I was able to boot into the new factory image flashed install (full wipe). Skipped through initial setup and enabled Developer Options, confirmed "Bootloader is already unlocked" under OEM unlocking, reenabled USB Debugging and rebooted back to bootloader.

PS C:\adb> adb reboot bootloader
PS C:\adb> fastboot flashing unlock_critical
...
OKAY [ 12.009s]
finished. total time: 12.009s

PS C:\Users\ME\Downloads\Pixel 2 XL\December\taimen-opm1.171019.011> .\flash-all.bat
target reported max download size of 536870912 bytes
sending 'bootloader_a' (36344 KB)...
OKAY [ 0.159s]
[B]writing 'bootloader_a'...
OKAY [ 0.368s][/B]
finished. total time: 0.528s
rebooting into bootloader...

Success!

I just noticed the Bootloader Version report during the factory image flash. Both were the same before and after I was able to flash the bootloader with the factory image.

writing 'bootloader_a'...
FAILED (remote: Flashing is not allowed for Critical Partitions)
. . .
--------------------------------------------
Bootloader Version...: TMZ12a
Baseband Version.....: g8998-00164-1710262031
Serial Number........: 710KPXV0281498
--------------------------------------------

(Even though I visually confirmed on my PC, I copy and pasted twice to be doubly sure.)

writing 'bootloader_a'...
OKAY [ 0.368s]
. . .
--------------------------------------------
Bootloader Version...: TMZ12a
Baseband Version.....: g8998-00164-1710262031
Serial Number........: 710KPXV0281498
--------------------------------------------

It's academic for me since I was running a beta via OTA and Google's update without anything unlocked, but I am curious if I had been running 8.0.0 would I have been able to boot into 8.1.0 without having successfully written the new bootloader? Also a consideration for future updates if anyone has gotten away without unlocking critical so far.
[Google Pixel 2 XL Questions & Answers] ACiDxCHRiST:
No, you would not have been able to. Right after what you posted, there is a check for the bootloader version, and if you would not have been on TMZ12a, the script would have failed and exited with a bootloader version error. So the device wouldn't even have been updated to 8.1 much less being able to boot it.
[Google Pixel 2 XL Questions & Answers] equlizer:
How do i know if im critical unlocked? I used skipsoft toolkit
[Google Pixel 2 XL Questions & Answers] beezar:
Google specifically recommends unlocking both critical and non-critical for pixel 2 if you are going to flash, while for other phones (not sure about pixel 1) it says you can just unlock non-critical
[Google Pixel 2 XL Questions & Answers] MariuxReloaded:
Use the Fastboot command through Command Prompt on your PC and, if it says "OKAY (Error: already unlocked!)" or something similar, you'll know you have your bootloader/s unlocked :good:
[Google Pixel 2 XL Questions & Answers] equlizer:
what exactly do i type in to see if its unlocked already or not. I used the latest skipsoft tool so im assuming it is.
[Google Pixel 2 XL Questions & Answers] Badger50:
https://developers.google.com/android/

Oops...wrong one.

https://developers.google.com/android/images
[Google Pixel 2 XL Questions & Answers] elliwigy:
fastboot getvar all.. it should also tell him right on the fastboot screen
[Google Pixel 2 XL Questions & Answers] Ap3xGam3r:
So am I required to unlock critical if I want to flash a factory image?
[Google Pixel 2 XL Questions & Answers] Badger50:
Yup. Has to do with flashing the new bootloader.
[Google Pixel 2 XL Questions & Answers] Ap3xGam3r:
Ok, and will flashing a factory image relock the bootloader and wipe my data? I'm a noob at this flashing stuff haha.
[Google Pixel 2 XL Questions & Answers] bryantjopplin:
Not relock but wipe it will lol. Edit the bat file and remove the -w from basically the very last line.
[Google Pixel 2 XL Questions & Answers] Badger50:
No, it won't lock the bootloader, it WILL wipe your data if you use the flash-all.bat script that comes with every new update. However, if you remove the -w within the flash-all script, you will NOT loose any data. Bet your really confused now! :cool:

---------- Post added at 02:46 AM ---------- Previous post was at 02:45 AM ----------

Dang! Ninja'd again :cool:
[Google Pixel 2 XL Questions & Answers] Ap3xGam3r:
Oh I get it, but if I download a custom kernel and I end up not liking it, will flashing a factory image after removing -w replace it with the default kernel without wiping anything?
[Google Pixel 2 XL Questions & Answers] Badger50:
Yes. However, all you would need to do is flash the boot.img. No need to flash the whole factory image to get back to stock kernel :good:
[Google Pixel 2 XL Questions & Answers] bryantjopplin:
Be sure to extract that other zip inside the zip to get the boot IMG. Then all you would have to do is "fastboot flash boot boot.img"
[Google Pixel 2 XL Questions & Answers] Ap3xGam3r:
Alright sweet, thanks for the help! Can't wait to start flashing stuff
[Google Pixel 2 XL Questions & Answers] elliwigy:
howd u disable verity?
[Google Pixel 2 XL Questions & Answers] bryantjopplin:
Thats weird mine works

C:\Users\Bryant>fastboot oem device-info

...

(bootloader) Verity mode: true

(bootloader) Device unlocked: true

(bootloader) Device critical unlocked: true

(bootloader) Charger screen enabled: true

OKAY [ 0.005s]

finished. total time: 0.006s

---------- Post added at 06:27 PM ---------- Previous post was at 06:26 PM ----------

NVM noticed you wanted false. thought you posted that sorry. lol

---------- Post added at 06:33 PM ---------- Previous post was at 06:27 PM ----------

Wonder if these will work

fastboot oem disable_dm_verity

fastboot oem enable_dm_verity

EDIT: Dont work
[Google Pixel 2 XL Questions & Answers] elliwigy:
in ur original post it shows verity mode is off lol was just curious
[Google Pixel 2 XL Questions & Answers] bryantjopplin:
That's not my post lol. I tried pulling the oem strings from the bootloader img but I'm not sure since I only was able to do that from older devices that shown aboot in /Dev/block/device/by-name/ and used strings to get the info out but this one doesn't have aboot so idk what all the oem commands are.
[Google Pixel 2 XL Questions & Answers] Ap3xGam3r:
I have a weird issue...I did fastboot flashing unlock_critical and my device state says unlocked, but when I check using fastboot oem device-info it says that

(bootloader) Verity mode: true

(bootloader) Device unlocked: true

(bootloader) Device critical unlocked: false

(bootloader) Charger screen enabled: true

OKAY [ 0.012s]

finished. total time: 0.012s

But I typed in fastboot flashing unlock_critical and not fastboot flashing unlock. Now when I type in fastboot flashing unlock_critical it gives me an error saying my bootloader is already unlocked...what is happening?
[Google Pixel 2 XL Questions & Answers] bryantjopplin:
Don't do flashing_unlock_critical

Do flashing unlock_critical

But this will wipe don't forget
[Google Pixel 2 XL Questions & Answers] Ap3xGam3r:
I did type fastboot flashing unlock_critical, what do you mean?
[Google Pixel 2 XL Questions & Answers] bryantjopplin:
Your post shows flashing_unlock_critical so I was just saying
[Google Pixel 2 XL Questions & Answers] elliwigy:
try from platform.. but our aboot is the abl lol
[Google Pixel 2 XL Questions & Answers] bryantjopplin:
That's only a meg or so and didn't have much info. Working on the abootool but have issues with enum but everything up to there seems ok. Do you have the oem commands?
[Google Pixel 2 XL Questions & Answers] elliwigy:
nope.. i dont think theyre in the abl.. i kno for fact tho abl=appsbootloader=aboot lol.. they got real clever with oreo.. quite a bit of partition changes..

if u look at my attached pics oem commands could be on any one of the ab block devices as those all pertain to the abl lol
[Google Pixel 2 XL Questions & Answers] chinhe:
any success critical_unlocking already unlocked bootlader? this pixel 2 making me out of my head...
[Google Pixel 2 XL Questions & Answers] Badger50:
Do you have a Verizon or Google variant phone?
[Google Pixel 2 XL Questions & Answers] chinhe:
I have a google variant. I followed a vid instruction on utube but on the 'fastboot boot twrp....' process i cant go further, i definitely doing something wrong
[Google Pixel 2 XL Questions & Answers] Badger50:
A few things to check...

Is your SDK/platform-tools up to date?

Are you using a laptop, desktop, Windows, or Mac?

What type of USB cable are you using?

Does your phone ID come up when in fastboot mode and you type in...fastboot devices?
[Google Pixel 2 XL Questions & Answers] chinhe:
Yes sir i have updated the drivers before starting just fastbooting twrp gives me problem

Btw im using a usb 3.0 to type-c

Yes my laptop win10 recognizes my pixel when im on fastboot mode.
[Google Pixel 2 XL Questions & Answers] Badger50:
I'd still try a USB 2.0 cable or a different port. Sounds stupid I know, but it's been a well reported issue on laptops with flashing or issuing fastboot commands. ?
[Google Pixel 2 XL Questions & Answers] gianton:
Replace the files in your adb folder with the 4 files in the attached zip. Fastboot flashing unlock_critical didn't work before but it worked right after replacing these files for me.
[Google Pixel 2 XL Questions & Answers] chinhe:
Nice thnx for the help guys im gonna try tonight when i get back home. Can't wait to get Diiiiirty!! :good:
[Google Pixel 2 XL Questions & Answers] xantonin:
Incase it helps anyone, I have a Google Pixel 2 XL and I had to run

fastboot flashing unlock_critical

first, then

fastboot flashing unlock

I ran fastboot oem device-info between each one to confirm what had been unlocked.
[Google Pixel 2 XL Questions & Answers] Mellon7:
Thank you sir! was looking specifically for this info (order of commands)
[Google Pixel 2 XL Questions & Answers] ZeroSkylineX:
Hey guys, silly question but what would happen if I tried unlock_critical after it was already oem unlocked, rooted with Magisk and TWRP installed? I just heard about critical unlock now. It's not running a custom rom but would I have to relock, unroot, and start off with unlock_critical first?

For the record, the phone is still clean as I haven't put any data onto it so I'm still in the early stages. I tried fastboot flashing unlock_critical while the phone was already unlocked and rooted but nothing happened. It didn't recognize the command and it directed me to a list of fastboot commands as if I didn't type unlock_critical at all. Any advice?
[Google Pixel 2 XL Questions & Answers] Badger50:
If you are successful at.."fastboot flashing unlock_critical".....it will completely wipe your phone. There are times when/if you try that command, and it doesn't work, it could be a USB/cable problem. Also, make sure your device drivers and adb/fastboot are up to date. :good:
[Google Pixel 2 XL Questions & Answers] ZeroSkylineX:
Hi Badger, thank you for your response. I was successful in unlock_critical (the reason it didn't work earlier was because I tried to use Command Prompt from Windows instead of the dedicated SDK folder from Google (d'oh). Moving forward, it wiped my entire phone including root and recovery- I was curious if I had to reroot and reflash TWRP and I was right.

Recap: My phone was OEM unlocked, rooted and had TWRP recovery. I performed the unlock_critical AFTER these have been done. After I successfully critically unlocked the phone, the phone went into a bootloop between the boot up and TWRP. It would not go past the Google boot logo and kept reverting back to TWRP and back to the Google boot logo. TWRP was still installed despite the unlock but it was clearly not working, it gave me the error "invalid argument" (see attached screenshot) and it wouldn't let me boot into recovery. TWRP was constantly closing and did not even pause at the menu like it should. Now I did not worry as I expected this to happen, this was just an experiment as no one here had a clear answer and now I know. I had to reflash the factory image, TWRP, and reroot. I did not have unlock again. I'm glad I got this out of the way since my phone was still new.

P.S For the ones who used toolkits to have their bootloaders unlocked, they are NOT critically unlocked. (I don't even think they have the option...? I checked and I did not see a unlock_critical option) The only way to check is to open your Command Prompt and type "fastboot oem device-info". I've attached photos of before and after critically unlocking., I hope this post helps anyone else who may have the same concern in the future.

The files I've used are from here: http://highonandroid.com/twrprecovery/
[Google Pixel 2 XL Questions & Answers] ahhl:
bryantopplin

i hope you can help me.

i am novice. not programmer. but because i want to enable my phone poweron boot, i forced to learn this (good for me anyway)

i have download abootool, python interpreter, python-adb

this is because i want to find fastboot command for my phone

but i am stuck

can direct me ( or teach me:D) where can i find, to setup python so i can run python command for abootool.

i tried to place abootool and adb.zip, fastboot.zip, it not working.

can help me
[Google Pixel 2 XL Questions & Answers] bryantjopplin:
I used it in Linux. There was another tool for Windows that have more info tho. Strings I believe is the name. Give that a go as well
[Google Pixel 2 XL Questions & Answers] ahhl:
python strings? sorry searching strings alone will come out a lot of things
[Google Pixel 2 XL Questions & Answers] buzzaldrine:
i tried this. i relocked my bootloader, the state was written locked

then i tried to unlock_critical and it just says that my bootloader is unlocked but its not.

not quite understanding how to unlock critical if my device bootloader is already unlocked
[Google Pixel 2 XL Questions & Answers] uicnren:
the critical component allows the bootloader to be written for certain versions, without the critical the bootloader cannot be written to.

from the developer pages:

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:

fastboot flashing unlock_critical
[Google Pixel 2 XL Questions & Answers] CyberpodS2:
Actually maybe you misread the guide. It explicitly instructs to do fastboot unlock and says critical is optional...
[Google Pixel 2 XL Questions & Answers] buzzaldrine:
Gotcha

Maybe you know this better then me.

I have a bootloader version tmz12bb

And pretty much only March 5th factory image from Google has that bootloader. But I would like to go back to Nov factory image but the bootloader isnt the same version.

Is their no way around this?
[Google Pixel 2 XL Questions & Answers] CyberpodS2:
Curious why the revert to Nov??
[Google Pixel 2 XL Questions & Answers] buzzaldrine:
From what I seen the battery life on the older updates was much better. I know this probably depends on individual devices. But It was just to see if there would have been a difference in my current batter y life and that to the older updates