7

I am trying to unlock bootloader for my HTC Legend.

I have ADT (Android SDK according to release 21.1) on my Ubuntu/Linux box.

While following the HTCDev instructions to unlock bootloader of HTC Legend.

I can adb devices that results as under

List of devices attached 
HTXXXXXXXXXX    device

But fastboot devices does not result any thing.

When I reboot my phone to FASTBOOT USB mode and plug in the USB cable to phone and connect to PC/Ubuntu.

fastboot oem get_identifier_token
results as following and sit idle. < waiting for device >

I have cross checked for certain things:

  • The default USB mode is Charge Only
  • The USB Debugging is enabled

But on my ubuntu box there are no drivers and no HTC Sync installed.

What am I missing here? Can I do it from Ubuntu, as I don't have windows?


UPDATE: My device's HBOOT is 1.00.0000


UPDATE2: I just tried with sudo fastboot devices and returned.

HTXXXXXXXXXX    fastboot

Now when I do sudo fastboot oem get_identifier_token it returns:

...
(bootloader) [ERR] Command error !!!
OKAY [  0.010s]
finished. total time: 0.010s
4
  • 1
    Often you just need to add a udev rule for the device. Do you see it under lsusb when it's in fastboot mode? My guess is that if you compare the device/vendor IDs in fastboot mode to the normal ones that they'll be different (the poor-man's solution in some cases is to use sudo fastboot to get around the udev rule, but I don't know if that's entirely recommended). Commented Feb 27, 2013 at 20:58
  • Yes I can see my device in lsusb when it is fastboot mode. (Bus 004 Device 042: ID 0bb4:0fff HTC (High Tech Computer Corp.) Android Fastboot Bootloader)I have no idea about udev rules :( Commented Feb 27, 2013 at 21:20
  • Take a look at this answer and see if it helps you solve the problem. If not, then your situation may be something different (e.g. not a udev thing). The question is for the N4, but the process is the same; you'll just need to use your device IDs. Commented Feb 27, 2013 at 21:24
  • I just tried and found that sudo fastboot devices lists my device and without sudo it waits for the device. Commented Feb 27, 2013 at 21:54

3 Answers 3

3

It looks like your HBOOT needs to be upgraded to v1.02.0000 in order to use the HTCdev unlock method. The reason for this is that the Legend's bootloader did not originally ship with unlocking capabilities, so you need to upgrade to the version that added it.

Unfortunately, the HTCdev site will give you an RUU to run, but since it's an .exe file it won't do you much good on Linux (even with wine it probably will balk). However, you can perform a manual flash instead:

  1. Download this LEGEIMG.zip1 file. This is the new 1.02 bootloader packaged as a zip.
  2. Copy the zip file to the root of your SD card (as in, not in any subfolders)
  3. Reboot to your bootloader however you like (adb reboot bootloader works, for example)
  4. When HBOOT starts up it should tell you that it found an upgrade package on the SD card. Check the on-screen prompt and select "Yes" to let it flash the zip.
  5. Reboot your phone into your bootloader again and verify that it's been updated to version 1.02. At this point you can follow the HTCdev unlocking instructions.

1Regarding this file: "eldarerathis", you say, "I'm sure you're a trustworthy chap and all, but how do I know that this Mediafire download is legit?" Well, since your bootloader is currently locked, it will only flash images that have been digitally signed by HTC. Since modifying the contents of the zip file would invalidate the signature, you can rest assured that it is genuine and has not been tampered with.

For complete instructions, including how to actually get the zip from the RUU yourself (which requires Windows), refer to this XDA post.

4

Linux users: If you're stuck in "waiting for device", make sure you run fastboot as root, such as:

$ sudo ./fastboot oem get_identifier_token  
...  
(bootloader)      
(bootloader) < Please cut following message >  
(bootloader) <<<< Identifier Token Start >>>>  
(bootloader) C8750A7847621A009AAC7949E9B41A52  
...  
(bootloader) 7206C18600834B50AB6FA9F4A9AFC71C  
(bootloader) <<<<< Identifier Token End >>>>>  
OKAY [  0.004s]  
finished. total time: 0.005s
2
  • or run those commands: sudo chmod 644 /etc/udev/rules.d/51-android.rules && sudo chown root /etc/udev/rules.d/51-android.rules && sudo service udev restart Commented May 31, 2013 at 12:43
  • The rules Jakub is referring to are available here. They are also packaged as android-udev on Arch's AUR.
    – Tobu
    Commented Feb 18, 2014 at 16:43
0

Here a example to flash TWRP and LineageOS on a HTC One M8:

adb reboot bootloader
fastboot oem get_identifier_token

# Download Unlock_code.bin from htcdev.com
https://www.htcdev.com/bootloader/token-submitted

fastboot flash unlocktoken Unlock_code.bin
fastboot flash recovery twrp-3.4.0-1-m8.img 
adb sideload lineage-17.1-20201009-nightly-m8-signed.zip
adb sideload open_gapps-arm-10.0-micro-20201010.zip

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .