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

Search This thread

DesignGrits

Senior Member
Apr 10, 2011
4,629
1,124
Seattle
I'm not a pro ad cmd, and just started using the Kindle fire the same day I posted the issue I was having.

As far as doing cmd commands, you want all of your files to be in the same directly on your computer where you have the fastboot file. If you installed the Android SDK on your computer you should be able to find the "platform-tools" folder in it SDK folder, that's where I put all of my files. Like I said I am not sure if this is necessary but exactly what I did. To enter cmd commands you want to do it from that directory, so in that folder somewhere press SHIFT+Right Click your mouse and you will see an option for "Enter Command here". Not sure what its called on Windows XP. When you launch the command prompt from that folder your directory on cmd should match that folder directory. Now your can enter commands and your device should respond to them.

So what I did was use the method user lizzord30 posted on this thread using the First Aide Software: http://xdaforums.com/showthread.php?t=2217299

I can't remember which method I used to get it in to fast boot but I think what I did was power off the device and then run the First Aide Software and followed lizzord30 instructions to flash 8.1.4 back on to the device. At some point in the process the First Aide Software will ask if you will like to boot to fastboot mode, I entered yes and then connected the device.

The other way would be to do the same thing but enter the following commands and then connect the device turned off.
adb shell su -c "reboot bootloader"

Once your in fastboot mode you are golden, flash the 8.1.3 back on to the device, let it boot once, use the command above to go back in to fastboot mode and then follow the instructions at the beginning of this thread from the beginning all over again. ;D

UPDATE: Also before you put the Android SDK I think the First Aide Software requires that you don't have it installed, so install it after you are able to flash back using the software.
 
  • Like
Reactions: dreamer609

praed0r

Senior Member
Jun 7, 2011
99
8
East Kilbride
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 ----------



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...

This is how I did it - I copied these instructions from a post on here somewhere - can't remember exactly which post.
The stack file should be in the same directory as your ADB exe file
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:
Code:
adb push stack /data/local/tmp/
adb shell su -c "dd if=/data/local/tmp/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"

Hope this helps
 
  • Like
Reactions: dreamer609

dreamer609

