[BOOTLOADER] 2nd-bootloader for Custom ROMs on KFireHD 8.9 [06/24 CM12.1/TWRP 2.8.x]

Search This thread

soupmagnet

Retired Forum Moderator
Jan 7, 2012
3,990
2,587
Austin, TX
Google Pixel 6
Is there an official post somewhere with the drivers?
The install_drivers.bat from the Kindle Fire Utility is probably the most straight forward way to get them installed, but don't use anything in the KFU other than that. The KindleFireFirstAide tool has an option to install drivers also, I believe. Or you could just do as suggested and boot into a liveUSB and install SoupKit.
 

DesignGrits

Senior Member
Apr 10, 2011
4,629
1,124
Seattle
What is this soupkit? I am running through the KindleFireFirstAide right now and down grading, then I will do option 14 (Dissable OTA Update) then option 18 (Google Play store). But I will still need a method to flash twrp. Will that work to get twrp?

I noticed that KindleFireFirstAide gives me an option to put the fire in fast boot before I run any options, would I technically be able to get it in to fasboot that way and then run the cmd to flash twrp?
 

soupmagnet

Retired Forum Moderator
Jan 7, 2012
3,990
2,587
Austin, TX
Google Pixel 6
You can put the device in fastboot yourself by entering...
Code:
adb shell su -c "reboot bootloader"
...but if your drivers aren't working properly, fastboot commands may not work.
 

mmesh

Member
Sep 6, 2007
24
3
Stuck in fastboot

Hi,

Can someone help me, please.

I was going to install CM10.1 on my KFHD8. I was doing it inside Win7 Virtualbox machine and everything went fine until I started this command:
Code:
fastboot -i 0x1949 flash bootloader kfhd8-u-boot-prod-8.1.4.bin

Then I got kernel panic on my linux (host) machine and KFHD got stuck at "Start downloading" message in fastboot mode.

Is there a way to restart the process. When I booted the computer I tried executing the same command but all I got was
< waiting for device >
and no device was detected in device manager when I disconnected and connected the USB cable.

I can wait until the battery drains - but what then? Will I be able to charge the device then and try to redo this step and continue with the process?
 

soupmagnet

Retired Forum Moderator
Jan 7, 2012
3,990
2,587
Austin, TX
Google Pixel 6
Hi, I can wait until the battery drains - but what then? Will I be able to charge the device then and try to redo this step and continue with the process?
OMG...don't do that.

Can someone help me, please.

I was going to install CM10.1 on my KFHD8. I was doing it inside Win7 Virtualbox machine and everything went fine until I started this command:
Code:
fastboot -i 0x1949 flash bootloader kfhd8-u-boot-prod-8.1.4.bin
Then I got kernel panic on my linux (host) machine and KFHD got stuck at "Start downloading" message in fastboot mode.
Why on earth, if you have a Linux machine, are you trying to run a Windows VM? I think I just died a little inside.
 

mmesh

Member
Sep 6, 2007
24
3
OMG...don't do that.


Why on earth, if you have a Linux machine, are you trying to run a Windows VM? I think I just died a little inside.

Well I was running the installer from this thread http://goo.gl/BMybF which only has a bat file and doesn't have bash variant; and I was to lazy to rewrite the thing; and I never had any problem with the VBox Win7 machine until today :(

