# [Q] [HTC LEGEND] (bootloader) [ERR] Command error !!!



## ericosman (Jan 6, 2012)

Hello,

I try to unlock my bootloader with htcdev but i get this error :

*C:\Users\Administrator>cd C:\Android

C:\android>fastboot oem get_identifier_token
...
(bootloader) [ERR] Command error !!!
OKAY [  0.009s]
finished. total time: 0.009s
*

How to fix this ? :$


----------



## cj chitwood (Jan 7, 2012)

*I'm looking too, but for the [Doubleshot].*

Trying the same thing myself on the HTC Doubleshot (MyTouch 4G Slide) and no joy, same exact error.  

ericosman, did you by chance follow all the advice on HTC's site -- including specifically installing HTC Sync?  I didn't install Sync because it looks like stuff I won't use and don't need, except that Sync has some dependencies (like a USB BMP Driver, whatever that is) that might make the difference.  I haven't tried yet but I plan to.

I've tried two different versions of Fastboot, one I downloaded from masterjason.com and another I downloaded from Google's Android SDK manager.  Both behave identically, despite one being nearly a megabyte where the other was 70 kilobytes.

I've tried reinstalling USB drivers, no joy.

I can get _fastboot devices_ to work, as well as _adb anything_ when the phone is booted, so I don't think drivers are really the issue.

I think it's HTC making a blanket promise that all the phones in that list can do this and indeed not all can.

[EDIT 2012-01-07:  Add more info I found]
Gotta love it.  Edited the post, and when saving, was told to refresh and log in.  Then I wasn't given a chance to copy-paste what I typed.  Annoying.

Anyway, see if I can remember what all I typed...

uhm...

I found through Google, and directed to Yet Another Android Forum somewhere on the 'net, that _fastboot oem h_ will provide you a list of commands that are supported, and _get_identifier_token_ was not among them.  I suspect it's the phone's bootloader which contains supported commands, not Fastboot executable itself, so it may require downgrading/upgrading to a different HBOOT that has the necessary command support. 

I did find _readsecureflag_ which returns the integer "3" on my S-ON device.  I assume then that the command I found called _writesecureflag_ similarly takes an integer value, but what value to feed it, I don't know, and I don't want to risk my phone.  Seems benign enough, but I know from computer programming that anything looking benign is not always.

Anyway, if you run _fastboot oem h_ and _get_identifier_token_ isn't there, I'd recommend giving up on this particular method of rooting.

Hope this helps.

[Edit 2012-04-15:  Strikeout above no longer applicable info]
Turns out, see Aisho's post below, which sums up what eventually worked for me.

I actually had to wait for an OTA to be available long enough for a dev to package it up to a bootloader-flashable package, which included the get_identifier_token.  Once I had that version on my phone, I was able to get the token to HTCDEV and get my bootloader unlocked.  Not full access, but not bad:  The only downside is if I need to flash a kernel I have to do it separately from the ROM through fastboot, and I don't think I can update my radio (not that I should need to).  But hey, I can flash a custom ROM and get rid of this nasty crap T-Mobile thinks everyone should have (I will never play bejeweled, so I don't even want that adware/nagware on my phone).

[/edit]


----------



## Aisho (Mar 3, 2012)

I actually had this same problem with my HTC Wildfire S, and found this thread in searching for answers -- since I figured it out, I figured I'd put the solution out there.

My HBOOT was precisely the version HTC was advertising on their site as necessary for the unlock, which made it all the more perplexing when I repeatedly got this error. But then it occurred to me that while my version might be the same, HTC had stuck a neat little asterisk* next to the Wildfire S initially, saying that it required a new HBOOT anyway. I'd thought I was smarter than they were, but really what's different in the new download is the incorporation of just the command you're missing here. Since the ability to unlock is fairly new (through HTC officially, I mean) they're providing new HBOOTs with that command line included. I flashed the new HBOOT (even though it was exactly the same version) and lo and behold when I tried it again, it accepted the fastboot oem get_indentifier_token command. 

I'd check to make sure that the HTC Legend doesn't have an asterisk as well, and maybe redownload the HBOOT anyway just in case. It can't hurt.


----------



## chris... (Apr 13, 2012)

Aisho said:


> I flashed the new HBOOT (even though it was exactly the same version)

Click to collapse



I'm having the same problem on htc salsa, I have the version it says i should have, but have no get_indentifier_token, how is HBOOT updated?
My phone is S-ON and Hboot is 1.07.0000


----------



## cj chitwood (Apr 14, 2012)

