yashsingh1/xdaforums huggingface dataset:
[Kindle Fire HDX 7" & 8.9" General] DB126:
After pondering a couple options I believe the safest path is to unlock the bootloader (realize this apparently failed before) and reflash twrp. That will yield a known configuration that is suitable for flashing CM13 or other HDX compatible ROMs.

Currently your device is in an unknown/unproven state. You should not have been able to flash TWRP 3.0.2 or CM-13 with a locked bootloader. Safestrap remnants are also concerning. Normally I would advise a full wipe and reflash of the system partition but that could have unfavorable outcomes given the potentially unstable config.

If CM-13 boots don't change anything! Retrace and repeat steps taken to unlock the bootloader, correcting any errors as needed. Once the bootloader is successfully unlocked return to CM-13 and use Flashify (available in the Play Store or via apkmirror) to backup your current recovery and flash HDX build of TWRP 3.0.2.

Once complete power down device and then restart via <power>+<vol-up> to confirm native TWRP 3.0.2 is properly installed in the recovery partition. That's your proof positive confirmation the device is unlocked. From there you can proceed with a full wipe (system, data, dalvik and cache partitions; can leave "internal storage" as is) and then reflash CM-13 plus a suitable GAaps package (suggest nano). Be sure to flash GAaps concurrent with CM-13; doing it later often leads to problems (generic CM 12/13 issue). Alternatively, you could go with Nexus 6.0.1 which is all inclusive; just one zip to flash!

Sorry for the novel. Again, ask questions as needed. Good luck.
[Kindle Fire HDX 7" & 8.9" General] nhatanh181:
Good news! I got the bootloader unlock. I don't know why this time it works. May be your assurance give me confidence. Thank you!

I still want to use amazon prime benefits. Is there anyway i can have CM with kindle ROM ?
[Kindle Fire HDX 7" & 8.9" General] DB126:
lol - no. One or the other. But most Prime benefits can be obtained through Amazon apps available through the Play Store. A notable exception is "Amazon Underground" (shopping and Prime Video) which must be obtained directly from Amazon. Google refuses to host it as offers apps (often free) that are available for purchase in the Play Store.
[Kindle Fire HDX 7" & 8.9" General] nhatanh181:
CM13 is really tempting, but i must use kindle ROM to get a free borrow book every month (only thing i hold on to the crazy FireOS).

So i found this twrp compatible: http://xdaforums.com/kindle-fire-hdx/development/recovery-twrp-3-0-0-0-t3322547

I re-write down your steps to be sure that i get it right:

1 . Back up current recovery img with Flashify

2. Flash the twrp in the link above

3. Boot into recovery and Wipe Dalvik/Data/Cache/System and flash ROM

I can find anywhere stock recovery, does twrp back it up somewhere?
[Kindle Fire HDX 7" & 8.9" General] DB126:
Stock recovery was replaced when TWRP was flashed (no auto backup). Seems you prefer FireOS. What ROM is installed now? Care must be taken reinstalling FireOS to avoid a potential brick scenario.
[Kindle Fire HDX 7" & 8.9" General] nhatanh181:
It's running CM 13 with twrp 3.0.2-0 ( i know lot of people would be happy to trade place with mine). The kindle is 7", the ultimate goal is to reverse to the original design with stock recovery, fireOS with safestrap and CM 11.
[Kindle Fire HDX 7" & 8.9" General] DB126:
You're not going get stock recovery back (easily) nor is there any reason to. It sounds like you were running FireOS in the STOCK slot and CM 11 in a secondary slot. You decided which ROM to use (FireOS or CM 11) when the device booted. You used CM 11 most of the time but booted FireOS on occasion to grab a free book (more accurately borrow a book from the Kindle Owners' Lending Library). Is that correct? Sorry for all the questions but it's important to understand the desired end state.

Although you may not have known it running multiple ROMs under Safestrap v4 (a special version for HDX devices) introduces significant problems. ROMs in secondary slots never sleep and can only utilize two of the four available processors. The two active processors are locked full throttle increasing heat and taking a toll on battery life. WiFi and/or Bluetooth radios don't always work in secondary slots although CM11 seems to be an exception.
[Kindle Fire HDX 7" & 8.9" General] nhatanh181:
Yes, that's the end game i'm looking for. Everything could have been like that nice and easy until i came across this thread. OP should have give a warning about how difficult it will be to reverse back the process. I always thought unlocked is better than locked so i can get CM13 running with FireOS, but it turns out to be one way street. I'm aware of heat and battery life while running safestrap, but i have no other options given the desire to have a free book every month.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Understood. You''ll need a special build of FireOS to accomplish your objectives without jeopardizing the device. I have put a request in to another contributor who has done this before; let's see what comes back in the next 24-48 hours. There are other options but all involve more work, risk or both.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Checking in. The contributor mentioned above has not responded to my inquiry and has been absent from XDA (no posts) for nearly two months. Thinking he may be out-of-pocket for awhile.

You need a custom build of FireOS that can be flashed with TWRP. A stock version downloaded from Amazon would likely brick your device. At present only version 4.5.5 is available which is not rootable. That means no Safestrap or CM11. While fully functional it can not be upgraded or rolled back as both operations depend on the Amazon stock recovery which has been overwritten by TWRP. Catch 22.

Up to you: hang on CM 13 (or any other

custom

ROM) or fall back to v4.5.5 which will leave you with pure FireOS. Conceivably you could keep backups of CM 13 and FireOS on your device (assuming a 32/64 GB model) and toggle back and forth by restoring archives in TWRP. Very messy. Alternatively, you can create your own custom FireOS 4.5.5.1 build using a python based developer tool. Doesn't look that tricky once you have python and associated libraries up an running on a suitable host.
[Kindle Fire HDX 7" & 8.9" General] nhatanh181:
I will take your advice and stay still with CM for now. One small concern though, should i leave the unlocked bootloader be unlocked?
[Kindle Fire HDX 7" & 8.9" General] DB126:
CM 13 (and most other custom ROMs for this device) and twrp require an unlocked bootloader. There are no risks, exposures or potential 'gotchas'. FireOS runs fine on unlocked devices. No need to relock.
[Kindle Fire HDX 7" & 8.9" General] houkai4355:
/system/bin/sh: python.exe: not found

can not done the step 1.2 after install pyhon2.7 and gmpy2.2.0.2, I am a newbie,sry!:confused:
[Kindle Fire HDX 7" & 8.9" General] DB126:
If you post your device manfid and serial another contributor may provide an unlock file. There is no risk publicly posting these values (and the corresponding unlock file) as they are only applicable to your device.
[Kindle Fire HDX 7" & 8.9" General] ONYXis:
Seems you tried to do this in adb shell

you need to do this in cmd
[Kindle Fire HDX 7" & 8.9" General] DB126:
[MENTION=5594063]ONYXis[/MENTION] - was looking through OP again and noticed an important detail: seems twrp can be flashed on any 3rd gen HDX without first unlocking the bootloader. Explains why a recent poster was able to install twrp (and apparently flash cm13) despite a failed unlock (he subsequently fixed it). Any known issues/limitations aside from those imposed by the locked bootloader itself?

All my devices are unlocked so I didn't pick up on this earlier (just skimmed the OP). I can see situations where getting twrp working without immediately unlocking could be advantageous.
[Kindle Fire HDX 7" & 8.9" General] houkai4355:
all done

thanks， I have flashed cm13
[Kindle Fire HDX 7" & 8.9" General] ONYXis:
Twrp image signed with cuber and vulnarable bootloader 3.2.3.2 can boot it without unlocking.

As for CM13 I remember what our devs wrote that is not enough to sign boot.img of custom rom with cuber to work, but I do not tried.

Sure, we can use twrp without unlock as advanced recovery, but why?
[Kindle Fire HDX 7" & 8.9" General] DB126:
Ah - thank you! Makes sense now as leveraging vulnerable 3.2.3.2 bootloader (missed that). As for custom ROMs I would never advocate flashing on a locked bootloader unless explicitly indicated it is acceptable by dev (currently only KitKat based roms).
[Kindle Fire HDX 7" & 8.9" General] AnyAndroidOSWins:
OK, I followed the instructions, but when I do

I get the message
[Kindle Fire HDX 7" & 8.9" General] DB126:
Data string is mis-formatted. Recheck the example in step 1.2 of the OP.
[Kindle Fire HDX 7" & 8.9" General] AnyAndroidOSWins:
Thanks for your reply

I can't seem to figure out what I'm doing wrong, could you give me the command?

My manfid: 0x000015

My Serial: 0x2ba64a9a
[Kindle Fire HDX 7" & 8.9" General] DB126:
==> python.exe cuberHDX.py 0x152ba64a9a
[Kindle Fire HDX 7" & 8.9" General] AnyAndroidOSWins:
Thanks for your help!

Now I have TWRP 3 on my Fire HDX, and I can now install CM 13, and have multi windows (and security stuff). :o:D
[Kindle Fire HDX 7" & 8.9" General] pt254:
Hey,

I have followed all steps and got the message that I unlocked the bootloader. How do I go on? Whenever I start the device it boots into fastboot - but on my Mac, fastboot does not list the device (sudo does not help). Any idea?
[Kindle Fire HDX 7" & 8.9" General] DB126:
If you followed the OP (first post) step 2 involves installing TWRP which provides an environment for flashing a custom rom. You'll need to do that regardless so give it a go.

Unfortunately, can'tt help with the Mac question. On Windows proper drivers must be installed for the device to be addressable when in fastboot mode. Probably need to poke around the forums for a Mac/OS X solution. Of find a friend with a Windows desktop/laptop.
[Kindle Fire HDX 7" & 8.9" General] pt254:
thank you for your answer.

I executed all steps including flashing twrp - how do I get to twrp from fastboot?
[Kindle Fire HDX 7" & 8.9" General] AnyAndroidOSWins:
It says in the OP "Hold Volume Up while on the grey kindle logo to get to TWRP" IFRC (If I Remember Correctly).
[Kindle Fire HDX 7" & 8.9" General] DB126:
Procedure is the same on virtually every android device:

- untether device (no charger or usb connection)

- (optional) long press <power> to insure device is powered down

- press and hold <power>+<vol-up>; release buttons when screen comes on

- after a few seconds device will enter recovery mode

If you have never messed with TWRP do some light reading on how to wipe partitions, flash roms, perform backups, etc. It's a powerful environment with limited safeties to prevent irreparable damage and/or data loss.
[Kindle Fire HDX 7" & 8.9" General] DonGrinch:
Cant install gympy on windows

Hi guys,

I am trying to install Gympy2 desperatly on windows just compile the file, but fail.

Could you pls create the unlock file for me?

here are my values

manfid

0x000045

serial

0x098501b2

Thanks so much. I would use the 1 click utility but I cant download it.....
[Kindle Fire HDX 7" & 8.9" General] DB126:
For awareness: http://xdaforums.com/kindle-fire-hdx/general/multi-platform-1-click-bootloader-t3241014/post69555212
[Kindle Fire HDX 7" & 8.9" General] DonGrinch:
Wow srsly how arrogant are you? You sit on the tool, enjoy writing people thay have bad luck (not just to me) and try to make this place as unfriendly as possible. Not an ahole at all and RLY a example of positive community work.
[Kindle Fire HDX 7" & 8.9" General] AnyAndroidOSWins:
Try installing "gmpy2-2.0.8.win-amd64-py2.7.exe" from this page: https://pypi.python.org/pypi/gmpy2#downloads

