[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
I have an issue when try to mount usb mass storage in my kindle, I have tried 2 different roms and I'm having the same issue on both roms.

Any thought of what the problem can be?


Cheers

BTW I'm very thankful to the creator of this thread it was pretty easy to follow up all the required steps to get my kindle to install custom roms.

Glad to hear you got some use out of the guide.

First the obvious... you need to "pull up" the notification window and turn on USB storage after you've connected it to your computer. It will show you a USB symbol when you've connected the device. Select the notification and you'll get a button that lets you mount the storage device onto your computer. If that doesn't work...

Try using the "Mount" feature in TWRP and see if that shows up on the computer for you.

If you are using an ICS ROM, there are a couple of different protocols you can choose from... MTP and Mass Storage. Open up "Settings" and choose "Storage" from the list on the left. Then in the upper right are three dots arranged vertically, select that and then the item that pops up... "USB... something"... I don't recall exactly. There you can select from some options. Try those out and see if that helps.
 

willibertus

Member
Jun 22, 2012
16
1
Thx, with the option "usb mass storage", even when I did "mount" the sd card I couldn't "see" de kindle in windows, but with mtp or something like that, everything went ok, now I can add books, music, and all the stuff I wish to add.

Thx!
 

freefaling

Senior Member
Dec 9, 2010
97
20
Lahore
Reverting to stock

I just spent a good chunk of my morning to revert my ICS/CM9 Kindle back to stock 6.3.1. I followed this guide closely and was stuck at "status 7" error. Basically my build.prop file was modified (hint: "otter") and now the update won't proceed because it was looking for "blaze". Anyway, that's what I think was happening. So I reverted all the settings of my build.prop to the stock one.

I tried flashing the stock update with Cannibal Open Touch and TWRP 2.1.1. But it was TWRP 2.0.0 which finally did the trick.
 
  • Like
Reactions: johnadelic

Brewer9

New member
Jun 26, 2012
1
0
thanks

very helpful.

you got me dialed. :)

working to make kf a wifi phone. used googletalk and grooveip and special microphone as described in another forum. Only getting one way... i can hear, but not be heard. Wondering if Kakeo apk might do the trick as it goes in and alters audio settings. has anyone tried this.

thanks so much. great help!!!:cowboy:
 

los_wochos

New member
Jun 27, 2012
1
0
hi guys,

is it possible for me to ask some questions about KFU here? in the developer area i have no access for my questions.

i would like to root my KF and install ICS.
my problem is by choosing "install permanent root" in the KFU the KF reboot and in the terminal window i see:
Installing FFF...
<waiting for device>

I´ve testet all 3 boot typs in the KF - but the FFF will not be installed

The drivers are installed correctly, my kindle has firmware 6.3.1, the KFU is 0.9.6 - any ideas waht i made wrong (i also tested this on different computers)?

Thanks to all
 

putney1477

Senior Member
Feb 21, 2011
753
50
Concord, NH
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!

Hi there. I am tryimg to get my rooted kf back to stock. I have twrp installed. Took me 4 hours yesterday to root, install google play and install twrp. Mainly because my computer wouldnt recognize my kf. I ended up using my husbands laptop. I dont like how the kf is running, I want it back to bone stock and sell it. Th problem is, I dont know how to use adb. And the very first direction says "this section assumes the device is booted into the system software" sadly I dont even know what that means. Does it juat mean on? Or recovery? I flashed with samsung and htc so im not that much of a noob. However I know that I am in over my head here.
Heather

Sent from my GT-P3113 using Tapatalk 2
 

putney1477

Senior Member
Feb 21, 2011
753
50
Concord, NH
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!



Do I have to unroot before I flash back to stock?
 

glennj99

Senior Member
Jul 7, 2012
78
16
Do I have to unroot before I flash back to stock?


No, you do not.

When you flash back to stock using the update.zip for 6.3.1 from Amazon, for example, your kindle Fire will be at that point a brand new Kindle Fire with the original bootloader, "recovery" and Amazon-altered OS, no Root no TWRP no ROM.

All three partitions are flashed.
 

bennettg

Senior Member
Nov 11, 2010
262
6
Hi. I am a noob desperate for help. have been trying to flash twrp and firefirefire for 3 days without success. i can only get so far as to put the stock kindle fire into fastboot mode. i followed the guide and got the following in the terminal. can someone help me with what i am missing?


bennettg@eyhldfk:~$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
02EC000600000001 device

bennettg@eyhldfk:~$ cd /home/bennettg/android-sdk-linux/platform-tools
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb push /home/bennettg/android-sdk-linux/platform-tools/fbmode /data/local/tmp
1153 KB/s (510876 bytes in 0.432s)
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb shell chmod 755 /data/local/tmp/fbmode
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb shell /data/local/temp/fbmode
/data/local/temp/fbmode: not found
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb shell /data/local/tmp/fbmodebennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb reboot
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ fastboot -i 0x1949 flash recovery /home/bennettg/android-sdk-linux/platform-tools/openrecovery-twrp-2.2.0-blaze.img
usage: fastboot [ <option> ] <command>

commands:
update <filename> reflash device from update.zip
flashall 'flash boot' + 'flash system'
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
reboot reboot device normally
reboot-bootloader reboot device into bootloader

options:
-w erase userdata and cache
-s <serial number> specify device serial number
-p <product> specify product name
-c <cmdline> override kernel commandline
 

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb shell chmod 755 /data/local/tmp/fbmode
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb shell /data/local/temp/fbmode
/data/local/temp/fbmode: not found

