1. anon(9072051)'s Avatar
    I want to re-lock my 6P's bootloader before using it for a trade-in via Project Fi. But every time I try "fastboot flashing lock," a help menu of fastboot commands is all that comes up. For the hell of it, I tried "fastboot oem lock" and "fastboot oem relock," but those just FAIL.

    Any ideas? "fastboot devices" works as it should, so it's not like I'm forgetting USB debugging or messing up the USB configuration.
    10-01-2017 09:21 PM
  2. SactoKingsFan's Avatar
    Try Nexus root toolkit
    10-01-2017 09:34 PM
  3. GSDer's Avatar
    But every time I try "fastboot flashing lock," a help menu of fastboot commands is all that comes up.
    Are you sure you have the latest version of the SDK (or the tools if you just installed ADB and fastboot)?

    What does the Help menu show for available commands?
    10-02-2017 01:23 PM
  4. anon(9072051)'s Avatar
    I tried updating the SDK to no avail. I updated it to API level 26 last month, but I'd have to be in front of it to tell you anything about the tools. I also downloaded USB drivers last night, but I was too tired to give it another go. I don't really remember the listed commands, but not a one of them was about locking the bootloader.

    I read a post on XDA from someone claiming that he had to update his "adb files" to get his phone to relock, but I don't know how you go about updating adb if its part of SDK.
    10-02-2017 03:16 PM
  5. GSDer's Avatar
    Well, I'm not going to be much help - I can't even get the damned 'fastboot devices' command to work correctly, even though ADB works fine. And of course fastboot doesn't spit out a version number so it's useless to see if I have the latest version.

    Edit: well, finally solved that problem so on to the important stuff.
    If you try 'fastboot flashing get_unlock_ability' does it display anything?
    Mine shows:
    ...
    (bootloader) 0
    OKAY [ 0.016s]
    finished. total time: 0.016s

    and my bootloader is currently locked so that's the correct status.
    (I wasn't willing to try 'fastboot flashing lock' in case it decided to wipe my device)
    10-02-2017 05:33 PM
  6. anon(9072051)'s Avatar
    If you try 'fastboot flashing get_unlock_ability' does it display anything?
    Nope. Just the same list of fastboot commands, namely:

    commands:
    update <filename> reflash device from update.zip
    flashall flash boot, system, vendor and if found,
    recovery
    flash <partition> [ <filename> ] write a file to a flash partition
    erase <partition> erase a flash partition
    format[:[<fs type>][:[<size>]] <partition> format a flash partition.
    Can override the fs type and/or
    size the bootloader reports.
    getvar <variable> display a bootloader variable
    boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
    flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
    flash it
    devices list all connected devices
    continue continue with autoboot
    reboot reboot device normally
    reboot-bootloader reboot device into bootloader
    help show this help message

    options:
    -w erase userdata and cache (and format
    if supported by partition type)
    -u do not first erase partition before
    formatting
    -s <specific device> specify device serial number
    or path to device port
    -l with "devices", lists device paths
    -p <product> specify product name
    -c <cmdline> override kernel commandline
    -i <vendor id> specify a custom USB vendor id
    -b <base_addr> specify a custom kernel base address.
    default: 0x10000000
    -n <page size> specify the nand page size.
    default: 2048
    -S <size>[K|M|G] automatically sparse files greater
    than size. 0 to disable

    And this is after I completely removed Android Studio and reinstalled it from scratch.

    I'm thinking the safest approach now is to just reset the phone for the trade-in without locking it.
    10-02-2017 08:22 PM
  7. GSDer's Avatar
    It looks like you have an old version of fastboot - that list you provided doesn't even include the 'flashing' command.

    Rather than fiddling with the SDK you should just download the latest version of ADB and fastboot. Before you do make sure you do a search (or dir /s in a Command window) and look for other instances of ADB and fastboot on your system and get rid of them all.
    10-03-2017 01:31 AM
  8. anon(9072051)'s Avatar
    Before you do make sure you do a search (or dir /s in a Command window) and look for other instances of ADB and fastboot on your system and get rid of them all.
    Good call! Thanks! But I'm still confused by this.

    I did find a separate "adb" folder in my C:drive and deleted it. (I don't even remember how it got there.) There was also another adb.exe in the Andromeda file I downloaded last month and used to set up rootless Substratum on the 6P. That's probably also the last adb version I used on the 6P.

    But how could that folder's fastboot be calling the shots from "outside" the platform-tools folder (it was in Downloads!) when the command window was located "in" the platform-tools folder, which has its own adb/fastboot tools?
    10-03-2017 08:13 AM
  9. GSDer's Avatar
    Part of the problem (lousy coding IMO) is that fastboot doesn't report a version number when it's run, so without examining the binary there's no way to tell if you're running an out-of-date version. At least ADB reports a version number (1.0.36 was the latest one I came across) so you have some idea what's going on.

    Unfortunately I haven't come across a document that correlates the ADB/fastboot versions to a specific API release - that really should happen every time they update the SDK (and independent tools release).

    The short answer to your question is - a file outside of your current directory SHOULDN'T be called/executed in preference over an identically named file within the current directory - unless a path has been established that gives some other file precedence.

    Anyway, without examining the PATH variables in your setup there's no way to tell what was going on so the safest bet was to get rid of anything that might be interfering and start over with a fresh download of the tools. ADB and fastboot usually come bundled together so if you have a later version of ADB hopefully you have a later version of fastboot. Just check the 'help' output to be sure the 'flashing' command is supported and then give it another whack.
    10-03-2017 09:14 AM
  10. GSDer's Avatar
    A couple of updates if you're still interested:
    1. There are updated versions of ADB/fastboot available as of September 2017. Probably the easiest place to get them is the platform tools download (https://developer.android.com/studio...orm-tools.html). This way you can just get the tools without having to install the whole SDK.
    2. Latest version of ADB is 1.0.39
    3. Fastboot does provide a version number (in a hard-to-read format) if you use the --version command line option. Latest version is 3db08f2c6889-android.
    10-04-2017 03:40 PM

Similar Threads

  1. Lock screen
    By Chris5483 in forum Samsung Galaxy S8 & S8+
    Replies: 5
    Last Post: 10-02-2017, 10:11 PM
  2. Locked out
    By Android Central Question in forum Ask a Question
    Replies: 2
    Last Post: 10-01-2017, 05:38 PM
  3. how to bypass lock screen with wifi/data switched off? Samsung Galaxy S7
    By Android Central Question in forum Ask a Question
    Replies: 2
    Last Post: 10-01-2017, 05:35 PM
  4. Hello. Recent Samsung buyer after years with apple. Caps lock not turning off.
    By Android Central Question in forum Ask a Question
    Replies: 0
    Last Post: 10-01-2017, 03:40 PM
  5. Pattern lock
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 10-01-2017, 12:42 PM
LINK TO POST COPIED TO CLIPBOARD