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

Search This thread

aaron.a

Senior Member
Dec 24, 2010
646
98
Honest answer.

Idk..

lol... I'm a noob at this and am lucky I haven't bricked any of my devices yet. I have successfully rooted and flashed ROMs on a Nexus 7, HTC amaze 4g, t989 s2, and t999 s3.... But this kindle is giving me a hard time.

For today I will quit while I'm ahead, with it rooted and running GO launcher.

Any suggestions on how to edit the paths? Yes, I realize that's a dumb question but I have never played around in command prompts until now.

Thanks

SGH T989 Cyanogen Mod 10.1

you need to be in the directory that the recovery img is in..
use CD to change directory, for example CD C:\Users\Aaron\Downloads

=)
 
  • Like
Reactions: t3dpott3r

t3dpott3r

Senior Member
Dec 9, 2012
369
144
Los Angeles
Ok... So with your guys help i was able to find the correct directory. All seemed like it was going good until the reboot.... which never got passed the orange "kindle fire" screen? I am able to get it back into fastboot mode, but im unsure what to do after that? I have repeated the steps and re-flashed the recovery img. but still nothing? Any ideas?

Thanks in advance!

CMDpromt_zpsba4b6930.png
 

soupmagnet

Retired Forum Moderator
Jan 7, 2012
3,990
2,587
Austin, TX
Google Pixel 6
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 8.9

Ok... So with your guys help i was able to find the correct directory. All seemed like it was going good until the reboot.... which never got passed the orange "kindle fire" screen? I am able to get it back into fastboot mode, but im unsure what to do after that? I have repeated the steps and re-flashed the recovery img. but still nothing? Any ideas?

Thanks in advance!

CMDpromt_zpsba4b6930.png
Have you checked your MD5s?
 

arda99

Senior Member
Jan 4, 2011
340
214
Ok... So with your guys help i was able to find the correct directory. All seemed like it was going good until the reboot.... which never got passed the orange "kindle fire" screen? I am able to get it back into fastboot mode, but im unsure what to do after that? I have repeated the steps and re-flashed the recovery img. but still nothing? Any ideas?

did you install the stack file?


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"
 

t3dpott3r

Senior Member
Dec 9, 2012
369
144
Los Angeles
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 8.9

did you install the stack file?


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"

I thought I did.... I went through the whole thing step by step. Let's say for a second i didn't though? What can I do to fix this if anything :confused:

SGH T989 Cyanogen Mod 10.1

---------- Post added at 10:45 PM ---------- Previous post was at 10:43 PM ----------

Have you checked your MD5s?

What's that? And how can I check it.... Sorry I'm really learning as I go here :D

SGH T989 Cyanogen Mod 10.1
 

arda99

Senior Member
Jan 4, 2011
340
214
I thought I did.... I went through the whole thing step by step. Let's say for a second i didn't though? What can I do to fix this if anything :confused:

for this

adb push stack /data/local/tmp/

command to work you need to run it within the same directory as the "stack" file. per your previous posts I highly doubt you missed it and failed to put it on the phone.
 
  • Like
Reactions: t3dpott3r

t3dpott3r

Senior Member
Dec 9, 2012
369
144
Los Angeles
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 8.9

for this

adb push stack /data/local/tmp/

command to work you need to run it within the same directory as the "stack" file. per your previous posts I highly doubt you missed it and failed to put it on the phone.







Code:
md5sum /path/to/file
Compare it to what is listed by goo.im when you download that file
I will be trying both of these tomorrow and let you know how it goes :thumbup:

Thanks guys!



SGH T989 Cyanogen Mod 10.1
 

chenzhengbin

New member
Dec 27, 2009
3
0
When I run "adb shell su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/boot of=/sdcard/stock-boot.img" It appears /system/bin/sh: su: not found . How could I solve this problem? Thankyou !
 

Born2BeMild

Senior Member
Mar 5, 2011
89
8
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 8.9