Senior Member
Sep 17, 2012
136
14
Portland, OR
3/4 of the way lost... :(

This is how I did it - I copied these instructions from a post on here somewhere - can't remember exactly which post.
The stack file should be in the same directory as your ADB exe file
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:
Code:
adb push stack /data/local/tmp/
adb shell su -c "dd if=/data/local/tmp/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"

Hope this helps

Hmm I did read the original posts and have been pouring over other's posts, but I still cannot figure it out :( I am to the point where I am doing a search on my computer for any any ADB locations, adding "stack files to them and THEN trying the ADB Command. I did recently run the KFFirstAide and after placing "stack" files in the places it was complaining it could not find them, I did not see the "cannot find stack error," but it still gave me a red screen of death at the end... So one of those places must be something good.. I am going to place my bets on the "my username/local settings/temp file" directory.. which i can't seem to find any adb files, but it is closest to what the script. Although, just as I am typing I came across another folder.. the "KF8" folder in the KFFirstAide directory that seems to have all those files places in them together... But my other problem is if I get the "stack" script to read, what on earth do I do with the second command after that "adb shell su -c "dd if=/data/local/tmp/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1" ?? I don't really understand what I am supposed to change that to or what I am supposed to move there to activate this script combination. I would installed the SDK drivers the OP posted, but I cannot find enough instruction somehow of what to use or install in that package, as I did when I rooted my original Kindle fire. And that actually worked fairly easily once I installed those SDK drivers with decent instruction.
 

praed0r

Senior Member
Jun 7, 2011
99
8
East Kilbride
Hmm I did read the original posts and have been pouring over other's posts, but I still cannot figure it out :( I am to the point where I am doing a search on my computer for any any ADB locations, adding "stack files to them and THEN trying the ADB Command. I did recently run the KFFirstAide and after placing "stack" files in the places it was complaining it could not find them, I did not see the "cannot find stack error," but it still gave me a red screen of death at the end... So one of those places must be something good.. I am going to place my bets on the "my username/local settings/temp file" directory.. which i can't seem to find any adb files, but it is closest to what the script. Although, just as I am typing I came across another folder.. the "KF8" folder in the KFFirstAide directory that seems to have all those files places in them together... But my other problem is if I get the "stack" script to read, what on earth do I do with the second command after that "adb shell su -c "dd if=/data/local/tmp/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1" ?? I don't really understand what I am supposed to change that to or what I am supposed to move there to activate this script combination. I would installed the SDK drivers the OP posted, but I cannot find enough instruction somehow of what to use or install in that package, as I did when I rooted my original Kindle fire. And that actually worked fairly easily once I installed those SDK drivers with decent instruction.

1 The stack file needs to be in the same directory as your ADB exe file
2 At the command prompt - change to the ADB exe directory - Type dir - then press enter to confirm that the stack file is there
3 Type or copy and paste the first ADB line exactly as posted in my first reply - then press enter
4 Type or copy and paste the second ADB line exactly as posted in my first reply - then press enter

Remember the command prompt you are using must be in the ADB directory
 
  • Like
Reactions: dreamer609

dreamer609

Senior Member
Sep 17, 2012
136
14
Portland, OR
Stumped..

I'm not a pro ad cmd, and just started using the Kindle fire the same day I posted the issue I was having.

As far as doing cmd commands, you want all of your files to be in the same directly on your computer where you have the fastboot file. If you installed the Android SDK on your computer you should be able to find the "platform-tools" folder in it SDK folder, that's where I put all of my files. Like I said I am not sure if this is necessary but exactly what I did. To enter cmd commands you want to do it from that directory, so in that folder somewhere press SHIFT+Right Click your mouse and you will see an option for "Enter Command here". Not sure what its called on Windows XP. When you launch the command prompt from that folder your directory on cmd should match that folder directory. Now your can enter commands and your device should respond to them.

So what I did was use the method user lizzord30 posted on this thread using the First Aide Software: http://xdaforums.com/showthread.php?t=2217299

I can't remember which method I used to get it in to fast boot but I think what I did was power off the device and then run the First Aide Software and followed lizzord30 instructions to flash 8.1.4 back on to the device. At some point in the process the First Aide Software will ask if you will like to boot to fastboot mode, I entered yes and then connected the device.

The other way would be to do the same thing but enter the following commands and then connect the device turned off.
adb shell su -c "reboot bootloader"

Once your in fastboot mode you are golden, flash the 8.1.3 back on to the device, let it boot once, use the command above to go back in to fastboot mode and then follow the instructions at the beginning of this thread from the beginning all over again. ;D

UPDATE: Also before you put the Android SDK I think the First Aide Software requires that you don't have it installed, so install it after you are able to flash back using the software.


Thanks for responding so fast and rather detailed. I have been at that his for around 12 hrs. I wanted to fix up my kindle for my bro, but it seems like a major endeavor so far.. I will have to take a look at that gentleman's post for flashing it back to 8.14. Hopefully, it is not too painful.. I actually, had no trouble getting the Kindle to go into Fastboot. I ran the KFFirstAide's option where you can put it into fastboot and that seemed to have engaged it to do that ever since with not much trouble. I have mostly dealt with the confusion of what do with ADB and not being able to install the the bootloaders at the end of the KFFirstAide list. . I guess I will try to install the SDK drivers, but honestly have no clue which ones to enable. Which ones did you or other people enable / install this time around? I have not found a lot of reading on this for the Kindle 8.9. I deleted them all when I heard that KFFirstAides program needed them all off. I have been mostly using that program to disable OTA updates and restore my Kinda when it gets the red screen of death after I try to flash or install in some other way...I am thinking I might want to install the KFFirstAide on another computer just in case I have to restore yet again.. But I guess, I will have to try to revert back to 8.14.. and see if I can figure out how to get the ADB to work. I am still confused about the second command in "stack overflow" section. I am just not sure what to put in there or what to move..
 

DesignGrits

Senior Member
Apr 10, 2011
4,629
1,124
Seattle
I would revert and start over if I was having that issue using the software I linked.

Step 2 is really easy. Download all of the files listed.
-Stack file
-freedon boot
-twrp
-cm10 rom
-google apps.

Put stack, freedom, twrp, in your folder with all the other fastboot files. And save the other two for putting on your sd card.

STEP 3:

adb push stack /data/local/tmp/

ENTER

adb shell su -c "dd if=/data/local/tmp/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"

ENTER

Go to step 4: (Always press enter in between each line)
 
  • Like
Reactions: dreamer609

dreamer609

Senior Member
Sep 17, 2012
136
14
Portland, OR
I would revert and start over if I was having that issue using the software I linked.

Step 2 is really easy. Download all of the files listed.
-Stack file
-freedon boot
-twrp
-cm10 rom
-google apps.

Put stack, freedom, twrp, in your folder with all the other fastboot files. And save the other two for putting on your sd card.

STEP 3:

adb push stack /data/local/tmp/

ENTER

adb shell su -c "dd if=/data/local/tmp/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"

ENTER

Go to step 4: (Always press enter in between each line)

Well, what I meant is that I will have to go from the current Kindle fire version of 8.31 to 8.14 is that it seems like so hopefully something will work. As for the SDK files... do you happen know which ones I am supposed to install off of that? That was my issue with using it in the first place, as i did not know which elements to install.. I am mostly stuck at step 3. I am hoping if I can figure out what files to install from the SDK that maybe I can figure out where my ADB and fastboot files are are. They are together I take it? Well, I have been at it 13 hrs.. I am just hoping that something actually works. I seem to escape hard bricking the device, but I can't seem to get figure out the ADB and I keep getting the "red screen of death... " at the end of trying to flash the boot loaders.. Maybe I should try to install the SDK on the other computer, as this one seems to work ok for restoring my Kindle when it gets soft bricked and the other has never had an ADB driver installed period.. Thanks for your help, btw. I do hope I can actually install this bootloader and ROM eventually :) But I should get some sleep and then hope I get luckier or get some more help tomorrow. Thanks for your help!
 

DesignGrits

Senior Member
Apr 10, 2011
4,629
1,124
Seattle

mmesh

Member
Sep 6, 2007
24
3
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 :)

