I recently bought a used HTC One that I intend on using on Ting — it’s a phone I’ve been wanting to use for about a year. It’s one of the nicest Android phones, with hardware quality approaching that of an iPhone. (Not to mention a software skin much more “professional” looking than a lot of other Android hardware manufacturers out there.)
I didn’t want to flash or even necessarily root my HTC One, however, the only way to restore some apps (like the Google Authenticator) require rooting, so I had to do it. What’s strange is that most tutorials and utilities I’ve found are for Windows (like this one from theunlockr) — I guess it shouldn’t be too surprising, considering most PC’s are Windows, but I’d figure that there would at least be some tutorials for Linux, considering Android’s origins.
Well, the good thing is that unlocking/rooting your HTC One on Linux isn’t really that hard at all, if you’re comfortable with the command-line, and familiar with using the android sdk tools (fastboot, etc.).
I’m not going to go into how to set up the Android sdk, etc, since if you’re doing something like manually unlocking your bootloader, you should already be familiar with it!
Unlocking/Rooting Your HTC One (M7) on Linux
Prerequisites:
- android sdk
- htcdev.com account
- Latest recovery .img file from CWM
- Superuser Hack .zip file: SuperSU (make sure and get whatever is the latest version of the SuperSU flashable zip — earlier versions found in other tutorials no longer work to root the later versions of Sense)
Unlock Bootloader
- Boot into bootloader and select Fastboot
- Run command “fastboot oem get_identifier_token”
- Copy token as explained on the htcdev page, and await your Unlock_code.bin file in email
- Copy Unlock_code.bin file to your working directory in Linux
- Run command “fastboot flash unlocktoken Unlock_code.bin”
- Follow prompts on screen to unlock/reset your phone
Flash Recovery
- Boot into bootloader and select Fastboot
- Run command “fastboot flash recovery <recovery.img>” (replace with .img file downloaded from CWM site)
- Reboot
Root
- Copy SuperSU .zip file to phone’s internal memory
- Reboot into recovery
- Flash SuperSU .zip file
- Reboot and enjoy
Other Useful Links
- Sprint HTC One Stock Recovery: http://forum.xda-developers.com/showthread.php?t=2236418
- Latest Sense 6 Flashable .zip for HTC One (M7): http://forum.xda-developers.com/showthread.php?t=2766604