I hope for the best. :)
[Kindle Fire HDX 7" & 8.9" General] DonGrinch:
Thanks, I already tried that. But it keeps telling me, that it cant find Python 2.7 in the register. I installed the Python 2.7 but still gmpy installer cant find it. :/
[Kindle Fire HDX 7" & 8.9" General] AnyAndroidOSWins:
It may seem obvious, but have you tried re-installing Python 2.7?
[Kindle Fire HDX 7" & 8.9" General] unhappybirthday:
I had an issue (with another application) that required python on Windows because I had installed 32 bit vs 64 bit python. Don't know which is right for gmpy but you could try that.
[Kindle Fire HDX 7" & 8.9" General] stangri:
Good luck!
[Kindle Fire HDX 7" & 8.9" General] DonGrinch:
Many thanks!

Hi guys, many thanks! It workes the unlock file is awesome.

Now i am running on Anroid 6! You think there is gonna be Android 7 as well?
[Kindle Fire HDX 7" & 8.9" General] DB126:
One of the primary devs has indicated an intention to work on a Nougat build as time permits (life and job keeping him busy). Amazon devices present unique hardware challenges as you'll see from the various threads. Depending on usage you may run into camera, Bluetooth, WiFi and/or display orientation issues. Some can be mitigated, others not. Best approach is to search the relevant ROM thread first and then ask if needed.

Also, various Play Store annoyances which is really just Google being fussy around perceived device/rom compatibility. Most (virtually all) apps run fine when sideload.
[Kindle Fire HDX 7" & 8.9" General] Oh_wow:
WAY out of line...Davey has been a constant source of help on this device for years...look at his number of posts and his thanks button....good grief
[Kindle Fire HDX 7" & 8.9" General] DonGrinch:
Not out of line at all, he behaved like a jerk. Sitting on his tool - TRUE, writing people thay have bad luck - true, writing other not to help me - TRUE. So how is he not arrogant?
[Kindle Fire HDX 7" & 8.9" General] DB126:
Historical context: http://xdaforums.com/kindle-fire-hdx/general/multi-platform-1-click-bootloader-t3241014/post69555212
[Kindle Fire HDX 7" & 8.9" General] stangri:
I wish I read it when it was first posted.
[Kindle Fire HDX 7" & 8.9" General] DonGrinch:
The thread was deleted by the admin, sooooo why do you think that Davey is si great?
[Kindle Fire HDX 7" & 8.9" General] DB126:
Let's get the facts straight. Forum moderator deleted several caustic posts by [MENTION=4117027]DonGrinch[/MENTION] and warned against reoccurrence.

Reputations are built over time. The very first post under user name [MENTION=4117027]DonGrinch[/MENTION] was an insulting rant against a long time fellow XDA contributor (linked above) who has selflessly shared his considerable time and talents with the XDA community. The free '1-click' bootloader unlock utility is under revision. The author opted to pull it for reasons of his own choosing. He does not need to provide an explanation.

Those who traffic in caustic behaviors/language will draw a response from those who actually contribute helpful material to the community. My only regret is not reporting the original demeaning post to a moderator instead of offering council and pointing to this thread where a solution was ultimately provided by another member.

[MENTION=4117027]DonGrinch[/MENTION] is entitled to his/her opinion regarding other XDA contributors provided it does not involve personal attacks or inappropriate language. I am not looking to win anyone over.
[Kindle Fire HDX 7" & 8.9" General] stangri:
Finally received my Apollo (came brand new), followed the tutorial to flash CM13 followed by magisk (so I could "systemize" apps without putting them in the space-limited /system partition). Everything is working perfectly! Thanks again for the tutorial and the python script!
[Kindle Fire HDX 7" & 8.9" General] DB126:
Interesting use of Magisk!
[Kindle Fire HDX 7" & 8.9" General] cohomology:
I am very lost here. Title says this unlocks any firmware and refers to the multiplatform tool. But the multiplatform tool thread still requires 3.2.3.2 or earlier. Which one is correct?
[Kindle Fire HDX 7" & 8.9" General] DB126:
The multiplatform tool is offline at present (pulled by developer). However, you can manually unlock the bootloader on ANY rooted 3rd (not 4th) gen HDX using the procedure outlined in the OP. Not that difficult; a bit of technical background helps.

