[Thor][Apollo] Unlocking bootloader with any firmware

Search This thread

DB126

Senior Member
Oct 15, 2013
15,362
10,174
Well... I'm not a mind reader... (-;
The person said they didn't know how to use TWRP flash a ROM,
and wanted to do more 'research'; so, it sounded counter-productive
to tell them to do just that. BUT: apparently, they were happy to do
that in any case... ODD... how people say one thing and mean another. :^)
Chalk it up to a bit of experience navigating choppy waters :)

Based on what was reported, the bootloader unlock worked.
The more likely scenario is that the aboot and TWRP images
got swapped on the first flashing attempt (hence the failed
boot attempt, with the device still in bulk mode), and only
aboot got reflashed to the correct partition, meaning that
the recovery partition of that device likely holds aboot and
NOT TWRP. Depeding on how much gets screwed up and
where later on, this _can_ prove to be a fatal mistake. I'd say
it would be wise to make sure the recovery partition has TWRP
on it; especially, since this is trivially achieved from fastboot on
unlocked HW...

Code:
fastboot flash recovery twrp_cubed.img

@webby2018 - heed @draxie's guidance on this item which clearly trumps my casual speculations. Trivial to implement (especially given your growing familiarity working with fastboot) and a wise precaution to avoid a potential unpleasant visit to the poop-pit.
 

webby2018

Member
Jan 2, 2018
9
1
Chalk it up to a bit of experience navigating choppy waters :)


@webby2018 - heed @draxie's guidance on this item which clearly trumps my casual speculations. Trivial to implement (especially given your growing familiarity working with fastboot) and a wise precaution to avoid a potential unpleasant visit to the poop-pit.

OK. I've done this and now can power+volup into TWRP (thanks @draxie).

I'm downloading the Nexus rom now but I would like to restore the original FireOS, I like to always have a rollback point when doing kind of things, and I'm still unclear how to do this.

I haven't touched the boot partition so I now assume that if I flash the original aboot (emmc_aboot.mbn) then this will boot into FireOS but @draxie said there may be issues if recovery contains TWRP so where do I get the original recovery partition to flash (restore)?
 

DB126

Senior Member
Oct 15, 2013
15,362
10,174
OK. I've done this and now can power+volup into TWRP (thanks @draxie).

I'm downloading the Nexus rom now but I would like to restore the original FireOS, I like to always have a rollback point when doing kind of things, and I'm still unclear how to do this.

I haven't touched the boot partition so I now assume that if I flash the original aboot (emmc_aboot.mbn) then this will boot into FireOS but @draxie said there may be issues if recovery contains TWRP so where do I get the original recovery partition to flash (restore)?
You can preserve your current FireOS config via the backup function in TWRP. Tap Backup then select System, Data and Boot partitions. On HDX devices the output file must be written on device so you must have sufficient free space. If not you'll need to backup one partition at a time. Data will likely be the largest. When complete tether your device and copy the dated folder under TWRP->{serial} to the host. Copy the folder, not the individual files contained in the folder. Then delete the dated folder. Do not delete the parent {serial} folder.

Note you will not be able to restore and execute the FireOS backup(s) without making the accommodations outlined by @draxie. I am not a fan of replacing the original aboot at this stage of the game. A borked aboot flash will ruin your day and possibly yield an unrecoverable device. Recommend installing Nexus and moving forward. The fewer brain surgeries the better.
 

webby2018

Member
Jan 2, 2018
9
1
You can preserve your current FireOS config via the backup function in TWRP. Tap Backup then select System, Data and Boot partitions. On HDX devices the output file must be written on device so you must have sufficient free space. If not you'll need to backup one partition at a time. Data will likely be the largest. When complete tether your device and copy the dated folder under TWRP->{serial} to the host. Copy the folder, not the individual files contained in the folder. Then delete the dated folder. Do not delete the parent {serial} folder.

Note you will not be able to restore and execute the FireOS backup(s) without making the accommodations outlined by @draxie. I am not a fan of replacing the original aboot at this stage of the game. A borked aboot flash will ruin your day and possibly yield an unrecoverable device. Recommend installing Nexus and moving forward. The fewer brain surgeries the better.

---------- Post added at 02:32 AM ---------- Previous post was at 02:30 AM ----------


You can preserve your current FireOS config via the backup function in TWRP. Tap Backup then select System, Data and Boot partitions. On HDX devices the output file must be written on device so you must have sufficient free space. If not you'll need to backup one partition at a time. Data will likely be the largest. When complete tether your device and copy the dated folder under TWRP->{serial} to the host. Copy the folder, not the individual files contained in the folder. Then delete the dated folder. Do not delete the parent {serial} folder.

Note you will not be able to restore and execute the FireOS backup(s) without making the accommodations outlined by @draxie. I am not a fan of replacing the original aboot at this stage of the game. A borked aboot flash will ruin your day and possibly yield an unrecoverable device. Recommend installing Nexus and moving forward. The fewer brain surgeries the better.

Yep. Have since gone onto Nexus as you suggested earlier. Had a problem with TWRP 3.1.1-0 where I kept getting a error 7: "Can't install this package . . . over newer build" even after a full wipe. Found a reference to reverting back to version 3.0.0-1 which worked for me so Nexus will be my rollback point until I eventually go to a 7.x OS which is my current goal.

