yashsingh1/xdaforums huggingface dataset:
[Kindle Fire HDX 7" & 8.9" General] DB126:
Yep - recall that recommendation to leave well enough alone. Been down this path before. I'm certain [MENTION=5828306]draxie[/MENTION] will get things cleaned up. Reflashing stock recovery has never been a clean procedure...although that may change in the future based on learnings from this go-around.

As an aside, you can reinstall and/or boot TWRP from fastboot (assuming an unlocked bootloader) which is the likely the path [MENTION=5828306]draxie[/MENTION] will take to revive your device. Good chance whatever ROM was previously installed remains intact; same for contents of the data partition. See TWRP thread for related fastboot commands.
[Kindle Fire HDX 7" & 8.9" General] draxie:
Full stock?

Hmm... Last time I did this was on 3.2.6, and it worked as expected.

So, never say never... ;^P

Which reminds me that the old bootloader (3.x) cannot load

the new (4.x) kernels. Unfortunately, that also means that

I was ever so slightly wrong in my previous post regarding

'boot.img', which is all the more embarrassing considering

that I wrote the script that fixes up (or, really, down) the v2

device-tree to v1 format allowing the old bootloader to boot

the massaged newer 'boot.img'. Obviously, that 'recovery.img'

would need the same treatment to boot on the old bootloader.

Chances are that [MENTION=5438836]bobcat131[/MENTION] flashed not only recovery, but also

boot, otherwise that Thor should simply boot into system as if

nothing ever happened. AFAIK, checking recovery is not part of

the normal bootchain.

That should work, but assuming that my theory about *both* boot *and* recovery

having gotten flashed to their stock versions holds AND that the ultimate goal is to

restore this unit to full stock, I'd suggest to flash 'images/emmc_appsboot.mbn' (yes,

that's the stock 4.x bootloader) to the aboot partition.

BUT, perhaps, it's better to wait until I have a chance to verify this on my test Thor

tomorrow evening....

---------- Post added at 20:55 ---------- Previous post was at 20:52 ----------

Was flashing recovery the only step you performed in fastboot,

or did you happen to flash boot also?
[Kindle Fire HDX 7" & 8.9" General] DB126:
Yes - I also restored a 3.2.6 recovery which I (somewhat amazingly) had preserved before borking a TWRP flash. As I recall the process was trivial -but- I had saved the image with Flashify which simplified the restoration. Been diligent with recovery and kernel backups ever since. :)
[Kindle Fire HDX 7" & 8.9" General] bobcat131:
First I only flashed recovery.img and no joy there. So then I flashed boot.img, and still no joy.

Waiting now to see how it goes on your test Thor. :fingers-crossed:
[Kindle Fire HDX 7" & 8.9" General] draxie:
under way

Here's how far I got today, starting from a Thor with CM14, unlocked bootloader:

generated stock recovery

interestingly, 'applypatch' on CM14 appends '.patch' to the filename

flashed stock recovery from fastboot

as expected CM14 started up unaffected on reboot,

but both 'adb reboot recovery', and Power+VolUp entered fastboot;

a clear indication that the old bootloader cannot load the new kernel

tried flashing junk to recovery

didn't work: only Android boot image format is accepted

flashed the stock boot.img to recovery

this worked, but resulted in entering fastboot instead of recovery,

which is expected as the old BL cannot load stock boot either

reinstalled TWRP in preparation for flashing repacked ROM

flashed ROM, wiped cache/dalvik, rebooted

waited over 30 minutes for FireOS to finish updating

it didn't; so, I gave up, shut down and rebooted to TWRP

wiped system and data and tried flashing repacked stock again

got error 7 (no wonder, no system, no build.prop ;))

And, that's where I ran out of time for today...

Here's my plan for tomorrow:

flash repacked FireOS, make sure everything works

flash stock boot and recovery from fastboot

verify that all three boot options end up in fastboot

flash stock aboot and verify that everything works

reinstall old aboot + TWRP via bulk mode

flash renamed stock update from TWRP

hope that I still have a working test device ;^)
[Kindle Fire HDX 7" & 8.9" General] bobcat131:
Similar problems with the generated recovery.img. Only fastboot access, so I flashed TWRP and joy into recovery by power + sound+. From TWRP flashed the twrp repacked rom and joy into system. Now we are back where we started to try and get back to full stock. I still think it will work eventually and I will test when you instruct. :)
[Kindle Fire HDX 7" & 8.9" General] draxie:
Things got busy. I only had time for the first step.