But as I was on v8.3.1 (didn't disable automatic upgrade) and this post http://xdaforums.com/showpost.php?p=40453742&postcount=22 pointed me to do boot image from this thread I went ahead and did it - that is tried to do it - from inside VM.

If waiting for battery drai isn't the option, what is?
Or am I stuck with soon to be brick
 

soupmagnet

Retired Forum Moderator
Jan 7, 2012
3,990
2,587
Austin, TX
Google Pixel 6
Well I was running the installer from this thread http://goo.gl/BMybF which only has a bat file and doesn't have bash variant; and I was to lazy to rewrite the thing; and I never had any problem with the VBox Win7 machine until today :(

But as I was on v8.3.1 (didn't disable automatic upgrade) and this post http://xdaforums.com/showpost.php?p=40453742&postcount=22 pointed me to do boot image from this thread I went ahead and did it - that is tried to do it - from inside VM.

If waiting for battery drai isn't the option, what is?
Or am I stuck with soon to be brick
If you don't want to go through the trouble of configuring your Linux environment to send ADB or fastboot commands, just install SoupKit. It already does all of that for you, and you won't have to run the VM (which is probably why you received the kernel panic in the first place).

To install the 2nd bootloader, you only need to copy and paste a handful of commands to the terminal, so running a script to do it for you is kind of pointless IMO.
 

mmesh

Member
Sep 6, 2007
24
3
If you don't want to go through the trouble of configuring your Linux environment to send ADB or fastboot commands, just install SoupKit. It already does all of that for you, and you won't have to run the VM (which is probably why you received the kernel panic in the first place).

To install the 2nd bootloader, you only need to copy and paste a handful of commands to the terminal, so running a script to do it for you is kind of pointless IMO.

What's worse - I do have configured Android SDK (adb and fastboot) in my linux environment as I started to develop an app using Titanium Studio. But, I was just to lazy and wanted to try CM10.1 as soon as possible. The first step was to root my device once again as it lost su app after automatic upgrade to 8.3.1. The path of least resistance at that moment was to use this upgrade script which only runs in Windows. But Murphy never sleeps...

The point is that the PC isn't able to detect the device when connected with USB cable - neither in Windows nor in Linux.

Is there a way to reset fastboot state using some combination of key presses or am I doomed? :)

I never stated that I was clever about all of this but on the contrary I screwed myself over trying to do the shortcut.


So, the cut this short - do You think that recovering isn't possible and that I should not lose time trying to do it?

P.S.
I would like to come across Your thread before: http://goo.gl/yeDil
Then I would know that using VBox isn't good idea although I manged to configure it to recognize device in normal boot and in fastboot (fixed USB filters before booting the VM).

And there is a dvelopment on the physical state of the tablet. The Battery drained and I have connected it to the wall charger and I will leave it until tomorrow morning. Only thing bothering me that I won't be able to tinker more with it tomorrow as I'm going on a short trip. Maybe there will be some good news on Sunday :)
 
Last edited:

sjj1991

Senior Member
Jun 29, 2010
101
2
Singapore
sjj.sg
I have done everything up to step 5. It just doesn't go into fastboot.

This is what I have done:
1. Shut down the device.
2. Enter "fastboot -i 0x1949 flash boot kfhd8-freedom-boot-8.3.0.img" into command prompt, I see "< waiting for device >"
3. Connect the device via USB.
4. Device still boots up normally into Android.

What did I do wrong? I have already installed the drivers successfully and ADB does detect the device.
 

soupmagnet

Retired Forum Moderator
Jan 7, 2012
3,990
2,587
Austin, TX
Google Pixel 6
I have done everything up to step 5. It just doesn't go into fastboot.

This is what I have done:
1. Shut down the device.
2. Enter "fastboot -i 0x1949 flash boot kfhd8-freedom-boot-8.3.0.img" into command prompt, I see "< waiting for device >"
3. Connect the device via USB.
4. Device still boots up normally into Android.

What did I do wrong? I have already installed the drivers successfully and ADB does detect the device.
You need to make sure your drivers are configured properly for fastboot .
 

arda99

Senior Member
Jan 4, 2011
340
215
I have done everything up to step 5. It just doesn't go into fastboot.

This is what I have done:
1. Shut down the device.
2. Enter "fastboot -i 0x1949 flash boot kfhd8-freedom-boot-8.3.0.img" into command prompt, I see "< waiting for device >"
3. Connect the device via USB.
4. Device still boots up normally into Android.

What did I do wrong? I have already installed the drivers successfully and ADB does detect the device.

try this:

http://xdaforums.com/showpost.php?p=37882963&postcount=54
 
  • Like
Reactions: sjj1991

sjj1991

Senior Member
Jun 29, 2010
101
2
Singapore
sjj.sg

Thanks, it works! This should be included on the first post, it will save everyone a lot of time!

EDIT: I have completed all the steps, but now its stuck at the orange kindle fire logo. I have waited for more than 10 mins and I still don't see the blue logo.
I can still access the device via fastboot. Already tried repeating steps 4.5 and 5, but it just won't work. Any idea whats wrong now? :/
 
Last edited:

arda99

Senior Member
Jan 4, 2011
340
215
Thanks, it works! This should be included on the first post, it will save everyone a lot of time!

EDIT: I have completed all the steps, but now its stuck at the orange kindle fire logo. I have waited for more than 10 mins and I still don't see the blue logo.
I can still access the device via fastboot. Already tried repeating steps 4.5 and 5, but it just won't work. Any idea whats wrong now? :/

I never experienced this issue, but looks like there is some problem with the stack file installation. u can try to restore with your previous backup or KFHD SRT(http://xdaforums.com/showthread.php?t=2011126) and start over again.
 
  • Like
Reactions: sjj1991

dreamer609

Senior Member
Sep 17, 2012
136
14
Portland, OR
How were you finally able to get it to work?

After a lot of trial and error I claim success! Thank you for your help, on CM now, rockin and rollin

Well, I am kinda in the same boat you are. I keep trying and trying different things, but no avail. If you could clue me on what worked for you I would most appreciative :) Did you have to go down a few levels to 8.14 from 8.30 to get things to happen. Were you able to push the stack through ADB? Being a complete Newb at ADB, I still can't quite figure out where things are supposed to be that I am flashing.... I installed the Amazon Kindle Fire drives from Kffirstaide, as I was a bit confused about what exactly to install with the SDK package... But I cannot seem to get the address to the stack where it should be in either of the two commands for pushing the stack... :( I am very confused. I have been working on this all day. I am running Windows XP and I seem to have no idea where to put the "stack" file or where to direct ADB to go for the second command of the stack. I have tried to read other posts, but I am just baffled. Any ideas would be most appreciative.

---------- Post added at 03:09 AM ---------- Previous post was at 03:07 AM ----------

:good: The stack file was overwritten by an OTA update, doing that step again fixed the problem!