Note: the ability to unlock the bootloader on any 3rd gen HDX was only realized in mid-September 2016. Earlier posts may still reference the FireOS 3.2.3.2 prerequisite which was the best knowledge at the time. Technically still true; it's the ability to rollback to a vulnerable bootloader w/o bricking the device that was 'discovered' by [MENTION=5594063]ONYXis[/MENTION].
[Kindle Fire HDX 7" & 8.9" General] androidchef97:
EDIT: I had some major problems and rewrote the script so it works with python 3.4.

enjoy
[Kindle Fire HDX 7" & 8.9" General] tvd0405:
How did you get out of fastboot mode?

Was able to boot into recovery, flashed cm13 and i am good to go. The latest nightly of cm13 has boot loop. I flashed the oldest nightly 11/6 and it booted fine. I have not tried other versions.
[Kindle Fire HDX 7" & 8.9" General] DB126:
- to determine active slot boot into Safestrap recovery and examine text near top of screen; current slot will be clearly identified

- there are several methods for exiting fastboot while tethered depending on situation; long pressing power button (8-20 sec) always works

What is your situation and objectives? Didn't find a post history in this thread.
[Kindle Fire HDX 7" & 8.9" General] tvd0405:
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.

Has anyone successfully flashed the stock repacked latest 4.5.5.2 rom? I kept getting symlinks failed message.
[Kindle Fire HDX 7" & 8.9" General] tommai:
Hi, could someone please create the unlock file for me?

I'm already stuck with installing/running python :crying:

manfid

0x000015

serial

0x3934b68f

Much appreciated!
[Kindle Fire HDX 7" & 8.9" General] Apfelman123:
0x000045

0x09990369

Tank you :)

have done it myself :)

bootloader unlocked :)
[Kindle Fire HDX 7" & 8.9" General] Apfelman123:
View attachment 0x153934b68f.rar
[Kindle Fire HDX 7" & 8.9" General] tommai:
Thanks! Worked like a charm.
[Kindle Fire HDX 7" & 8.9" General] CrankyOldEngineer:
ONYXis: I cannot thank you enough. Bravo!

CrankyOldEngineer
[Kindle Fire HDX 7" & 8.9" General] p-4:
I was able to create an unlock file. But I have a few questions for the 2nd step. My Fire HDX 7" has at the moment CM11 with safestrap.

Do I have to go back to FireOS or can I just proceed?

I think that I had FireOS 4.5.2 and Safestrap 4.0.1.

Do I have to remove Safestrap. If yes how do I do that?

Thanks
[Kindle Fire HDX 7" & 8.9" General] chastbi:
I did it successfully from the same setup you currently have without reverting back to FireOS or removing Safestrap.
[Kindle Fire HDX 7" & 8.9" General] DB126:
You can unlock the bootloader without uninstalling CM11 or Safestrap. There's no risk; unlock code/procedure will work or not. Further, your existing Safestrap/CM11 environment will remain intact and fully operational until changed.
[Kindle Fire HDX 7" & 8.9" General] p-4:
[MENTION=1578685]chastbi[/MENTION] and [MENTION=5488402]Davey126[/MENTION] thanks a lot.

I unlocked the bootloader successfully and I was able to boot into TWRP. But I performed a factory reset before copying the new rom on the device :/

How can I copy the rom now on the device? Because I dont see the device anymore in my windows file manager.

I tried it with adb push but it says:

error: device unauthorized.
This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
[Kindle Fire HDX 7" & 8.9" General] Apfelman123:
Boot into TWRP and then connect you fire HDX with your PC. Then you see your device and can copy the rom on it.
[Kindle Fire HDX 7" & 8.9" General] p-4:
I just did that and Windows makes that sound that a device connected. And in the taskbar I have the option to throw the Fire HDX out.

But i still dont see it in my windows file manager

