[Desire 626 Q&A, Help & Troubleshooting] Cpt_Birdseye:
Hello,

I have been trying in vain for the last two days to unlock the bootloader of my wife's HTC 626G phone following the instructions on HTC's site which, as I understand, is the first prerequisite before one can install a custom ROM on it.

I have scoured the Web for all sorts of recipes, howtos, and hacks (also in this forum) but none of them seems to match my particular environment.

In fact, most instructions assume that their user have a Windows host at their hand which is no option for me, for I can only rely on a Linux host and would like to prefer usage of the ADB tools from a shell.

I am trying this on a Fedora with following Android tools' versions.

[fiddle@lenolap:~/HTC_Desire-626/log]
$ rpm -qf $(which fastboot)
android-tools-20160327git3761365735de-2.fc25.x86_64

I have only discovered ways so far, to boot the phone into one of the following modes: bootloader, recovery, or sideload (no idea, what the last one would be used for), either via adb reboot ...[\i], or by pressing Volume Down plus Power On buttons at phone.

I haven't discovered how to boot into the ominous "download" mode.

So having attached the phone, that has been booted into fastboot mode

(n.b. phone's display shows at the bottom "=> FASTBOOT mode...")

to my Fedora host's USB port, while the ADB Server is running

(started via systemd, though don't know if this is necessary, when only fastboot commands are issued)

[fiddle@lenolap:~/HTC_Desire-626/log]
$ systemctl is-active adb.service
active
[fiddle@lenolap:~/HTC_Desire-626/log]
$ systemctl show adb.service -p MainPID
MainPID=3862

the fastboot command that should be issued to retrieve the OEM token, that needs to be submitted to the HTC site in order to receive an unlock token from them, fails.

(n.b. unlike all issued adb commands in device mode, I found out that the fastboot command requires root privileges.

when issuing fastboot as !root user, I get the pesky "waiting for device" hang)

[fiddle@lenolap:~/HTC_Desire-626/log]
$ fastboot --version
fastboot version 3761365735de
[fiddle@lenolap:~/HTC_Desire-626/log]
$ fastboot devices
no permissions; see [http://developer.android.com/tools/device.html]	fastboot
[fiddle@lenolap:~/HTC_Desire-626/log]
$ sudo fastboot devices -l
0123456789AB fastboot usb:3-1.3
[fiddle@lenolap:~/HTC_Desire-626/log]
$ fastboot oem get_identifier_token
< waiting for any device >
^C
[fiddle@lenolap:~/HTC_Desire-626/log]
$ sudo fastboot oem get_identifier_token
...
FAILED (remote: unknown command)
finished. total time: 0.002s
[fiddle@lenolap:~/HTC_Desire-626/log]
$ sudo fastboot flashing get_unlock_ability
...
FAILED (remote: unknown command)
finished. total time: 0.003s
[fiddle@lenolap:~/HTC_Desire-626/log]
$ sudo fastboot getvar all
(bootloader)	partition-size:userdata: 32000000
(bootloader)	partition-type:userdata: ext4
(bootloader)	partition-size:cache: c800000
(bootloader)	partition-type:cache: ext4
(bootloader)	partition-size:system: 5e000000
(bootloader)	partition-type:system: ext4
(bootloader)	partition-size:expdb: ce0000
(bootloader)	partition-type:expdb: raw data
(bootloader)	partition-size:cota: 3200000
(bootloader)	partition-type:cota: ext4
(bootloader)	partition-size:resv: 80000
(bootloader)	partition-type:resv: raw data
(bootloader)	partition-size:ebr2: 80000
(bootloader)	partition-type:ebr2: raw data
(bootloader)	partition-size:logo: 800000
(bootloader)	partition-type:logo: raw data
(bootloader)	partition-size:misc: 80000
(bootloader)	partition-type:misc: raw data
(bootloader)	partition-size:sec_ro: 600000
(bootloader)	partition-type:sec_ro: ext4
(bootloader)	partition-size:recovery: a00000
(bootloader)	partition-type:recovery: raw data
(bootloader)	partition-size:boot: a00000
(bootloader)	partition-type:boot: raw data
(bootloader)	partition-size:uboot: 60000
(bootloader)	partition-type:uboot: raw data
(bootloader)	partition-size:seccfg: 40000
(bootloader)	partition-type:seccfg: raw data
(bootloader)	partition-size:protect_s: a00000
(bootloader)	partition-type:protect_s: ext4
(bootloader)	partition-size:protect_f: a00000
(bootloader)	partition-type:protect_f: ext4
(bootloader)	partition-size:nvram: 500000
(bootloader)	partition-type:nvram: raw data
(bootloader)	partition-size:pro_info: 300000
(bootloader)	partition-type:pro_info: raw data
(bootloader)	partition-size:ebr1: 80000
(bootloader)	partition-type:ebr1: raw data
(bootloader)	partition-size:mbr: 80000
(bootloader)	partition-type:mbr: raw data
(bootloader)	partition-size:preloader: 40000
(bootloader)	partition-type:preloader: raw data
(bootloader)	kernel: lk
(bootloader)	product: HTC_EUROPE
(bootloader)	version: 0.5
all: Done!!
finished. total time: 0.004s

Can anyone tell me if my phone is capable at all to disclose the coveted OEM identity token, or suggest a method or hack that would work in my Windows-free setting?