How to Control Both Moto G and Moto E LEDs

Notification LEDs offer a great way to check for notification at a glance on the Moto G (2013) and … more

LG G3 Receives Oversharpening Fix via Modified Kernel

Nothing is perfect, as they say. No matter how alluring or seemingly perfect, … more

APKTool Updated with Android Lollipop Support

One of the beauties of Android is the level of flexibility we have over our devices. Whether … more

Lollipop Leak for Sprint Galaxy S5, TWRP for Micromax Canvas Magnus – XDA TV

Android 5.0 Lollipop has been leaked for the Sprint … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[SOLVED] Problem unlocking RELOCKED HTC One M7

OP bluferbl

20th July 2014, 02:22 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
7 posts
Join Date:Joined: Jul 2009
Hoping someone can help with this. I have an International HTC One M7 which was converted to GPE KitKat whenever it first came out. The phone was S-OFF'ed, unlocked, custom recovery, rooted and worked fine. In order to get an OTA update I tried to relock it and install stock recovery. I succeeded in installing stock recovery and changing the bootloader to RElocked rather than locked and I still had root. The OTA updates wouldn't install.

So I decided to wipe the phone, install a KitKat RUU, install the OTA updates (it's now on 4.4.4) and then unlock/custom recovery/root. The problem is that I can't get the RElocked bootloader to UNlock. I have tried the HTC Dev method...I get the required code, paste it into their system, receive the bin file via email and attempt to flash it. It appears to be successful:

C:\androidsdk\sdk\platform-tools>fastboot flash unlocktoken c:\Unlock_code.bin

target reported max download size of 1526722560 bytes
sending 'unlocktoken' (0 KB)...
OKAY [ 0.155s]
writing 'unlocktoken'...
(bootloader) unlock token check successfully
OKAY [ 0.008s]
finished. total time: 0.166s

It seems strange that it reports 'sending 'unlocktoken' (0 KB)' - maybe that's just the way this works though, the bin file is reported in Windows to be 1KB. After flashing the bin file I do not get the GUI warning about unlocking the bootloader, the phone just stays in the bootloader screen. When I reboot the phone boots up normally.

Here's the entries from the top of the bootloader screen at the moment:

***RELOCKED***
M7_UL PVT SHIP S_OFF RH
CID-CWS_001
HBOOT-1.54.0000
RADIO-4T.27.3210.09
OpenDSP-v32.120.274.0909
0S-4.09.1700.1
eMMC-BOOT 2048MB
Jun 16 2014,20:13:15.0

I've Googled right left and centre and found other people reporting the same or similar problems trying to unlock a relocked bootloader but none of them has either a solution that worked or a solution that is relevant to this phone. Somewhere along the line I think the CID value got changed, I remember that it said something about Google but now it's CWS_001 - not sure if that's related to the problem.

I also tried using Hassoon's AIO Toolkit for the M7 but couldn't get that to work (it seems like it hasn't been updated for a long time so perhaps that's why).

Any help would be appreciated...I'd really like to regain root so that I can restore all my settings.

Thanks!
Last edited by bluferbl; 20th July 2014 at 05:32 PM.
20th July 2014, 02:28 PM   |  #2  
kartik.kayz's Avatar
Senior Member
Thanks Meter: 38
 
263 posts
Join Date:Joined: Oct 2011
More
Quote:
Originally Posted by bluferbl

Hoping someone can help with this. I have an International HTC One M7 which was converted to GPE KitKat whenever it first came out. The phone was S-OFF'ed, unlocked, custom recovery, rooted and worked fine. In order to get an OTA update I tried to relock it and install stock recovery. I succeeded in installing stock recovery and changing the bootloader to RElocked rather than locked and I still had root. The OTA updates wouldn't install.

So I decided to wipe the phone, install a KitKat RUU, install the OTA updates (it's now on 4.4.4) and then unlock/custom recovery/root. The problem is that I can't get the RElocked bootloader to UNlock. I have tried the HTC Dev method...I get the required code, paste it into their system, receive the bin file via email and attempt to flash it. It appears to be successful:

C:\androidsdk\sdk\platform-tools>fastboot flash unlocktoken c:\Unlock_code.bin

target reported max download size of 1526722560 bytes
sending 'unlocktoken' (0 KB)...
OKAY [ 0.155s]
writing 'unlocktoken'...
(bootloader) unlock token check successfully
OKAY [ 0.008s]
finished. total time: 0.166s

It seems strange that it reports 'sending 'unlocktoken' (0 KB)' - maybe that's just the way this works though, the bin file is reported in Windows to be 1KB. After flashing the bin file I do not get the GUI warning about unlocking the bootloader, the phone just stays in the bootloader screen. When I reboot the phone boots up normally.

Here's the entries from the top of the bootloader screen at the moment:

***RELOCKED***
M7_UL PVT SHIP S_OFF RH
CID-CWS_001
HBOOT-1.54.0000
RADIO-4T.27.3210.09
OpenDSP-v32.120.274.0909
0S-4.09.1700.1
eMMC-BOOT 2048MB
Jun 16 2014,20:13:15.0

I've Googled right left and centre and found other people reporting the same or similar problems trying to unlock a relocked bootloader but none of them has either a solution that worked or a solution that is relevant to this phone. Somewhere along the line I think the CID value got changed, I remember that it said something about Google but now it's CWS_001 - not sure if that's related to the problem.

I also tried using Hassoon's AIO Toolkit for the M7 but couldn't get that to work (it seems like it hasn't been updated for a long time so perhaps that's why).

Any help would be appreciated...I'd really like to regain root so that I can restore all my settings.

Thanks!

fastboot flash unlock token Unlock_code.bin connect your phone via fastboot.

Sent from my HTC One using XDA Premium 4 mobile app
20th July 2014, 03:10 PM   |  #3  
OP Junior Member
Thanks Meter: 0
 
7 posts
Join Date:Joined: Jul 2009
Thanks for the quick reply.

You have a space between 'unlock' and 'token'...is that a typo? I believe it's supposed to be 'unlocktoken'?

I moved the Unlock_code.bin file from the root of C to the platform-tools folder where fastboot is installed (I had already tried it here before).

The way the command in reply recommends reports is:
error: cannot open 'token'

This way 'fastboot flash unlocktoken Unlock_code.bin' reports:
C:\androidsdk\sdk\platform-tools>fastboot flash unlocktoken Unlock_code.bin
target reported max download size of 1526722560 bytes
sending 'unlocktoken' (0 KB)...
OKAY [ 0.156s]
writing 'unlocktoken'...
(bootloader) unlock token check successfully
OKAY [ 0.007s]
finished. total time: 0.164s

But nothing happens on the phone and no GUI prompt re unlocking the bootloader!


Quote:
Originally Posted by kartik.kayz

fastboot flash unlock token Unlock_code.bin connect your phone via fastboot.

Sent from my HTC One using XDA Premium 4 mobile app

20th July 2014, 04:40 PM   |  #4  
nkk71's Avatar
Recognized Contributor
Flag Beirut
Thanks Meter: 3,078
 
6,208 posts
Join Date:Joined: May 2010
More
Quote:
Originally Posted by bluferbl

***RELOCKED***
M7_UL PVT SHIP S_OFF RH

Since you are S-Off, use a custom recovery masked in a firwmare package: you can use of these "firmware" packages (m7_u/ul only):
http://www.androidfilehost.com/?w=files&flid=13085

in bootloader/FASTBOOT USB:
fastboot oem rebootRUU
fastboot flash zip fw_m7ul_TWRP_2.6.3.3_1.26.401.33.zip
fastboot reboot-bootloader


-> enter RECOVERY (should be TWRP or CWM now)

and use scotty1223's commands in custom recovery http://forum.xda-developers.com/show....php?t=2475914 to unlock bootloader


Code:
C:\ADB3>adb devices
List of devices attached
HT34xxxxxxxx    recovery <- you need to be in custom recovery to
                            ensure root privileges
                            i.e. an adb shell with # as opposed to $


C:\ADB3>adb shell

Note
CWM shell prompt usually looks like ~#
TWRP shell prompt usually looks like ~ # ←[6n
it doesn't matter, you just type (or even better copy/paste) the commands in bold blue


Setting UNLOCKED
~ # echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796 
4+0 records in
4+0 records out
4 bytes (4B) copied, 0.007691 seconds, 520B/s

~ # exit
exit

C:\ADB3>adb reboot bootloader
^^ if this doesn't work in your particular version, 
   just select reboot to bootloader in TWRP.


ps: your version-main will now say 1.26.401.33 (reflecting the recovery version 2.6.3.3); it didn't actually change, but version-main always shows the last thing flashed in ruu mode.
.
The Following User Says Thank You to nkk71 For This Useful Post: [ View ]
20th July 2014, 05:23 PM   |  #5  
OP Junior Member
Thanks Meter: 0
 
7 posts
Join Date:Joined: Jul 2009
[SOLVED} Problem unlocking RELOCKED HTC One M7
Fantastic! I was up until 4 am last night going round in circles trying to sort this out!

Many thanks for your help!


Quote:
Originally Posted by nkk71

Since you are S-Off, use a custom recovery masked in a firwmare package: you can use of these "firmware" packages (m7_u/ul only):
http://www.androidfilehost.com/?w=files&flid=13085

in bootloader/FASTBOOT USB:
fastboot oem rebootRUU
fastboot flash zip fw_m7ul_TWRP_2.6.3.3_1.26.401.33.zip
fastboot reboot-bootloader


-> enter RECOVERY (should be TWRP or CWM now)

and use scotty1223's commands in custom recovery http://forum.xda-developers.com/show....php?t=2475914 to unlock bootloader


Code:
C:\ADB3>adb devices
List of devices attached
HT34xxxxxxxx    recovery <- you need to be in custom recovery to
                            ensure root privileges
                            i.e. an adb shell with # as opposed to $


C:\ADB3>adb shell

Note
CWM shell prompt usually looks like ~#
TWRP shell prompt usually looks like ~ # ←[6n
it doesn't matter, you just type (or even better copy/paste) the commands in bold blue


Setting UNLOCKED
~ # echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796 
4+0 records in
4+0 records out
4 bytes (4B) copied, 0.007691 seconds, 520B/s

~ # exit
exit

C:\ADB3>adb reboot bootloader
^^ if this doesn't work in your particular version, 
   just select reboot to bootloader in TWRP.


ps: your version-main will now say 1.26.401.33 (reflecting the recovery version 2.6.3.3); it didn't actually change, but version-main always shows the last thing flashed in ruu mode.
.

20th July 2014, 05:26 PM   |  #6  
nkk71's Avatar
Recognized Contributor
Flag Beirut
Thanks Meter: 3,078
 
6,208 posts
Join Date:Joined: May 2010
More
Quote:
Originally Posted by bluferbl

Fantastic! I was up until 4 am last night going round in circles trying to sort this out!

Many thanks for your help!

no problem, my pleasure

if all is good now, could you also edit the main thread title to include [SOLVED] (go to 1st post click EDIT, at the bottom of the edit window click GO ADVANCED, then you can edit the main title), thanks
Post Reply Subscribe to Thread

Tags
relocked bootloader, root, unlock bootloader
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes