[HOW-TO] Root / Install a ROM / Unroot / Revert to Stock (A KFFB Supplement)

Search This thread

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
This how-to originally started out as a part of the Kindle Fire For Beginners (KFFB) guide, but evolved into this supplemental guide. Because of its origin, this guide assumes the reader is already familiar with KFFB, so reading it is a mandatory prerequisite. Users who post questions in this thread already covered in KFFB will be directed to go back and read it again.

My motives for writing this guide are very much in line with the reasons why I wrote KFFB. I'm hoping users will take the time to learn what they are doing and why they are doing it instead of crossing their fingers and hitting a button on an automated program. While I understand this is the more tedious route to their destination, the knowledge gained here can be used to get back on track when things go wrong or methods inevitably change over time.

The first post in this series details the process of rooting and installing a ROM on a stock device. The two share many of the same preliminary steps, so it makes sense to go over both at the same time.

Preparations

Again, please read Kindle Fire For Beginners before continuing. The conventions introduced in KFFB (e.g. having KFU installed in "C:\kfu") will continue to be used here. Make sure the battery is fully charged. A drained battery is not something you'll ever want to encounter and especially not while in the middle of this process. Create a new folder "C:\kfu\software" on your hard drive. Downloaded software to be installed on the Kindle Fire will be moved there.

Download and install WinMD5Free to some place on your Computer. The developers for most of the software you'll download for the Kindle Fire will provide an MD5 checksum. The checksum is used to verify the integrity of downloaded file, so you can be sure that you haven't gotten a bad download or a corrupted file. Tell WinMD5Free what file you want to check and compare the calculated checksum with the one provided by the developer. If the two match, you can be confident about installing it on your Kindle Fire.

For all required software listed in this document...
  • Extract (unzip) the files from the compressed archive (unless otherwise noted)
  • Verify the MD5 checksums if they have been provided
  • Move them to the C:\kfu\software folder
As with any other how-to guide, it's always a good idea to just read through the document first to get a basic idea of the process involved. Once you are comfortable with the concepts, then go back through and actually perform the steps required.

Getting to fastboot mode

The first step to modifying the Kindle Fire is to get the device into fastboot mode. The easiest and safest way to do this on a stock device is to use a factory cable. The factory cable is safe because it does not require the bootmode to be changed on the device. If something unexpected happens, you'll be able to disconnect the factory cable and reboot straight back into the stock software.

If you choose not to use a factory cable and change the bootmode to get into fastboot mode, you'll be taking a small gamble that you'll be able to issue fastboot commands to the device and change the bootmode back to normal. If you cannot change the bootmode back for some reason (e.g. your device drivers for fastboot mode fail to recognize the device), the device will be stuck in fastboot mode until you find a way to do so. In nearly every case, if you are able to issue the adb commands to get into fastboot mode, you should be able to send the fastboot commands necessary to get out of it. This is just a fair warning out of an abundance of caution... make sure you've done everything to ensure the ADB device drivers have been installed properly.

If you have a factory cable, you can turn the Kindle Fire off and connect the cable to the device, then the computer. The Kindle Fire will power up and put you directly into fastboot mode. You can then skip the rest of this section and go directly to flashing a recovery and bootloader. Otherwise...

Required software:

1) Boot up the Kindle Fire normally and connect a USB cable to the device and computer.

2) Copy pokey9000's fbmode program into a user writeable location on the Kindle Fire...
Code:
adb push C:\kfu\software\fbmode /data/local/tmp/
3) Change the permissions on the fbmode program so it can be executed (run) on the device...
Code:
adb shell chmod 755 /data/local/tmp/fbmode
4) Execute (run) the fbmode program to change the bootmode to fastboot...
Code:
adb shell /data/local/tmp/fbmode
5) Reboot the device...
Code:
adb reboot
Note: In case you are wondering why the "adb shell idme bootmode 4002" command previously discussed in KFFB was not used here, that command requires root privileges not available in the stock configuration. Without root privileges, the above workaround is required.

Installing a recovery and custom bootloader

Required software:
FIREFIREFIRE bootloader
TeamWin Recovery Project (TWRP) recovery

Note: Do not extract the contents of the FIREFIREFIRE bootloader zip file. It will be flashed as-is with TWRP recovery.

1) Install the TWRP recovery...
Code:
fastboot -i 0x1949 flash recovery C:\kfu\software\openrecovery-twrp-2.2.2.1-blaze.img
2) Set the bootmode to recovery (5001)...
Code:
fastboot -i 0x1949 oem idme bootmode 5001
3) Reboot the device into TWRP recovery. If you used a factory cable to get into fastboot mode, turn off the device by holding down the power button for about 20 seconds. Replace the factory cable with a generic USB cable and the device will start up again automatically. Otherwise...
Code:
fastboot -i 0x1949 reboot
4) Copy the FIREFIREFIRE bootloader zip file to the /sdcard directory on the Kindle Fire...
Code:
adb push C:\kfu\software\fff-u-boot_v1.4a.zip /sdcard/
5) From the main menu of TWRP, press the "Install" button to flash the FFF bootloader onto the bootloader partition. Navigate to the /sdcard directory on the left (should be the default the first time you use TWRP) and select the file from the list on the right. Then simply "Swipe to Confirm Flash" to install.

6) Optional: Make a nandroid backup of the stock software. From the main menu of TWRP, press the "Backup" button and then "Swipe to Back Up" to create a snapshot of the stock system. If you change your mind later about rooting or have second thoughts about the ROM, just "Restore" the backup and return to the stock configuration.

Rooting the stock software

Users interested in flashing a custom ROM may elect to skip this section. Rooting the stock software is not a requirement to flash a custom ROM because the custom ROM will completely overwrite the stock software. However, if you are undecided on the question of rooted stock vs. custom ROM, root the stock software first and try that out for a while. The option to flash a custom ROM will still be available at a later time.

The following method of rooting the Kindle Fire stock software has been tested on 6.3.x and 6.2.x systems. Skip step #5 when rooting 6.2.x systems because the root checker does not exist in those versions.

Required software:
Superuser by ChainsDD

Note: Two separate files will be needed from the contents of this zip file: the su binary from the system\bin folder and the Superuser.apk file from system\app folder.

This section assumes the device is already booted into TWRP recovery.

1) Remount the /system partition in read/write mode...
Code:
adb shell mount system
2) Copy the su binary onto the device...
Code:
adb push C:\kfu\software\su /system/xbin/
3) Change the owner of the su binary to root...
Code:
adb shell chown root:root /system/xbin/su
4) Set permissions for the su binary to run as root...
Code:
adb shell chmod 6755 /system/xbin/su
5) Disable the root checker by renaming the check_rooted executable...
Code:
adb shell mv /system/bin/check_rooted /system/bin/check_rooted.bak
6) Change the bootmode back to normal...
Code:
adb shell idme bootmode 4000
7) Reboot the system...
Code:
adb reboot
8) Once the Kindle Fire has rebooted into the system, install the Superuser app...
Code:
adb install C:\kfu\software\Superuser.apk

Congratulations! You have gained root privileges on the stock Kindle Fire software!

Installing a custom ROM

It should go without saying, but users who intend on staying with a rooted stock device need to skip this section. Flashing a custom ROM will overwrite the stock software and leave no trace of the original Kindle Fire interface.

Required software:
Any ROM you choose to install. Check the KF Development List as a starting point.

Note: Do not extract the contents of the ROM archive. The recovery program will need the actual zip file to install.

This section assumes the device is already booted into TWRP recovery.

1) Carefully read the ROM thread for specific directions and warnings provided by the developer when flashing any new ROM.

2) Copy the custom ROM zip file to the /sdcard directory on the Kindle Fire...
Code:
adb push C:\kfu\software\ROM.zip /sdcard/
You must replace the "ROM.zip" part of the above command to the actual name ROM's zip file you've downloaded.

3) From the main menu of TWRP, "Wipe -> Factory Reset" to remove the existing files in the data and cache partitions that could interfere with the operation of the new system software. A "Factory Reset" will delete any installed apps, software/network settings, etc. It will not touch the /sdcard directory that contains music, eBooks, and files of that nature.

4) From the main menu of TWRP, "Install" to flash the ROM onto your device. Navigate to the /sdcard directory on the left (should be the default the first time you use TWRP) and select the file from the list on the right. Then simply "Swipe to Confirm Flash" to install.

5) From the main menu of TWRP, "Reboot -> System" to boot into the newly flash ROM.

Congratulations! You have completely replaced the stock Kindle Fire software with a custom ROM!

