Firekit LiveUSB repair kit 1.1- when you're about to kill Windows

Search This thread

pokey9000

Senior Member
Apr 17, 2007
767
396
Austin
What it is

Firekit combines all the command line tools for Kindle Fire recovery with the Ubuntu LiveUSB. All you need is a USB stick and a PC that can boot off it. All files stay on the stick, so nothing on your PC is changed.

Firekit is run from the command line, but there are scripts to automate common tasks so the typical restoration involves running just two commands. A fastboot-bootable TWRP and FFF is included as well as the Rekindle USB boot tools so even the most fubared bricks can be restored.

This is only for the first gen Kindle Fire 7" from late 2011. It will not work on any other model.

What can it do


Fix power on problems: If the Fire's screen never seems to turn on, you may have wrecked the bootloaders or the partitioning. Fortunately most of the time this results in the CPU falling into the low level USB boot mode. Use the "usb_fix_parts_and_install_fff_twrp" to rebuild the flash enough to boot TWRP. You don't need to use the USB shorting trick for this one, just power up the Kindle after running the script.

Fix stuck-at-triangle-logo: This can be due to being stuck in fastboot or having a corrupt /system. First try getting into recovery. Press power for a few seconds just after turning on, LED should go orange and the TWRP should show up. If that works, reflash your ROM from TWRP. If not, try the "normal_boot" script to get out of being stuck in fastboot.

Fix stuck-at-Kindle Fire-logo: Similar to the above. First try the "normal_boot" script. If that doesn't work, you need to reflash the stock ROM from TWRP. But you don't have TWRP. So use the "install_fff_twrp_from_stock" script which will force the stock ROM into letting you install fastboot. Then flash a ROM.

-and more


Why

A lot of people seem to be having problems with Windows and ADB drivers needed for fastboot and adb. Linux doesn't seem to have this kind of trouble, so I threw this together. It's not pretty or menu driven, but I find that too much automation gets in the way when things are broken to begin with.

Downloading a ~600MB Ubuntu image is needed, and this has only been tested on one PC so far. Don't complain if you spend hours grabbing this only to not have it fix your problem. I thought about rolling my own USB image with debootstrap for a much smaller image but figured that a prefab Ubuntu Live image is probably best for compatibility.


Using Firekit

Making the LiveUSB

Get the latest 32-bit Ubuntu and follow the directions to make a USB stick. If you want to try this with another distro (not tested) it must be 32-bit or have full 32-bit compatibility libraries.

Then unpack the attached zip to the top of the stick. The easiest way is to open the .zip in Explorer, right-click on "fk" (the only file in the zip), and choose "Send to..."->your USB stick's drive letter. You may have to unplug and replug the stick for Windows to see the drive after Ubuntu's been installed. If you have anything else you want available on the stick (roms, other recovery/bootloader, etc) copy them here as well. When done, eject the drive.


Before Booting

Set your PC's BIOS to boot USB before your internal drive. Each PC is different, so it's up to you to figure out how to set your PC to boot from USB.


Running the tools

Always start with your Kindle turned off and unplugged from USB. These directions assume that your Fire is stuck in fastboot, has FFF installed, or you are using the USB boot shorting trick. The exception is if you're trying to install FFF/TWRP from stock Kindle OS, in which case leave it booted and plugged in.

Now boot the LiveUSB. Once the Ubuntu desktop shows up, click the Ubuntu logo in the top left (or press the Windows key) and type "term". Hit enter to run the terminal.

In the terminal window, type "sudo /cdrom/fk". This unpacks the tools and sets up your environment. You should now have a prompt that says "root@ubuntu:~/firekit#"

A list of the possible scripts should now be showing. Type the name of the script you want and hit enter. Protip: type a few letters and hit tab to autocomplete the rest of the word. If you're using any of the usb_ scripts, short the test point and plug in the Fire. As mentioned before, you should have the Fire already booted when using "install_fff_twrp_from_stock". For all the other commands, just plug the Fire in.