Now, we should have identical setups.

I'll see if I find time for the rest tomorrow...
[Kindle Fire HDX 7" & 8.9" General] bobcat131:
Ok, thanks :)
[Kindle Fire HDX 7" & 8.9" General] DB126:
Nice study and associated write up. As a heads-up I will be pointing folks here who want to return their device to pure stock - although my initial (strong) recommendation will be to update the system partition with an appropriate build of FireOS and leave the boot and recovery partitions (presumably hosting an unlocked/vulnerable loader and TWRP, respectively) alone.
[Kindle Fire HDX 7" & 8.9" General] bobcat131:
Brilliant accomplishment and although it is too daunting for me, I appreciate your time and efforts to return the Thor to pure stock. I will try it, but probably fail and wind up without pure stock. The lessons gained are well worth my time. Thank you again. :good:
[Kindle Fire HDX 7" & 8.9" General] kkcheong:
Probably deserve it's own thread don't you think?
[Kindle Fire HDX 7" & 8.9" General] DB126:
Probably does along with a handful of other exceptional posts. Likely live here for the time being as this device is closer to sunset than its glory days.
[Kindle Fire HDX 7" & 8.9" General] maddin999:
Safestrap - Stock or not

Hey there,

i am currently running Safestrap 4.01 with TWRP v2.7.1.0.

Do i need to return to stock somehow or is it possible to just follow the steps of the first post in the thread?

Cheers and thanks!

Martin
[Kindle Fire HDX 7" & 8.9" General] DB126:
You do not need to remove Safestrap although doing so will eliminate a layer of complexity should something go wrong during the unlock procedure. Since your device is already rooted (Safestrap prerequisite) you do not, and should not, attempt to install/use KingRoot. Likely you do not have TWRP installed at present, only a TWRP emulator that comes with SafeStrap.

Be sure to remove any secondary slots created with SafeStrap prior to taking any further actions; hopefully there are none.

Suggest you follow step #2 (only) from the original unlock thread linked in the OP. Initially This will not unlock the bootloader but will install a proper version of TWRP which simplifies troubleshooting and supports KitKat based custom ROMs such as Fire Nexus and CM 11. Once that is installed/stable you can go on to unlocking the bootloader (and wrestling with fastboot) which opens the door to the full suite of custom ROMs for this device.

Another advantage to the 2 phase approach: the ROM you are currently using with SafeStrap will likely remain fully functional after the first phase.
[Kindle Fire HDX 7" & 8.9" General] sick707:
Does it work with the Amazon Fire HDX 7 (3rd generation)??
[Kindle Fire HDX 7" & 8.9" General] DB126:
Yes - the procedure described in this thread ONLY works with that generation.
[Kindle Fire HDX 7" & 8.9" General] sick707:
If i brick ... Any way to fix it?
[Kindle Fire HDX 7" & 8.9" General] DB126:
Depends on what lead to the "brick"...but generally yes. Follow instructions and you should be fine.
[Kindle Fire HDX 7" & 8.9" General] Vanb85:
Thanks for the recommendation of Super-Sume. I was able to use it to remove KingRoot and switch over to Super Su. However, I've now run into another problem. I had been going along nicely for a few days with my newly rooted device, when I saw that there was an update on the Play Store for Super Su. So, I went ahead and downloaded the update. Much to my dismay, Super Su didn't update properly (no idea why), and the attempt caused me to lose root access. It has left me completely unable to re-root my HDX 7, even with KingRoot. I've tried several versions of KingRoot to no avail. Do you know if there is any workaround for this, or am I just stuck not being able to root this device until possibly a new version of KingRoot is released?

