[Q] problem with locking bootloader - Google Pixel 2 XL Questions & Answers

Hello everyone.
I've got some strange problem with my pixel 2 xl.
I did googleand searched here to find any solution but I couldn't find any.
So, I unlocked the bootloader because I wanted to root my phone and install a custom rom.
But after a while I realized that I loved my phone more when he was unrooted... so I unrooted my phone with the "flash all.bat" that google provide us.
The strange thing is that everytime Im locking the bootloader Im getting a message "Can't find valid operating system...." and im getting a bootloops with that message.
the only way I can turn the phone on properly is by unlocking the bootloader and keep it that way.............
what should I do?
Is it bad if I just keep it the bootloader unlock?

Maybe try running the flash all to both slots and see if you can relock then?

rickysidhu_ said:
Maybe try running the flash all to both slots and see if you can relock then?
Click to expand...
Click to collapse
I think this is the correct answer. You're going to want to flash-all the factory image to both slots before relocking the bootloader.
fastboot getvar current-slot *(take note of the current slot this command returns)*
flash-all
fastboot --set-active= *(=a or =b to change slot to the opposite the first command returned)*
flash-all
fastboot flashing lock_critical
fastboot flashing lock
fastboot oem device-info
Verify that the returned device info after the last command is;
(bootloader) Verity mode: true
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
Now you are back to 100% stock with locked bootloaders. Reboot and set up your factory fresh device.

Namolas said:
I think this is the correct answer. You're going to want to flash-all the factory image to both slots before relocking the bootloader.
fastboot getvar current-slot *(take note of the current slot this command returns)*
flash-all
fastboot --set-active= *(=a or =b to change slot to the opposite the first command returned)*
flash-all
fastboot flashing lock_critical
fastboot flashing lock
fastboot oem device-info
Verify that the returned device info after the last command is;
(bootloader) Verity mode: true
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
Now you are back to 100% stock with locked bootloaders. Reboot and set up your factory fresh device.
Click to expand...
Click to collapse
thanks for your answer!
im trying to switch slots between a to b but it says to me "fastboot: unknown option -- set-active=b

Orpalili said:
thanks for your answer!
im trying to switch slots between a to b but it says to me "fastboot: unknown option -- set-active=b
Click to expand...
Click to collapse
Looks like you've got a space in between -- and set?
Needs to be one space after fastboot and that's all;
fastboot --set-active=b

I'm more interested in what Ill effects you had being rooted. Unless I'm actually using root to facilitate something in particular I can't even detect that root exists other than seeing the icons in the drawer...

Namolas said:
Looks like you've got a space in between -- and set?
Needs to be one space after fastboot and that's all;
fastboot --set-active=b
Click to expand...
Click to collapse
still not working :crying:

Orpalili said:
still not working :crying:
Click to expand...
Click to collapse
I don't know why, sorry. I just went through all the motions to make sure I didn't miss something but it all executes for me. Is that the only command not working for you??
Last login: Tue Feb 27 09:04:26 on ttys000
Codys-MBP:~ namolas$ fastboot devices
*****7/11****** fastboot
Codys-MBP:~ namolas$ fastboot getvar current-slot
current-slot: a
finished. total time: 0.001s
Codys-MBP:~ namolas$ fastboot --set-active=b
Setting current slot to 'b'...
OKAY [ 0.016s]
finished. total time: 0.016s
Codys-MBP:~ namolas$ fastboot flashing lock_critical
...
FAILED (remote: Set device locked! canceled)
finished. total time: 3.895s
Codys-MBP:~ namolas$ fastboot flashing lock
...
FAILED (remote: Set device locked! canceled)
finished. total time: 2.653s
Codys-MBP:~ namolas$ fastboot oem device-info
...
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: true

