• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root error: cannot load 'Unlock_code.bin'

Hi. I've gotten this far trying to root my HTC One M8 (Sprint) and I've done everything right but can't manage to figure this next step out...

How do I fix this step?

Thanks :)
 
Can you tell us what root method you are using (just to be sure)?

Meanwhile, as this question requires device-specific knowledge, I've asked one of the moderators to move it to the M8 All Things Root forum. That way it will be seen by people who are familiar with rooting the M8, which should get you the best answer.
 
Macs are exactly the same as anything else with fastboot. It's just a little easier to install on a Mac than on a Window PC ;)

BTW our own rooting instructions are described here. "Cannot load..." is a message from fastboot? I can't see anything in that thread to suggest that the method wouldn't work with a Sprint handset.
 
Last edited:
BTW our own rooting instructions are described here. "Cannot load..." is a message from fastboot?

Yes. I'll copy and paste it exactly as shown:

new-host-2:~ Matt$ /Users/Matt/Downloads/fastboot/fastboot-mac flash unlocktoken Unlock_code.bin
error: cannot load 'Unlock_code.bin'
 
Yes. I'll copy and paste it exactly as shown:

new-host-2:~ Matt$ /Users/Matt/Downloads/fastboot/fastboot-mac flash unlocktoken Unlock_code.bin
error: cannot load 'Unlock_code.bin'
Is your Unlock_code.bin file saved in the folder from which you're running fastboot?

Can you confirm the full filename and case of the file? Can you try re-downloading it from the email in which it came?

Is the device in "FASTBOOT USB" mode?
 
Is your Unlock_code.bin file saved in the folder from which you're running fastboot?

Can you confirm the full filename and case of the file? Can you try re-downloading it from the email in which it came?

Is the device in "FASTBOOT USB" mode?

Yes. The Unlock_code.bin file is saved in the same folder as the fastboot. I tried re-downloading and that did not fix it.

The previous step, idenitifying the token, was from this folder:
/Users/Matt/Downloads/fastboot/fastboot-mac oem get_identifier_token

And yes, my device, still connected, is in FASTBOOT USB (highlighted red).
 
Have you tried flashing as admin (on Linux I often make sure I am root while doing it)
Sudo or root is required to run fastboot on Linux but not on a Mac, so that won't help.

OP do us a favor. In your Terminal Window where you're issuing the command, please enter the following and copy back the results (don't worry about the spacing getting messed up -

ls -lFa

Those are little Ls and there's a space after the ls ok.

Also - are you doing this with a USB 2 port?
 
Last edited:
The results:

new-host-2:~ Matt$ ls -lFa
total 104
drwxr-xr-x+ 37 Matt staff 1258 Jan 3 14:04 ./
drwxr-xr-x 5 root admin 170 Jul 15 2012 ../
-rw------- 1 Matt staff 3 Jul 15 2012 .CFUserTextEncoding
-rw-r--r--@ 1 Matt staff 24580 Dec 25 23:11 .DS_Store
drwxr-xr-x 6 Matt staff 204 Aug 3 2012 .Graboid/
drwx------ 222 Matt staff 7548 Jan 3 13:31 .Trash/
-rw------- 1 Matt staff 351 Jan 3 12:55 .bash_history
drwxr-xr-x 3 Matt staff 102 Jul 27 13:44 .cache/
drwxr-xr-x 5 Matt staff 170 Aug 20 2013 .config/
drwx------ 3 Matt staff 102 Sep 5 2012 .cups/
drwxr-xr-x 5 Matt staff 170 Dec 14 19:36 .dvdcss/
drwxr-xr-x 3 Matt staff 102 Mar 15 2013 .jagex_cache_32/
drwxr-xr-x 3 Matt staff 102 Jun 2 2013 .local/
drwxr-xr-x 3 Matt staff 102 Feb 21 2013 .mono/
drwxr-xr-x 3 Matt staff 102 Aug 20 2013 .python-eggs/
drwxr-xr-x 14 Matt staff 476 Oct 20 20:45 Applications/
drwxr-xr-x@ 4 Matt staff 136 Jan 15 2014 Applications (Parallels)/
drwx------+ 28 Matt staff 952 Jan 3 13:42 Desktop/
drwx------+ 196 Matt staff 6664 Dec 19 11:53 Documents/
drwx------+ 1089 Matt staff 37026 Jan 3 13:42 Downloads/
drwxr-xr-x 4 Matt staff 136 Aug 30 2012 FrostWire/
drwxr-xr-x 3 Matt staff 102 Aug 3 2012 Graboid/
drwxr-xr-x 140 Matt staff 4760 Jul 5 23:47 GrooveDown_Downloads/
drwx------@ 49 Matt staff 1666 Dec 9 12:48 Library/
drwx------+ 45 Matt staff 1530 Dec 14 22:12 Movies/
drwx------+ 8 Matt staff 272 Jun 19 2014 Music/
drwxr-xr-x 3 Matt staff 102 Feb 21 2013 My Games/
drwx------+ 115 Matt staff 3910 Dec 25 23:28 Pictures/
drwxr-xr-x+ 5 Matt staff 170 Jul 15 2012 Public/
-rw-r--r-- 1 root staff 1 Nov 8 2013 a.txt
-rw-r--r-- 1 Matt staff 0 Dec 21 17:20 bitlord_log.txt
-rw-r--r-- 1 Matt staff 0 Jan 3 14:04 cd
-rw-r--r--@ 1 Matt staff 41 May 19 2014 jagex_cl_oldschool_LIVE.dat
-rw-r--r-- 1 Matt staff 41 May 11 2014 jagex_cl_runescape_LIVE.dat
-rw-r--r-- 1 Matt staff 11 Mar 15 2013 jagexappletviewer.preferences
drwxr-xr-x 5 Matt staff 170 Jan 5 2014 jagexcache/
-rw-r--r-- 1 Matt staff 24 May 19 2014 random.dat