If this keeps you from returning or junking an otherwise good Fire, consider throwing a thanks or a beer my way.


Props to TeamWin & agraben for TWRP, everyone at Canonical


These are the commands as of 1.1:

install_fff_twrp_from_stock: Install FFF and TWRP while in stock Android. Uses fbmode to reboot. Use this to get FFF/TWRP installed on 6.2.1 stock OS.

install_fff_twrp: Install FFF and TWRP while in fastboot. Good if you're stuck in fastboot and you want FFF/TWRP.

fix_parts Restore partition table to stock while in fastboot. Do this if you're in fastboot and your partition table is screwed up.

normal_boot: Set the bootmode to boot android and reboot while in fastboot. Try this if you're stuck at the Kindle Fire logo.

usb_boot_twrp: USB boot TWRP without installing. Boot TWRP if your Kindle black screens when you try to power it on. Needs the USB boot mode trick.

usb_install_fff_twrp: USB boot FFF, install FFF and TWRP. Install / recover the bootloader and recovery if they are broken. Needs the USB boot mode trick.

usb_fix_parts_and_install_fff_twrp: USB boot FFF, restore partition table to stock, install FFF and TWRP. Fix everything if you screwed up the partition table and your Fire's screen no longer turns on. Needs the USB boot mode trick.


Changelog:

1.1:
-Add restore of mmcblk0p1 (x-loader) to the "usb_fix_parts_and_install_fff_twrp" script to recover from total brain damage. Thanks to TyHi for proving this works and may be necessary.

1.0:
-Initial release


(todo: make videos, integrate usb boot mode instructions)
 

Attachments

  • fk-1.1.zip
    5.7 MB · Views: 22,669
Last edited:

chuffykow

Member
Dec 4, 2010
38
11
Thanks for the compilation of tools and directions. Rolling up your own image with debootstrap is probably more trouble then it's worth; the images provided by Canonical might be larger -- but they will pretty much work on *.
 

sarge363

Senior Member
Nov 7, 2010
233
13
Robstown, Tx
This is very interesting. I never really was interested in learning about Ubuntu but if it saves me worry about finally getting around to flashing FFF & TWRP then it's worth a shot.
 

yumcax

Senior Member
Aug 29, 2010
277
125
Seattle
This is a very, very good idea. I spent a long time trying to get the drivers working on Windows, it seems that the ones packaged with the latest KFU are FUBAR.
Maybe you could package this with a minimal Ubuntu install, or another distro? For something with such a simple purpose Ubuntu is mighty bloated.
 

mewshi

Senior Member
Dec 27, 2009
73
11
The sdk version of adb has trouble on windows too. Linux : for those who want their computer to work for them, not the other way around. ;)
Sent from my DROID2 using xda premium
 

pokey9000

Senior Member
Apr 17, 2007
767
396
Austin
This is a very, very good idea. I spent a long time trying to get the drivers working on Windows, it seems that the ones packaged with the latest KFU are FUBAR.
Maybe you could package this with a minimal Ubuntu install, or another distro? For something with such a simple purpose Ubuntu is mighty bloated.

Ubuntu is a known quantity, and Canonical does all the hard QA work making sure it runs on the largest swath of hardware. I put this together to be a sure thing for people having trouble in other environments, and trying to streamline the OS may compromise that.
 

gett

Senior Member
Oct 27, 2006
264
68
Skopje
What can it do
These are the commands as of 1.0:

install_fff_twrp_from_stock: Install FFF and TWRP while in stock Android. Uses fbmode to reboot. Use this to get FFF/TWRP installed on 6.2.1 stock OS.

Sorry for noob questions
1. This means that it will unstall FFF and TWRP without any other downloads, or I should put another files in USB (along with attached one) It will work with 6.2 OS?
2. Should I been rooted first?
And
3. Any root method for ubuntu from USB?