Thanks for your help and @draxie
 

DB126

Senior Member
Oct 15, 2013
15,362
10,174
Yep. Have since gone onto Nexus as you suggested earlier. Had a problem with TWRP 3.1.1-0 where I kept getting a error 7: "Can't install this package . . . over newer build" even after a full wipe. Found a reference to reverting back to version 3.0.0-1 which worked for me so Nexus will be my rollback point until I eventually go to a 7.x OS which is my current goal.

Thanks for your help and @draxie
Great! All of the custom Android 7 builds for this device are stable and feature complete with a couple caveats. My current preference is AospExtended as it closely mirrors AOSP/Nexus which is effectively 'pure Android'. The previously mentioned caveats involve display, audio, WiFi and Bluetooth support. All work but are not always seamless due to a wonky Amazon kernel dating to Android 4.x that does not always play nicely with modern roms. There are workarounds for most issues and not everyone runs into problems. Just a heads-up.
 

ReichMann

Senior Member
Mar 15, 2012
206
78
Berlin
Steps unlock bootloader and needed files

this is the details step for unlocking bootloader for the 2013 Kindle HDX 7 (Thor) and HDX 8.9 (Apollo). Becarefull the 2014 HDX 8.9 (Saturn) doesn't work! These steps are done in Windows 10, successfully checked by myselft!
i don't take any credits, just collect all the steps in one post of the whole process.

Download the needed files are in the attachment, just download them all + the TWRP for your device from this thread: TWRP 3.1.1-1
You do NOT need root for these steps!

1. Install the adb-setup-1.4.3 into a folder (for example: C:/adb), extract dd-0.5.zip + unlock.zip + aboot-xxx.zip, put dd.exe + get_code.bat + unlock.bat + twrp image (for your device) + aboot_vuln.mbn (for your device) into that folder. After that install the kindle_fire_usb_driver.
2. Turn on ADB-Debuging Mode in Developer Mod by tapping 7 times the build numbers in settings and connect to your computer + trust your device.
3. Excecute "get_code.bat" in the folder above, you will get a new file: unlock.code in the folder.
4. Open CMD in the folder and run "adb reboot bootloader", the Kindle will reboot to bootloader with "[ fastboot ]" on the display
5. On the Computer go to Device-Manager and change driver in "Other Android" to "Fire Devices - Android Adb Composite Driver" . It should say "Ready" on the Kindle.
6. Now we need to enter Bulk-Mode like the instruction in this thread: Bulk Mode
Type:
Code:
fastboot -i 0x1949 erase aboot
fastboot -i 0x1949 reboot

NB: this will be scary as you'll lose 'fastboot' and only see a black screen.
Your device should reboot into "bulk mode" resulting in a number of pop-up
windows asking to format all the partitions that get exposed (at least, on Windows 10).
DO NOT format anything! Follow the above instructions instead.

Open a command window (cmd) and run the following commands:

Code:
wmic partition where index=22 get diskindex
wmic partition where (index=17 and numberofblocks=20480) get diskindex
wmic partition where (index=5 and numberofblocks=4096) get diskindex

All three of the above commands should return the same DiskIndex. Let's call that index X.

In the command window, run the following two commands with the right aboot&twrp files for your device
(you will need to substitute the DiskIndex X from above in place of the X):


Code:
dd of=\\?\Device\HarddiskX\Partition6 if=aboot_vuln.mbn
dd of=\\?\Device\HarddiskX\Partition18 if=twrp_cubed.img

This error message on the first command seems normal: "Error reading file: 87 The parameter is incorrect"
NB: make sure you run both commands! Without TWRP, you'll get a brick.

Wait a few minutes for good measure; then, keep holding Power + VolUp until your device enters TWRP.

7. When done, hold down the power button until it reboots. Now you will be at Bootloader with [Fastboot] sign on the screen. Change the drive in Device-Manager again if needed.
8. Run the "unlock.bat" in the folder and you should get a green line: "unlock code is correct". Congrats your Kindle now has an unlocked bootloader.
9. Now hold power button again to shut down the device, then hold both "power button + Volume UP" and keep them for 3-5 seconds after you see the "kindle fire" logo. Then you will get into the TWRP and flash your desire things.

i hope this post will help others new member to free our beautifull devices!

Cheers and happy flashing :D
 

Attachments

  • kindle_fire_usb_driver.zip
    9 MB · Views: 7,240
  • aboot-13-thor.zip
    173.4 KB · Views: 6,577
  • aboot-14-apollo.zip
    172.9 KB · Views: 4,067
  • adb-setup-1.4.3.zip
    8.9 MB · Views: 5,429
  • dd-0.5.zip
    186.5 KB · Views: 5,996
  • unlock.zip
    282.3 KB · Views: 5,970
Last edited:

mrw187

Senior Member
Jun 5, 2012
246
31
this is the details step for unlocking bootloader for the 2013 Kindle HDX 7 (Thor) and HDX 8.9 (Apollo). Becarefull the 2014 HDX 8.9 (Saturn) doesn't work! These steps are done in Windows 10, successfully checked by myselft!
i don't take any credits, just collect all the steps in one post of the whole process.

