Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,290 Members 46,529 Now Online
XDA Developers Android and Mobile Development Forum

[BOOTLOADER] 2nd-bootloader for Custom ROMs on KFireHD 7" [05/27 CM11/TWRP 2.7.x.x]

Tip us?
 
Hashcode
Old
(Last edited by Hashcode; 28th May 2014 at 06:43 AM.)
#1  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 22,392
Posts: 3,232
Join Date: Sep 2011

 
DONATE TO ME
Default [BOOTLOADER] 2nd-bootloader for Custom ROMs on KFireHD 7" [05/27 CM11/TWRP 2.7.x.x]

Introducing: Kindle Fire 2nd-bootloader + TWRP 2.7.0.0 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/Factor...s-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 CM11.0:
  1. Stack override file:
    http://goo.im/devs/Hashcode/tate/stack
  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 (Goo.im)
    md5sum: 1628fc4750d0d49cbce41ab616a9d732
  3. [04/16] TWRP Recovery 2.7.0.0:
    Mirror 1: Download (Goo.im)
    md5sum: cfcb75e3dd4e109cd00df05be8db384a
  4. CM-11.0 for the Kindle Fire HD 7 (choose the latest version from):
    Mirror 1: Downloads CM
  5. Google Apps from:
    http://www.androidfilehost.com/?fid=23311191640114013 (This version for CM-11.0!)
  6. Download the older 7.2.3 bootloader file and flash to your device via fastboot:
    Mirror 1: Download (Goo.im)
    md5sum bb029673d8f186db4dff6d38f4aa28cf
    (You SHOULD check the md5sum before using fastboot -- downloads CAN be corrupted)
Place the CM-11.0 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.7.0.0-recovery.img
fastboot -i 0x1949 reboot
*DONT RE-FLASH FREEDOM-BOOT.IMG LATER AFTER FLASHING CM11.0 -- 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-11.0 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-11.0 / GAPPS .ZIP files
  • Select the CM11.0 .ZIP file in the list by touching it, then confirm it says the name of the CM-11.0 .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://forum.xda-developers.com/show....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 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

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)
Attached Thumbnails
Click image for larger version

Name:	kfhd7-initlogo-new.jpg
Views:	8984
Size:	6.5 KB
ID:	1695419  
The Following 109 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
Hashcode
Old
(Last edited by Hashcode; 9th July 2013 at 07:59 AM.)
#2  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 22,392
Posts: 3,232
Join Date: Sep 2011

 
DONATE TO ME
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.
The Following 11 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
Shawnsch
Old
(Last edited by Shawnsch; 1st February 2013 at 08:01 PM.)
#3  
Senior Member
Thanks Meter 31
Posts: 111
Join Date: Jul 2012
Default 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
 
Hashcode
Old
#4  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 22,392
Posts: 3,232
Join Date: Sep 2011

 
DONATE TO ME
Default Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"

Quote:
Originally Posted by Shawnsch View Post
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
The Following 4 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
0xD34D
Old
#5  
0xD34D's Avatar
Senior Member
Thanks Meter 2,044
Posts: 459
Join Date: Feb 2009
Location: San Diego

 
DONATE TO ME
For those using this, for some reason that moment waiting for the device to boot into recovery can seem like eternity. It does take a bit to finally enter recovery but it will eventually do so. You'll see the BLUE logo for a little while so just be patient.
 
persano
Old
(Last edited by persano; 1st February 2013 at 08:31 PM.)
#6  
persano's Avatar
Senior Member
Thanks Meter 256
Posts: 1,571
Join Date: Nov 2012
Quote:
Originally Posted by Hashcode View Post
Yes, that's how the initial install is setup.

Sent from my DROID RAZR HD using Tapatalk 2
hashcode, what are the methods to make a kernel ?

and the startup time increase?

your work is increadible, you dont have a 7" but you made this.
The Following User Says Thank You to persano For This Useful Post: [ Click to Expand ]
 
Hashcode
Old
#7  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 22,392
Posts: 3,232
Join Date: Sep 2011

 
DONATE TO ME
Default Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"

I am looking into a loaner device so that I can setup the kernel for the HD7. So while this new bootloader may seem useless at the moment, that may change.

I am still very busy, of course so it may take time.

Sent from my DROID RAZR HD using Tapatalk 2
The Following 2 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
persano
Old
#8  
persano's Avatar
Senior Member
Thanks Meter 256
Posts: 1,571
Join Date: Nov 2012
Quote:
Originally Posted by Hashcode View Post
I am looking into a loaner device so that I can setup the kernel for the HD7. So while this new bootloader may seem useless at the moment, that may change.

I am still very busy, of course so it may take time.

Sent from my DROID RAZR HD using Tapatalk 2
start up time of device xD. you are the best rom kernel here. thanks for your beautiful job.

if you need any help or something i can help you with all
 
Hashcode
Old
#9  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 22,392
Posts: 3,232
Join Date: Sep 2011

 
DONATE TO ME
I added a missing step where the auto recovery updater runs in the OS on stock boot:

To disable this auto recovery installer do this via adb:
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"
The Following 2 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
xiro49
Old
#10  
Member
Thanks Meter 7
Posts: 61
Join Date: Jan 2013
Safestrap will it remove it

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes