Simple question about relocking my bootloader - Google Pixel 2 XL Questions & Answers

I unlocked the bootloader on my phone because I was planning on flashing a different ROM on the phone and I never got around to it. Now I need to send it back because of a screen issue and I want to relock it so I don't get any grief from Google about it. So can I just run the lock command or do I need to flash a factory image first and then do the lock?

loki993 said:
I unlocked the bootloader on my phone because I was planning on flashing a different ROM on the phone and I never got around to it. Now I need to send it back because of a screen issue and I want to relock it so I don't get any grief from Google about it. So can I just run the lock command or do I need to flash a factory image first and then do the lock?
Click to expand...
Click to collapse
Be darn sure you are full stock!! No magisk or modules or custom kernels. I just did this for a trade in for my P4XL as well. After I uninstalled magisk and custom kernel, I factory reset, let it boot up, then went back and clean flashed the factory image. In essence, wiping the phone twice. Also, be sure and leave OEM unlocking and USB debugging turned on. Then just go to fastboot and run...fastboot flashing lock. And there ya go :good:

Badger50 said:
Be darn sure you are full stock!! No magisk or modules or custom kernels. I just did this for a trade in for my P4XL as well. After I uninstalled magisk and custom kernel, I factory reset, let it boot up, then went back and clean flashed the factory image. In essence, wiping the phone twice. Also, be sure and leave OEM unlocking and USB debugging turned on. Then just go to fastboot and run...fastboot flashing lock. And there ya go :good:
Click to expand...
Click to collapse
I was in the process of rooting it and somehow soft bricked the phone..so I has to reflash the stock image once. After that I didn't mess with uit again but I left it unlocked because I figured id try again at some point. So yeah Ill just reflash a factory image just to be extra sure and then relock it.

loki993 said:
I was in the process of rooting it and somehow soft bricked the phone..so I has to reflash the stock image once. After that I didn't mess with uit again but I left it unlocked because I figured id try again at some point. So yeah Ill just reflash a factory image just to be extra sure and then relock it.
Click to expand...
Click to collapse
This thread might help you :
https://forum.xda-developers.com/pixel-2-xl/help/lock-bootloader-steps-p2xl-t3968185

Yep I did that last night..worked fine, its all ready to go back now.

Related

unlock bootloader from bootlooping phone N5x

I wonder if anyone is able to help.
my 5x is stuck in bootloop. i can downkey on volume to menu but te recovery options just leads back to bootloop.
my bootloader is locked and from the bootloop i cant access the phones developer options as the phone wont boot up.
is there any way of unlocking the phone so i can reflash stock from a phone that wont boot up
MIni
oldsnow said:
I wonder if anyone is able to help.
my 5x is stuck in bootloop. i can downkey on volume to menu but te recovery options just leads back to bootloop.
my bootloader is locked and from the bootloop i cant access the phones developer options as the phone wont boot up.
is there any way of unlocking the phone so i can reflash stock from a phone that wont boot up
MIni
Click to expand...
Click to collapse
The actual bootloader unlocking is done in bootloader mode with fastboot.
Try unlocking it in fastboot anyway and see what happens. If your rom is corrupt it might not stop you.
Try restoring the stock image and see what it does, if it fails try unlocking the bootloader, ignoring the oem unlock process.
Are you on stock recovery? Are you on a custom rom? If you are have you tried dirty flashing it?
Have you tried clearing cache and delvik cache?
Darke5tShad0w said:
I don't think stock images require you to unlock the bootloader anymore.
Click to expand...
Click to collapse
When did that change? Reference?
sfhub said:
When did that change? Reference?
Click to expand...
Click to collapse
I checked again and it seems they were talking about OTA's. opps.
Then when I went to download the full image the other day they had changed it from a required warning to just a "if necessary" and I put it together wrong.

Really need help