Cleaning up

The zip files pushed onto the /sdcard during installation are only necessary during the installation process and do not need to take up space on the device after completing the install. Use a file manager or mount the storage device on the host computer to delete the files and reclaim the used space.

Coming soon...?

I've got some other topics in mind, but like I did with the KFFB, I'll see how users respond to this post before I continue. Please feel free to comment and make suggestions. I may not respond to everything, but I will keep the helpful comments in mind if/when I decide to expand this how-to guide. Thanks for reading.

Credits
jcase - For providing the basis for this guide and lending his expertise in rooting devices
pokey9000 - For his work on FFF and providing the fbmode exploit
TeamWin and Dees_Troy - For providing the TWRP recovery and continuing its development
ChainsDD - For the Superuser package​
 
Last edited:

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
Unroot or Revert to Stock Software

This second post in the series details the procedures required to undo the steps taken in the first. Use it to unroot or revert back to the stock software like it just came from the factory. If you tried out the rooted stock software or a custom ROM for a while, but just prefer the no-frills stock software, you've come to the right place.

Unrooting the stock software

Required software:
None​

This section assumes the device is already booted into the system software.

1) Uninstall the Superuser app
Code:
adb uninstall com.noshufou.android.su
2) Optional: Set the bootmode to recovery. Alternatively, use the recovery selection feature in FFF to boot into recovery during startup without manipulating the bootmode setting here. If you are more comfortable setting the bootmode directly...
Code:
adb shell su -c 'idme bootmode 5001'
3) Reboot the device into recovery...
Code:
adb reboot
4) Mount the data partition...
Code:
adb shell mount data
5) Optional: Delete the files that the Superuser app left behind...
Code:
adb shell rm -rf /data/data/com.noshufou.android.su
6) Mount the system partition...
Code:
adb shell mount system
7) Re-enable the root checker by renaming the check_rooted executable...
Code:
adb shell mv /system/bin/check_rooted.bak /system/bin/check_rooted
8) Delete the su binary from the device...
Code:
adb shell rm /system/xbin/su
9) From the main menu of TWRP, "Reboot -> System" to restart the device into the system software.

Congratulations! You have unrooted the stock Kindle Fire software!

Reverting to stock software

Required software:


Warning: Installing the Amazon Kindle Fire Software Update will not only replace the system software, but also overwrite the bootloader and recovery with the stock versions. Any custom bootloader and recovery like FFF and TWRP will be overwritten in the process.

This section assumes the device is already booted into TWRP recovery.

1) Copy the update bin file to the /sdcard as update.zip
Code:
adb push C:\kfu\software\update-kindle-6.3.1_D01E_4107720.bin /sdcard/update.zip
2) From the main menu of TWRP, "Wipe -> Factory Reset" to remove the existing files in the data and cache partitions that could interfere with the operation of the new system software. A "Factory Reset" will delete any installed apps, software/network settings, etc. It will not touch the /sdcard directory that contains music, eBooks, and files of that nature.

3) From the main menu of TWRP, press the "Install" button to flash the stock software onto your device. Navigate to the /sdcard directory on the left and select the "update.zip" file from the list on the right. Then simply "Swipe to Confirm Flash" to install.

4) Optional: From the main menu of TWRP, "Wipe -> SD Card" to remove all files on the USB mountable storage space. This step will permanently delete all of the files that appear on a computer when the device is connected as a USB storage device.

5) From the main menu of TWRP, "Reboot -> System" to restart the device into the system software.

Congratulations! You have reverted the device to a completely stock Kindle Fire!
 
Last edited:

plee3

Senior Member
Dec 8, 2011
66
31
Samsung Galaxy Watch 4
Great explanations!

I wanted to thank you for explaining everything clearly so that people can understand what they are doing when installing their bootloader, recovery and new ROMs.

Thanks again... plee3
 

x-y-no

Senior Member
Mar 27, 2011
91
64
Thanks so much!

This worked flawlessly. I had gotten stuck trying to root with KFU (I think the driver is slightly funky in fastboot - so KFU failed to flash either recovery or bootloader and left me in fastboot mode) but using the '-i 0x1949' option with fastboot made everything work perfectly.
 

Docs009

Member
Apr 1, 2012
37
7
Needs Sticky


Great Work. Gets my vote (and really needs) to be sticky'd.