And I think you mean does my MacBook Pro have two USB slots? If so, yes.
 
OK, here's your solution - break it into two commands, the first to take you to your fastboot folder -

cd /Users/Matt/Downloads/fastboot

(mind the space after the cd)

./fastboot-mac flash unlocktoken Unlock_code.bin

The "./" (no spaces) means "do it from right here" and that's what you really want.

If this doesn't work, please redo the ls -lFa command right there in your fastboot folder.
 
OK, here's your solution - break it into two commands, the first to take you to your fastboot folder -

cd /Users/Matt/Downloads/fastboot

(mind the space after the cd)

./fastboot-mac flash unlocktoken Unlock_code.bin

The "./" (no spaces) means "do it from right here" and that's what you really want.

If this doesn't work, please redo the ls -lFa command right there in your fastboot folder.

That fixed it :) You're the best! Thank you!
 
That fixed it :) You're the best! Thank you!
No worries!

Please do that method for all of your future fastboot flash needs, it's the right way for your setup.

Before you go on to flashing CWM, please be aware that is not compatible with all roms.

ViperOneM8 for example only works with TWRP.

If interested, please see the sticky thread at the top of this forum taking you to Captain Throwback's version, it's the best.

Welcome to the rooted M8 community! :)
 
No worries!

Please do that method for all of your future fastboot flash needs, it's the right way for your setup.

Before you go on to flashing CWM, please be aware that is not compatible with all roms.

ViperOneM8 for example only works with TWRP.

If interested, please see the sticky thread at the top of this forum taking you to Captain Throwback's version, it's the best.

Welcome to the rooted M8 community! :)

Thanks. Will do! One more question... I accidentily started up my phone recovering everything. I did not want to do that. Can I just Power Off > Power On Holding Volume Button > Factory Reset to try again, this time no recovering and having a blank slate phone?
 
Thanks. Will do! One more question... I accidentily started up my phone recovering everything. I did not want to do that. Can I just Power Off > Power On Holding Volume Button > Factory Reset to try again, this time no recovering and having a blank slate phone?
Pretty much a certainty that one of us can get you out of most any trouble.

In this case, I'm not sure what you're describing - can you please describe it again?

And don't worry, it takes time to get the lingo, and we've all been there.
 
Pretty much a certainty that one of us can get you out of most any trouble.

In this case, I'm not sure what you're describing - can you please describe it again?

And don't worry, it takes time to get the lingo, and we've all been there.

I proceeded to the next step after you helped me and I signed into my HTC One M8. I checked the box to recover my data. I didn't want to do that because I prefer to have a blank slate phone. I only really want my contacts... not old apps, pictures, settings, etc...

Will factory reset help me out with this?
 
I proceeded to the next step after you helped me and I signed into my HTC One M8. I checked the box to recover my data. I didn't want to do that because I prefer to have a blank slate phone. I only really want my contacts... not old apps, pictures, settings, etc...

Will factory reset help me out with this?
Ah ah ah - I gotcha, from your HTC backup and Google backup.

Certainly - a factory data reset is harmless, it clears apps and your data and will give you the clean slate you want.

Back out of the setup wizard after that, input your Gmail account and from settings, only sync your contacts.
 

Okay, problem, once again. Lol. So, I'm now up to the part where I enter flashboot flash recovery. I now have this problem:

new-host-2:fastboot Matt$ ./fastboot-mac flash recovery /Users/Matt/Downloads/fastboot/philz_touch_6.26.6-m8spr.img
< waiting for device >

It says waiting for device forever. Is there a fix to this?
 
You're in FASTBOOT USB mode again, yes?

And with the recovery image in the same folder as fastboot, you can shorten the command to -

./fastboot-mac flash recovery philz_touch_6.26.6-m8spr.img

Just for future reference, that's not going to matter right now.

If you are in FASTBOOT USB mode, please show your latest ls -lFa from the fastboot folder.

And btw, time to learn about md5 checksums - never flash a rom or a recovery without it.

The correct value ought to have been published on the page that you got philz from - you check your download integrity by saying in the Terminal Window -

md5 philz_touch_6.26.6-m8spr.img

Again, note the space after the md5 command.
 
Back
Top Bottom