yashsingh1/xdaforums huggingface dataset:
[Kindle Fire HDX 7" & 8.9" General] DB126:
Unfortunately, the "Ready" indication does not necessarily confirm a working fastboot connection. Recommend installing Motorola Device Manager which includes drivers that are known to work well with HDX devices. You'll need to select Moto driver with the device tethered in fastboot mode. Sometimes a reboot of one or both devices is needed. Can be a frustrating exercise until you get the hang of it. A favorable response to "fastboot devices" usually confirms a working connection. Note there is no need to fire up Moto app in Windows; just leveraging the drivers that are installed with that package.

Root is not always a prerequisite depending on the method used to prepare the device for flashing aboot, etc. That said, it may very well be the obstacle in this case.
[Kindle Fire HDX 7" & 8.9" General] draxie:
fastboot commands at the end!

I must've replied to at least half a dozen different people with the exact same issue.

And, the answer is always the same: the instructions you are trying to follow assume

that your device is in bulk mode already (which it isn't if you're connecting to it via

fastboot). Near the end of that post, you'll find what commands you need to use to

get you into bulk mode (from adb to fastboot, and from fastboot to bulk).

And, you're right, you do not need to root.

OOPS! Sorry... I thought you were referring to the post that's cited

from the post you linked to... (-; In either case, as long as you see

a [fastboot] Ready. prompt you're device is definitely NOT in bulk

mode, and the wmic commands will not get you anywhere.

You need to 'erase aboot' and 'reboot' from fastboot.

Does that not work for you?
[Kindle Fire HDX 7" & 8.9" General] webby2018:
OK. I think I mis-interpreted some of the previous post(s) so now I'm clear that I had to run:

fastboot -i 0x1949 erase aboot

fastboot -i 0x1949 reboot

to get into BULK mode, which I did.

I then ran:

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

and confirmed Diskindex '1'

then copied aboot_vuln and twrp images:

dd of=\\?\Device\Harddisk1\Partition6 if=aboot_vuln.mbn

dd of=\\?\Device\Harddisk1\Partition18 if=twrp_cubed.img

tried to to reboot but got blank screen - looked to be 'bricked'

I reviewed this thread where you previously helped someone recover a Thor device and dumping my partition 6 I found it appeared to be corrupted so I re-copied aboot_vuln.mbn to partition6 again and was then able to start the device using Power+volup and it came up in Fastboot with a Ready prompt :)

Tried to boot into twrp_cubed.img ('fastboot boot twrp_cubed.img') but this failed with 'boot not allowed for locked hw' so I ran 'fastboot -i 0x1949 flash unlock unlock.code' which worked. Re-ran the fastboot boot command and it booted up into twrp :)

So with all your current and previous help I've managed to finish this stage 1 - many thanks.

I don't know much (yet) about TWRP and how to load a new OS but in the meantime can you or anyone else tell me (point me) to how to reboot back into the original FireOS which I assume is still on the device?
[Kindle Fire HDX 7" & 8.9" General] draxie:
Need to patch boot.img

To boot into FireOS, you'll need to flash a patched boot.img (the old bootloader and the 4.x

boot images don't play well together [as you can probably tell]), but note that doing so is not

without risks. In fact, if you decide to attempt booting into fireOS I'd recommend that you

also patch your system partition to avoid FireOS overwriting TWRP with stock recovery and

a potential unexpected OTA (which could be incoming to mitigate Spectre) bricking your HDX.

In all honesty, I'm not sure it's worth the trouble....

Since you appear to have access to Linux, you could try using my tools.

Running them without arguments gives you basic command-line help,

otherwise you gotta know what you're doing. I'm not going to guide you.
[Kindle Fire HDX 7" & 8.9" General] webby2018:
I don't understand your comment about patching boot.img. Is there a way to put back the original bootloader and boot back into FireOS so I can use the device while I research further? Basically a vanilla restore.
[Kindle Fire HDX 7" & 8.9" General] draxie:
No time, sorry...

The bootloader and the boot image are different animals.

The former lives on the aboot partition and loads the latter,

which lives in the boot partition and holds the kernel+device

tree for your system partition... I have a Python script, cuboot.py

that patches the kernel command-line and device tree; so, that

you can boot a newer kernel on an old bootloader. That's what

my comment meant.

You _could_ also just flash the bootloader (i.e. emmc_aboot.mbn)

for your current version of FireOS (from the corresponding official

Amazon update). Now that you're device is unlocked, you won't

even have to enter bulk mode for that. You should be able to flash

directly from fastboot. That should get you back into FireOS, but

TWRP will likely not work anymore, nor will your device remain

unlocked. Your call... If you look carefully, you'll find posts from

people who believe they have bricked their device this way, and

you may also run into rumours that claim that this is due to TWRP