Thanks for listening :)

Sincerely,

William

[Kindle Fire: gedeROM v1.25 [KeyClicks Added] {3.0 Kernel, CM9, Android 4.0.4} - Stock Kernel]
[HTC Evo 4G Supersonic: MikG 3.11 ROM - Chop Suey Custom Kernel]
[Retired: HTC CDMA Hero: Gingerbread Hero Deck ROM - Stock Kernel]

end.
 

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
Thanks to all. I'm glad some of the readers got some use out of it.


Great Work. Gets my vote (and really needs) to be sticky'd.

Thanks for listening :)

Sincerely,

William

[Kindle Fire: gedeROM v1.25 [KeyClicks Added] {3.0 Kernel, CM9, Android 4.0.4} - Stock Kernel]
[HTC Evo 4G Supersonic: MikG 3.11 ROM - Chop Suey Custom Kernel]
[Retired: HTC CDMA Hero: Gingerbread Hero Deck ROM - Stock Kernel]

end.

If you think this guide will be useful to other users here, you can ask the moderators to review the thread and possibly make it a sticky. I would ask, but it seems a bit... uncouth to nominate my own post for sticky status.

Thanks for reading!
 

ExploreMN

Senior Member
Jun 23, 2007
1,574
463
Gotta tell you, there should be some warnings/things to look out for in this guide. If you install all the latest Android SDKs (I pretend to develop in my spare time) it loads the wrong drivers. It will show up as "Android Device" or something like that. The correct drivers have it show up as "Android Composite Device". If you have the SDK in your path (which you need for Eclipse) after the first reboot it might load the wrong drivers again as it did with me which are the wrong ones and basically you won't be able to communicate with the Kindle again.

Took me almost an hour to get this thing off the "Kindle Fire" loading screen because of this problem/unawareness.
 
Last edited:

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
Well, I followed the instructions. Got as far as "adb shell reboot" after the fbmode command. Now it just sits at "kindle fire" and shows up as an unknown device in device manager.

Is there anyway to recover from this or did I just junk my fire?

Your Kindle Fire is fine... it's in fastboot mode. The computer is most likely the problem. You'll have to make sure your device drivers are working properly, so the computer can send fastboot commands to the device.

http://xdaforums.com/showpost.php?p=23747671&postcount=2
 

ExploreMN

Senior Member
Jun 23, 2007
1,574
463
Your Kindle Fire is fine... it's in fastboot mode. The computer is most likely the problem. You'll have to make sure your device drivers are working properly, so the computer can send fastboot commands to the device.

http://xdaforums.com/showpost.php?p=23747671&postcount=2

Thanks Kinfauns. I actually got it fixed without even reading about it...I get a little medieval on things that frustrate me and eventually got it figured out...I edited my post to warn people about what tripped me up!
 

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
Gotta tell you, there should be some warnings/things to look out for in this guide. If you install all the latest Android SDKs (I pretend to develop in my spare time) it loads the wrong drivers. It will show up as "Android Device" or something like that. The correct drivers have it show up as "Android Composite Device". If you have the SDK in your path (which you need for Eclipse) after the first reboot it might load the wrong drivers again as it did with me which are the wrong ones and basically you won't be able to communicate with the Kindle again.

Took me almost an hour to get this thing off the "Kindle Fire" loading screen because of this problem/unawareness.

Well, I actually tell you at the beginning of this guide to read my guide for beginners. In that guide, I tell you to use the driver installer included in KFU. Any how-to guide has to make some set of assumptions and I made the assumption that you'd actually follow the previous set of instructions before proceeding onto the next. I think you'd agree that I cannot possibly account for every possible deviation a user might take away from my actual directions. If I even attempted such a thing, this guide would turn into Encyclopedia Britannica.

In addition, I also gave you ample warning about putting your device into fastboot mode by manipulating the bootmode. I made a clear suggestion for you to get a factory cable and use it to get into fastboot mode the "safe" way. I've never seen any other rooting guide/utility even make mention of this possibility, so I've gone above and beyond what you'd get anywhere else.

With those things together, I believe I've done the very best I can to minimize the possibility that you might get stuck and have to "get a little medieval" on your device. Regardless, I'm glad you got it figured out. Good luck with the rest of it.
 

ExploreMN