Namolas said:
I don't know why, sorry. I just went through all the motions to make sure I didn't miss something but it all executes for me. Is that the only command not working for you??
Last login: Tue Feb 27 09:04:26 on ttys000
Codys-MBP:~ namolas$ fastboot devices
*****7/11****** fastboot
Codys-MBP:~ namolas$ fastboot getvar current-slot
current-slot: a
finished. total time: 0.001s
Codys-MBP:~ namolas$ fastboot --set-active=b
Setting current slot to 'b'...
OKAY [ 0.016s]
finished. total time: 0.016s
Codys-MBP:~ namolas$ fastboot flashing lock_critical
...
FAILED (remote: Set device locked! canceled)
finished. total time: 3.895s
Codys-MBP:~ namolas$ fastboot flashing lock
...
FAILED (remote: Set device locked! canceled)
finished. total time: 2.653s
Codys-MBP:~ namolas$ fastboot oem device-info
...
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: true
Click to expand...
Click to collapse
yes thats the only command that not working for me

Orpalili said:
yes thats the only command that not working for me
Click to expand...
Click to collapse
I think I might know what the problem is.... You need to update your fastboot to the newest version.
https://developer.android.com/studio/releases/platform-tools.html

Namolas said:
I think I might know what the problem is.... You need to update your fastboot to the newest version.
https://developer.android.com/studio/releases/platform-tools.html
Click to expand...
Click to collapse
YESSSS!!!! IT WORKED!!
Thank you very much!!!!!!!!!!!!11:fingers-crossed::highfive::victory::laugh:

Thank you!
Namolas said:
I think this is the correct answer. You're going to want to flash-all the factory image to both slots before relocking the bootloader.
fastboot getvar current-slot *(take note of the current slot this command returns)*
flash-all
fastboot --set-active= *(=a or =b to change slot to the opposite the first command returned)*
flash-all
fastboot flashing lock_critical
fastboot flashing lock
fastboot oem device-info
Verify that the returned device info after the last command is;
(bootloader) Verity mode: true
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
Now you are back to 100% stock with locked bootloaders. Reboot and set up your factory fresh device.
Click to expand...
Click to collapse
Hey man, just wanted to say thanks. You saved my ass!

thank you so much dude!
Namolas said:
I think this is the correct answer. You're going to want to flash-all the factory image to both slots before relocking the bootloader.
fastboot getvar current-slot *(take note of the current slot this command returns)*
flash-all
fastboot --set-active= *(=a or =b to change slot to the opposite the first command returned)*
flash-all
fastboot flashing lock_critical
fastboot flashing lock
fastboot oem device-info
Verify that the returned device info after the last command is;
(bootloader) Verity mode: true
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
Now you are back to 100% stock with locked bootloaders. Reboot and set up your factory fresh device.
Click to expand...
Click to collapse

After I flash updates; I always boot up first. To make sure it actually does before rooting, relocking.
I've read to many horror stories and written a couple myself.

Related

Bricked device: Cannot unlock, flash, boot, unable to mount partition, missing table