Also, I'm now concerned about updating Super Su at all, even on my other devices that I've rooted. I've just avoided the update since I lost root on my HDX 7. I'm trying to figure out if updating Super Su was a problem due to having Super Sume on the device or if this was just some sort of fluke. I have a Fire 5th Gen that's rooted, and I never had trouble updating Super Su on that device, but now I'm just in wait and see mode, because I'm not sure if the latest update itself doesn't break root somehow. Any help would be appreciated.
[Kindle Fire HDX 7" & 8.9" General] DB126:
You are not alone. There was a serious flaw in a recent release of SuperSU (builds 2.80-2.81) that caused widespread havoc as documented in this thread. I'll need to have a think about how this might be addressed in the HDX/FireOS v4 context. KingRoot likely won't work due to the presence of SuperSU components. Will respond with additional thoughts in a day or two.
[Kindle Fire HDX 7" & 8.9" General] Vanb85:
Oh, wow. Good to know that mine wasn't just an isolated incident. Okay. I'll hang tight then. Thanks.
[Kindle Fire HDX 7" & 8.9" General] DB126:
I didn't forget this concern and have been thinking about it as the SuperSU situation continues to unfold. Unfortunately, I do not see a path forward in your case aside from a high-risk technique that allows the bootloader to be unlocked without root. Any solutions for the general Android community assume access to a custom recovery which a stock HDX does not offer. Unless you can get KingRoot to redo root (seems unlikely given the presence of a non-working SuperSU binary) you're probably stuck with the status quo. I will provide an update if the situation changes. Sorry to be the bearer of bad news.
[Kindle Fire HDX 7" & 8.9" General] Vanb85:
Oh well, thanks anyway. At least I still have the Play Store on my HDX which, truth be told, had been the most important reason for establishing root in the first place. Anything else that I have done or would have done with root on this particular device was just gravy, as I was never really willing to risk anything too risky on such a finicky device.

So, I'm guessing there's no way to remove the non-functioning SuperSu binary without drastic measures, is there?
[Kindle Fire HDX 7" & 8.9" General] trlkly:
As predicted, I did get stuck.

I am stuck with getting a fastboot drive working. I'm all the way to running unlock.bat, but it simply reboots my Kindle Fire into fastboot mode, with cmd.exe window saying "< waiting for any device >" Per the instructions in the other thread, I have tried manually installing drivers through Device Manager while the prompt is still there and the device is in Fastboot mode. All of them tell me the "device will not start.")

The drivers I have tried installing are:

Kindle Fire:

Android Composite ADB Interface 1.0.0.0 (8/20/2012)

Android Composite ADB Interface 1.3.1000.0 (12/3/2012)

Android Composite ADB Interface 1.4.0.0 (10/27/2014)

Motorola (under ADB Interface in Device Manager list):

Android Sooner Composite ADB Interface 1.1.5.0 (4/1/2010)

Android Sooner Composite ADB Interface 1.3.0.0 (3/15/2015)

Most Composite ADB Interface 1.1.5.0 (4/1/2010)

Most Composite ADB Interface 1.3.0.0 (3/15/2015)

Clockwork Mod (possibly from a generic fastboot driver set I installed):

Android Composite ADB Interface (no version number or date)

Google Inc.:

Android Composite ADB Interface (no version number or date)

I have searched both Google and this forum for a list of other possible ADB Composite Interfaces to try installing. But I'm still stuck at "[fastboot] Ready."

If it matters, I am using Windows 7 SP1 all current updates, and my FireOS version is 13.3.2.6_user_326001820. I can get into TWRP recovery, so that part worked fine. And I do have an unlock.code file generated.

If it matters, I do also have a Linux computer. However, it is running Puppy Linux Tahr 6.0.0.5, which is based on Ubuntu Trusty Tahr (14.04). It is running off a USB drive. I find that having a nonstandard Linux sometimes makes things more complicated. Still, if I can't fix this fastboot driver issue on Windows, I'd be willing to give it a go.
[Kindle Fire HDX 7" & 8.9" General] DB126:
First a metaphorical tip-of-the-hat for the legwork already performed. Rarely do I encounter a member willing to make that investment before running up the white flag. Amazon devices in general and HDX models in particular are picky about fastboot connectivity. But not impossible.

Quick question and suggestion before diving in:

- What version of Windows are you running? 32 or 64 bit?

- Have you tried a different USB cable? Amazing how often that remidies the issue...even if the cable works fine for charging, ADB, MTP, etc. Also try a different USB port on the host, preferably one connected to an external hub. Avoid USB3 ports on older machines.

If neither the above helps I walk you through some other steps that typically yield a positive outcome.

Finally, feel free to flash one of the KitKat custom ROMs (recommend Fire Nexus as everything is included in one zip) as they do not require an unlocked bootloader. It will give you a feel for how nice this device performs once freed of FireOS shackles.
[Kindle Fire HDX 7" & 8.9" General] draxie:
For Windows, it's likely a HW issue, but you might want to try switching to a 'fastboot-only' driver temporarily

(e.g. Amazon has 3 drivers: adb-only, fastboot-only, and composite; just change from composite to fastboot).