Senior Member
Jun 23, 2007
1,574
463
Well, I actually tell you at the beginning of this guide to read my guide for beginners. In that guide, I tell you to use the driver installer included in KFU.
True enough. Just didn't think it would keep reloading the drivers from the SDK if the SDK was in the path for Eclipse. I'm guessing anyone who set up Eclipse would not think this is an issue and might get stuck like I did...so it's still worth mentioning. (to me at least)
 
  • Like
Reactions: BorrowADolla

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
The second installment of this how-to guide has been posted. Included are instructions on unrooting and reverting back to the stock software. Suggestions and comments are always appreciated. Thanks!
 

Ledgehanger

New member
Jun 11, 2009
3
0
North Texas
Thank you for the excellent guide.

For what it's worth, this guide is very helpful for the admitted "noob" who has somehow failed with a utility like KFU and needs to go back and work through the pieces step by step. Thank you for laying out an instruction manual with enough detail to not only do the steps needed - but also to begin to understand what I'm doing.

I've rooted my KF (thanks to your assistance) so that I could install Swype. I then was able to use OTA-Rootkeeper to "hide" my SU file so that I can use Amazon media on my Fire as I want to, but still get the benefits I wanted from a rooted device (primarily the use of the Android Market, "Google Play", and the use of Swype).

For those that don't *really* want to unroot but do want to still use the Amazon content tools, I HIGHLY recommend the OTA-Rootkeeper utility.

Thanks again!
 
May 5, 2012
17
3
Kinfauns,


My Kinde Fire was bricked, with power problems. So I did the short trick to repair the bootloaders, using the linux stick and this script here, provided by firekit: usb_fix_parts_and_install_fff_twrp


When I look into device manager i have "Android Phone - Android Composite ADB Interface", at printers and devices the name shows as Kindle.

Can I go direct to these instructions here?

Rooting the stock software

Users interested in flashing a custom ROM may elect to skip this section. Rooting the stock software is not a requirement to flash a custom ROM because the custom ROM will completely overwrite the stock software. However, if you are undecided on the question of rooted stock vs. custom ROM, root the stock software first and try that out for a while. The option to flash a custom ROM will still be available at a later time.

The following method of rooting the Kindle Fire stock software has been tested on 6.3.x and 6.2.x systems. Skip step #5 when rooting 6.2.x systems because the root checker does not exist in those versions.

Required software:
Superuser by ChainsDD

Note: Download the latest zip for Gingerbread/ICS (the filename should end in "efghi-signed.zip"). Two separate files will be needed from the contents of this zip file: the su binary from the system\bin folder and the Superuser.apk file from system\app folder.
This section assumes the device is already booted into TWRP recovery.

1) Remount the /system partition in read/write mode...
Code:
adb shell mount system
2) Copy the su binary onto the device...
Code:
adb push C:\kfu\software\su /system/xbin/
3) Change the owner of the su binary to root...
Code:
adb shell chown root:root /system/xbin/su
4) Set permissions for the su binary to run as root...
Code:
adb shell chmod 6755 /system/xbin/su
5) Disable the root checker by renaming the check_rooted executable...
Code:
adb shell mv /system/bin/check_rooted /system/bin/check_rooted.bak
6) Change the bootmode back to normal...
Code:
adb shell idme bootmode 4000
7) Reboot the system...
Code:
adb reboot
8) Once the Kindle Fire has rebooted into the system, install the Superuser app...
Code:
adb install C:\kfu\software\Superuser.apk
Congratulations! You have gained root privileges on the stock Kindle Fire software!
 

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
Kinfauns,


My Kinde Fire was bricked, with power problems. So I did the short trick to repair the bootloaders, using the linux stick and this script here, provided by firekit: usb_fix_parts_and_install_fff_twrp


When I look into device manager i have "Android Phone - Android Composite ADB Interface", at printers and devices the name shows as Kindle.

Can I go direct to these instructions here?

If you used that script in Firekit, you should have FFF 1.2 and TWRP 2.0.0 installed, so technically, yes.... you can boot into TWRP and start following those directions. However, I would recommend that you upgrade your bootloader and recovery to the versions I have in the previous section... FFF 1.4a and TWRP 2.1.1. I won't go into all the reasons why, but they are "better" and likely to keep you out of trouble in the future. Since you already have FFF installed, it will be easy for you to get into fastboot mode. Once you are in fastboot mode, start with flashing TWRP and continue on from there.
 
  • Like