So i have searched all over the internet and havent found ant help. My phone is in a bootloop and i can't get out of it, i have tried with Nexus root tool kit to factory reset but just bootloop have tried it twice. Also tried to install factory with TWRP but still bootloop. I have an unlocked bootloader, I also tried to lock it and start with a new factory image but didnät work either . So please help me if you can i'm willing to try anything can't afford a new phone right now.
BIG UPDATE
So now after some work with trying to fx this i have found the problem with it. It's that my phone dosen't install the files that i install with either adb or TWRP. I found this by putting pure nexus rom on the phone and installing it with TWRP and then remove it from the storage. That was when the storage on the phone said it was still zero even when i had choose to install a new rom on the phone. but it still bootloop with the google logo and the four dots that pulse and then reboots.
Another Update
So i tried with installing the pixel rom from the xda forum and it all went well and all with the insallation no errors what so ever but my boot animation changed to pixels but still continue to bootloop still don't know whats happening.
I'm not sure what state your device is in right now. Is the bootloader locked or unlocked? When you tried to lock it, don't try that again, did it lock or did it remain unlocked when you re-booted into the bootloader? Were you able to successfully flash the factory image?
I'd suggest you carefully read thru this and pay particular attention to how to flash a factory image, http://forum.xda-developers.com/nexus-5x/general/guides-how-to-guides-beginners-t3206930
Sent from my Nexus 9 using XDA-Developers mobile app
Not really
jd1639 said:
I'm not sure what state your device is in right now. Is the bootloader locked or unlocked? When you tried to lock it, don't try that again, did it lock or did it remain unlocked when you re-booted into the bootloader? Were you able to successfully flash the factory image?
I'd suggest you carefully read thru this and pay particular attention to how to flash a factory image, http://forum.xda-developers.com/nexus-5x/general/guides-how-to-guides-beginners-t3206930
Sent from my Nexus 9 using XDA-Developers mobile app
Click to expand...
Click to collapse
Whell when i locked the bootloader it got locked but then when it bootlooped for one to two hours i opened it again and went to ask the pros at xda. I also read through the guide you linked me and did as said in the tutorial but my phone is still bootlooping right now.
Did you successfully manually flash each of the image files in the latest factory image? Bootloader, radio, system, boot, etc.
jd1639 said:
Did you successfully manually flash each of the image files in the latest factory image? Bootloader, radio, system, boot, etc.
Click to expand...
Click to collapse
Yes i succesfully flashed everyone that was said in the guide.

Getting "Your device is corrupt. It can't be trusted and may not work properly"

