[Very Technical] Did fastboot returns wrong bootloader lock state for MRA58K?

kschang

Senior Member
Dec 11, 2010
440
72
0
San Francisco, CA
Was using WugFresh's Nexus Root Toolkit, updated N7 to MRA58K. Try to update to 58U, and got "bootloader still locked", when I know for sure it was NOT locked as I was able to update to M from L previously.

So I did a little digging in Fastboot.

One way to get bootloader status is

Code:
fastboot oem device-info
This returns, among other things

Code:
Device unlocked: false
However, using a different command

Code:
fastboot getvar lock_state
(or getvar all if that doesn't work)

Got me instead...

Code:
(bootloader)   lock_state: unlocked
Which is the result I was expecting.

So, you think someone over at Nexus ROM patching screwed up the oem device-info output? Or did I interpreted the flags wrong? Which flag to trust? Should they say the same thing? :D
 

pk-sanja

Senior Member
Jul 10, 2013
141
74
0
I had exact the same Situation tonight. Bootloader unlocked but nexus toolkit tells me it's locked. Tried several times... No chance, i belvieve the nexus toolkit update screw something up. Anyway i manged to flash factory 6.0 image throuhh adb without problems.

Gesendet von meinem Nexus 5 mit Tapatalk
 

madbat99

Senior Member
Mar 1, 2014
5,538
3,285
113
I had exact the same Situation tonight. Bootloader unlocked but nexus toolkit tells me it's locked. Tried several times... No chance, i belvieve the nexus toolkit update screw something up. Anyway i manged to flash factory 6.0 image throuhh adb without problems.

Gesendet von meinem Nexus 5 mit Tapatalk
You mean through fastboot, not adb.
 
  • Like
Reactions: pk-sanja

kschang

Senior Member
Dec 11, 2010
440
72
0
San Francisco, CA
Plot thickens. According to Chris Simmonds, a Linux consultant who also do Android, bootloader status is shown in "secure" variable. I'll have to double check both my Moto X and my Nexus 7.
 

_jis_

Senior Member
Feb 5, 2012
1,422
498
113
You should read this: PSA: Unlocking The Nexus 6P Bootloader Requires The New 'Flashing' Command, Likely To Become Common For Many Devices In The Future
Maybe our beloved N7 20113 is in some transient state with its actual MM stock factory image versions regarding ability to answer queries for bootloader to see if the device is unlocked...
I am getting still the same result as you even on 6.0.0 MRA58V (unlocked):

Code:
C:\>fastboot oem device-info
...
(bootloader)    Device tampered: false
(bootloader)    Device unlocked: false
(bootloader)    SB=Y
OKAY [  0.000s]
finished. total time: 0.000s

C:\>fastboot getvar lock_state
lock_state: unlocked
finished. total time: -0.000s

C:\>fastboot flashing get_unlock_ability
...
FAILED (remote: unknown command)
finished. total time: -0.000s

C:\>
 
  • Like
Reactions: kschang

kschang

Senior Member
Dec 11, 2010
440
72
0
San Francisco, CA