Reactions: DuendePaladino

Top Liked Posts

  • There are no posts matching your filters.
  • 96
    This how-to originally started out as a part of the Kindle Fire For Beginners (KFFB) guide, but evolved into this supplemental guide. Because of its origin, this guide assumes the reader is already familiar with KFFB, so reading it is a mandatory prerequisite. Users who post questions in this thread already covered in KFFB will be directed to go back and read it again.

    My motives for writing this guide are very much in line with the reasons why I wrote KFFB. I'm hoping users will take the time to learn what they are doing and why they are doing it instead of crossing their fingers and hitting a button on an automated program. While I understand this is the more tedious route to their destination, the knowledge gained here can be used to get back on track when things go wrong or methods inevitably change over time.

    The first post in this series details the process of rooting and installing a ROM on a stock device. The two share many of the same preliminary steps, so it makes sense to go over both at the same time.

    Preparations

    Again, please read Kindle Fire For Beginners before continuing. The conventions introduced in KFFB (e.g. having KFU installed in "C:\kfu") will continue to be used here. Make sure the battery is fully charged. A drained battery is not something you'll ever want to encounter and especially not while in the middle of this process. Create a new folder "C:\kfu\software" on your hard drive. Downloaded software to be installed on the Kindle Fire will be moved there.

    Download and install WinMD5Free to some place on your Computer. The developers for most of the software you'll download for the Kindle Fire will provide an MD5 checksum. The checksum is used to verify the integrity of downloaded file, so you can be sure that you haven't gotten a bad download or a corrupted file. Tell WinMD5Free what file you want to check and compare the calculated checksum with the one provided by the developer. If the two match, you can be confident about installing it on your Kindle Fire.

    For all required software listed in this document...
    • Extract (unzip) the files from the compressed archive (unless otherwise noted)
    • Verify the MD5 checksums if they have been provided
    • Move them to the C:\kfu\software folder
    As with any other how-to guide, it's always a good idea to just read through the document first to get a basic idea of the process involved. Once you are comfortable with the concepts, then go back through and actually perform the steps required.

    Getting to fastboot mode

    The first step to modifying the Kindle Fire is to get the device into fastboot mode. The easiest and safest way to do this on a stock device is to use a factory cable. The factory cable is safe because it does not require the bootmode to be changed on the device. If something unexpected happens, you'll be able to disconnect the factory cable and reboot straight back into the stock software.

    If you choose not to use a factory cable and change the bootmode to get into fastboot mode, you'll be taking a small gamble that you'll be able to issue fastboot commands to the device and change the bootmode back to normal. If you cannot change the bootmode back for some reason (e.g. your device drivers for fastboot mode fail to recognize the device), the device will be stuck in fastboot mode until you find a way to do so. In nearly every case, if you are able to issue the adb commands to get into fastboot mode, you should be able to send the fastboot commands necessary to get out of it. This is just a fair warning out of an abundance of caution... make sure you've done everything to ensure the ADB device drivers have been installed properly.

    If you have a factory cable, you can turn the Kindle Fire off and connect the cable to the device, then the computer. The Kindle Fire will power up and put you directly into fastboot mode. You can then skip the rest of this section and go directly to flashing a recovery and bootloader. Otherwise...

    Required software:

    1) Boot up the Kindle Fire normally and connect a USB cable to the device and computer.

    2) Copy pokey9000's fbmode program into a user writeable location on the Kindle Fire...
    Code:
    adb push C:\kfu\software\fbmode /data/local/tmp/
    3) Change the permissions on the fbmode program so it can be executed (run) on the device...
    Code:
    adb shell chmod 755 /data/local/tmp/fbmode
    4) Execute (run) the fbmode program to change the bootmode to fastboot...
    Code:
    adb shell /data/local/tmp/fbmode
    5) Reboot the device...
    Code:
    adb reboot
    Note: In case you are wondering why the "adb shell idme bootmode 4002" command previously discussed in KFFB was not used here, that command requires root privileges not available in the stock configuration. Without root privileges, the above workaround is required.

    Installing a recovery and custom bootloader

    Required software:
    FIREFIREFIRE bootloader
    TeamWin Recovery Project (TWRP) recovery

    Note: Do not extract the contents of the FIREFIREFIRE bootloader zip file. It will be flashed as-is with TWRP recovery.

    1) Install the TWRP recovery...
    Code:
    fastboot -i 0x1949 flash recovery C:\kfu\software\openrecovery-twrp-2.2.2.1-blaze.img
    2) Set the bootmode to recovery (5001)...
    Code:
    fastboot -i 0x1949 oem idme bootmode 5001
    3) Reboot the device into TWRP recovery. If you used a factory cable to get into fastboot mode, turn off the device by holding down the power button for about 20 seconds. Replace the factory cable with a generic USB cable and the device will start up again automatically. Otherwise...
    Code:
    fastboot -i 0x1949 reboot
    4) Copy the FIREFIREFIRE bootloader zip file to the /sdcard directory on the Kindle Fire...
    Code:
    adb push C:\kfu\software\fff-u-boot_v1.4a.zip /sdcard/
    5) From the main menu of TWRP, press the "Install" button to flash the FFF bootloader onto the bootloader partition. Navigate to the /sdcard directory on the left (should be the default the first time you use TWRP) and select the file from the list on the right. Then simply "Swipe to Confirm Flash" to install.

    6) Optional: Make a nandroid backup of the stock software. From the main menu of TWRP, press the "Backup" button and then "Swipe to Back Up" to create a snapshot of the stock system. If you change your mind later about rooting or have second thoughts about the ROM, just "Restore" the backup and return to the stock configuration.

    Rooting the stock software

    Users interested in flashing a custom ROM may elect to skip this section. Rooting the stock software is not a requirement to flash a custom ROM because the custom ROM will completely overwrite the stock software. However, if you are undecided on the question of rooted stock vs. custom ROM, root the stock software first and try that out for a while. The option to flash a custom ROM will still be available at a later time.

    The following method of rooting the Kindle Fire stock software has been tested on 6.3.x and 6.2.x systems. Skip step #5 when rooting 6.2.x systems because the root checker does not exist in those versions.

    Required software:
    Superuser by ChainsDD

    Note: Two separate files will be needed from the contents of this zip file: the su binary from the system\bin folder and the Superuser.apk file from system\app folder.

    This section assumes the device is already booted into TWRP recovery.

    1) Remount the /system partition in read/write mode...
    Code:
    adb shell mount system
    2) Copy the su binary onto the device...
    Code:
    adb push C:\kfu\software\su /system/xbin/
    3) Change the owner of the su binary to root...
    Code:
    adb shell chown root:root /system/xbin/su
    4) Set permissions for the su binary to run as root...
    Code:
    adb shell chmod 6755 /system/xbin/su
    5) Disable the root checker by renaming the check_rooted executable...
    Code:
    adb shell mv /system/bin/check_rooted /system/bin/check_rooted.bak
    6) Change the bootmode back to normal...
    Code:
    adb shell idme bootmode 4000
    7) Reboot the system...
    Code:
    adb reboot
    8) Once the Kindle Fire has rebooted into the system, install the Superuser app...
    Code:
    adb install C:\kfu\software\Superuser.apk

    Congratulations! You have gained root privileges on the stock Kindle Fire software!

    Installing a custom ROM

    It should go without saying, but users who intend on staying with a rooted stock device need to skip this section. Flashing a custom ROM will overwrite the stock software and leave no trace of the original Kindle Fire interface.

    Required software:
    Any ROM you choose to install. Check the KF Development List as a starting point.

    Note: Do not extract the contents of the ROM archive. The recovery program will need the actual zip file to install.

    This section assumes the device is already booted into TWRP recovery.

    1) Carefully read the ROM thread for specific directions and warnings provided by the developer when flashing any new ROM.

    2) Copy the custom ROM zip file to the /sdcard directory on the Kindle Fire...
    Code:
    adb push C:\kfu\software\ROM.zip /sdcard/
    You must replace the "ROM.zip" part of the above command to the actual name ROM's zip file you've downloaded.

    3) From the main menu of TWRP, "Wipe -> Factory Reset" to remove the existing files in the data and cache partitions that could interfere with the operation of the new system software. A "Factory Reset" will delete any installed apps, software/network settings, etc. It will not touch the /sdcard directory that contains music, eBooks, and files of that nature.

    4) From the main menu of TWRP, "Install" to flash the ROM onto your device. Navigate to the /sdcard directory on the left (should be the default the first time you use TWRP) and select the file from the list on the right. Then simply "Swipe to Confirm Flash" to install.

    5) From the main menu of TWRP, "Reboot -> System" to boot into the newly flash ROM.

    Congratulations! You have completely replaced the stock Kindle Fire software with a custom ROM!

    Cleaning up

    The zip files pushed onto the /sdcard during installation are only necessary during the installation process and do not need to take up space on the device after completing the install. Use a file manager or mount the storage device on the host computer to delete the files and reclaim the used space.

    Coming soon...?

    I've got some other topics in mind, but like I did with the KFFB, I'll see how users respond to this post before I continue. Please feel free to comment and make suggestions. I may not respond to everything, but I will keep the helpful comments in mind if/when I decide to expand this how-to guide. Thanks for reading.

    Credits
    jcase - For providing the basis for this guide and lending his expertise in rooting devices
    pokey9000 - For his work on FFF and providing the fbmode exploit
    TeamWin and Dees_Troy - For providing the TWRP recovery and continuing its development
    ChainsDD - For the Superuser package​
    43
    Unroot or Revert to Stock Software

    This second post in the series details the procedures required to undo the steps taken in the first. Use it to unroot or revert back to the stock software like it just came from the factory. If you tried out the rooted stock software or a custom ROM for a while, but just prefer the no-frills stock software, you've come to the right place.

    Unrooting the stock software

    Required software:
    None​

    This section assumes the device is already booted into the system software.

    1) Uninstall the Superuser app
    Code:
    adb uninstall com.noshufou.android.su
    2) Optional: Set the bootmode to recovery. Alternatively, use the recovery selection feature in FFF to boot into recovery during startup without manipulating the bootmode setting here. If you are more comfortable setting the bootmode directly...
    Code:
    adb shell su -c 'idme bootmode 5001'
    3) Reboot the device into recovery...
    Code:
    adb reboot
    4) Mount the data partition...
    Code:
    adb shell mount data
    5) Optional: Delete the files that the Superuser app left behind...
    Code:
    adb shell rm -rf /data/data/com.noshufou.android.su
    6) Mount the system partition...
    Code:
    adb shell mount system
    7) Re-enable the root checker by renaming the check_rooted executable...
    Code:
    adb shell mv /system/bin/check_rooted.bak /system/bin/check_rooted
    8) Delete the su binary from the device...
    Code:
    adb shell rm /system/xbin/su
    9) From the main menu of TWRP, "Reboot -> System" to restart the device into the system software.

    Congratulations! You have unrooted the stock Kindle Fire software!

    Reverting to stock software

    Required software:


    Warning: Installing the Amazon Kindle Fire Software Update will not only replace the system software, but also overwrite the bootloader and recovery with the stock versions. Any custom bootloader and recovery like FFF and TWRP will be overwritten in the process.

    This section assumes the device is already booted into TWRP recovery.

    1) Copy the update bin file to the /sdcard as update.zip
    Code:
    adb push C:\kfu\software\update-kindle-6.3.1_D01E_4107720.bin /sdcard/update.zip
    2) From the main menu of TWRP, "Wipe -> Factory Reset" to remove the existing files in the data and cache partitions that could interfere with the operation of the new system software. A "Factory Reset" will delete any installed apps, software/network settings, etc. It will not touch the /sdcard directory that contains music, eBooks, and files of that nature.

    3) From the main menu of TWRP, press the "Install" button to flash the stock software onto your device. Navigate to the /sdcard directory on the left and select the "update.zip" file from the list on the right. Then simply "Swipe to Confirm Flash" to install.

    4) Optional: From the main menu of TWRP, "Wipe -> SD Card" to remove all files on the USB mountable storage space. This step will permanently delete all of the files that appear on a computer when the device is connected as a USB storage device.

    5) From the main menu of TWRP, "Reboot -> System" to restart the device into the system software.

    Congratulations! You have reverted the device to a completely stock Kindle Fire!
    6
    KFFB Supplement Post #3

    Reserved...
    2
    can i follow this to root 6.3.1?

    Yes, it's been tested to work from 6.2.0 and up.
    2
    Just a quick question are you using a usb 2.0 port? And try shift+ right click on the tools folder in kfu select open command window here type adb devices hit enter see if it returns a device string for you.