What exactly are you referring to? How was it fixed? I just downloaded that file this afternoon and I still cannot find out where to put it or how to use it... or the other line after you push the stack...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 91
    Introducing: Kindle Fire 2nd-bootloader + TWRP 2.8.x.x for the Kindle Fire HD 8.9

    *** USE AT YOUR OWN RISK! WHILE I TRY MY BEST TO PROVIDE WORKING KERNELS/ROMS, I AM NOT RESPONSIBLE IF THIS SOFTWARE OR ANYTHING I'VE WORKED ON SUDDENLY FRIES YOUR DEVICE. ***

    ** THESE FILES WILL ONLY WORK ON A KINDLE FIRE HD 8.9. DO NOT ATTEMPT TO USE THESE FILES ON ANY OTHER DEVICE. **

    ** WHEN MODDING THE KFIRE HD YOU SHOULD HAVE WORKING FASTBOOT DRIVERS ON YOUR PC. **


    FASTBOOT CABLES ARE NOT REQUIRED FOR USING FASTBOOT MODE ON THE KINDLE FIRE HD 8.9.
    DOWNLOAD THE ANDROID SDK AND GO FROM THERE.
    POSSIBLE ALSO THAT USING A FASTBOOT CABLE ON THE 8.9 WILL CAUSE DAMAGE.

    http://developer.android.com/sdk/index.html

    MAC USERS: USEFUL LINKS
    http://xdaforums.com/showpost.php?p=41199927&postcount=230

    Q: How do I know if my fastboot works?
    A: With the Kindle powered down, type the following command into a cmd/terminal window on your PC (should return with: < waiting for device> ):
    fastboot -i 0x1949 getvar product

    Then connect USB to the Kindle and reboot. It *SHOULD* show a Fastboot screen and your terminal window should show something like:
    product: Jem-PVT-Prod-04

    Type this to reboot out of fastboot mode:
    fastboot -i 0x1949 reboot


    ** IF YOU HAVE QUESTIONS, RE-READ THROUGH THE THREAD FOR ANSWERS. WHEN YOU'RE ABSOLUTELY SURE NO ONE HAS ASKED YOUR QUESTION, GO AHEAD AND RE-READ THE THREAD AGAIN AND USE THE SEARCH FEATURE. THEN POST YOUR QUESTION IF YOU STILL CAN'T FIND THE ANSWER **



    INSTRUCTIONS FOR INSTALLING A 2ND-BOOTLOADER TO LOAD CUSTOM KERNELS / ROMS / RECOVERY:
    *** BE SURE YOU HAVE A GOOD CHARGE ON THE DEVICE ***

    STEP 1. Backup your stock partitions to your own HD for later if you need disaster recovery:
    Code:
    adb shell su -c "dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot0block.img"
    adb shell su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/boot of=/sdcard/stock-boot.img"
    adb shell su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/recovery of=/sdcard/stock-recovery.img"
    adb shell su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/system of=/sdcard/stock-system.img" # This will take a few minutes
    adb pull /sdcard/boot0block.img
    adb pull /sdcard/stock-boot.img
    adb pull /sdcard/stock-recovery.img
    adb pull /sdcard/stock-system.img # This will take a few minutes
    Take those files and put them somewhere safe.

    **** MAC USERS MAY NEED TO SPARSE THE FILES FOR RE-FLASHING TO THE DEVICE. I NEED A MAC USER TO PROBABLY WORK THROUGH THAT PROCESS AND I CAN POST BACKUP COPIES OF THE STOCK PARTITIONS FOR DISASTER RECOVERY ****



    STEP 2: Download the files you will need to install 2nd-bootloader, TWRP and CM:

    ON THE FOLLOWING DEV-HOST LINKS
    USE THE BLUE "DOWNLOAD NOW" BUTTON
    -- DO NOT INSTALL AN EXECUTABLE DOWNLOADER TO YOUR SYSTEM! --
    I'LL LOOK FOR A BETTER HOST WHEN I GET MORE TIME.

    1. Stack override file:
      Mirror 1: Download "stack" from Dev-Host
    2. [12/09] kfhd8-freedom-boot-8.4.6.img (USED ONLY THE FIRST TIME -- .zip files will have their own boot.img's from now on):
      Mirror 1: Download "kfhd8-freedom-boot-8.4.6.img" from Dev-Host
      md5sum: 8374cf88e75abda8c374044a1f0daa5f
    3. [06/24] TWRP 2.8.7.0 recovery flash Image
      Mirror 1: Download TWRP from Dev-Host
      md5sum: a0c7533fd853849184850580350abd18
    4. CM-12.1 for the Kindle Fire HD 8.9 (choose the latest version from):
      Mirror 1: Downloads CM
    5. Google Apps from Android File Host:
      https://www.androidfilehost.com/?w=files&flid=25361 (Use 5.1 version!)
    6. Download the older 8.1.4 bootloader file and flash to your device via fastboot:
      Mirror 1: Download bootloader from Dev-Host
      md5sum a56f24c0c01aaea4bf408bc710faadaa
      (You SHOULD check this before using fastboot -- downloads CAN be corrupted)
    Place the CM-12.1 ROM and the gapps .zip on your device in the /sdcard area


    STEP 3. Install the stack override in /system:
    ADB commands entered while booted up into STOCK *rooted* Amazon Kindle OS -- May need to enable ADB debugging in Settings:
    [2013-08-21] edited the location where stack is placed on device due to permissions changes
    Code:
    adb push stack /sdcard/
    adb shell su -c "dd if=/sdcard/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"

    STEP 4. Stop the auto recovery update script (this file may or may not be present):
    Code:
    adb shell su -c "mount -o remount,rw ext4 /system"
    adb shell su -c "mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak"
    adb shell su -c "mount -o remount,ro ext4 /system"

    STEP 5:
    [ With the device powered off: Issue the following commands into your command/terminal window on your PC. Start with the first command and press enter. Then connect USB to the Kindle and power on ]


    Code:
    fastboot -i 0x1949 flash bootloader kfhd8-u-boot-prod-8.1.4.bin
    fastboot -i 0x1949 flash boot kfhd8-freedom-boot-8.4.6.img
    fastboot -i 0x1949 flash recovery kfhd8-twrp-2.8.7.0-recovery.img
    fastboot -i 0x1949 reboot

    *DONT RE-FLASH FREEDOM-BOOT.IMG LATER AFTER FLASHING CUSTOM ROMS -- IT'S FOR STOCK AMAZON OS ONLY / FIRST INSTALL ONLY*

    ** If everything was done correctly your Kindle will reboot and you will at first see the normal Kindle Fire ORANGE logo and then it will fade and come back as a BLUE logo. **

    TO ENTER RECOVERY:
    Press the left volume button (volume up) while the logo is still YELLOW and keep pressing until the logo turns BLUE. Wait a moment and you should enter recovery.


    STEP 6:
    CM-12.1 AND GAPPS INSTALLATION:
    • (OPTIONAL) Make a backup by selecting "Backup" and then slide your finger to the right on the "Swipe to Back Up"
    • Once complete use the pentagon "Home" icon in the upper right corner of the screen (next to the back arrow and terminal icon)
    • Now, select "Wipe"
    • Swipe the "Swipe to Factory Reset"
    • Use the "Home" icon
    • Select "Install"
    • Browse to the location on your device where you saved the CM-11.0 / GAPPS .ZIP files
    • Select the CM12.1 ZIP file in the list by touching it, then confirm it says the name of the CM-12.1 .ZIP file on the next screen under "File to flash:"
    • Select "Add More Zips"
    • Select the GAPPS ZIP file in the list by touching it -- make sure it says the name of the .ZIP again under "File to flash:"
    • Swipe the "Swipe to Confirm Flash", and wait for it to finish.
    • If the screen is blank at any time you can hit the power button to "wake up" the device
    • Once the flash is done, you'll see a "Home" and "Reboot" buttons at the bottom of the screen
    • Select "Reboot"

    CONGRATULATIONS YOU NOW HAVE THE ABILITY TO INSTALL CUSTOM KERNELS / RECOVERY AND ROMS.


    FLASHING BACK TO STOCK:
    ** FIND THE FILES WE BACKED UP IN STEP #1: ** OR Follow this thread's instructions:
    http://xdaforums.com/showthread.php?t=2011126


    **** MAC USERS MAY NEED TO SPARSE THE FILES FOR RE-FLASHING TO THE DEVICE. I NEED A MAC USER TO PROBABLY WORK THROUGH THAT PROCESS AND I CAN POST BACKUP COPIES OF THE STOCK PARTITIONS FOR DISASTER RECOVERY ****


    Once you have these files (we'll name them boot.img/recovery.img and system.img for the purpose of these instructions, but they could be different on your system).

    Plug in your fastboot cable and reboot so that you see the fastboot screen and enter the following commands:
    Code:
    fastboot -i 0x1949 flash boot [B]boot.img[/B]
    fastboot -i 0x1949 flash recovery [B]recovery.img[/B]
    fastboot -i 0x1949 flash system [B]system.img[/B] # This one will take a few minutes
    fastboot -i 0x1949 reboot


    THANKS TO:
    • fattire for finding the original bootloader exploit
    • verygreen for doing some initial work on the 2nd-bootloader and fixing bugs (and letting me copy some of his bootloader installation instructions)
    10
    Who thinks I should write an APK installer for the initial installation of the 2nd-bootloader, TWRP and an automated re-install of the Amazon OS to fix any damage the stack drop did?
    6
    Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 8.9

    I forgot to put up the stock flash .zip that I put together. I'll try and get it uploaded tonight.

    Sent from my DROID RAZR HD using Tapatalk 2
    6
    Added a stock Amazon OS flash .zip (8.1.4) for use in TWRP here:
    http://xdaforums.com/showthread.php?t=2142241

    FOR USE ONCE 2ND-BOOTLOADER / TWRP ARE INSTALLED