For Linux, since Puppy is based on Ubuntu, you should be able to install adb/fastboot easily.

sudo apt-get install android-tools-adb android-tools-fastboot

With the tools installed, you can run 'unlock.sh' (instead of 'unlock.bat').

Just switching to another machine (which you'll do apparently) can suffice to solve this issue.
[Kindle Fire HDX 7" & 8.9" General] kkcheong:
Firstly, sorry for not putting all the install file in 1 place.

Secondly, I use Windows 10. Since draxie said it's hardware issue, then os version probably not the issue.
[Kindle Fire HDX 7" & 8.9" General] trlkly:
I tried switching cables and plugs. I even tried using my USB hub. No dice. So I finally resigned to going to my Linux computer. I used Puppy's package manager, installed those packages, copied over the files from the network, and it worked! It was so painless I wish I'd just used Linux from the start. (It makes me wonder if recommending people use a Linux LiveCD would be a viable option.)

I chose CM13 due to LineageOS 14 not having Xposed support yet. It's okay, but I think I don't like the launcher. I can't make the icons or text under them bigger (even by changing the DPI) and it seems to be stuck in portrait mode, like a phone. Any launchers that let me fix these two things?

I also would prefer a darker theme, like FireOS. It's one thing I did like about it. Is there any such thing?

Still, it's definitely better than FireOS 3/4. So thank you guys so much for the help. What I'm doing now is all tweaks.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Getting Windows to communicate with a HDX isn't that bad once you know the tricks. My previous response centered on hardware considerations which often resolves the problem. Yours was likely due to a driver issue which is pretty easy to resolve with the right sequence of steps to get around Windows idiosyncrasies (btw - you never responded to my inquiry regarding Windows version/build). That said, Linux will always be easier for those familiar with the environment.

CM 13.x for HDX is not being maintained at present; same for Android 6.x build of AOSP Nexus ROM. Of the two I prefer Nexus for pure Android look/feel and strong compatibility with Xposed.

Nova launcher works well on CM. As for theming not so many choices unless you delve into Xposed offerings. I strongly recommend you not mess with the internal CM theming engine. Nothing but headaches for those that have tried.

Orientation is a constant headache on HDX devices. Make sure auto rotation is enabled both in settings and whatever launcher you settle on. If still no joy you may need to backup your current ROM (to preserve tweaks), flash an older build then restore your backup. That often fixes it. You'll also find some apps set their own orientation that is 180 degrees opposite of what you expect. Exposed module HaveOwnOrientation fixes that. Note this is different than OwnOrientation app on play store even thought both are from the same author; I use a paid version of the latter as it includes a serviceable UI.
[Kindle Fire HDX 7" & 8.9" General] draxie:
Live CD

1-Click is essentially a minimal live CD,

but I opted for "serving" it via VirtualBox

(instead of bare metal), due to less hassle

for the end-user (when it works).

I might reconsider, but I think that those

that are comfortable with a Linux Live CD

would just as easily use all the scripts out

there....
[Kindle Fire HDX 7" & 8.9" General] DB126:
[MENTION=5828306]draxie[/MENTION] - if time is at a premium I wouldn't invest in a revised 1-click. The method out there now works fine, especially with your semi-automatic unlock code generation/application script. The number of unlock attempts (at least those with some public acknowledgement) has dwindled as gadget lovers continue to drift away from tablets in favor of 'sexier' handhelds.
[Kindle Fire HDX 7" & 8.9" General] trlkly:
I didn't answer the 64 bit question because I didn't figure it mattered after I got it worked out. But, yeah, I use 64-bit Windows. Driver signature enforcement has been turned off for a while, since I find the warning sufficient.

It just seems silly to me that Windows needs all these device specific drivers when Linux just needed the programs.

And I wasn't saying you need to make a live CD (though that would be awesome). I was just saying that using one might be a tool in you guys' toolkit when the usual instructions aren't working. Get the Ubuntu live CD, save the necessary files ahead of time, rebootband run those aptget commands, and run the scripts.

I will look into the other things mentioned, includonthe other ROM.

Also, i 'm surprised anyone would get a handheld except for gaming. They suck for most of what a tablet is good for. I would have assumed the bigger phones were replacing tablets.
[Kindle Fire HDX 7" & 8.9" General] DssTrainer:
Feels like these steps are missing some setup...

Kingroot doesn't work for me. Trying other methods to root but none seem current for 4.5.5.2. The link in post 5 requires you to be in fastboot but so far nobody tells you how to get into fastboot on an unrooted device.

adb reboot bootloader takes me to the kindle fire logo with "[fastboot]" but i can't connect with fastboot devices and power button doesn't seem to select anything.

So how do you start if the first step fails?
[Kindle Fire HDX 7" & 8.9" General] DB126:
KingRoot is an unsophisticated POS that does not explore all potential vulnerabilities (and/or test all possible exploits) on each run. Some report success only after dozens of runs. Performing a factory reset and not registering the device w/Amazon on restart sometimes helps. Others report success with the desktop variant of KingRoot.

Alternatively, use the riskier method linked in post #5. You'll need to install the drivers from the prerequisite section in this post. Getting the host machine to install the proper drivers and recognize the tethered device can be a PiTA depending on platform. Post back with machine type and OS version if you have difficulty with this step. A ready prompt on the HDX will indicate a successful fastboot connection. Don't be shy about changing USB ports and cables. Even if a cable works fine with ADB it may fail with fastboot. Avoid external hubs and USB3 ports on older hardware.

Once you have achieved root follow step #2 (only step #2) from this post to install a vulnerable bootloader and TWRP. Once TRWP is working you can test flash a KitKat based ROM or proceed with unlocking the bootloader.
[Kindle Fire HDX 7" & 8.9" General] DssTrainer:
Done and working fine. I have ADB working and it shows under device manager as Kindle Fire -> Android adb composite

windows 10

Using usb 2.0 but what do you mean "ready prompt"? How do I get into fastboot to begin with? Is "adb reboot bootloader" supposed to do it? That is the step that seems to be missing.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Yes - after issuing "adb reboot bootloader" your device will likely show "Kindle fire" in large font with the word "fastboot" in brackets below. If the word "Ready." isn't there you need to change drivers in Windows:

- open Device Manager

- you will likely see Android with a yellow explanation mark under Other devices

- right click the work Android and select Update driver

- select "Browse my computer ..."

- select "Let me pick from a list ..."

- select "Android Device" or "ADB Interface"

- try different composite drivers until the work "Ready." appears on HDX

Once that's complete you can use a limited subset of fastboot commands to complete prescribed tasks. Note you will probably have to select a different driver each time you toggle between ADB and Fastboot. PiTA.

Edit: Ignore warnings about unsigned drivers and/or needing to reboot Windows due to system changes; generally unnecessary.
[Kindle Fire HDX 7" & 8.9" General] DssTrainer:
And there it is... the most important part of the steps. That's what I was looking for.

So the KF actually requires a driver response from the PC to trigger the "Ready" signal... that's key.. that's unlike any other android device that will just boot to fastboot regardless of usb connection.

I'll work with this. Thanks so much!
[Kindle Fire HDX 7" & 8.9" General] DssTrainer:
Still no luck... tried 4 different cables. 3 different usb 2.0 ports

device manager shows Android adb composite and adb works fine

But adb reboot bootloader also just goes to the kf logo with the words "[fastboot]" but never ready.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Almost certainly a Windows driver issue. Keep trying different options under the Android and ADB categories. The driver package linked in prior posts usually works but you may need to experiment with others. For me a Motorola composite driver is the most reliable with Amazon devices; go figure. As previously noted the driver used with ADB communication probably will not work for fastboot.

Further thoughts:

- disconnect everything and reboot both devices

- with device tethered (no ready prompt) delete entry in device manager

- disconnect/replug device then manually guide Windows through driver selection

- repeat as needed

- got another PC? Try that one

- Linux fluent? Almost always works on the first attempt; no special drivers
[Kindle Fire HDX 7" & 8.9" General] draxie:
Interestingly, I ran into the same issue with a Linux laptop and my trusty HDX

that had ALWAYS worked before. If I remember correctly I had to disconnect

the power adapter to get it to work (or the other way around, but that would

actually make some sense; so, I'm almost sure that wasn't it). Totally nuts...
[Kindle Fire HDX 7" & 8.9" General] DssTrainer:
ok i tried my laptop and got further. I changed the driver to "Android Bootloader Driver".. and got "Ready" showing. Also tried with "Android Composite ADB Driver" and that also showed me Ready.

I now have "Ready" showing up on my KF in fastboot

But that's all. Still can't run the wmic commands as they say "No instance(s) available) ... and "fastboot devices" doesn't show any devices. So I still cannot communicate with it even though it appears to be ready.