I had lollipop running without real issues for a while. After a complete battery drain, I put it on the charger. Upon trying to turn the device on, it hung on the Google screen showing an unlocked padlock at the bottom.
I tried to see how far I could go, and can boot into fastboot but no further.
I thought I would start the usual flashing process from the start by bringing it back to stock and then back to root. Initially the device was unlocked. I locked it with "fastboot oem lock" the rebooted to bootloader. Now when I run "fastboot oem unlock", the unit freezes up when I select Yes to confirm unlocking the bootloader.
Code:
C:\Android>fastboot oem unlock
...
(bootloader) Unlocking bootloader...
(bootloader) erasing userdata...
FAILED (status read failed (Too many links))
finished. total time: 898.264s
Previously, before I locked it, when I tried to flash recovery & bootloader, I received "FAILED (remote: flash write failure)" and "fastboot FAILED (remote: Partition table doesn't exist)" errors. Now, I cannot try to reflash because I can't get unlocked ("FAILED (remote: Bootloader is locked.)")
Current status:
Code:
C:\Android>fastboot-toolkit oem device-info
...
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) SB=Y
OKAY [ 0.016s]
finished. total time: 0.016s
integramodder said:
I had lollipop running without real issues for a while. After a complete battery drain, I put it on the charger. Upon trying to turn the device on, it hung on the Google screen showing an unlocked padlock at the bottom.
I tried to see how far I could go, and can boot into fastboot but no further.
I thought I would start the usual flashing process from the start by bringing it back to stock and then back to root. Initially the device was unlocked. I locked it with "fastboot oem lock" the rebooted to bootloader. Now when I run "fastboot oem unlock", the unit freezes up when I select Yes to confirm unlocking the bootloader.
Code:
C:\Android>fastboot oem unlock
...
(bootloader) Unlocking bootloader...
(bootloader) erasing userdata...
FAILED (status read failed (Too many links))
finished. total time: 898.264s
Previously, before I locked it, when I tried to flash recovery & bootloader, I received "FAILED (remote: flash write failure)" and "fastboot FAILED (remote: Partition table doesn't exist)" errors. Now, I cannot try to reflash because I can't get unlocked ("FAILED (remote: Bootloader is locked.)")
Current status:
Code:
C:\Android>fastboot-toolkit oem device-info
...
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) SB=Y
OKAY [ 0.016s]
finished. total time: 0.016s
Click to expand...
Click to collapse
Same exact thing happened to mine last week. I've followed the exact same steps as you with no luck..Maybe some has recovered from this?????
zerocool00 said:
Same exact thing happened to mine last week. I've followed the exact same steps as you with no luck..Maybe some has recovered from this?????
Click to expand...
Click to collapse
So was this a Google OTA update that caused this?
integramodder said:
So was this a Google OTA update that caused this?
Click to expand...
Click to collapse
Anyone else have any suggestions?

Unlocking bootloader for LEX727

Hi All.
I just bought the leeco pro 3 and want to unlock the bootloader. I followed the steps outlined in "X727 (US Model) Persistent bootloader unlock from 5.8.019s". I turned on USB debugging, permanently added USB device, and turned on the "allow oem unlocking option". Then, i rebooted to fast boot and tried the following commands and received an error.
Code:
:~$[B] fastboot oem device-info[/B]
...
(bootloader) Device product name: [le_zl1_oversea]
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: false
(bootloader) Serial console enabled: false
(bootloader) Serial hw output enabled: false
(bootloader) Display panel:
OKAY [ 0.083s]
finished. total time: 0.083s
:~$ [B]fastboot oem unlock-go[/B]
...
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.008s
:~$ [B]fastboot oem unlock[/B]
...
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.004s
[email protected]:~$ fastboot reboot
rebooting...
finished. total time: 0.007s
My phone came with 5.8.020S (I think) and I tried the above steps with that version. Then i updated to 5.8.021S and tried again and received the same issue. I checked for more updates but none were found.
I am sure this issue has been solved somewhere but I just want to make sure I do not brick this device. Please help.
Developer Options ---> usb debug ---> open ..
Developer Options ---> Oem unlock ---> open ..
Have you enabled them?
lazye53 said:
Developer Options ---> usb debug ---> open ..
Developer Options ---> Oem unlock ---> open ..
Have you enabled them?
Click to expand...
Click to collapse
Thanks for the reply.. Yes. Both of those options are on. I have tried multiple times to turn them off and on and redo the unlock at fast boot, but i get the same error
sagarc88 said:
Hi All.
I just bought the leeco pro 3 and want to unlock the bootloader. I followed the steps outlined in "X727 (US Model) Persistent bootloader unlock from 5.8.019s". I turned on USB debugging, permanently added USB device, and turned on the "allow oem unlocking option". Then, i rebooted to fast boot and tried the following commands and received an error.
Code:
:~$[B] fastboot oem device-info[/B]
...
(bootloader) Device product name: [le_zl1_oversea]
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: false
(bootloader) Serial console enabled: false
(bootloader) Serial hw output enabled: false
(bootloader) Display panel:
OKAY [ 0.083s]
finished. total time: 0.083s
:~$ [B]fastboot oem unlock-go[/B]
...
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.008s
:~$ [B]fastboot oem unlock[/B]
...
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.004s
[email protected]:~$ fastboot reboot
rebooting...
finished. total time: 0.007s
My phone came with 5.8.020S (I think) and I tried the above steps with that version. Then i updated to 5.8.021S and tried again and received the same issue. I checked for more updates but none were found.
I am sure this issue has been solved somewhere but I just want to make sure I do not brick this device. Please help.
Click to expand...
Click to collapse
For 5.8.021S, go to page 26 ....
sagarc88 said:
Thanks for the reply.. Yes. Both of those options are on. I have tried multiple times to turn them off and on and redo the unlock at fast boot, but i get the same error
Click to expand...
Click to collapse
I had this issue also this I solved it.
Undo the OEM allow to unlock reboot then enable OEM to unlock bootloader.
Still had the problem.
I ended up flash the bootloader then then ran the bootloader unlock commander and it worked.
Sent from my LEX727 using xda premium
mchlbenner said:
I had this issue also this I solved it.
Undo the OEM allow to unlock reboot then enable OEM to unlock bootloader.
Still had the problem.
I ended up flash the bootloader then then ran the bootloader unlock commander and it worked.
Sent from my LEX727 using xda premium
Click to expand...
Click to collapse
You need to flash 2 files via adb first, then run the unlock command.
I did it successfully for 021s
Sent from my LEX727 using Tapatalk
kukuteku said:
For 5.8.021S, go to page 26 ....
Click to expand...
Click to collapse
This worked perfectly!! Thank you very much.
Flashing Critical Locked
I'm just a dabbler in this stuff, but I think I understand everything required to get LineageOS on my LEX727. The problem is, in the process of learning, I think I locked the ability to flash aboot, and now I can't get the twrp recovery onto my phone. Does anyone have any ideas or know what to do? If I can do anything from here?
Thanks for any help!
MAHawbs said:
I'm just a dabbler in this stuff, but I think I understand everything required to get LineageOS on my LEX727. The problem is, in the process of learning, I think I locked the ability to flash aboot, and now I can't get the twrp recovery onto my phone. Does anyone have any ideas or know what to do? If I can do anything from here?
Thanks for any help!
Click to expand...
Click to collapse
What did locked ability flash abootd it d relock bootloader.
What did you ?
Sent from my SM-A730F using xda premium