Download the needed files are in the attachment, just download them all + the TWRP for your device from this thread: TWRP 3.1.1-1
You do NOT need root for these steps!

1. Install the adb-setup-1.4.3 into a folder (for example: C:/adb), extract dd-0.5.zip + unlock.zip + aboot-xxx.zip, put dd.exe + get_code.bat + unlock.bat + twrp image (for your device) + aboot_vuln.mbn (for your device) into that folder. After that install the kindle_fire_usb_driver.
2. Turn on ADB-Debuging Mode in Developer Mod by tapping 7 times the build numbers in settings and connect to your computer + trust your device.
3. Excecute "get_code.bat" in the folder above, you will get a new file: unlock.code in the folder.
4. Open CMD in the folder and run "adb reboot bootloader", the Kindle will reboot to bootloader with "[ fastboot ]" on the display
5. On the Computer go to Device-Manager and change driver in "Other Android" to "Fire Devices - Android Adb Composite Driver" . It should say "Ready" on the Kindle.
6. Now we need to enter Bulk-Mode like the instruction in this thread: Bulk Mode
Type:






7. When done, hold down the power button until it reboots. Now you will be at Bootloader with [Fastboot] sign on the screen. Change the drive in Device-Manager again if needed.
8. Run the "unlock.bat" in the folder and you should get a green line: "unlock code is correct". Congrats your Kindle now has an unlocked bootloader.
9. Now hold power button again to shut down the device, then hold both "power button + Volume UP" and keep them for 3-5 seconds after you see the "kindle fire" logo. Then you will get into the TWRP and flash your desire things.

i hope this post will help others new member to free our beautifull devices!

Cheers and happy flashing :D

Will this work for 4.5.5.3?
 

mrw187

Senior Member
Jun 5, 2012
246
31
this is the details step for unlocking bootloader for the 2013 Kindle HDX 7 (Thor) and HDX 8.9 (Apollo). Becarefull the 2014 HDX 8.9 (Saturn) doesn't work! These steps are done in Windows 10, successfully checked by myselft!
i don't take any credits, just collect all the steps in one post of the whole process.

Download the needed files are in the attachment, just download them all + the TWRP for your device from this thread: TWRP 3.1.1-1
You do NOT need root for these steps!

1. Install the adb-setup-1.4.3 into a folder (for example: C:/adb), extract dd-0.5.zip + unlock.zip + aboot-xxx.zip, put dd.exe + get_code.bat + unlock.bat + twrp image (for your device) + aboot_vuln.mbn (for your device) into that folder. After that install the kindle_fire_usb_driver.
2. Turn on ADB-Debuging Mode in Developer Mod by tapping 7 times the build numbers in settings and connect to your computer + trust your device.
3. Excecute "get_code.bat" in the folder above, you will get a new file: unlock.code in the folder.
4. Open CMD in the folder and run "adb reboot bootloader", the Kindle will reboot to bootloader with "[ fastboot ]" on the display
5. On the Computer go to Device-Manager and change driver in "Other Android" to "Fire Devices - Android Adb Composite Driver" . It should say "Ready" on the Kindle.
6. Now we need to enter Bulk-Mode like the instruction in this thread: Bulk Mode
Type:






7. When done, hold down the power button until it reboots. Now you will be at Bootloader with [Fastboot] sign on the screen. Change the drive in Device-Manager again if needed.
8. Run the "unlock.bat" in the folder and you should get a green line: "unlock code is correct". Congrats your Kindle now has an unlocked bootloader.
9. Now hold power button again to shut down the device, then hold both "power button + Volume UP" and keep them for 3-5 seconds after you see the "kindle fire" logo. Then you will get into the TWRP and flash your desire things.

i hope this post will help others new member to free our beautifull devices!

Cheers and happy flashing :D

I tried with 4.5.5.2 but this should work with *ANY* firmware like mentioned in the OP.

Good luck!

Worked all good. Now on aosp 7.1.2
 

mancoh51

Member
Mar 31, 2017
14
2
I have hit a dead end

Hello. At first, I did not invent anything new, just checked some my guess on a other motherboard. All thanks and credits to our great developers. As always, all at your own risk.
It does not work on the Fire HDX 8.9 (Saturn)!
All steps in this manual are not necessary but they are present for maximum safety. So I highly recommend do anything exactly in this way. Sorry my English as always =)

Update: now you can use updated draxie's utility - http://xdaforums.com/kindle-fire-hdx/general/multi-platform-1-click-bootloader-t3241014

Prerequisites for Installation
- Root
- Installed adb and fastboot drivers - official - https://drive.google.com/open?id=0B2twXJIOgv-UWWdwRl9TQS11b0k (if your system language not English, after fail navigate to "Program Files (x86)\Lab126\drivers" and run dpinst.exe /EL or switch to English =) for x64 need to disable driver signature verification before install ) also you can use pdanet drivers - http://xdaforums.com/showpost.php?p=59268023&postcount=8

Manual:
1. Create unlock file following this instruction - https://xdaforums.com/kindle-fire-h...r-firmware-t3463982/post70881555#post70881555