@soupmagnet:

First, thanks for the effort...
After recharging tablet booted normaly into Custom ROM I installed (StariROM1.2 - modified 8.30). It seems that the bootloader wasn't corrupted :good: Now I can continue to try and install TWRP and CM10.1 :fingers-crossed:
I saw in the mail your question about udev... I think You edited that post in the thread. You reminded me about that - it is true that I haven't set it up for the KFHD on my Ubuntu 12.10. I did set it before for the Smartphone (i9001) but forgot about it. I should probably do that for the KFHD, too.
Are there any specific instructions for the KFHD8 and udev? Or can I use general instructions and apply them using vendor ids of KFHD?
 

soupmagnet

Retired Forum Moderator
Jan 7, 2012
3,990
2,587
Austin, TX
Google Pixel 6
@soupmagnet:

First, thanks for the effort...
After recharging tablet booted normaly into Custom ROM I installed (StariROM1.2 - modified 8.30). It seems that the bootloader wasn't corrupted :good: Now I can continue to try and install TWRP and CM10.1 :fingers-crossed:
I saw in the mail your question about udev... I think You edited that post in the thread. You reminded me about that - it is true that I haven't set it up for the KFHD on my Ubuntu 12.10. I did set it before for the Smartphone (i9001) but forgot about it. I should probably do that for the KFHD, too.
Are there any specific instructions for the KFHD8 and udev? Or can I use general instructions and apply them using vendor ids of KFHD?
You can use whatever instructions you find to setup your udev rules, or you can install SoupKit (does it for you).
 

dreamer609

Senior Member
Sep 17, 2012
136
14
Portland, OR
Thanks Everyone for your help! I finally got it!