fastboot unlock_critical derp

If I remember correctly, on the P2XL, we were able to do both unlock and unlock_critical from fastboot. And them lock them both separately. However, since the last two clean flashes for me, I'm unable to lock or unlock both the partitions. I can only unlock or lock either one of them. When I try to do the other, it fails stating that the device is already unlocked! Another thing I noticed is that when I run sudo fastboot oem device-info, I get the below:
Code:
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Charger screen enabled: true
OKAY [ 0.000s]
Finished. Total time: 0.000s
If you notice,
Code:
(bootloader) Device critical unlocked: false/true
is completely missing!
Due to this, my device remains uncertified and always fails safety net.
Any idea how to fix this?

Locked bootloader

Hey so I have a razer phone and I am stuck in the bootloader "download" mode Oem Unlock is disabled and cant enable because I am in a boot loop and I can't install stock because I can't unlock bootloader. Can anyone help me?
did you ever fix
have the same problem right now any help would be appreciated
does fastboot recognize the device?
same problem
Hi, I have the exact same problem,
fastboot is working, but cannot unlock
Code:
fastboot oem device-info
(bootloader) Verity mode: true
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
OKAY [ 0.008s]
Finished. Total time: 0.009s
Code:
fastboot flashing unlock
FAILED (remote: 'Flashing Unlock is not allowed
')
Finished. Total time: 0.004s
I cannot go into the android system, screen stay black, I need to wait for the battery to run out to test again from powered off phone (if I boot normally)
any help ?

[solved] lost build.prop -> no more booting

Hello kind saviour,
I accidentally deleted my build.prop file and now my phone is stuck on "the boot loader is unlocked and software integrity cannot be guaranteed..." screen at boot.
I use the AOSIP rom for OnePlus 7t,if that helps.
I do NOT want to lose any data and preferably not lose any system settings either.
Updating the ROM is OK for me. Please let me know if that is a good idea however.
The good part:
fastboot boot TWRP.img works, sdcard data de-cryption works, i can access files with MTP. Already made a backup of most important data.
I do not know which AOSIP version I have, but it's not the latest.
Doesn't work: fastboot boot magisk-patched.img (image might be too old?)
Doesn't work: fastboot reboot fastboot + fastboot boot boot.img -> Error:
*FAILED (remote: 'Download is not allowed on locked devices')
Booting from A instead of B goes into infinite booting animation.
adb commands during twrp don't work
No adb access anywhere else
I have no backup of build.prop
I have a builT.prop file and i suspect i saved it with wrong name (but I still can't access /system partition)
I had access to /system partition during first twrp boot, but accidentally mounted it as read only the first time.
After following reboots to twrp, system is always unmountable (both from slot a as well as slot b).
Even after deleting twrp folder from pc, the system partition remains unmountable:
*Failed to mount '/system_root' (Permission denied)
*Failed to mount '/vendor' (Permission denied)
bootloader is unlocked & phone is rooted with magisk.
If you could help me with a solution where i can keep my data you would make me soo happy. Having a rough time with life lately and you could be my second coming of Jesus
Thanks in advance.
Dirty flash latest aosip with TWRP or with fastboot
HueyT said:
Dirty flash latest aosip with TWRP or with fastboot
Click to expand...
Click to collapse
Thank you! I will try that later today and report back.
I tried dirty flashing the latest AOSIP update, and it made everything worse. (Maybe I was on the wrong slot??)
Now there is no fastbootD, no recovery, and neither possible to fastboot boot twrp.img!
Only thing that worked was the bootloader (fastboot).
I didn't even get the usual "the boot loader is unlocked and software integrity cannot be guaranteed..." screen.
However, i changed slot with fastboot and now I have recovery and fastbootD and can boot twrp again.
Now I'm really worried about messing up my next steps, so would be super grateful for any help you can give me. I believe we are near a solution here.
Big Questions:
Should I dirty update the rom from fastbootD or from TWRP?
Which *SLOT* do I update from?
History of how everything went wrong:
Spoiler: command line messages and responses
fastboot update OSiP-10-Gapps-hotdogb-20210621-img.zip
Code:
--------------------------------------------
Bootloader Version...: unknown
Baseband Version.....:
Serial Number........: 9de0f5c0
--------------------------------------------
extracting android-info.txt (0 MB) to RAM...
android-info.txt syntax error:
Setting current slot to 'b'
FAILED (remote: 'set_active command is not allowed on locked devices')
fastboot: error: Command failed
fastboot oem device-info
Code:
FAILED (remote: 'Unable to open fastboot HAL')
fastboot: error: Command failed
//I manually rebooted to bootloader (fastboot) here//
fastboot oem device-info
Code:
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
(bootloader) enable_dm_verity: true
(bootloader) have_console: false
(bootloader) selinux_type: SELINUX_TYPE_INVALID
(bootloader) boot_mode: NORMAL_MODE
(bootloader) kmemleak_detect: false
(bootloader) force_training: 0
(bootloader) mount_tempfs: 0
(bootloader) op_abl_version: 0x31
(bootloader) cal_rebootcount: 0x31
OKAY [ 0.050s]
Finished. Total time: 0.053s
fastboot reboot fastboot
Code:
Rebooting into fastboot
OKAY [ 0.004s]
< waiting for any device >
fastboot: error: Failed to boot into userspace fastboot; one or more components might be unbootable.
Update: i found a solution by updating adb/fastboot .exe files,
flashing twrp-3-5-1_10-hotdog-sdcardfs.img
and dirty flashing the latest aosip image in twrp's fastboot mode
I got a "QUALCOMM CrashDump Mode" message once but it boots to aosip now. We will see if the crashdump messages appear again or not.

Categories

Resources