You have a typo in the second command. It must be "tmp" in both spots.
 

bennettg

Senior Member
Nov 11, 2010
262
6
You have a typo in the second command. It must be "tmp" in both spots.

thanks....fixed the typo, but got the same result. do you think there is something wrong with fastboot command?

bennettg@eyhldfk:~$ cd /home/bennettg/android-sdk-linux/platform-toolsbennettg@eyhldfk:~/android-sdk-linux/platform-tools$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor
Bus 002 Device 073: ID 1949:0006 Lab126
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb devices
List of devices attached
02EC000600000001 device

bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb push /home/bennettg/android-sdk-linux/platform-tools/fbmode /data/local/tmp
3402 KB/s (510876 bytes in 0.146s)
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb shell chmod 755 /data/local/tmp/fbmode
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb shell /data/local/tmp/fbmode
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ adb reboot
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$ fastboot -i 0x1949 flash recovery openrecovery-twrp-2.2.0-blaze.img
usage: fastboot [ <option> ] <command>

commands:
update <filename> reflash device from update.zip
flashall 'flash boot' + 'flash system'
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
reboot reboot device normally
reboot-bootloader reboot device into bootloader

options:
-w erase userdata and cache
-s <serial number> specify device serial number
-p <product> specify product name
-c <cmdline> override kernel commandline
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$
 

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
options:
-w erase userdata and cache
-s <serial number> specify device serial number
-p <product> specify product name
-c <cmdline> override kernel commandline
bennettg@eyhldfk:~/android-sdk-linux/platform-tools$

The fastboot command is fine. I think the problem is with your fastboot binary. You must be using an old/outdated version or something because there should be a "-i <vendor id>" switch listed under options... and you are not getting that. I suggest you reinstall the newest version of the platform tools from the Android SDK. You don't necessarily need the other parts within the SDK... just the platform tools.
 

GoSpyder

New member
Dec 9, 2010
3
0
Awesome Guide!

I would like to say that this is a great Guide. Hmm let me rephrase...the is an AWESOME guide! I just did my first ROM installation and it took about 30mins after reading the Beginners guide and this Supplemental. I read it twice and was successful on my first try. I had no choice but to flash my Kindlefire because I got a lost/stolen one off Craigslist and I was pissed! Never thought of calling Amazon to verify if the SN was good. Anyhow...this route was better thou at the end, I took your advice and got a factory cable which made the installation alot easier plus this was my first install and I wanted to be cautious as well.There is one thing that I would reiterate in the guide and that is when installing TWRP you need to run all the commands from the command prompt in the C:kfu/tools folder. After reading the guide I figured it out since it mentions the commands are in the tools folder but I think it should be more prominent in the guide.

Thanks again!

GoSpyder

Kindlefire - AOKP Otter Milestone build 6
Galaxy SII ICS
 

stojanovicnikola68

New member
Jul 12, 2012
4
0
I need help. I have installed twrp and fff. Also I have installed new ROM, and today I decided to change it.
And everything goes well until I need to install new ROM, I copy it to /sdcard and when I select it to install it goes wrong:

Finding update package...
E:failed to mount /sdcard (invalid argument)
E:can't mount /sdcard/rom.zip
*Verifying filesystems...
*Verifying particion sizes...
E:Unable to mount '/sdcard' (tw_mount)
E:Unable to mount '/sdcard' (tw_mount)
E:failed to mount /sdcard (Invalid argument)
E:failed to mount /sdcard (Invalid argument)
E:failed to mount /sdcard (Invalid argument)
Error flashing zip '/sdcard/rom.zip'

And it is the same situation with every rom I tried.
Also when I reboot device and press intall in twrp in sdcard file which I tried to flash isn't there anymore.

Edit:
Setting the bootmode to normal brings me to the current rom.

Plese help!
 
Last edited:

kinfauns

Retired Senior Moderator and Retired DC Lead
Jan 5, 2012
1,864
3,543
I need help. I have installed twrp and fff. Also I have installed new ROM, and today I decided to change it.
And everything goes well until I need to install new ROM, I copy it to /sdcard and when I select it to install it goes wrong:



And it is the same situation with every rom I tried.
Also when I reboot device and press intall in twrp in sdcard file which I tried to flash isn't there anymore.

Edit:
Setting the bootmode to normal brings me to the current rom.

Plese help!

I don't recognize those errors. I almost want to say that something is wrong with your sdcard storage partition, but you seem to be saying that you can copy zip files to it and find that file to be installed. Maybe you want to detail the particulars... for example, the exact steps you are taking to flash the ROM or anything else you think may be relevant.

I believe you are using TWRP 2.2.0. I have no experience with that recovery and no Kindle Fire to test it, so I cannot offer any help if that's the potential source of these problems. The Kindle Fire Q&A forum is probably a better idea, so you can get some people who have used it to take a look at it.
 
  • Like
Reactions: stojanovicnikola68

stojanovicnikola68

New member
Jul 12, 2012
4
0
It was really strange because I could copy ROM with "adb push C:\kfu\software\ROM.zip /sdcard/" command and if I reboot the device the file will be erased, there wasn't any trace of it.
But I solve this problem by installing new twrp, and formating SD card, I'm not sure what was the problem of these two, because I did that at one step:).
 

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.