Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Hashcode
Old
(Last edited by Hashcode; 11th May 2013 at 07:13 PM.)
#1  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 10618
Posts: 1,837
Join Date: Sep 2011

 
DONATE TO ME
Default [BOOTLOADER] 2nd-Bootloader/Recovery unlock process for KFire 2 [04/02 TWRP update]

Introducing: Kindle Fire 2nd-bootloader + TWRP 2.4.4.0 for the Kindle Fire 2nd GEN

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

FMKILO IS NOW SUPPORTING A 1-CLICK METHOD FOR INSTALLING CUSTOM RECOVERY:
See here: http://forum.xda-developers.com/show....php?t=2106463



*** READ CAREFULLY BEFORE DOING ANYTHING ***
*** Kindle Fire 1st-gen ROMs/KERNELS are *NOT* compatible with the Kindle Fire 2. Please only flash ROMs/KERNELS that are made for the Kindle Fire 2. ***



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


** WHEN MOVING FROM AMAZON OS TO CM10.1 IN TWRP: "WIPE" -> "SYSTEM" AND "FACTORY RESET" TO CLEAR SYSTEM/DATA/CACHE. YOUR APPS FROM AMAZON ICS AREN'T COMPATIBLE. IF NOT YOU'LL LOOP ON THE CM10.1 BOOT ANIMATION **


[03/27] NEW support thread for OFFICIAL CM on the Otter2 (Kindle Fire 2):
http://forum.xda-developers.com/show....php?t=2209995


** YOU SHOULD HAVE A WORKING FASTBOOT CABLE + FASTBOOT DRIVERS/ACCESS ON YOUR PC. **

Q: How do I know if my fastboot works?
A: Plug the cable into your device and then the computer. Reboot the Kindle. It *SHOULD* show a Fastboot screen. Once at the screen use this command on your computer: fastboot devices
You should see something like this:
0123456789ABCDEF fastboot

If you do NOT see this, then make sure you have the SDK installed correctly and you have the right setup for fastboot on your PC before proceeding.


*** BE SURE YOU HAVE A GOOD CHARGE ON THE DEVICE ***


INITIAL SETUP INSTRUCTIONS (1st TIME ONLY) FOR 2ND-BOOTLOADER + TeamWinRecoveryProject INSTALL:

STEP 1. Backup your stock partitions to your own HD for later if you need disaster recovery:
Code:
adb pull /dev/block/mmcblk0boot0
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/boot
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/recovery
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/system # This will take a few minutes
Take those files and put them somewhere safe.