Getting "Your device is corrupt. It can't be trusted and may not work properly"
Hey guys
I tried playign with the new magisk. Decided to factory reset and ran the script, and keep getting:
Getting "Your device is corrupt. It can't be trusted and may not work properly"
Any suggestions? I thought factory reset, literally reset everything...
Thanks in advance
docluv01 said:
Hey guys
I tried playign with the new magisk. Decided to factory reset and ran the script, and keep getting:
Getting "Your device is corrupt. It can't be trusted and may not work properly"
Any suggestions? I thought factory reset, literally reset everything...
Thanks in advance
Click to expand...
Click to collapse
A factory reset erases the partition where user data is stored. It does not touch any other partition. You're getting that message because the phone detects that the boot image is no longer stock. If you want to undo the changes you have made, you'll have to flash the stock Google image.
Ok, SO teh message is normal?
I flashed factory 8.0.0, and I get the same message,
TheSt33v said:
A factory reset erases the partition where user data is stored. It does not touch any other partition. You're getting that message because the phone detects that the boot image is no longer stock. If you want to undo the changes you have made, you'll have to flash the stock Google image.
Click to expand...
Click to collapse
docluv01 said:
Ok, SO teh message is normal?
After I did a factory reset, I got the message, clicked power when it asked to, then phone just sits at the google screen.
Click to expand...
Click to collapse
I haven't had a chance to test Magisk on this phone yet (I returned mine and am waiting on the replacement) but when I've used Magisk in the past, the first boot took a really long time. Give it like 10 minutes or so. If it never makes it past that, something went wrong and you should flash the stock image.
Oh wait, you get the same message if you flash the stock image? Well in that case, I'm not sure what's wrong. You may need to re-lock the bootloader before that message goes away, but make sure you're on 100% stock software before that happens. It might have something to do with the fact that Pixel devices have A and B firmware slots, so if you bring A back to stock, B might still have the Magisk patched image on it. Someone more familiar with Pixel devices should chime in.
TheSt33v said:
I haven't had a chance to test Magisk on this phone yet (I returned mine and am waiting on the replacement) but when I've used Magisk in the past, the first boot took a really long time. Give it like 10 minutes or so. If it never makes it past that, something went wrong and you should flash the stock image.
Click to expand...
Click to collapse
Well, to clarify...
I was able to get Magisk to run fine. But decided I wanted fresh stock image, so went to flash stock google image, flash went fine, but at reboot i get the same thing. could this be a slot issue?
docluv01 said:
Well, to clarify...
I was able to get Magisk to run fine. But decided I wanted fresh stock image, so went to flash stock google image, flash went fine, but at reboot i get the same thing. could this be a slot issue?
Click to expand...
Click to collapse
I'm thinking so. I'm not sure what the proper procedure is for designating which slot you're flashing to on the Pixel 2's, but it's possible that you now have 1 slot with stock firmware and 1 slot with the Magisk patched image. For the original Pixel devices, the partition names were boot_a and boot_b. So I think, and someone please correct me if I'm wrong, fastboot flash boot <file> will flash the file to whichever slot is active, but using boot_a and boot_b will flash to those designated slots. So to fix your issue, you need to make sure that both boot_a and boot_b contain stock images.
Keep in mind that I've never owned a Pixel before now (although I'm pretty comfortable with flashing other android devices), and I'm not 100% sure about this, so you might not want to take my advice.
relock the bootloader.
Here is what I did:
Fastboot flashing lock
fastboot flashing lock_critical
then tried running the flash-all.bat, got FAILED being it was locked
SO then I ran
Fastboot flashing unlock
fastboot flashing unlock_critical
ran flash-all.bat, seemed to have gone fine. Phone reboots, then after you get the circle, where it says "erasing", after about 10 seconds it reboots and says "your device is corrupt..."
Ughhh, I hope I didn't brick this thing???
sorry guys, im an ass, i thought i was using teh latest fastboot, but apparently, not
all is good. I wish I was able to delete this thread
docluv01 said:
sorry guys, im an ass, i thought i was using teh latest fastboot, but apparently, not
all is good. I wish I was able to delete this thread
Click to expand...
Click to collapse
What was the fix cuz i am getting this now after flashing the latest factory image...help!! Lol
canemaxx said:
What was the fix cuz i am getting this now after flashing the latest factory image...help!! Lol
Click to expand...
Click to collapse
relock your bootloader
canemaxx said:
What was the fix cuz i am getting this now after flashing the latest factory image...help!! Lol
Click to expand...
Click to collapse
Make sure you have the latest version of adb and fastboot from the developer site.
https://developer.android.com/studio/releases/platform-tools.html
I got the message as soon as I unlocked the bootloader. It's normal
I had this issue with old platform tools and could not get my device to boot no matter how many times I flash-all'ed or changed the current boot slot. Upgrade to the latest platform tools and run the flash-all from that directory. If it's still not working, I also unlocked critical: fastboot flashing unlock_critical , so that the flash-all could flash my bootloader as well.
Like some have said already. This message appears every time you boot after you unlock your bootloader, whether you are still running stock OS or not. Same thing happened on my 6P. Only way to get it to go away is relocking the bootloader. Don't worry though, your device isn't really corrupt. Just a scare tactic by Google.
charesa39 said:
Like some have said already. This message appears every time you boot after you unlock your bootloader, whether you are still running stock OS or not. Same thing happened on my 6P. Only way to get it to go away is relocking the bootloader. Don't worry though, your device isn't really corrupt. Just a scare tactic by Google.
Click to expand...
Click to collapse
This is somewhat true. There are 2 different messages. One that says you are running unsupported software and the color is orange. This message pops up on every boot while the bootloader is unlocked. The other message says your device is corrupt, in red. The phone will not boot. I just ran into this issue while trying to flash the november update
EDIT:
I was able to resolve this by updating adb/fastboot. I updated adb/fastboot before but i guess i did it on my other computer.
So was there any way to fix this without having to relook the bootloader? I've already had to set this phone up a second time after the longest marathon session of trying to get both TWRP and magisk to live happily together on this device, so I'd rather not do it again if it's avoidable.
Literally all I did to cause this is press the button in TWRP to switch to slot A, and after rebooting I immediately got the new scarier message that requires a power button press to boot, after which you get the regular nag about the unlocked BL. The device then hung at the Google padlock screen, so I used the buttons to reboot into BL then tried TWRP. TWRP then hung at the splash screen, so I hooked up to the PC and fastboot booted TWRP. When I tried to switch back to B, strangely, it said I already was. I pressed the button to switch to B anyway, then rebooted. The error happened again, but at least the device boots. I tried rebooting again to see if it had cleared up, but unfortunately not.
I would really like to be rid of this without having to start over. I do have a nandroid but I don't even know if I trust a restore to be successful and potentially make **** worse. Thanks in advance!
Fastboot setactive=_b
Double check exact command but this worked for me.
Make sure you flash boot.img first using
Fastboot flash boot XXX.img
Sent from my Pixel 2 XL using Tapatalk
matt1313 said:
Fastboot setactive=_b
Double check exact command but this worked for me.
Make sure you flash boot.img first using
Fastboot flash boot XXX.img
Sent from my Pixel 2 XL using Tapatalk
Click to expand...
Click to collapse
I was able to switch back and forth between the slots with fastboot. I thought maybe I was getting the error because they had two different boot images installed, so I backed up my boot on side B, and then restored it to slot A. No dice. I still get the error message.
IrocD said:
I was able to switch back and forth between the slots with fastboot. I thought maybe I was getting the error because they had two different boot images installed, so I backed up my boot on side B, and then restored it to slot A. No dice. I still get the error message.
Click to expand...
Click to collapse
Flash boot.img first. Don't select which slot
Then reboot bootloader and fastboot active slot b
Sent from my Pixel 2 XL using Tapatalk