I would revert and start over if I was having that issue using the software I linked.

Step 2 is really easy. Download all of the files listed.
-Stack file
-freedon boot
-twrp
-cm10 rom
-google apps.

Put stack, freedom, twrp, in your folder with all the other fastboot files. And save the other two for putting on your sd card.

STEP 3:

adb push stack /data/local/tmp/

ENTER

adb shell su -c "dd if=/data/local/tmp/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"

ENTER

Go to step 4: (Always press enter in between each line)

So after hours of trying to figure this out, I finally got it. Thank you very much for letting me know the Command prompt could be (and was meant to be) run in the same folder as the ADB.exe that was installed. As a windows XP user, I never had that option originally and had to a search on "open command prompt in folder" so that I could enter in the registry script to give me that option. I always was used to running it out the Run command in the start menu. It was all fairly simple after that. I actually did not need to install the Android SDK pack. A lightbulb went off when I realized I needed to run the command prompt in the original folder of the KFFirstAid, as it had installed my fastboot and ADB. As soon as I ran the command prompt in that folder after transferring the downloaded files into it as well, everything went smooth as butter. Install done in literally 5 mins! Thanks everyone!
 

dreamer609

Senior Member
Sep 17, 2012
136
14
Portland, OR
How I got Kindle Fire HD 8.9 to Root and Run Twrp bootloader

So for anyone who wants further instructions or is still struggling, here is how I got my Kindle Fire HD 8.9 with software v8.31 Rooted: (With A LOT of help from people! Thanks!)

1. I used Bin4ry's method found here http://xdaforums.com/showthread.php?t=1886460
to root it. I ran option 1 TWO times until the kindle booted the second time over and seemed to be have reaction speed back to normal. The first time booting up seemed to be a bit slow and groggy. Also, I made sure to leave the encryption password blank. The other password is just your Amazon account password.

2. I used KFFirstAide found on this page http://xdaforums.com/showthread.php?p=38231371&highlight=kindle+fire+first+aide#post38231371

3. Installed the KFFirstAide in my main directory (C: in windows xp). Make sure to follow the instructions included in the post.

4. Deleted any other Kindle Fire / ADB drivers from previous installs of Android SDK pack via control panel and unhiding drivers in the Device Manager and deleting them. Be careful! I accidentally deleted a motherboard driver and had to reinstall from CD...

5. Use KFFirstAide....Installed ADB drivers from inside KFFirstAide. Test the ADB connection. Disable OTA updates from Amazon.

6. I found I had difficulty getting fastboot to verify, so I used the option to Boot the Kindle Fire into Fastboot and then used the other option to boot it out. After that it verified and went into fastboot very easily.

5. Make a backup! I made a basic 3 partition backup using the option listed in KFFirstAide. Definitely worth it. Verify your backup is actually in the backup folder in the KFFirstAide directory. This backup would not work, though until I deleted every other ADB interface and Amazon Kindle fire driver I had and reinstalled the ADB from the KFFirstAide.

7. Do not try to install enable second the 2nd Bootloader and TWRP through KFFirstAid. It would never work for me and I kept getting the red screen of death no matter what I did and I had to restore through the backup option in KFFirstAide. Thank goodness for that!

8. Went to Hashcodes (Thanks!) method http://xdaforums.com/showthread.php?t=2128175 and downloaded his files and placed them in the KFFirstAide directory in C:

9. After adding some code to the registry (for Win xp), I right clicked on the KFFirstAide Directory and opened up a command prompt for the directory. You will know if you have it right if in the command prompt it has the address starting from C:\KFFirstAide.

10. Started from Step 2 in his process (as I already made a working backup earlier). and downloaded and installed all of his files. I placed the Gapps and CM10 in my SDCARD on my kindle and rest moved to the directory of the ADB.exe (C:\KFFirstAide). I replaced the original stack file that came with the program with Hashcode's.

11. Followed instructions on Hashcodes page with ADB and Fastboot codes and it worked like a dream!