STEP 2: Download the files you will need to install 2nd-bootloader, TWRP and CM10.1:
  1. Stack override file: http://goo.im/devs/Hashcode/otter2/stack
  2. otter2-freedom-boot.img (USED ONLY THE FIRST TIME -- .zip files will have their own boot.img's from now on): http://goo.im/devs/Hashcode/otter2/o...eedom-boot.img
  3. [04/02] TWRP Recovery: http://goo.im/devs/Hashcode/otter2/o...0-recovery.img
  4. CM-10.1 for the Kindle Fire 2 (choose the latest version from): http://www.get.cm/?device=otter2
  5. Google Apps from: http://goo.im/gapps (choose the top rom CM10.1 version)
Place the CM-10.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:
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"
ADDED 04/02
Download the older 10.2.4 bootloader file and flash to your device via fastboot:
http://goo.im/devs/Hashcode/otter2/o...rod-10.2.4.bin
md5sum 5b03a7b428325de8d360ec201a745498
(You SHOULD check this before using fastboot -- downloads CAN be corrupted)

And this is flashed via fastboot with (from the directory where the file was saved):
[ 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 (preferably with a fastboot cord connected) ]
Code:
fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
AND NOW YOU CAN CONTINUE...

STEP 4. Connect fastboot cable, reboot and flash new otter2-freedom-boot.img and TWRP recovery.
*DONT RE-FLASH FREEDOM-BOOT.IMG LATER AFTER FLASHING CM10.1 -- IT'S FOR STOCK AMAZON OS ONLY / FIRST INSTALL ONLY*
Code:
fastboot -i 0x1949 flash boot otter2-freedom-boot.img
fastboot -i 0x1949 flash recovery otter2-twrp-2.4.4.0-recovery.img
fastboot -i 0x1949 reboot
** If everything was done correctly you will at this point see the bootmenu with a BLUE logo during the reboot. **

TO ENTER RECOVERY:
During the blue logo screen press the power button to cycle through options and select "Recovery" to enter TWRP.

Once in TWRP you can Install" the CM-10.1 by selecting "Install" and then browsing the device and selecting it, then "Add Zip" and select the Gapps .zip as well.

Use the slider to start the install.


FLASHING BACK TO STOCK:
** FIND THE FILES WE BACKED UP IN STEP #1 OR DOWNLOAD NEW ONES FROM THE RECOVERY THREAD HERE: **
http://forum.xda-developers.com/show....php?t=2035047

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

THANKS TO:
  • fattire for finding the original bootloader exploit
  • TESTERS: powerpoint45 and FMKilo
    powerpoint45 and FMKilo
The Following 46 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
Hashcode
Old
(Last edited by Hashcode; 3rd April 2013 at 08:21 AM.)
#2  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 10618
Posts: 1,837
Join Date: Sep 2011

 
DONATE TO ME
CM10.1 + 3.0.50+ KERNEL for Kindle Fire 2
CM Nightlies for Download
For Android 4.2.2/CM 10.1 use the top row gapps here:
Http://goo.im/gapps

CHANGES:
** ALL updates include lates CM10.1 updates
  • [01/29] Kernel: Fixed HD codecs binary load
  • [01/29] Kernel: Adjusted some flash memory settings for otter2
  • [01/07] Battery life / sleep improvements
  • [01/06] Update to 3.0.50 kernel
  • [01/06] Update wifi firmware to R5.SP3.06
  • [12/16] Fixed Deep Sleep
  • [12/15] Added multi-profile fix

CURRENT KNOWN ISSUES:
  • The initial portion of the bootanimation is stretched and 1/2 missing. This corrects itself fairly quickly.
  • HD codecs for the Kindle Fire 2 are *NOT* working. I need to fix the kernel.
  • Sleep battery life needs improvement. And I'll work on this more as I get time. Some Improvements 01/07
  • The headphone MIC input is not functioning correctly yet. Work in progress.
  • Virtual keyboard input on Jellybean is terrible. Needs a protocol update or something. Fixing. For now use an alternate keyboard like Swype

KERNEL FEATURES:
  • [01/06] Mainline version updates to 3.0.50 updated to current with Google's kernel/common
  • [01/06] WLAN Firmware R5.SP3.06
  • [11/07] Updated to SGX/IMG DDK 1.9@2166536 for Android (via omapzoom 18 hours ago)
  • [11/07] WLAN Firmware R5.SP3.03
  • [09/05] Updated to SGX/IMG DDK 1.9.RC2@2139099 for Android
  • Based on TI kernel 4AI.1.7 (3.0.31 mainline) which supports 512M and 1GB memory mapping needed by the Kindle Fire/Fire 2
  • Uses ducati binary from TI based on rpmsg 1.20.5.11
  • Kernel audio: Added a switch device "h2w" which allows the OS to recognize headset plug events and adjust audio capture routes accordingly. Translation: OS can recognize we have a MIC input via headset now. (NOTE: that audio recording is still not working at this time. Tho it is very close).
  • MUCH better standby / sleep function. The device will go inactive for much longer periods of time (80-100 seconds) while still waking up appropriately for wifi events, power button triggers, etc. And this is still going to get even better when I re-implement DPLL cascading and the charger fixes coming later.
  • Many bugfixes pulled down from TI's omapzoom sources.


DEVS
BUILDING THIS ROM:

First, read through Google's Android website about "how to setup a build environment":
http://source.android.com/source/initializing.html

Then you can setup the Kindle Fire 2 repo by doing the following:
Code:
mkdir android
cd android
# Use main repo for CyanogenMod 10.1..
repo init -u https://github.com/CyanogenMod/android -b cm-10.1
# Then add the local_manifest.xml for the Kindle Fire/Fire 2
curl -L -o .repo/local_manifest.xml -O -L https://raw.github.com/KFire-Android...l_manifest.xml
repo sync
vendor/cm/get-prebuilts
. build/envsetup.sh && brunch otter2

RESERVED FOR NOTES
The Following 19 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
Hashcode
Old
#3  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 10618
Posts: 1,837
Join Date: Sep 2011

 
DONATE TO ME
one more reserved space
The Following 10 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
Hondologe
Old
#4  
Member
Thanks Meter 1
Posts: 34
Join Date: Sep 2009
no chance to flash without fastboot cable? cause when i do

su
reboot bootloader

the fire boots into fastboot...does this work too?
 
Hashcode
Old
#5  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 10618
Posts: 1,837
Join Date: Sep 2011

 
DONATE TO ME
Quote:
Originally Posted by Hondologe View Post
no chance to flash without fastboot cable? cause when i do

su
reboot bootloader

the fire boots into fastboot...does this work too?
Yes, this would work, however if something goes wrong (and it frequently can during early development) you will have NO WAY of recovering the device without a fastboot cable. So I don't recommend this method currently.

Also, these instructions are BRAND NEW, and I understand if you really want to get this setup, but please let some users w/ fastboot cables run through the instructions to make sure I didn't typo something, etc.
The Following User Says Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
mindmajick
Old
#6  
mindmajick's Avatar
Senior Member
Thanks Meter 1942
Posts: 2,418
Join Date: Nov 2010
Location: Cape Coral, FL

 
DONATE TO ME
Good work man! Can't wait for my fastboot cable so I can try this out.

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
 
Hondologe
Old
#7  
Member
Thanks Meter 1
Posts: 34
Join Date: Sep 2009
Quote:
Originally Posted by mindmajick View Post
Good work man! Can't wait for my fastboot cable so I can try this out.

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
I`m gonna try it later WITHoUT FB cable . If it fails i just have to wait a couple of days, so its worth it if i get CM onto my kindle
BTW If it fails, im gonna blame it on you :P (Just kidding...)
 
powerpoint45
Old
(Last edited by powerpoint45; 15th January 2013 at 07:08 PM.)
#8  
powerpoint45's Avatar
Senior Member
Thanks Meter 1037
Posts: 1,426
Join Date: Jan 2012
Location: Dallas

 
DONATE TO ME
Thanks hash code!!! Is this ROM the updated one so Apollo won't force close?


Donate by buying my game: Ping Pong Evolved

*GLOBAL PROTEST AGAINST F*&$*#G MONSANTO MAY 25

*The cure to cancer has been known for centuries! don't trust this link, do your own research!
*The education system is a fraud
The Following User Says Thank You to powerpoint45 For This Useful Post: [ Click to Expand ]
 
Hashcode
Old
#9  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 10618
Posts: 1,837
Join Date: Sep 2011

 
DONATE TO ME
Quote:
Originally Posted by powerpoint45 View Post
Thanks hash code!!! Is this ROM the updated one so Apollo won't force close?
I did make the /storage/usb0 changes in this ROM. No telling if it'll fix the Apollo FCs till we get it tested.
 
powerpoint45
Old
(Last edited by powerpoint45; 15th January 2013 at 07:21 PM.)
#10  
powerpoint45's Avatar
Senior Member
Thanks Meter 1037
Posts: 1,426
Join Date: Jan 2012
Location: Dallas

 
DONATE TO ME
Quote:
Originally Posted by Hashcode View Post
I did make the /storage/usb0 changes in this ROM. No telling if it'll fix the Apollo FCs till we get it tested.
OK cool! Looking forward to build custom ROM. Downloading latest ROM now... I think Darwin's upload failed ): not showing up as right file size on goo.im. will check md5 at home

Edit:no FC yet


Donate by buying my game: Ping Pong Evolved

*GLOBAL PROTEST AGAINST F*&$*#G MONSANTO MAY 25

*The cure to cancer has been known for centuries! don't trust this link, do your own research!
*The education system is a fraud

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...