Bootloader says device is unlocked?

I've been trying to unlock my bootloader using "fastboot unlock_critical", but it throws me an error, saying "Device already: unlocked!" even though in the fastboot menu, it says my device state is locked.
If I do the regular unlock it seems to work.
Prior to this I had tried flashing a ROM through TWRP. I unlocked (not critical), then booted into the TWRP image, flashed the TWRP zip, and then flashed the Nitrogen ROM. But when I rebooted, it would just boot me into the fastboot menu, and I wound up having to flash a stock image from google. And this is where I'm at now.
I made sure that the right options are turned on in developer settings, and I even tried relocking the bootloader. Any ideas? Is critical unlock needed to flash roms through TWRP? Thanks
raisins said:
I've been trying to unlock my bootloader using "fastboot unlock_critical", but it throws me an error, saying "Device already: unlocked!" even though in the fastboot menu, it says my device state is locked.
If I do the regular unlock it seems to work.
Prior to this I had tried flashing a ROM through TWRP. I unlocked (not critical), then booted into the TWRP image, flashed the TWRP zip, and then flashed the Nitrogen ROM. But when I rebooted, it would just boot me into the fastboot menu, and I wound up having to flash a stock image from google. And this is where I'm at now.
I made sure that the right options are turned on in developer settings, and I even tried relocking the bootloader. Any ideas? Is critical unlock needed to flash roms through TWRP? Thanks
Click to expand...
Click to collapse
This may sound crazy, but according to your post, you gave the wrong command. It's...fastboot flashing unlock_critical ?
Badger50 said:
This may sound crazy, but according to your post, you gave the wrong command. It's...fastboot flashing unlock_critical ?
Click to expand...
Click to collapse
That was my mistake in the post. I think I figured out my issue..
I think unlock and unlock_critical were independent in a way? As far as re-locking goes at least. See: https://forum.xda-developers.com/pixel-xl/how-to/pixel-xl-fastboot-commands-t3490080
I never tried the "flashing lock_critical" so I'm thinking my device was still flagged as unlocked_critical from when I tried the first time, and when I did the "flashing lock", it changed my status to lock in the fastboot menu.
Anyway, my phone crashing when flashing the rom was a separate issue.. I had trouble wiping dalvik cache and data, but it works now.
On the topic of flashing roms for this phone.. Is it worth it in your opinion? I was looking forward to trying the edge squeeze, but it looks like it won't work on roms for now, so I'm thinking about going to just stock + root. Not sure how much customization you lose on stock versus custom roms though.
raisins said:
That was my mistake in the post. I think I figured out my issue..
I think unlock and unlock_critical were independent in a way? As far as re-locking goes at least. See: https://forum.xda-developers.com/pixel-xl/how-to/pixel-xl-fastboot-commands-t3490080
I never tried the "flashing lock_critical" so I'm thinking my device was still flagged as unlocked_critical from when I tried the first time, and when I did the "flashing lock", it changed my status to lock in the fastboot menu.
Anyway, my phone crashing when flashing the rom was a separate issue.. I had trouble wiping dalvik cache and data, but it works now.
On the topic of flashing roms for this phone.. Is it worth it in your opinion? I was looking forward to trying the edge squeeze, but it looks like it won't work on roms for now, so I'm thinking about going to just stock + root. Not sure how much customization you lose on stock versus custom roms though.
Click to expand...
Click to collapse
If you like active edge, then keep stock+root, and maybe a few magisk modules and you'll be more than fine. The main reason I like a custom rom is for long press to kill an app, and a few status and nav bar tweaks. Not to mention, I just enjoy fiddling with em ??

