[BOOTLOADER] 2nd-bootloader for Custom ROMs on KFireHD 7" [06/24 CM12.1/TWRP 2.8.7.0]

Search This thread

dagelo

Senior Member
Dec 15, 2012
64
1
Solving fastboot problem

Dear everyone,

problem solved. So in short general: my problem was that in fastboot mode my device was not recognize and i have still waiting to device. I need fastboot because of problem with my ROM - every wake up my kindle get reboot him.

But it solved in my last attempt, i supposed, before i will buy factory cabel .) With the script application KindleFireFirstAid only choice no. 3 helped me. Dont know exactly how, because its still reboot to fastboot mode but with some magic my device in fastboot mode was recognize !! and all other commands succesfully done :)

So thankz everyone

my opinion -> Currently i am on 7.2.3 version. Maybe i will try 7.3.0. But dont want to use Kinology until batery using will be solved - 1 hour of reading and more then 10% is gone. Its not good.

And of course will wait and hope for CM 10.1

Cheers
.leg
 

dagelo

Senior Member
Dec 15, 2012
64
1
one more problem

ruqavu8y.jpg
Hello again

after i sucessfullz downgrade to 7.2.3, i have tried to instal TWRP again as i did it before. And after step 5

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

i get completly RED screen after fast blicking Kindlefire logo.

Anybody know how to solve it ?
 
Last edited:

seokhun

Senior Member
Feb 23, 2013
331
226
The 7.3.0 bootloader sticks, even if you downgrade to 7.2.3, so in short, you're screwed. The only way to avoid that was to flash the 7.2.3 u-boot file, so that you overwrite the 7.3.0 bootloader. Now you really have to get a factory cable.
 

fattire

Inactive Recognized Developer
Oct 11, 2010
2,280
6,473
www.eff.org
The 7.3.0 bootloader sticks, even if you downgrade to 7.2.3, so in short, you're screwed. The only way to avoid that was to flash the 7.2.3 u-boot file, so that you overwrite the 7.3.0 bootloader. Now you really have to get a factory cable.

Yup, the new bootloader shows a red screen when the digital signatures don't match. The older bootloader did not do that. If you get a "red screen of death" like that, it means that the new bootloader wasn't replaced with the old one, which allows the locked bootloader fix. So it looks like the new bootloader got copied but the new (signed) stock system/kernel/ramdisk did not get flashed. They all go together..

I can show you the code that turns the screen red in the new bootloader, if anyone is interested. I believe (though I don't have a Kindle HD) that you can use fastboot to replace the new (bad) bootloader with the old (good) one.
 

fattire

Inactive Recognized Developer
Oct 11, 2010
2,280
6,473
www.eff.org
It's possible, but the red screen stuff was connected to a bad verification of the certificate in the new code. If I remember correctly, the new code broke the old verification function into two new functions (one executed just after reading the certificate/header and the other after loading the boot partition), so it may have been taken from what was already there. Hashcode linked me to the new code a few days back, but I lost the link.
 

los911

Member
Dec 28, 2012
28
0
Are these commands carried out in cmd prompt? I'm really confused.

btw I'm rooted sith 7.20 version. Safe to use?
 
Last edited:

phatfish

Member
Apr 7, 2013
19
6
Hi all,

Sorry if this has come up before, i did check through this thread.

I ran though all the steps fine, all commands completed, got backups etc.

I can boot fine into Kindle OS still, and i was on 7.2.3 to start with so didn't need to downgrade the boot loader.

However... i cant get into TWRP recovery. I do volume up and Kindle logo goes blue and stays up for maybe 10 seconds, then it seems like it cant load the recovery as it just reboots back into stock OS.

Any ideas what i should try? TWRP image file MD5 checks out OK, could it be that there was a bad flash on the recovery?

Ok, seems i did it all right, i just couldn't hold down the correct button, sorry!
 
Last edited:

dagelo

Senior Member
Dec 15, 2012
64
1
RED SCREEN - continue

helllo,

i just remove previous text in this post and write this:

make own factory cabel, reboot and spent some time to solve some error - out of memory etc.
But now, i was able recovery system image and boot + recovery .. seems its booting.

now i can make more tests :) because have factory cabl D>

---------- Post added at 08:37 PM ---------- Previous post was at 07:49 PM ----------

But fact is that i canno still install TWRP 2.4.4.0 on my rootes 7.2.3 ROM version. I still get RED screen.

Therefore i woul like to ask about STEP 5:
the first fastboot command going to flash with freedom boot 7.3.0. Is it right in case i have 7.2.3 ROM?