Looks like you're lacking root access.

Sent from my Amazon Kindle Fire HD
 

ddem1

Senior Member
Dec 25, 2010
69
31
tapebrain.com
Thanks for this! After hours of fiddling around I managed to get it done, was first time playing with adb manually.

Make sure to use

Code:
adb devices

to check if your device is recognized by the computer. In case you get it recognized once but not the second time, try re-enabling ADB option in Kindle settings and then

Code:
adb kill-server
adb devices

The official Amazon pages helped me, follow the instructions for installing the SDK
https://developer.amazon.com/sdk/fire/setup.html#step4

and also
https://developer.amazon.com/sdk/fire/connect-adb.html#ConnectYourFire

Another problem was that I didn't figure out I needed root. Anyway i got that done following this thread
http://xdaforums.com/showthread.php?t=1996873

Using that program with option 1 and ignoring the password when asked for it on the Kindle worked like a charm.
 

Technogen

Senior Member
Jul 15, 2008
193
55
After installing CM10.1+ Gapps, it booted to a black screen, so I did a hard reset. Went back into TWRP, wiped system, and flashed just CM10.1. After that, it got stuck on the orange Kindle Fire logo (doesn't get to the blue one) and even reflashing the bootloader/recovery doesn't fix it.
EDIT: Tried restoring my system backup from the stock ROM, that didn't work either. Restoring the stock boot image makes it so I can boot into the stock ROM though.


EDIT 2: Must have done something wrong. It's working fine again, but CM10.1 still doesn't work.

KFHD8.9 16gb

Where you able to get around the stuck on "kindle fire logo" issue and install CM10.1? I ran CM10.1 but the build.prop was messed up and none(0) of the apps in the market would work. So I did a full wipe rebooted and reinstalled 10.1 and Gapps, now I am getting stuck at the orange KF logo. I'm going to try pushing the old bootloader and Amazon OS back and then doing twrp and CM10.1 and see if that fixes it (yes I know don't do freedom again). (note I copied line for line, step for step from OP)

Got this when attempting to go back to stock.

C:\android-sdk\platform-tools>fastboot -i 0x1949 flash boot boot.img
target reported max download size of 1006632960 bytes
error: cannot load 'boot.img': No error

Doing twrp setup gets me stuck back ad the kindle fire logo again.

C:\android-sdk\platform-tools>fastboot -i 0x1949 flash recovery kfhd8-twrp-2.3.3.0-recovery.img
target reported max download size of 1006632960 bytes
sending 'recovery' (8192 KB)...
OKAY [ 0.447s]
writing 'recovery'...
OKAY [ 0.866s]
finished. total time: 1.315s

C:\android-sdk\platform-tools>fastboot -i 0x1949 reboot
rebooting...

finished. total time: 0.001s

C:\android-sdk\platform-tools>
 
Last edited:

Dirty Pete

Member
Feb 8, 2012
19
1
Enter fastboot by running:
"
adb shell
su
reboot bootloader
"

KF will reboot into fastboot and the device name in device manager is "Jem-PVT-Prod-04" without any driver.
At this point, device is in fastboot mode but normal fastboot commands will NOT work.

Manually install the amazon adb driver(should be somewhere like c:\programs files\amazon\drivers) name is "Android Composite ADB Interface", ignore the Windows warning and contiune. Fastboot commands start working after that.

This was critical for me in getting fastboot to work. Thank you sincerely for this post, I've been scouring xda-forums looking for exactly these instructions.

Pete
 

Slimepuppy

Senior Member
Jan 6, 2013
89
23
San Antonio
Just a couple of assorted comments from a relative newb that's exercised and broken this boot loader. ;)

KFHD 8.9 16GB

The end first:

- Backup your stock system files and move the files off the Kindle before installing TWRP
- Backup your configured system and move the files off the Kindle after installing TWRP
- Flashing boot.img, recovery.img, and system.img in fastboot will remove the TWRP bootloader and return the Kindle to stock
- It's just as quick and easy to install TWRP the second time around - yes, use the Freedom image 'again' if the device has been flashed back to stock (TWRP not present).
- Hashcode tells us to backup our systems and save the files. If we don't do that, rooted stock images are available from a number of developers, including Onemeila and Prokennexusa.
- The Onemeila and Prokennexusa tools include fastboot/ADB drivers, so there no need to install any SDKs if you don't already have and/or need them.


The story...

Hashcode's install process worked perfectly and I've enjoyed the freedom of moving back and forth between different versions of the Amazon software and his CM10 Alpha within minutes. The utility and the backup.restore process is a toaster - it just works!

During the process of learning, installing and deleting a bunch of software, and testing a couple of toolkit apps, I had remnant files, directories, and other strangeness that I wanted to completely purge and reset to 'stock.' Yes, that's the set-up. ;)

TWRP made it very easy to backup and restore, and it also makes it easy to do a complete wipe of the system, caches, user files, etc. etc. which I did. Unfortunately, what I "didn't did" is copy the backup files off the Kindle. And that created an interesting challenge, as I found myself with TWRP but an otherwise blank device. I wonder how I'll move system files onto the Kindle now?

I tried the TWRP sideload function, but couldn't get the Windows PC to recognize the Kindle while in TWRP - attempts to sideload failed. If anyone has a fix for this, I'm interested in learning it! Is this where one might use an OMAP driver?

I've successfully used Onemeila's restore images in the past, so brought those to bear to reflash the stock files in Fastboot. But the images for the 8.9 include only the system, not the boot or recovery images. Once that sunk into my newb brain (after staring at the orange kindlefire logo), I dug around until I remembered that Proconnexusa's tool included a three-image download in their restore process. If you use the Proconnexusa tool, let it run through downloading the image files (or pull the files manually) as the default process assumes the Kindle starts the restore process in ADB mode...

Pushing only the system.img leaves the Kindle in the orange kindlefire portion of the boot process - it sticks there and doesn't progress. I needed to also flash boot.img and recovery.img for the Kindle to move from the static to the 'animated' orange kindlefire portion of the boot process and ultimately into a functioning system.

Even after overwriting the TWRP boot process, the Kindle was never bricked - I always had access to the device via Fastboot.

Too many words, but I hope it's useful to others that install this excellent tool! Thanks Hashcode!
 
Last edited:

Slimepuppy

Senior Member
Jan 6, 2013
89
23
San Antonio
Never tried that on KF, but adb push/pull should work under TWRP for file transfer.
Thanks - good to hear it works on other devices!

Part of last night/early this morning's Google'n around brought this from Team Win:
http://teamw.in/ADBSideload

My PC's drivers are solid for Fastboot, ADB, and 'file manager' access in the Amazon builds and in CM10.1, but when I put TWRP into ADB Sideload mode and connect the USB, the PC shows the Kindle in the device manager with no driver. I went through the delete driver, reinstall process but couldn't come up with a driver that worked. That's ultimately why I broke down and decided to try to restore the old boot images.
 

field3d

Senior Member
Oct 10, 2009
67
1
I tried to install but...

I tried to install all the process but when reboot never advance from Kindle logo. I gave all the commands and entered fastboot perfect I made the backup of course of a KFHD rom I had with the commands of backup you are posting. I want to revert to stock factory because I have GPS troubles is not detected and I have the kindle fire with 4G 64 GB is for that I want to install 2nd boot loader but like I said no luck is stuck on the logo of kindle. I tried to install KFHD like before and crash at same in the logo stuck the only way I can enter was with the backups I made according your post I used the commands to restore the backup and with that worked again but my problem is I don´t have GPS and with restore to default from kindle settings doesn´t do nothing just delete my settings but still no GPS then how can I install 2nd loader to boot install the factory stock rom? Why after make the process stuck in Amazon logo?
Thank you
 

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