Weird recovery of a crashed 8 pro.

Popping in to give some feedback as always with my stuff.
Last night while using lucky patcher something must have happened it didn't like because I lost my wallpaper and my call history, at that point I figured she needed a restart. This brought me too a boot that would crash 40 seconds later and boot into whatever it was explaining boot issues
I tried clearing cache in the stock recovery but that didn't help
So I wiped the system settings only
Phone restarted as a fresh phone and is running great! First thing I did was look for and launch majisk, it needed to install some stuff but the damn think came back fully rooted!!!
So if all else fails wipe system in factory recovery.
It saved me a good bit of time unlocking bootloader and all that jazz
Hope it helps someone else when they get to a loop
Merry Christmas all
Smittyzz said:
Popping in to give some feedback as always with my stuff.
Last night while using lucky patcher something must have happened it didn't like because I lost my wallpaper and my call history, at that point I figured she needed a restart. This brought me too a boot that would crash 40 seconds later and boot into whatever it was explaining boot issues
I tried clearing cache in the stock recovery but that didn't help
So I wiped the system settings only
Phone restarted as a fresh phone and is running great! First thing I did was look for and launch majisk, it needed to install some stuff but the damn think came back fully rooted!!!
So if all else fails wipe system in factory recovery.
It saved me a good bit of time unlocking bootloader and all that jazz
Hope it helps someone else when they get to a loop
Merry Christmas all
Click to expand...
Click to collapse
You can do a full Factory Reset and remain rooted. Since the boot.img is patched and flashed to your device. A full reset wont lock your bootloader too.
Only if you use MSM Tool or relock the bootloader manually (and flash a non rooted boot img beforehand) you relock your device.
xtcislove said:
You can do a full Factory Reset and remain rooted. Since the boot.img is patched and flashed to your device. A full reset wont lock your bootloader too.
Only if you use MSM Tool or relock the bootloader manually (and flash a non rooted boot img beforehand) you relock your device.
Click to expand...
Click to collapse
Good to know thank you
Merry Christmas

Categories

Resources