There must be something strange,because i already install TWRP 2.3.3.0 without any problems.
 
Last edited:

seokhun

Senior Member
Feb 23, 2013
331
226
You need to flash the 7.2.3 u-boot file through fastboot, that's the one that drops your bootloader from 7.3.0 back to 7.2.3. Simply downgrading the system isn't going to cut it, the bootloader from 7.3.0 will stick, that's what gives you that red screen. You need to have BOTH the system AND the bootloader version 7.2.3 in order to get rid of the red screen.
 

dagelo

Senior Member
Dec 15, 2012
64
1
Yea.. great..i am on right way :) thank you.

will be good to leave old link in the instruction..in order to prevent RED screens, for someone who has still version 7.2.3
 
Last edited:

dagelo

Senior Member
Dec 15, 2012
64
1
Broken lockscreen with low density?

I have tried to change density from 240 to 200. Reboot and....vuala... instead of Ads lockscreen i have black lock screen. And this lockscreen with such constelation with density causing that every wake up-my kindle freeze and restart. whole other system works...just you cannot keep sleep the device.

Its only me?

Cheers
.leg
 
Last edited:

psych0phobia

Senior Member
Jul 29, 2011
408
406
Austin
I have tried to change density from 240 to 200. Reboot and....vuala... instead of Ads lockscreen i have black lock screen. And this lockscreen with such constelation with density causing that every wake up-my kindle freeze and restart. whole other system works...just you cannot keep sleep the device.

This really isn't the thread for this, but.... Changing the density does result in the lockscreen going black. This is normal. I don't know about freezing/restarting - can't say I've personally experienced that.
 

hamidwt

Senior Member
Oct 11, 2012
98
12
Finally I could install this bootloader.
Here is what my problem was , it can be helpful to other noobs like me.
the problem was with step 1 , I thought entering the code like this would do it , but nothing will happen if you just copy&paste it like this
adb shell su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/boot of=/sdcard/stock-boot.img"

you should do it like this
first copy this
adb shell
press enter
then this one.
su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/boot of=/sdcard/stock-boot.img"

Such a stupid mistake !!
now waiting for cm10 .
 
  • Like
Reactions: davelinc

Shawnsch

Senior Member
Jul 13, 2012
171
43
Hashcode:
At one point it was said that the kfhd had GPS and radio received/transmitter built onto board is this something that can be enabled?
I beleve I read it in the specs of the board
Sent from my KFTT using XDA Premium HD app
 

kgyuszko

Member
Jan 2, 2013
47
4
Noob question: i need a fastboot cable to install 2-nd bootloader or i can use a standard usb cable in this way http://xdaforums.com/showthread.php?t=2096888?

You can enter into fastboot without the factory cable yes, but most people on here will tell you, its a brave person to try it!
If you make even the smallest mistake then you have to get a factory cable to sort out the mess (first aide etc). If you are planning any development or modifications on your kfhd it is seriously recommended that you get the factory cable, (of course if your handy with the soldering iron then you can make one- youtube it!)

The long shot of this ramble is- Yes you can do it without the cable, but if you are in the position to get the factory cable then I seriously reccomend it!

kgyuszko
 