Overall, if things go smoothly you can probably be done in less than 10-15. Hope this helps someone!

---------- Post added at 04:47 AM ---------- Previous post was at 04:44 AM ----------

Awesome news dreamer609. It was not fun for me as well., so I know how you feel. Glad you got it working :D

Thanks! You have no idea how thrilled I was when I saw the Stack overflow code actually do something! :D haha. And then the blue and grey kindle fire logo when it is done correctly was pure elation! Thank you for you and praed0r help!
 

dreamer609

Senior Member
Sep 17, 2012
136
14
Portland, OR
Quiet Volume in CM10?

To start off with, I love the bootloader and the ROM. Very smooth and responsive. Definitely advantages to being on a tablet compared to a phone. So I have not been able to find any posts about this in this thread (hopefully this is still a valid question in this thread.. if not, my apologies), but has anyone experienced CM10 having quiet volume? I have read that it did another thread, but I was not sure. I know the original Kindle Fire HD 8.9 originally had quiet volume as well, which I used Volume + for, but I wondered if anyone had a more elegant solution. Some ROMs have volume boosts for this type of issue I hear, but I am not sure how effective that solution is as well. I also read that CM10 seems to have some compatibility issues with bass boost. Is this true as well or are there certain programs it likes and does not like? I have only tried Beats Audio so far, as included in an Acid Audio pack that supposedly was compatible with CM10. Thanks for any suggestions.
 

Slimepuppy

Senior Member
Jan 6, 2013
89
23
San Antonio
Amazon 8.3.1 Breaks Root - and TWRP

I just got to 'relearn' something best not forgotten - Amazon's over the air updates will kill TWRP and the replacement bootloader.

My 8.9 16GB device has been happily running TWRP, CM10.1, and occasionally 8.1.4. What made this all possible is that I used Prokennexusa's manual method to disable Amazon's over the air updates.

The last time I upgraded TWRP and CM10 I did a full system wipe and started from scratch. My plan was to install Hashcode's 8.3.0 image and then disable OTA updates. Unfortunately, Amazon go to the machine before I killed OTA. Now I'm back to a 'one trick pony' HD running 8.3.1 with no root, no TWRP, and no CM10.

Where's that cable? Grrrrrr...
 

apd

Senior Member
Dec 8, 2006
1,532
239
London
Xiaomi Mi 11 Ultra
I just got to 'relearn' something best not forgotten - Amazon's over the air updates will kill TWRP and the replacement bootloader.

My 8.9 16GB device has been happily running TWRP, CM10.1, and occasionally 8.1.4. What made this all possible is that I used Prokennexusa's manual method to disable Amazon's over the air updates.

The last time I upgraded TWRP and CM10 I did a full system wipe and started from scratch. My plan was to install Hashcode's 8.3.0 image and then disable OTA updates. Unfortunately, Amazon go to the machine before I killed OTA. Now I'm back to a 'one trick pony' HD running 8.3.1 with no root, no TWRP, and no CM10.

Where's that cable? Grrrrrr...

Very annoying and happened to me too (although I thought I had disabled OTA updates but had not yet gone to CM10). At least 8.3.1 can be rooted!
 

sugarsine

Senior Member
Jul 17, 2010
74
5
Do I Need Root First

quick question. does my kfhd 8.9 need to be rooted first before following this guide?
 

misagh99

Member
Oct 2, 2008
39
0
Sacramento
problem

What am I doing wrong?

I have windows 8

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.


C:\SDK\sdk>cd platform-tools

C:\SDK\sdk\platform-tools>adb shell su -c "dd if=/dev/block/platform/omap/omap_h
smmc.1/by-name/boot of=/sdcard/stock-boot.img"
/system/bin/sh: su: not found

C:\SDK\sdk\platform-tools>adb shell su -c "dd if=/dev/block/platform/omap/omap_h
smmc.1/by-name/recovery of=/sdcard/stock-recovery.img"
/system/bin/sh: su: not found

C:\SDK\sdk\platform-tools>
 

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