being present in the recovery partition instead of stock recovery.
[Kindle Fire HDX 7" & 8.9" General] DB126:
This is a case where [MENTION=5828306]draxie[/MENTION] has responded to your specific request in great detail yet omitted the most expeditious path: flash (install) a custom ROM via twrp which will yield a fully functional device while completing your "research". You can even backup your old personal data (not apps) for future restoration.

Since you appear unfamiliar with flashing ROMs and supporting packages I suggesting going with legacy Fire Nexus which includes everything you need (ROM, GAaps, SuperSU, etc.) in one package. Be sure to copy any personal content from the Media folder via tether before performing the required wipes before installing Nexus. You could also backup the entire device via TWRP which would provide a fallback should you decide FireOS is preferable. Really no one does this but the option exists.

Be sure to follow directions in the first post of the Fire Nexus thread.
[Kindle Fire HDX 7" & 8.9" General] webby2018:
OK. thanks for the info. I do appreciate the detail, even though I may not get it at first pass, as it usually clicks for me later after some thought and analysis.

I think I'll try Davey126's approach for now to get my device working again.

---------- Post added at 05:41 PM ---------- Previous post was at 05:33 PM ----------

Hi, I'll try what you suggest.

One query I have before I do that, unrelated to your suggestion, is that at the moment the device only starts up in fastboot. I can't boot up TWRP unless I run the 'fastboot boot twrp_cubed.img' whereas I read elsewhere that starting the device with Power+volup should invoke TWRP?
[Kindle Fire HDX 7" & 8.9" General] DB126:
It should, but I would not worry about that now. Possible the bootloader unlock failed (easy fix); other times reflashing aboot works. For now see if you can get Nexus to install/boot.
[Kindle Fire HDX 7" & 8.9" General] draxie:
Mindreader?

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. :^)

---------- Post added at 20:29 ---------- Previous post was at 20:24 ----------

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

fastboot flash recovery twrp_cubed.img
[Kindle Fire HDX 7" & 8.9" General] DB126:
Chalk it up to a bit of experience navigating choppy waters :)

[MENTION=8830098]webby2018[/MENTION] - heed [MENTION=5828306]draxie[/MENTION]'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.
[Kindle Fire HDX 7" & 8.9" General] webby2018:
OK. I've done this and now can power+volup into TWRP (thanks [MENTION=5828306]draxie[/MENTION]).

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 [MENTION=5828306]draxie[/MENTION] said there may be issues if recovery contains TWRP so where do I get the original recovery partition to flash (restore)?
[Kindle Fire HDX 7" & 8.9" General] DB126:
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 [MENTION=5828306]draxie[/MENTION]. 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.
[Kindle Fire HDX 7" & 8.9" General] webby2018:
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 [MENTION=5828306]draxie[/MENTION]
[Kindle Fire HDX 7" & 8.9" General] DB126:
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.
[Kindle Fire HDX 7" & 8.9" General] ReichMann:
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:

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
[Kindle Fire HDX 7" & 8.9" General] mrw187:
Will this work for 4.5.5.3?
[Kindle Fire HDX 7" & 8.9" General] ReichMann:
I tried with 4.5.5.2 but this should work with *ANY* firmware like mentioned in the OP.

