Installing Recovery for Amazon Kindle Fire

Root Device and Install Custom Bootloader

1. Root the device ( and install the FireFireFire custom bootloader ( FireFireFire will enable easy booting to recovery.

Download Recovery Image

2. Download a suitable recovery image (e.g. openrecovery-twrp- from

Boot to Fastboot

3. Change boot mode so that the device will boot to fastboot.

$ sudo ./adb shell
# idme bootmode 4002
<idme> write 4002 to offset 0x1000

4. Reboot device to enter fastboot.

Install Recovery

5. Flash device with the downloaded recovery image.

$ sudo ./fastboot -i 0x1949 flash recovery openrecovery-twrp-
sending 'recovery' (6144 KB)...
OKAY [  1.540s]
writing 'recovery'...
OKAY [  0.691s]
finished. total time: 2.231s

where openrecovery-twrp- is the downloaded image.

6. Change back the boot mode.

$ sudo ./fastboot -i 0x1949 oem idme bootmode 4000
OKAY [  0.080s]
finished. total time: 0.080s

Boot to Recovery

7. Reboot device. To boot to recovery, press the power button when the FireFireFire appears upon device start up.



Installing CyanogenMod 10.1 on HTC One X


1. Backup applications and settings using Titanium Backup, do a NANDroid backup in recovery, and/or do a manual backup of the sdcard partition.

Check and Upgrade Bootloader (HBOOT) Version

2. Check the bootloader version using adb.

$ sudo ./adb shell
shell@android:/ $ getprop ro.bootloader
shell@android:/ $ exit

If the bootloader version number (1.27.0000 in this case) is lower than 1.28.0000, then it needs to be updated.

3. Check the device carrier ID using fastboot.

$ sudo ./fastboot oem readcid
(bootloader) DEBUG: cid: HTC__044
OKAY [  0.015s]
finished. total time: 0.015s

In this case, the carrier ID is HTC__044.

4. Download the firmware corresponding to the device carrier ID (HTC__044) from

5. If the bootloader has previously been unlocked, it needs to be re-locked using fastboot.

$ sudo ./fastboot oem lock
(bootloader) Lock successfully...
OKAY [  0.143s]
finished. total time: 0.146s

6. Reboot the RUU using fastboot.

$ sudo ./fastboot oem rebootRUU
(bootloader) Save data from original MSC...
(bootloader) Save data from SIF...
(bootloader) Update partition data to SIF partition
(bootloader) offset = 0
(bootloader) Update partition data from original MSC...
(bootloader) offset = 0
(bootloader) [MSG] OKAY
OKAY [  0.210s]
finished. total time: 0.210s

7. Flash the device with the downloaded firmware using fastboot.

$ sudo ./fastboot flash zip
sending 'zip' (12875 KB)...
OKAY [  1.619s]
writing 'zip'...
(bootloader) adopting the signature contained in this image...
(bootloader) signature checking...
(bootloader) checking model ID...
(bootloader) checking custom ID...
(bootloader) checking main version...
(bootloader) checking hboot version...
(bootloader) start image[boot] unzipping & flushing...
(bootloader) Format partition LNX done
(bootloader) [RUU]WP,boot,100
(bootloader) start image[recovery] unzipping & flushing...
(bootloader) Format partition SOS done
(bootloader) [RUU]WP,recovery,100
(bootloader) ERASE backup cid
OKAY [  3.170s]
finished. total time: 4.790s

where is the downloaded firmware package.
IMPORTANT: If this step fails, repeat the command (to flash the device) IMMEDIATELY.

Unlock Bootloader

8. Unlock the bootloader using fastboot.

$ sudo ./fastboot flash unlocktoken Unlock_code.bin
sending 'unlocktoken' (0 KB)...
OKAY [  0.008s]
writing 'unlocktoken'...
(bootloader) unlock token check successfully
FAILED (status read failed (No such device))
finished. total time: 19.736s

where Unlock_code.bin is the unlock code from HTC. The bootloader is now unlocked again.

Install Recovery

9. Flash the device with the recovery image using fastboot.

$ sudo ./fastboot flash recovery recovery-clockwork-touch- 
sending 'recovery' (5742 KB)...
OKAY [  0.731s]
writing 'recovery'...
(bootloader) Format partition SOS done
OKAY [  0.552s]
finished. total time: 1.283s

where recovery-clockwork-touch- is the recovery image (in this case, ClockworkMod for HTC One X).

Install CyanogenMod

10. Download the CyanogenMod package from

11. Flash the device with the boot image from the CyanogenMod package using fastboot.

$ sudo ./fastboot flash boot boot.img 
sending 'boot' (4960 KB)...
OKAY [  0.626s]
writing 'boot'...
(bootloader) Format partition LNX done
OKAY [  0.493s]
finished. total time: 1.119s

12. Boot into recovery and flash the device with the CyanogenMod package.

13. Restore the backups if necessary.