Top Liked Posts

  • There are no posts matching your filters.
  • 122
    [BOOTLOADER] 2nd-bootloader for Custom ROMs on KFireHD 7" [06/24 CM12.1/TWRP 2.8.7.0]

    Introducing: Kindle Fire 2nd-bootloader + TWRP 2.8.x.x for the Kindle Fire HD 7

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

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


    LOOKS LIKE NOT ALL FASTBOOT CABLES WILL AUTOMATICALLY PLACE YOU IN FASTBOOT MODE ON THE KINDLE FIRE HD 7. DOWNLOAD THE ANDROID SDK AND GO FROM THERE.
    http://developer.android.com/sdk/index.html

    Here's 1 website you can purchase a FASTBOOT adapter from (works with your normal USB cable)
    http://shop.teamblackhat.info/Factory-Adapters-motadapt.htm
    ** I don't make any commission or fee from the sales of these devices, I just know they have them on stock most of the time and ship in a reasonable time frame unlike the Chinese variants found on ebay.

    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 your fastboot cable to the Kindle and reboot. It *SHOULD* show a Fastboot screen and your terminal window should show something like:
    product: Tate-XXX-XX (something here)

    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 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] kfhd7-freedom-boot-7.4.6.img (USED ONLY THE FIRST TIME -- .zip files will have their own boot.img's from now on):
      Mirror 1: Download "kfhd7-freedom-boot-7.4.6.img" from Dev-Host
      md5sum: 1628fc4750d0d49cbce41ab616a9d732
    3. [06/24] TWRP 2.8.7.0 recovery flash Image:
      Mirror 1: Download TWRP from Dev-Host
    4. CM-12.1 for the Kindle Fire HD 7 (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 7.2.3 bootloader file and flash to your device via fastboot:
      Mirror 1: Download bootloader from Dev-Host
      md5sum bb029673d8f186db4dff6d38f4aa28cf
      (You SHOULD check the md5sum 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: connect your FASTBOOT USB cable to the Kindle which should cause it to power on and enter "FASTBOOT" mode. Issue the following commands into your command/terminal window on your PC 1 at a time. ]

    Code:
    fastboot -i 0x1949 flash bootloader kfhd7-u-boot-prod-7.2.3.bin
    fastboot -i 0x1949 flash boot kfhd7-freedom-boot-7.4.6.img
    fastboot -i 0x1949 flash recovery kfhd7-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 lower left corner of the screen
    • 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-12.1 / 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=1951254

    **** 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 POST BACKUP COPIES OF THE STOCK PARTITIONS FOR DISASTER RECOVERY ****

    Plug in your fastboot cable and reboot so that you see the fastboot screen. On your computer go into a prompt and change to the directory where your stock backups are and enter the following commands:
    Code:
    fastboot -i 0x1949 flash boot [B]stock-boot.img[/B]
    fastboot -i 0x1949 flash recovery [B]stock-recovery.img[/B]
    fastboot -i 0x1949 flash system [B]stock-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)
    13
    Changelog: updated 2013-07-08

    freedom boot.img (for use w/ stock Amazon OS + 2nd-bootloader):
    • [07/08] Updated w/ kernel from 7.4.3 release

    Amazon OS .zip:
    • [07/08] Rebuilt on version 7.4.3 from Amazon

    TeamWin Recovery (TWRP) 2.6.0.0

    • [*][07/08] USB Vendor ID / Product ID in recovery now matches stock Amazon OS
    • [07/08] Fixed long pause before recovery entry
    • [07/08] Based on 7.4.3 stock kernel
    • [07/08] Fixed recovery bootloop issue
    • [07/08] Screen timeout feature currently disabled due to screen blanking bug
    • [07/08] TWRP 2.6.0.0 update
    • [07/08] Added "EFS" partition backup option. Normally, don't need to make too many backups of this, but having a backup will enable you to recover HDMI keys, and some other data.
    6
    I added a STEP 6 which is optional but recommended:

    Because we had to drop a 4K file right in the middle of the operating system, there is a chance that we've killed a binary that is used by the OS. As a final "cleanup" step to installing the bootloader, I recommend everyone re-flash the OS to /system. The stack space is pre-allocated during this process so that the files going back onto the /system partition will NOT land on it anymore.

    Download a flashable Amazon OS ROM (7.2.3): Amazon OS 7.2.3: http://goo.im/devs/Hashcode/tate/kfhd7-amazon-os-7.2.3.zip Place this in the /sdcard

    This is the stock Amazon OS which is rooted, has Superuser.apk and busybox. (Users can use this as an easy means of going back to stock the easy way via recovery. It also includes the modified boot.img including the 2nd-bootloader).

    INSTALL THE .ZIP IN TWRP:
    • Select "Install"
    • Use the file manager to browse and click on the "kfhd7-amazon-os-7.2.3.zip" file.
    • Swipe to start.
    • Once that's done, reboot.

    NOTE: Once we start using Jellybean ROMS, the location of "sdcard" can move and to find this file you may need to go "Up a level" to find "data" and then "media" and look for it in there.
    4
    Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"

    Can I use install this and still use stock os?

    Sent from my KFTT using XDA Premium HD app

    Yes, that's how the initial install is setup.

    Sent from my DROID RAZR HD using Tapatalk 2
    4
    Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"

    Whenever I get around to installing ubuntu or linux on my 2nd hard drive I plan on downloading the sdk, gonna start to try and learn a thing or 2 in the world of android development :D

    Edit: hey hashcode, i just noticed twrp recovery was updated to 2.4, can i just flash it thru fastboot? Or does it need to be modified for the HD7?

    Sent from my KFTT using Tapatalk HD

    The custom recovery and kernels we use on the new Kindle Fires require special modifications or they will break on Amazons signature check.

    I can build a new recovery with the 2.4 update over the next few days. It will probably come in 2 forms:
    - an updated image file for use during the 2nd bootloader installation
    - a flash .zip update for those who are already running custom recovery.

    Sent from my DROID RAZR HD using Tapatalk 2