EDIT: I tried it on my laptop and there is worked. Thanks ;)
[Kindle Fire HDX 7" & 8.9" General] p-4:
I just tried installing CM13, but it boots for more than 20 min, and than I shut the device down.

I installed in TWRP: CM13, GApps and SuperUser.

Why did the rom not start?

What should I Wipe? Only the normal factory reset or also the other partitions?
[Kindle Fire HDX 7" & 8.9" General] DB126:
CM 13 nightly builds are broken after Nov 7th. Please read/search the rom thread for answers before posting.

Edit: Try CM 12.1 or Fire Nexus 6.0.x (MM based).
[Kindle Fire HDX 7" & 8.9" General] p-4:
Ohh, i didnt saw that. I just looked at the first page :angel:

Thanks;)
[Kindle Fire HDX 7" & 8.9" General] Draekhost:
Thank you all for the amazing information. I had to use the PdaNet drivers (which Windows 10 didn't like at all), but after getting them installed the rest of the process worked! I'm now running Android 4.4.4 / Fire Nexus ROM. I saw that the latest Fire Nexus ROM may have Bluetooth trouble at the moment, and I usually use a wireless keyboard to code on the road. I decided to go with an older, more stable version until it looked like Bluetooth wasn't an issue. This forum is amazing. I definitely learned a lot, was probably in over my head a bit, but kept at it and didn't move forward until I knew exactly how the next steps should play out. I'm so stoked to have all the Google syncing I've been wanting since getting an apollo years ago. THANK YOU!
[Kindle Fire HDX 7" & 8.9" General] DB126:
Well done - especially the research/digest/plan/action sequence which so many do in reverse (or simply omit the first three steps altogether). Some pretty amazing people in the HDX forums who unselfishly share their time and talents. Enjoy your liberated HDX!
[Kindle Fire HDX 7" & 8.9" General] Draekhost:
Ain't that the truth! I'm really blown away by the sheer landslide of support and development going on in here. I'm not savvy at all with Android development. At best, I know some basic web development and programming. Learning how to unlock this HDX let me see how many different approaches people have tried in order to make this process work for others. It's truly amazing, and I'm grateful for all the time everyone spent to figure it out and break it down for folks who don't know as much. You all rock :)
[Kindle Fire HDX 7" & 8.9" General] idowens:
Help: Stuck on unlocking bootloader

I followed these same steps. 4.5.5.2 to 3.2.8 to 4.5.2, then root. I can enter bootloader via adb (Running via Terminal on my Mac). I'm getting stuck at unlocking the bootloader, however. Regardless of my correct unlock file, I keep getting the 'wrong unlock code' message.

Using the cuberHDX.py method, I've tried tried creating a file with and without prepending the '0x' (as I've seen it successful both ways on XDA.)

manfid = 0x000045

serial = 0x81f578ed

For cuberHDX.py, I've tried

./cuberHDX.py 4581f578ed

and .

/cuberHDX.py 0x4581f578ed

. Both result in an unlock file (dropped on my desktop).

When I move these files to my folder including adb/fastboot, and then enter bootloader, verify my device is found (

fastboot -i 0x1949 devices

), and then attempt the actual unlock

fastboot -i 0x1949 flash unlock 4581f578ed.unlock

OR

fastboot -i 0x1949 flash unlock 0x4581f578ed.unlock

, I get 'Unlock code is NOT correct' both ways.

Actual response from Terminal is:

user-mbp:platform-tools user$ ./fastboot -i 0x1949 flash unlock 4581f578ed.unlock
target reported max download size of 536870912 bytes
sending 'unlock' (0 KB)...
OKAY [ 0.084s]
writing 'unlock'...
FAILED (remote: Unlock code is NOT correct)
finished. total time: 0.142s
user-mbp:platform-tools user$

Can anyone help point me in a better direction? My goal is to have GAPPS (framework, services, store) running in tandem to 4.5.2 or either flash a custom ROM (e.g. CM.)

Many thanks in advance.