HBOOT is updated via bootloader mode (on my phone, assumably the same for most HTC phones).  You will need the correct HBOOT for your phone, and it will probably have to be contained within a full update package (for my phone, it's PG59IMG.ZIP, for the Dream it was DREAIMG.ZIP, your phone model will have its own filename).  That file goes on the SD card, you boot into bootloader (usually, remove battery to ensure phone is full off, replace battery, and power up while holding the "VOLUME DOWN" button in).  It then checks the file and asks you if you want to update.

However, if your phone is the same or newer version as the file you are trying to use, there's a good chance it will not work (the phone will not downgrade (usually (I think (I could be wrong) ) ) ).  

You might also be amongst the lucky few who have a phone with what's called an RUU available.  That's an .EXE file you run in Windows, connect your phone, and it writes what's in the file directly to the phone regardless of version.

HIH.


----------



## chris... (Apr 14, 2012)

I have the upgraded HBOOT version as Im following a thread for how to do it, which incidentally isnt working, when I go to the bootloader menu it finds the file but does not up date it. It has been updated to the current version stated on htcdev with a FOTA update which may be why the HBOOT upgrade doesnt work.
I have the HTC salsa and it does reference RUU a few times. I dont use windows but HTC sync doesnt seem to find the phone, I have tried many things to get it working

Am I meant to run the EXE provided by htcdev and dont run HTC SYNC? Should I be in the bootloader menu/recovery first before running it?


----------



## bibzor (Apr 15, 2012)

@ericosman

did you follow every single steps ?

I just did it on my Legend (24 hours ago), in the end I followed the post of BlaY0 (http://forum.xda-developers.com/showpost.php?p=22613990&postcount=62) and it worked great.
And yes, the RUU file is the one of a few MiB that you find at the very beginning at HTCdev.

The only trick is that I had to restore my data backup but also my boot backup, otherwise I was stuck in the hboot.
I did it by flashing the recovery image, as I deleted my old update.zip of ClockWorkMod, following the steps of http://forum.xda-developers.com/showthread.php?t=1290841 (see the end of the post: 'New recovery'). Then I went to 'Advanced restore' and restored both my boot image and my data back.

*Always backup your system before playing around !*


----------



## chris... (Apr 15, 2012)

i must be reading it wrong
where is says install htc sync and use the file below
I took it as use the file from htc sync
no
execute the file below


----------



## bibzor (Apr 15, 2012)

chris... said:


> i must be reading it wrong
> where is says install htc sync and use the file below
> I took it as use the file from htc sync
> no
> execute the file below

Click to collapse



Alright, let's try again.

Before the step 1 of HTCdev, it asks you to upgrade your phone to the latest RUU. *You don't have to.* (see BlaY0's post [1])
Just download the RUU file, thus you will be able to retrieve the very hboot's zip (just run the EXE, don't go through the installer but instead locate its temporary extraction folder with the task manager and get that _rom.zip_).

They only want you to install HTC Sync so that your phone is recognized by Windows and the RUU can located it.

[1] BlaY0 explains that you don't have to upgrade to the latest HTC ROM or even RUU.


----------



## chris... (Apr 15, 2012)

got it, and dump that zip file with the correct file name onto the root of the sdcard and start the bootloader
YAY it works, time to proceed to unlock
The version I got from a different post must not have been the correct one


----------



## Whoareyou (May 10, 2012)

im sure im bumping an old thread, but im trying to unlock an old espresso, but its having the same issue as the OP, i cant find the RUU with the new hboot, it currently has the 1.02 hboot, any clues?


----------



## bibzor (May 11, 2012)

Have you tried following the steps I referred to ?
Look at my two posts. 

In fastboot, What is displayed besides the hboot version ? Something like "unlocked" ?
If note you have to re-flash your hboot with HTC dev method, once again read the post I linked to.

Sent from my Legend using XDA


----------



## restopi (May 13, 2012)

just to add that on my MyTouch 4G slide I had hboot-1.44.0007 and gave me the same error as the first post when trying to unlock through htcdev.com. I did an OTA update to HBOOT-1.45.0013 (Software version 1.63.531.2 710RD) then went back to htcdev.com and it worked without problems


----------



## erichamby (Aug 4, 2012)

Getting this while trying to re-unlock evo 3d ics. hboot 1.58.


----------



## klausalex (May 3, 2013)

It's an old thread but maybe it's helping someone...

If you receive the error described in the topic title/first post you need to simply register to htcdev dot com and follow each step(including the 1st step because that's actually what you need to do  )


----------



## artsfreaky (Jan 28, 2017)

i got same problem w my Z3 plus hbot will work on my z3 plus????????


----------