2. Flash old vulnarable aboot and cubed twrp (just in case). Check that all these commands executed without errors. If you'll get one - read second post below. If your firmware <=13(14)3.2.3.2 skip this step.
Download aboot and twrp for Thor (Kindle Fire HDX 7) https://drive.google.com/open?id=0B2twXJIOgv-UMGxXMUZPZTlZTUk or for Apollo (Kindle Fire HDX 8.9) - https://drive.google.com/open?id=0B2twXJIOgv-URzJDQkczNzRLaHM - and put this two files (twrp_cubed.img and aboot_vuln.mbn) into root of your kindle internal storage.
Run:
Code:
adb shell
su
dd if=/sdcard/twrp_cubed.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
dd if=/sdcard/aboot_vuln.mbn of=/dev/block/platform/msm_sdcc.1/by-name/aboot
Now you have working twrp recovery. It already works even without unlocked bootloader. You could boot into it by holding volUP during grey kindle logo. But no need to flash anything until unlock. At this point this is just emergency tool if something goes wrong =)

3. Flash unlock file.
Now, if you reboot, you will go straight into fastboot because of old aboot - newest boot.img can't load with it. If your firmware <13(14).4.1.1 you need run "adb reboot bootloader" to boot into fastboot.
Time to flash your unlock file.
Code:
fastboot -i 0x1949 flash unlock 0xmmssssssss.unlock
You must obtain "unlock code is correct".
Grats. You are perfect =)
You can flash:
CM13 - http://xdaforums.com/kindle-fire-hdx/orig-development/rom-cm-13-kindle-hdx-2015-11-29-t3259732
CM 12.1 - http://xdaforums.com/kindle-fire-hdx/development/rom-cm-12-unofficial-apollo-thor-t3050199
Or stock repacked latest 4.5.5.2 rom - https://drive.google.com/open?id=0B2twXJIOgv-UVFFtN2RYNXNUZ0k (13.x - thor, 14.x - apollo)
Do not flash original stock firmwares.

Regards and thank to all - @dpeddi, @vortox, @draxie, @ggow, @Ralekdev, @jcase, @Hashcode
And greatest thanks for motherboard for my experiments to @MahmudS !

Hi all. I followed all the steps. When I get to step three (https://xdaforums.com/kindle-fire-h...firmware-t3463982/post70881555#post70881555)- I just get FAIL: Unlock Code is NOT correct. Here is what I get in Terminal after running unlock.bat

"/Users/MannyCohen/Downloads/unlock/unlock.bat: line 2: /Users/MannyCohen/Downloads/unlock: is a directory
error: no devices found
target reported max download size of 536870912 bytes
sending 'unlock' (0 KB)...
OKAY [ 0.087s]
writing 'unlock'...
FAILED (remote: Unlock code is NOT correct)
finished. total time: 0.144s
/Users/MannyCohen/Downloads/unlock/unlock.bat: line 7: pause: command not found
"
Can someone help?
I can't go into my device to fix anything, because I can only boot into fastboot, and also TWRP.
 

DB126

Senior Member
Oct 15, 2013
15,362
10,174
Hello. At first, I did not invent anything new, just checked some my guess on a other motherboard. All thanks and credits to our great developers. As always, all at your own risk.
It does not work on the Fire HDX 8.9 (Saturn)!
All steps in this manual are not necessary but they are present for maximum safety. So I highly recommend do anything exactly in this way. Sorry my English as always =)

Update: now you can use updated draxie's utility - http://xdaforums.com/kindle-fire-hdx/general/multi-platform-1-click-bootloader-t3241014

Prerequisites for Installation
- Root
- Installed adb and fastboot drivers - official - https://drive.google.com/open?id=0B2twXJIOgv-UWWdwRl9TQS11b0k (if your system language not English, after fail navigate to "Program Files (x86)\Lab126\drivers" and run dpinst.exe /EL or switch to English =) for x64 need to disable driver signature verification before install ) also you can use pdanet drivers - http://xdaforums.com/showpost.php?p=59268023&postcount=8

Manual:
1. Create unlock file following this instruction - https://xdaforums.com/kindle-fire-h...r-firmware-t3463982/post70881555#post70881555

2. Flash old vulnarable aboot and cubed twrp (just in case). Check that all these commands executed without errors. If you'll get one - read second post below. If your firmware <=13(14)3.2.3.2 skip this step.
Download aboot and twrp for Thor (Kindle Fire HDX 7) https://drive.google.com/open?id=0B2twXJIOgv-UMGxXMUZPZTlZTUk or for Apollo (Kindle Fire HDX 8.9) - https://drive.google.com/open?id=0B2twXJIOgv-URzJDQkczNzRLaHM - and put this two files (twrp_cubed.img and aboot_vuln.mbn) into root of your kindle internal storage.
Run:

Now you have working twrp recovery. It already works even without unlocked bootloader. You could boot into it by holding volUP during grey kindle logo. But no need to flash anything until unlock. At this point this is just emergency tool if something goes wrong =)