Good luck!
[Kindle Fire HDX 7" & 8.9" General] mrw187:
Worked all good. Now on aosp 7.1.2
[Kindle Fire HDX 7" & 8.9" General] mydanuyen:
link die . please reload link download
[Kindle Fire HDX 7" & 8.9" General] DB126:
A thread search would have yielded this: https://xdaforums.com/kindle-fire-h...ing-bootloader-firmware-t3463982/post75284993
[Kindle Fire HDX 7" & 8.9" General] mancoh51:
I have hit a dead end

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.
[Kindle Fire HDX 7" & 8.9" General] DB126:
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
[Kindle Fire HDX 7" & 8.9" General] fosterreichert:
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 . . .
[Kindle Fire HDX 7" & 8.9" General] DB126:
Did you install a vulnerable aboot (step #2 in OP) prior to attempting to unlock the bootloader?
[Kindle Fire HDX 7" & 8.9" General] draxie:
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...
[Kindle Fire HDX 7" & 8.9" General] mancoh51:
Will try soon, thanks for the help!
[Kindle Fire HDX 7" & 8.9" General] nikobaldt:
Works perfectly

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
[Kindle Fire HDX 7" & 8.9" General] ubergeek71:
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 [MENTION=4546062]ReichMann[/MENTION] 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!
[Kindle Fire HDX 7" & 8.9" General] draxie:
Good to go!

All *RECENT* TWRP images(3.0.2 and beyond) released by [MENTION=5749760]ggow[/MENTION] 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...
[Kindle Fire HDX 7" & 8.9" General] ubergeek71:
That is a useful bit of information to have. Thanks a [metric] ton!
[Kindle Fire HDX 7" & 8.9" General] ubergeek71:
No love

Unfortunately I'm not there just yet. I was able to get Thor into bulk mode and execute the dd commands, which seemed to be successful. However, upon rebooting the device, it re-enters bulk mode (black screen, Windows detects a USB connection and prompts me to format a bunch of drives). Repeated the process with the same effect. I'm glad I don't have a brick just yet but I am open for suggestions on how to proceed. Thanks!
[Kindle Fire HDX 7" & 8.9" General] notjoken958:
Follow OP, clearly says what to do next. Time to flash your unlock code you created in step 1.
[Kindle Fire HDX 7" & 8.9" General] draxie:
Watch out!

Unfortunately, that information was not entirely correct.

I've downloaded and double-checked all the TWRP images posted

(except for 3.1.1-1 for Thor, where a mirror couldn't be found) and

fake-signing seems to start at 3.0.2-0; 3.0.0-0 and 3.0.0-1 do NOT

appear to be fake-signed... (In other words, the 6 latest out of the

8 available versions are OK.)

---------- Post added at 00:10 ---------- Previous post was at 00:08 ----------

You seem to be having major problems with reading comprehension.

What you suggest is not possible in bulk mode.
[Kindle Fire HDX 7" & 8.9" General] draxie:
Did you pay attention to the different partitions aboot and TWRP need to be flashed to?

Chances are you either mixed them up, or forgot to change the partition number for aboot.

Until you manage to write a valid aboot to the right partition, your device will stay in bulk mode.

Do make sure you flash *both* aboot *and* TWRP otherwise you'd likely be left with a boot loop....
[Kindle Fire HDX 7" & 8.9" General] ubergeek71:
more info

I originally got the "mirror cannot be found" message for 3.1.1-1, but I tried the link later and it worked. However, I will retry with 3.1.1-0 just to see what happens.

Yes, I flashed aboot to partition 6 and twrp to partition 18.
[Kindle Fire HDX 7" & 8.9" General] draxie:
oflag=direct

If you have access to Linux, I'd advise you to give 1-Click a try.

BUT, since you're already so close, maybe you prefer to just do it manually.

In that case, please note that the instructions you're following were for Windows.

On Linux, you'll need to augment the 'dd' command-line with the following

bs=64k conv=notrunc oflag=direct

where the last setting is instrumental (otherwise the Kindle's flash cannot keep up).

AGAIN: make sure you write BOTH aboot and TWRP.

I made my only brick with the exact same method, by rebooting after having flashed

aboot from Linux (the 2nd time with oflag=direct) to check if that worked. The only

problem was that I didn't use that flag when I wrote TWRP, hence I had no recovery

and no means to enter fastboot (and the old bootloader CANNOT boot the newer

kernels)... GAME OVER....

---------- Post added at 00:30 ---------- Previous post was at 00:24 ----------

OK. Let's hope you don't have a bad flash...

BTW, have you tried re-reading those partitions and compare with what you wrote?

(1-Click does that... ;))
[Kindle Fire HDX 7" & 8.9" General] ubergeek71:
Success!

I was aware of the 1-Click tool, and I was tempted by its simplicity. But after reviewing the manual instructions, I felt that I could probably make it work without bricking anything--and I tend to learn more that way. (And I suppose making a brick would be a learning experience as well, although one I'm glad I didn't have today!)

Yes, I had been using Windows all along (since the instructions were using that, and the most accessible PC I have at hand is running Windows), until the point that I suspected that dd wasn't working as expected. The write speed reported by dd seemed impossibly high (~130MB/s), which suggested to me that writes were being cached and perhaps never flushed. And Windows' block device naming format is a bit obtuse, but I'm pretty sure I had the paths correct...

Once I got into Linux, I did just that, and noticed that they appeared to be different--which raised my suspicions further! This 1-Click sounds like a rather impressive tool; if any more HDX's come my way, I just might have to try it out.

But anyway, the extra dd parameters were exactly the "secret sauce" that I needed: I can now boot Thor into TWRP! The rest should be child's play. :D Thanks so much for your help!
[Kindle Fire HDX 7" & 8.9" General] hwwof:
Can anyone help me? I started a thread in help forum in case you need more details. Currently, I'm getting these errors even though fastboot is working. https://gyazo.com/ddb61e577829d3813b45cb9341210501
[Kindle Fire HDX 7" & 8.9" General] DB126:
Have you tried issuing the following command in fastboot:

fastboot -i 0x1949 flash unlock unlock.code

This assumes 1) unlock.code was properly generated by get_code and resides in the same folder as fastboot.exe; and 2) a vulnerable bootloader is installed.