Once more, sorry to ask noobs questions in developers forum

Edit:
I find answer for 3rd question here :)
 
Last edited:

bigjkcfan

Senior Member
Dec 9, 2010
53
4
Nebraska
Hello,

I have my unbuntu on a bootable usb and I have the extracted kf file on the root folder right where terminal opens up to... so in the terminal I do "sudo fk" and "sudo /fk" and it just gives me command not found, could somebody give me a little help? I'm not a linux noob but I am no pro either.
 

pokey9000

Senior Member
Apr 17, 2007
767
396
Austin
Hello,

I have my unbuntu on a bootable usb and I have the extracted kf file on the root folder right where terminal opens up to... so in the terminal I do "sudo fk" and "sudo /fk" and it just gives me command not found, could somebody give me a little help? I'm not a linux noob but I am no pro either.

sudo ./fk

"sudo /fk" doesn't work because I'm guessing your file is located in /root/fk, and "sudo fk" doesn't work because executables without a path prefix are assumed to be in the $PATH, and most of the time /root and the current directory ("./") aren't in the $PATH.
 

bigjkcfan

Senior Member
Dec 9, 2010
53
4
Nebraska
Ah, I got it! the permissions needed to be changed, then I ran the sudo ./fk and it worked, thanks!

Alright here is my situation. When trying to revert to stock my brother's kindle got very screwed up, adb shell does not work at all, adb works just fine though. So I bought a factory cable and now once I do the boot sequence with that in windows adb does not recognize anymore, actually in windows it just says unknown device. So it has to be in fastboot mode, yet now that I figured this linux stuff out, it still says waiting for device when trying to install twrp. Is my brother's kindle really screwed up?
 
Last edited:

pokey9000

Senior Member
Apr 17, 2007
767
396
Austin
Ah, I got it! the permissions needed to be changed, then I ran the sudo ./fk and it worked, thanks!



That makes since to me, but my computer must hate me... here is from a brand new terminal window that I had opened.

ubuntu@ubuntu:~$ dir
Desktop Documents Downloads fk Music Pictures Public Templates Videos
ubuntu@ubuntu:~$ "sudo ./fk"
bash: sudo ./fk: No such file or directory

Don't include the quotes...
 
  • Like
Reactions: lovejoy777

macx98

Member
Jul 20, 2010
18
1
Hi,

I'm running off ubuntu in a USB stick, and every time I type "sudo ./fk" I get the following error messages:

ubuntu@ubuntu:/cdrom$ sudo /cdrom/fk
tar: firekit: Cannot mkdir: Input/output error
tar: firekit/twrp2-blaze.img: Cannot open: Input/output error
tar: firekit/install_fff_twrp: Cannot open: Input/output error
5837+1 records in
5837+1 records out
5977554 bytes (6.0 MB) copied, 0.636875 s, 9.4 MB/s
tar: firekit/u-boot.bin: Cannot open: Input/output error
tar: firekit/usb_install_fff_twrp: Cannot open: Input/output error
tar: firekit/aboot.bin: Cannot open: Input/output error
tar: firekit/normal_boot: Cannot open: Input/output error
tar: firekit/fastboot: Cannot open: Input/output error
tar: firekit/install_fff_twrp_from_stock: Cannot open: Input/output error
tar: firekit/adb: Cannot open: Input/output error
tar: firekit/mmcblk0p1: Cannot open: Input/output error
tar: firekit/usb_fix_parts_and_install_fff_twrp: Cannot open: Input/output error
tar: firekit/usb_boot_twrp: Cannot open: Input/output error
tar: firekit/fbmode: Cannot open: Input/output error
tar: firekit/adb_usb.ini: Cannot open: Input/output error
tar: firekit/usbboot: Cannot open: Input/output error
tar: firekit/fix_parts: Cannot open: Input/output error
tar: Exiting with failure status due to previous errors
mkdir: cannot create directory `/root/.android': Input/output error
cp: accessing `/root/.android/.': Input/output error
Stopping any running adb servers...
/cdrom/fk: line 18: adb: command not found
/cdrom/fk: line 20: cd: /root/firekit: Input/output error
Done. Tools are in /root/firekit. Files copied to USB are likely in /cdrom
Scripts:
install_fff_twrp_from_stock - install FFF and TWRP while in stock Android
install_fff_twrp - install FFF and TWRP while in fastboot
fix_parts - restore partition table to stock while in fastboot
normal_boot - set the bootmode to boot android and reboot while in fastboot
usb_boot_twrp - USB boot TWRP without installing
usb_install_fff_twrp - USB boot FFF, install FFF and TWRP
usb_fix_parts_and_install_fff_twrp - USB boot FFF, restore partition
table to stock, install FFF and TWRP
Good luck. -pokey9000