3. Flash unlock file.
Now, if you reboot, you will go straight into fastboot because of old aboot - newest boot.img can't load with it. If your firmware <13(14).4.1.1 you need run "adb reboot bootloader" to boot into fastboot.
Time to flash your unlock file.


Hi all. I followed all the steps. When I get to step three (https://xdaforums.com/kindle-fire-h...firmware-t3463982/post70881555#post70881555)- I just get FAIL: Unlock Code is NOT correct. Here is what I get in Terminal after running unlock.bat

"/Users/MannyCohen/Downloads/unlock/unlock.bat: line 2: /Users/MannyCohen/Downloads/unlock: is a directory
error: no devices found
target reported max download size of 536870912 bytes
sending 'unlock' (0 KB)...
OKAY [ 0.087s]
writing 'unlock'...
FAILED (remote: Unlock code is NOT correct)
finished. total time: 0.144s
/Users/MannyCohen/Downloads/unlock/unlock.bat: line 7: pause: command not found
"
Can someone help?
I can't go into my device to fix anything, because I can only boot into fastboot, and also TWRP.
First - please don't cross post similar information in multiple threads; patience is a virtue.

Appears files are located in the downloads folder on the 'host' which I assume is a Windows machine. I doubt that is where the adb and fastboot executables are located.

There appears to be a conflict with a file/folder named 'unlock'. Might check to see if that exists and rename it. Also note the batch file is designed to run in a Windows command window (not terminal) and assumes your device tethered and accessible via adb. You might get the batch command to run while booted into TWRP; doubt it.

While there are ways around the latter obstacle the best path IMHO is to install and older ROM via TWRP that does not require and unlocked bootloader. Then start over with the procedure to generate an unlock code. You also want to be certain that a vulnerable aboot has indeed been installed (step #2) and that is a firm prerequisite to unlocking the bootloader. Finally, installing an older ROM will verify the device doesn't have other issues.

In short, install the ROM linked below, verify device stability and post back for further guidance if needed.

https://xdaforums.com/kindle-fire-hdx/orig-development/rom-fire-nexus-rom-ktu84q-t3322931
 

fosterreichert

New member
Feb 4, 2018
1
0
Help Please:

< waiting for device >
target reported max download size of 114294784 bytes
sending 'unlock' (0 KB)...
OKAY [ 0.019s]
writing 'unlock'...
FAILED (remote: unlock code error)
finished. total time: 0.031s
Press any key to continue . . .
 

DB126

Senior Member
Oct 15, 2013
15,362
10,174
Help Please:

< waiting for device >
target reported max download size of 114294784 bytes
sending 'unlock' (0 KB)...
OKAY [ 0.019s]
writing 'unlock'...
FAILED (remote: unlock code error)
finished. total time: 0.031s
Press any key to continue . . .
Did you install a vulnerable aboot (step #2 in OP) prior to attempting to unlock the bootloader?
 

draxie

Senior Member
Apr 20, 2014
515
642
First - please don't cross post similar information in multiple threads; patience is a virtue.

Appears files are located in the downloads folder on the 'host' which I assume is a Windows machine. I doubt that is where the adb and fastboot executables are located.

There appears to be a conflict with a file/folder named 'unlock'. Might check to see if that exists and rename it. Also note the batch file is designed to run in a Windows command window (not terminal) and assumes your device tethered and accessible via adb. You might get the batch command to run while booted into TWRP; doubt it.

While there are ways around the latter obstacle the best path IMHO is to install and older ROM via TWRP that does not require and unlocked bootloader. Then start over with the procedure to generate an unlock code. You also want to be certain that a vulnerable aboot has indeed been installed (step #2) and that is a firm prerequisite to unlocking the bootloader. Finally, installing an older ROM will verify the device doesn't have other issues.

In short, install the ROM linked below, verify device stability and post back for further guidance if needed.

https://xdaforums.com/kindle-fire-hdx/orig-development/rom-fire-nexus-rom-ktu84q-t3322931

Actually, based on the paths and the reference to Terminal, my guess is that someone's
trying to run a batch file intended for Windows on a Mac. They should be using the similarly
name shell script instead...
 
  • Like
Reactions: DB126

mancoh51

Member
Mar 31, 2017
14
2
First - please don't cross post similar information in multiple threads; patience is a virtue.

Appears files are located in the downloads folder on the 'host' which I assume is a Windows machine. I doubt that is where the adb and fastboot executables are located.

There appears to be a conflict with a file/folder named 'unlock'. Might check to see if that exists and rename it. Also note the batch file is designed to run in a Windows command window (not terminal) and assumes your device tethered and accessible via adb. You might get the batch command to run while booted into TWRP; doubt it.

While there are ways around the latter obstacle the best path IMHO is to install and older ROM via TWRP that does not require and unlocked bootloader. Then start over with the procedure to generate an unlock code. You also want to be certain that a vulnerable aboot has indeed been installed (step #2) and that is a firm prerequisite to unlocking the bootloader. Finally, installing an older ROM will verify the device doesn't have other issues.

In short, install the ROM linked below, verify device stability and post back for further guidance if needed.

https://xdaforums.com/kindle-fire-hdx/orig-development/rom-fire-nexus-rom-ktu84q-t3322931

Will try soon, thanks for the help!
 

nikobaldt

New member
Feb 14, 2018
1
1
Works perfectly

this is the details step for unlocking bootloader for the 2013 Kindle HDX 7 (Thor) and HDX 8.9 (Apollo). Becarefull the 2014 HDX 8.9 (Saturn) doesn't work! These steps are done in Windows 10, successfully checked by myselft!
i don't take any credits, just collect all the steps in one post of the whole process.

Download the needed files are in the attachment, just download them all + the TWRP for your device from this thread: TWRP 3.1.1-1
You do NOT need root for these steps!

1. Install the adb-setup-1.4.3 into a folder (for example: C:/adb), extract dd-0.5.zip + unlock.zip + aboot-xxx.zip, put dd.exe + get_code.bat + unlock.bat + twrp image (for your device) + aboot_vuln.mbn (for your device) into that folder. After that install the kindle_fire_usb_driver.
2. Turn on ADB-Debuging Mode in Developer Mod by tapping 7 times the build numbers in settings and connect to your computer + trust your device.
3. Excecute "get_code.bat" in the folder above, you will get a new file: unlock.code in the folder.
4. Open CMD in the folder and run "adb reboot bootloader", the Kindle will reboot to bootloader with "[ fastboot ]" on the display
5. On the Computer go to Device-Manager and change driver in "Other Android" to "Fire Devices - Android Adb Composite Driver" . It should say "Ready" on the Kindle.
6. Now we need to enter Bulk-Mode like the instruction in this thread: Bulk Mode
Type:






7. When done, hold down the power button until it reboots. Now you will be at Bootloader with [Fastboot] sign on the screen. Change the drive in Device-Manager again if needed.
8. Run the "unlock.bat" in the folder and you should get a green line: "unlock code is correct". Congrats your Kindle now has an unlocked bootloader.
9. Now hold power button again to shut down the device, then hold both "power button + Volume UP" and keep them for 3-5 seconds after you see the "kindle fire" logo. Then you will get into the TWRP and flash your desire things.

i hope this post will help others new member to free our beautifull devices!

Cheers and happy flashing :D

This guide works perfectly. The only difference: the commands


wmic partition where (index=17 and numberofblocks=20480) get diskindex
wmic partition where (index=5 and numberofblocks=4096) get diskindex


have an error message but the first command


wmic partition where index=22 get diskindex


returned the right index.

Thank you for that. After that I installed CM14.1.

My device: Kindle Fire HDX 8.9 (Apollo), FireOS 4.5.5.3
 
Last edited:
  • Like
Reactions: Mark2014

ubergeek71

Member
Mar 22, 2016
13
6
Cubed TWRP?

Greetings,

Thor and I have been happy users of the Fire Nexus ROM for a couple of years, so a big thanks to all who were involved in that!

I feel that it's time to update to something like AospExtended because why not?

I've taken some time to familiarize myself with the instructions in this and other threads, and I believe I have assembled almost all of the necessary pieces (I'm able to run get_code.bat, for example). But there's one puzzle remaining: the continued reference to the "cubed" TWRP, for which there don't appear to be any working links.

The most recent instructions from @ReichMann imply that one can just use TWRP 3.1.1-1, although the details still refer to twrp_cubed.img. So I just wanted to be sure that I can use 3.1.1-1, or if I still need to find this elusive "cubed" version somewhere.

Thanks for the help!
 

draxie

Senior Member
Apr 20, 2014
515
642
Good to go!

Greetings,

Thor and I have been happy users of the Fire Nexus ROM for a couple of years, so a big thanks to all who were involved in that!

I feel that it's time to update to something like AospExtended because why not?

I've taken some time to familiarize myself with the instructions in this and other threads, and I believe I have assembled almost all of the necessary pieces (I'm able to run get_code.bat, for example). But there's one puzzle remaining: the continued reference to the "cubed" TWRP, for which there don't appear to be any working links.

The most recent instructions from @ReichMann imply that one can just use TWRP 3.1.1-1, although the details still refer to twrp_cubed.img. So I just wanted to be sure that I can use 3.1.1-1, or if I still need to find this elusive "cubed" version somewhere.

Thanks for the help!

All *RECENT* TWRP images(3.0.2 and beyond) released by @ggow appear to be fake-signed (i.e. "cubed'").
You can either rename the file or change the reference in the command to the actual filename you have...
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 54
    Hello. At first, I did not invent anything new, just checked some my guess on a other motherboard. All thanks and credits to our great developers. As always, all at your own risk.
    It does not work on the Fire HDX 8.9 (Saturn)!
    All steps in this manual are not necessary but they are present for maximum safety. So I highly recommend do anything exactly in this way. Sorry my English as always =)
    Update2 - actual method is https://xdaforums.com/showpost.php?p=75284993&postcount=1006
    Update: now you can use updated draxie's utility - http://xdaforums.com/kindle-fire-hdx/general/multi-platform-1-click-bootloader-t3241014

    Prerequisites for Installation
    - Root
    - Installed adb and fastboot drivers - official - https://drive.google.com/open?id=0B2twXJIOgv-UWWdwRl9TQS11b0k (if your system language not English, after fail navigate to "Program Files (x86)\Lab126\drivers" and run dpinst.exe /EL or switch to English =) for x64 need to disable driver signature verification before install ) also you can use pdanet drivers - http://xdaforums.com/showpost.php?p=59268023&postcount=8

    Manual:
    1. Create unlock file following this instruction - https://xdaforums.com/kindle-fire-h...r-firmware-t3463982/post70881555#post70881555

    2. Flash old vulnarable aboot and cubed twrp (just in case). Check that all these commands executed without errors. If you'll get one - read second post below. If your firmware <=13(14)3.2.3.2 skip this step.
    Download aboot and twrp for Thor (Kindle Fire HDX 7) https://drive.google.com/open?id=0B2twXJIOgv-UMGxXMUZPZTlZTUk or for Apollo (Kindle Fire HDX 8.9) - https://drive.google.com/open?id=0B2twXJIOgv-URzJDQkczNzRLaHM - and put this two files (twrp_cubed.img and aboot_vuln.mbn) into root of your kindle internal storage.
    Run:
    Code:
    adb shell
    su
    dd if=/sdcard/twrp_cubed.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
    dd if=/sdcard/aboot_vuln.mbn of=/dev/block/platform/msm_sdcc.1/by-name/aboot
    Now you have working twrp recovery. It already works even without unlocked bootloader. You could boot into it by holding volUP during grey kindle logo. But no need to flash anything until unlock. At this point this is just emergency tool if something goes wrong =)

    3. Flash unlock file.
    Now, if you reboot, you will go straight into fastboot because of old aboot - newest boot.img can't load with it. If your firmware <13(14).4.1.1 you need run "adb reboot bootloader" to boot into fastboot.
    Time to flash your unlock file.
    Code:
    fastboot -i 0x1949 flash unlock 0xmmssssssss.unlock
    You must obtain "unlock code is correct".
    Grats. You are perfect =)
    You can flash:
    CM13 - http://xdaforums.com/kindle-fire-hdx/orig-development/rom-cm-13-kindle-hdx-2015-11-29-t3259732
    CM 12.1 - http://xdaforums.com/kindle-fire-hdx/development/rom-cm-12-unofficial-apollo-thor-t3050199
    Or stock repacked latest 4.5.5.2 rom - https://drive.google.com/open?id=0B2twXJIOgv-UVFFtN2RYNXNUZ0k (13.x - thor, 14.x - apollo)
    Do not flash original stock firmwares.

    Regards and thank to all - @dpeddi, @vortox, @draxie, @ggow, @Ralekdev, @jcase, @Hashcode
    And greatest thanks for motherboard for my experiments to @MahmudS !
    34
    Steps unlock bootloader and needed files

    this is the details step for unlocking bootloader for the 2013 Kindle HDX 7 (Thor) and HDX 8.9 (Apollo). Becarefull the 2014 HDX 8.9 (Saturn) doesn't work! These steps are done in Windows 10, successfully checked by myselft!
    i don't take any credits, just collect all the steps in one post of the whole process.

    Download the needed files are in the attachment, just download them all + the TWRP for your device from this thread: TWRP 3.1.1-1
    You do NOT need root for these steps!

    1. Install the adb-setup-1.4.3 into a folder (for example: C:/adb), extract dd-0.5.zip + unlock.zip + aboot-xxx.zip, put dd.exe + get_code.bat + unlock.bat + twrp image (for your device) + aboot_vuln.mbn (for your device) into that folder. After that install the kindle_fire_usb_driver.
    2. Turn on ADB-Debuging Mode in Developer Mod by tapping 7 times the build numbers in settings and connect to your computer + trust your device.
    3. Excecute "get_code.bat" in the folder above, you will get a new file: unlock.code in the folder.
    4. Open CMD in the folder and run "adb reboot bootloader", the Kindle will reboot to bootloader with "[ fastboot ]" on the display
    5. On the Computer go to Device-Manager and change driver in "Other Android" to "Fire Devices - Android Adb Composite Driver" . It should say "Ready" on the Kindle.
    6. Now we need to enter Bulk-Mode like the instruction in this thread: Bulk Mode
    Type:
    Code:
    fastboot -i 0x1949 erase aboot
    fastboot -i 0x1949 reboot

    NB: this will be scary as you'll lose 'fastboot' and only see a black screen.
    Your device should reboot into "bulk mode" resulting in a number of pop-up
    windows asking to format all the partitions that get exposed (at least, on Windows 10).
    DO NOT format anything! Follow the above instructions instead.

    Open a command window (cmd) and run the following commands:

    Code:
    wmic partition where index=22 get diskindex
    wmic partition where (index=17 and numberofblocks=20480) get diskindex
    wmic partition where (index=5 and numberofblocks=4096) get diskindex

    All three of the above commands should return the same DiskIndex. Let's call that index X.

    In the command window, run the following two commands with the right aboot&twrp files for your device
    (you will need to substitute the DiskIndex X from above in place of the X):


    Code:
    dd of=\\?\Device\HarddiskX\Partition6 if=aboot_vuln.mbn
    dd of=\\?\Device\HarddiskX\Partition18 if=twrp_cubed.img

    This error message on the first command seems normal: "Error reading file: 87 The parameter is incorrect"
    NB: make sure you run both commands! Without TWRP, you'll get a brick.

    Wait a few minutes for good measure; then, keep holding Power + VolUp until your device enters TWRP.

    7. When done, hold down the power button until it reboots. Now you will be at Bootloader with [Fastboot] sign on the screen. Change the drive in Device-Manager again if needed.
    8. Run the "unlock.bat" in the folder and you should get a green line: "unlock code is correct". Congrats your Kindle now has an unlocked bootloader.
    9. Now hold power button again to shut down the device, then hold both "power button + Volume UP" and keep them for 3-5 seconds after you see the "kindle fire" logo. Then you will get into the TWRP and flash your desire things.

    i hope this post will help others new member to free our beautifull devices!

    Cheers and happy flashing :D
    14
    Generate the unlock code on your own Kindle (no python required)

    Prerequisites
    • Platform tools (adb + fastboot) from Google
    • Fire drivers from Amazon
      (if you want something that works with *both* adb *and* fastboot, make sure you hand-pick the 'Android Composite ADB Interface' driver under 'Fire Devices' in Device Manager)
      Update Driver Software... >> Browse my computer for driver software >> Let me pick from a list [...] >> Fire Devices
    • Download and extract unlock.zip (SHA256: e5db0b8d82c8fd2a25a22b0a598014d22a2ec33cef27a8d4b65a36acde08f27a)
      to the same directory that holds the adb and fastboot executables (default: platform-tools)
      unless, of course, you have added that directory to your PATH

    Code Generation & Unlock
    1. Click on get_code.bat in the extracted folder (default: platform-tools)
      --- this replaces step 1 (including *both* 1.1 & 1.2) of the OP ---
      Check that two hex-numbers are printed (manfid+serial) and a new file 'unlock.code' appears in that folder
    2. Perform Step 2 of the OP
    3. Click on unlock.bat in the extracted folder (default: platform-tools)
      --- this replaces step 3 of the OP ---
      if you see < waiting for any device > in the Command window, you'll need to manually select a driver

    That's all folks...
    10
    BULK MODE

    it is all my fault.my device is apollo,nexus4.4.4. when unlocking bootloader,i put the wrong file into interstorage,that is thor's aboot vuln and twrp cube.and then my hdx8.9 cannot enter recovery,bootload and system,only display background light.i can still see its storage in computer,but shows do not find device in adb .so what should i do to save my apollo?i am appreciating for you help..

    Here's a set of instructions that _SHOULD_ work to recover your device.
    We had two recent successful cases, and I've only managed to brick
    one of my test devices experimenting with this.

    Nevertheless, the standard disclaimer still applies: your device, your risk.
    If anything goes wrong, I'm not responsible.


    1. Open a command window (cmd, NOT PowerShell!!) and run the following commands:
      Code:
      wmic partition where index=22 get diskindex
      wmic partition where (index=17 and numberofblocks=20480) get diskindex
      wmic partition where (index=5 and numberofblocks=4096) get diskindex
      All three of the above commands should return the same DiskIndex.
      Let's call that index X.
    2. Download and extract http://www.chrysocome.net/downloads/dd-0.5.zip.
    3. In the command window, change to the directory with the extracted dd.exe
      and run the following two commands with the right aboot&twrp files for your device
      (you will need to substitute the DiskIndex X from above in place of the red X):
      Code:
      dd of=\\?\Device\Harddisk[COLOR="Red"]X[/COLOR]\Partition6 if=aboot_vuln.mbn
      dd of=\\?\Device\Harddisk[COLOR="Red"]X[/COLOR]\Partition18 if=twrp_cubed.img
      This error message on the first command seems normal: "Error reading file: 87 The parameter is incorrect"
      NB: make sure you run both commands! Without TWRP, you'll get a brick.
    4. Wait a few minutes for good measure; then, keep holding Power + VolUp until your device enters TWRP.


    @bluecoyote, @Mr McBoatface (or anyone else starting from fastboot)
    I have all the ingredients for a script, but haven't had time to put it all together.
    The above instructions work, once you put your device into "bulk mode".
    To do so, you'll need to run these two fastboot commands:
    Code:
    fastboot -i 0x1949 erase aboot
    fastboot -i 0x1949 reboot
    NB: this will be scary as you'll lose 'fastboot' and only see a black screen.
    Your device should reboot into "bulk mode" resulting in a number of pop-up
    windows asking to format all the partitions that get exposed (at least, on Windows 10).
    DO NOT format anything! Follow the above instructions instead.

    Oh, and YES: this should also work on any unrooted & locked 3rd gen HDX device.
    You need to enable ADB and run the following command to enter fastboot:
    Code:
    adb reboot bootloader

    This is arguably faster (and less malware-ridden) than trying to root with Kingroot,
    but it's easy to make a small mistake and end up with a brick.
    7
    Although I have registered my 'thanks' on various posts it seems hollow to not explicitly recognize @ONYXis and @draxie for their tremendous contributions supporting this device both past and present. The ability to unlock virtually any rooted 3rd gen HDX is a true game changer that will revive interest in this discontinued gem that still competes nicely with contemporary offerings. Well done, gents!