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

Search This thread

Thepooch

Senior Member
Mar 31, 2012
2,490
1,051
Your post is very confusing. So you 're saying you have second bootloader installed and twrp, you wiped system, flashed the zip that hashcode has provided, selected wipe factory reset while in twrp, then reboot system sticks you at the logo?
 

For1n

Senior Member
Sep 28, 2012
247
35
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 8.9

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 cellular supported in the alpha build?

Send from my One XL CM10.1
 

field3d

Senior Member
Oct 10, 2009
67
1
I mean this.

I mean with the commands I gave this commands:
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"

Code:
fastboot -i 0x1949 flash boot kfhd8-freedom-boot.img
fastboot -i 0x1949 flash recovery kfhd8-twrp-2.3.3.0-recovery.img
fastboot -i 0x1949 reboot
In other words just flash the images on the device after make this last command:

Code:
fastboot -i 0x1949 reboot

Never booted again the kindle stuck in logo I can´t wipe nothing is totally dead the only way I can revive is restoring with the previous backup I made like you say in your posts:

Code:
fastboot -i 0x1949 flash boot boot.img
fastboot -i 0x1949 flash recovery recovery.img
fastboot -i 0x1949 flash system system.img # This one will take a few minutes
fastboot -i 0x1949 reboot

With that lives the kindle but I can´t install the 2nd boot loader is what I said :(
I have 8.1.4.
Thank you
 

twa_priv

Senior Member
Feb 10, 2011
1,701
4,472
I mean with the commands I gave this commands:
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"

Code:
fastboot -i 0x1949 flash boot kfhd8-freedom-boot.img
fastboot -i 0x1949 flash recovery kfhd8-twrp-2.3.3.0-recovery.img
fastboot -i 0x1949 reboot
In other words just flash the images on the device after make this last command:

Code:
fastboot -i 0x1949 reboot

Never booted again the kindle stuck in logo I can´t wipe nothing is totally dead the only way I can revive is restoring with the previous backup I made like you say in your posts:

Code:
fastboot -i 0x1949 flash boot boot.img
fastboot -i 0x1949 flash recovery recovery.img
fastboot -i 0x1949 flash system system.img # This one will take a few minutes
fastboot -i 0x1949 reboot

With that lives the kindle but I can´t install the 2nd boot loader is what I said :(
I have 8.1.4.
Thank you
After you restore your backup you might need to flash the stack override again.

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"

Then proceed with renaming install-recovery.sh and flashing freedom boot and twrp as you did before.

That's what I needed to do after losing the ability to boot into recovery.
 
  • Like
Reactions: Thepooch

Thepooch

Senior Member
Mar 31, 2012
2,490
1,051
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"
Also if you fail to do this correctly you will get stuck at the logo or when you try to access recovery it will claim bad boot image and either send you to stock recovery or straight into fastboot. Truthfully I think your missing a step or your not installing the stack file correctly or your not wiping correctly prior to flashing the zip. Backing up the stock images is not nearly as intergral as the rest of the process for bootloader install a single typo makes the difference between good and bad on this deal. Hashcode has laid each step out well enough that you can literally copy and paste each command and it will work. If you need help getting through it we should hook up again and I will walk you through each step so that next time you have a better idea of what needs to be done.
 

field3d

Senior Member
Oct 10, 2009
67
1
Need to override

I think I need to override like you say but gives me exactly that 2 commands permission denied or not permissions something like that how can I enable permissions to override the stack?
Now the question if I override once I have permissions can I lost all the applications and data inside? If yes how can I make a backup of apps and their data? After override I´ll restore the backup of that apps to avoid install one by one and the contents too.

Yes the Thepooch I see that 2 commands gave that error in case I can´t would be nice like the other day.

Thank you
 

Thepooch

Senior Member
Mar 31, 2012
2,490
1,051
Any errors during the process is a very good indication of why things are running amuck and not completing the task largely it could boil down to getting your drivers working properly. When executing any of the shell commands you may get a prompt to grant shell permission you must grant in order for it to work or you will get permission denied. A linux setup would make this much easier for you.
 

Thepooch

Senior Member
Mar 31, 2012
2,490
1,051
http://db.tt/ZNYlKiYp install this if it can't find busybox on your system make sure it gets installed to xbin then run the smart install that will help you with your recovery.sh problem.
 

field3d

Senior Member
Oct 10, 2009
67
1
ok

http://db.tt/ZNYlKiYp install this if it can't find busybox on your system make sure it gets installed to xbin then run the smart install that will help you with your recovery.sh problem.
Ok I'll try to install but just a question what is for busybox? I heard in many places about that and the script where I installed the google apps said couldn't install busybox app I ignored that until now you are talking about it.
And the other question "smart install" is an option of busybox or where can I find?
Thank you
 

Thepooch

Senior Member
Mar 31, 2012
2,490
1,051
Ok I'll try to install but just a question what is for busybox? I heard in many places about that and the script where I installed the google apps said couldn't install busybox app I ignored that until now you are talking about it.
And the other question "smart install" is an option of busybox or where can I find?
Thank you
Just open the app it will run a check, select install location xbin it might try to default to bin don't let it do that choose xbin then click install and select smart install. Make sure you grant permission upon launch of the app for superuser. All the time, energy, questions and problems could have been solved in about 20 mins by running a couple of scripts on a live usb and being done with it. Stop fiddle farting around with windows seems to have only caused you trouble just sayin Good luck.
 
Last edited:

LivingChampion

Senior Member
Jul 1, 2011
166
24
My Kindle is stuck on the Kindle Fire orange logo after following all the steps. Luckily I the backup recovery and boot helped me get it running again. Having a bit of trouble getting it done, will try again tomorrow. If anyone has any pointers other than trying again, please reply back to me.
 
Last edited:

Thepooch

Senior Member
Mar 31, 2012
2,490
1,051
My Kindle is stuck on the Kindle Fire orange logo after following all the steps. Luckily I the backup recovery and boot helped me get it running again. Having a bit of trouble getting it done, will try again tomorrow. If anyone has any pointers other than trying again, please reply back to me.
Any errors during the setup?
 

field3d

Senior Member
Oct 10, 2009
67
1
FInally I could

Finally I could instal TWRP is ok the problem was busybox. Now the question How can I remove totally TWRP in case not needed anymore?
Thank you
 

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

How can I remove totally TWRP in case not needed anymore?
Instructions from the OP...in case you missed them.

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
 

field3d

Senior Member
Oct 10, 2009
67
1
I mean.

I just mean a future inncase of sell the kindle or return to Amazon in a far future not now. Just wanted to know.
This weekend I'll play with the linux finally just to learn the device is working 100% now except the Time Warner cable. But to play I'll play with backtrack and ubuntu to see wha happen with the soup.
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