Is there a system setting I should set to enable r/w? Thanks.
 

markgamber

Senior Member
Apr 1, 2005
593
15
This totally saved my ass today. And my Fire. I figured it was a brick but between this kit and the breakout kit it's back up and running. Stock. ;) Many thanks!
 

ukulele_ninja

Senior Member
Sep 7, 2010
90
1
I booted ubuntu fine and was able to get the terminal to boot the program, however when I try to run one of the commands, im getting a 'no such file or directory' with the kindle plugged in.
 

ghettogeddy

Member
Oct 20, 2010
28
1
im a super ubuntu noob...

ive got the live usb done and i can get into the os but once i get into the terminal im at a loss for words of how monkey f***** i am..

every time i try sudo/cdrom/fk i get no directory
same with any other command i get.

i put the fk file directly on the live usb anyone care to break down the terminal a lil better or maybe give advice on a better place to put the fk file
 

freefaling

Senior Member
Dec 9, 2010
97
20
Lahore
Indebted

I am really grateful that you decided to share this wonderful unbricking method with us. I just successfully unbricked my kindle after a bad bootloader flash.

Thanks!

Here are some pointers for those still stuck with a brick:

- I followed DirectFix's video on Kindle teardown to get off the back cover.
- Then I setup pokey9000's Firekit on my Ubuntu 12.04 ( change file fk's permission to make it executable). After that I ran the script 'usb_fix_parts_and_install_fff_twrp' and at 'waiting for OMAP44xx device...' I did the shorting and plugging in. (I had already setup adb earlier) (USB cable was plugged in the computer from the start of this process; but not in the Kindle)
- I used a spare thin wire lying around, shaved both ends and put one end on the metal casing and then put kindle's back cover on top of it to hold it in place. This way I had both hands free to short the point. Then plug in the usb. (Make sure USB is plugged in the computer from the very beginning) (Also make sure kindle is really off; do a hard reset prior to this step just in case)
 
Last edited:

lovejoy777

Inactive Recognized Developer
Dec 30, 2011
3,725
4,541
Nottingham
I can second that. the said method did not work off my ubuntu 12.04 (i think it was my personal setup) but i followed the linked instructions on using a pendrive and it worked 1st time. i suggest follow the instructions exactly.

thanks again pk9 and anyone else that helped me in my 48 hour bricking session:)

Sent from my Amazon Kindle Fire using xda premium
 

lovejoy777

Inactive Recognized Developer
Dec 30, 2011
3,725
4,541
Nottingham
i think you are doing the terminal ok. you needed to extract the fk file to your pendrive ie. when you open pendrive you should see lots of files associated with the fire kit & not just one file (fk).

Sent from my Amazon Kindle Fire using xda premium
 

Adamp24

Senior Member
Apr 14, 2009
54
2
Raleigh
My Kindle is bricked.

I ran the Kindle Fire Utility 0.95, followed steps in the first post, installed drivers fine, then rooted it. It turned off, and now will not turn on. I've tried charging it, pressing and holding the button 100 times for varying lengths.. nothing.

My question is, what are my options now? I was thinking of doing the Firekit LiveUSB repair kit short trick.. but that will for sure void the warranty. Is there any possibility of me returning the Kindle as is right now? It's only 2 days old.

Any advice would be most certainly appreciated, because I'm pretty f**ked right now.


I'm trying to run your utility, but am a little confused. At first it says:

Fix power on problems: If the Fire's screen never seems to turn on, you may have wrecked the bootloaders or the partitioning. Fortunately most of the time this results in the CPU falling into the low level USB boot mode. Use the "usb_fix_parts_and_install_fff_twrp" to rebuild the flash enough to boot TWRP. You don't need to use the USB shorting trick for this one, just power up the Kindle after running the script.

But then down below it says "Needs usb shorting trick".. which is it?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    What it is

    Firekit combines all the command line tools for Kindle Fire recovery with the Ubuntu LiveUSB. All you need is a USB stick and a PC that can boot off it. All files stay on the stick, so nothing on your PC is changed.

    Firekit is run from the command line, but there are scripts to automate common tasks so the typical restoration involves running just two commands. A fastboot-bootable TWRP and FFF is included as well as the Rekindle USB boot tools so even the most fubared bricks can be restored.

    This is only for the first gen Kindle Fire 7" from late 2011. It will not work on any other model.

    What can it do


    Fix power on problems: If the Fire's screen never seems to turn on, you may have wrecked the bootloaders or the partitioning. Fortunately most of the time this results in the CPU falling into the low level USB boot mode. Use the "usb_fix_parts_and_install_fff_twrp" to rebuild the flash enough to boot TWRP. You don't need to use the USB shorting trick for this one, just power up the Kindle after running the script.

    Fix stuck-at-triangle-logo: This can be due to being stuck in fastboot or having a corrupt /system. First try getting into recovery. Press power for a few seconds just after turning on, LED should go orange and the TWRP should show up. If that works, reflash your ROM from TWRP. If not, try the "normal_boot" script to get out of being stuck in fastboot.

    Fix stuck-at-Kindle Fire-logo: Similar to the above. First try the "normal_boot" script. If that doesn't work, you need to reflash the stock ROM from TWRP. But you don't have TWRP. So use the "install_fff_twrp_from_stock" script which will force the stock ROM into letting you install fastboot. Then flash a ROM.

    -and more


    Why

    A lot of people seem to be having problems with Windows and ADB drivers needed for fastboot and adb. Linux doesn't seem to have this kind of trouble, so I threw this together. It's not pretty or menu driven, but I find that too much automation gets in the way when things are broken to begin with.

    Downloading a ~600MB Ubuntu image is needed, and this has only been tested on one PC so far. Don't complain if you spend hours grabbing this only to not have it fix your problem. I thought about rolling my own USB image with debootstrap for a much smaller image but figured that a prefab Ubuntu Live image is probably best for compatibility.


    Using Firekit

    Making the LiveUSB

    Get the latest 32-bit Ubuntu and follow the directions to make a USB stick. If you want to try this with another distro (not tested) it must be 32-bit or have full 32-bit compatibility libraries.

    Then unpack the attached zip to the top of the stick. The easiest way is to open the .zip in Explorer, right-click on "fk" (the only file in the zip), and choose "Send to..."->your USB stick's drive letter. You may have to unplug and replug the stick for Windows to see the drive after Ubuntu's been installed. If you have anything else you want available on the stick (roms, other recovery/bootloader, etc) copy them here as well. When done, eject the drive.


    Before Booting

    Set your PC's BIOS to boot USB before your internal drive. Each PC is different, so it's up to you to figure out how to set your PC to boot from USB.


    Running the tools

    Always start with your Kindle turned off and unplugged from USB. These directions assume that your Fire is stuck in fastboot, has FFF installed, or you are using the USB boot shorting trick. The exception is if you're trying to install FFF/TWRP from stock Kindle OS, in which case leave it booted and plugged in.

    Now boot the LiveUSB. Once the Ubuntu desktop shows up, click the Ubuntu logo in the top left (or press the Windows key) and type "term". Hit enter to run the terminal.

    In the terminal window, type "sudo /cdrom/fk". This unpacks the tools and sets up your environment. You should now have a prompt that says "root@ubuntu:~/firekit#"

    A list of the possible scripts should now be showing. Type the name of the script you want and hit enter. Protip: type a few letters and hit tab to autocomplete the rest of the word. If you're using any of the usb_ scripts, short the test point and plug in the Fire. As mentioned before, you should have the Fire already booted when using "install_fff_twrp_from_stock". For all the other commands, just plug the Fire in.



    If this keeps you from returning or junking an otherwise good Fire, consider throwing a thanks or a beer my way.


    Props to TeamWin & agraben for TWRP, everyone at Canonical


    These are the commands as of 1.1:

    install_fff_twrp_from_stock: Install FFF and TWRP while in stock Android. Uses fbmode to reboot. Use this to get FFF/TWRP installed on 6.2.1 stock OS.

    install_fff_twrp: Install FFF and TWRP while in fastboot. Good if you're stuck in fastboot and you want FFF/TWRP.

    fix_parts Restore partition table to stock while in fastboot. Do this if you're in fastboot and your partition table is screwed up.

    normal_boot: Set the bootmode to boot android and reboot while in fastboot. Try this if you're stuck at the Kindle Fire logo.

    usb_boot_twrp: USB boot TWRP without installing. Boot TWRP if your Kindle black screens when you try to power it on. Needs the USB boot mode trick.

    usb_install_fff_twrp: USB boot FFF, install FFF and TWRP. Install / recover the bootloader and recovery if they are broken. Needs the USB boot mode trick.

    usb_fix_parts_and_install_fff_twrp: USB boot FFF, restore partition table to stock, install FFF and TWRP. Fix everything if you screwed up the partition table and your Fire's screen no longer turns on. Needs the USB boot mode trick.


    Changelog:

    1.1:
    -Add restore of mmcblk0p1 (x-loader) to the "usb_fix_parts_and_install_fff_twrp" script to recover from total brain damage. Thanks to TyHi for proving this works and may be necessary.

    1.0:
    -Initial release


    (todo: make videos, integrate usb boot mode instructions)
    2
    Hello,

    I have my unbuntu on a bootable usb and I have the extracted kf file on the root folder right where terminal opens up to... so in the terminal I do "sudo fk" and "sudo /fk" and it just gives me command not found, could somebody give me a little help? I'm not a linux noob but I am no pro either.

    sudo ./fk

    "sudo /fk" doesn't work because I'm guessing your file is located in /root/fk, and "sudo fk" doesn't work because executables without a path prefix are assumed to be in the $PATH, and most of the time /root and the current directory ("./") aren't in the $PATH.
    1
    Ah, I got it! the permissions needed to be changed, then I ran the sudo ./fk and it worked, thanks!



    That makes since to me, but my computer must hate me... here is from a brand new terminal window that I had opened.

    ubuntu@ubuntu:~$ dir
    Desktop Documents Downloads fk Music Pictures Public Templates Videos
    ubuntu@ubuntu:~$ "sudo ./fk"
    bash: sudo ./fk: No such file or directory

    Don't include the quotes...
    1
    When it says waiting then apply the short trick plug it in and keep it applied till the script runs also make sure whatever your using to short has good conductivity :)
    1
    BTW, no. This is not for the Kindle Fire 2...it will only make things worse for you.


    "That's a special kind of stupid. The kind that makes me laugh."

    anything similar to this that will fix a KF2? Not too sure what to do at this point. seems pretty bricked to me :p