yashsingh1/xdaforums huggingface dataset:
[Kindle Fire HDX 7" & 8.9" General] slvr32:
I appreciate the response, and the suggestion, but I vaguely recall that a number of the KitKat-based ROMs (CM11, Nexus) seem to have similar issues, and my best guess is that there may have been partitioning/device changes at some point between KitKat and Lollipop (CM12, Android 5.x) and Marshmallow (CM13, Android 6.x) that somehow make it problematic to downgrade from ROMs based on later Android versions.

I believe I tried to flash CM11 yesterday, and the setup wizard on first boot kept crashing, before I even had a working wifi or cellular connection, ahead of entering any google account information, etc... although it did show cellular connectivity just before it got stuck in the setup/crash loop.

I've gone back to CM-13 a few times now, after various unsuccessful attempts to flash various TWRP-friendly zips of KitKat-based ROMs., and I've had CM-13 on my OnePlus X for quite some time, and it's a really nice ROM, minus the lost LTE connectivity on the HDX.
[Kindle Fire HDX 7" & 8.9" General] Mr McBoatface:
I believe the Fire HD 8.9 2nd generation had those problems and bluetooth errors too , but thought the HDX worked better. There is a MM nexus rom you could try - https://xdaforums.com/kindle-fire-hdx/orig-development/rom-fire-nexus-rom-t3485434. But Davy126 had a sim detection error on that build.

What version TWRP are you using ?
[Kindle Fire HDX 7" & 8.9" General] slvr32:
I'm using the twrp_cubed.img TWRP, from the first post in this thread, which shows 3.0.2-0 when I boot to recovery.
[Kindle Fire HDX 7" & 8.9" General] slvr32:
It looks like this may be the trick for the flash 'error 7' issues, i.e. clean wipe from recovery, then reboot 'from recovery to recovery' again, and then try the flash again.

https://xdaforums.com/showpost.php?p=65581694&postcount=23

I actually did this with the twrp-thor-13.4.5.5_user_455001320.zip package first, and then after that worked, I decided to do (without leaving recovery) an adb sideload of the 4.5.5.2 image from the first post in this thread, and that also worked.

I'm now back to 4.5.5.2.

Of course I can still boot recovery with the following from my (linux) PC...

$ fastboot -i 0x1949 boot twrp_cubed.img

Thanks again for your suggestions, since they indirectly led me to find the 'clean wipe, reboot to recovery, try to flash again' solution, and maybe that detail is worth adding to the first post documentation.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Yes - I have found this approach effective for addressing several different types of 'flash errors' on this device. Personal SOP for clean installs:

- (optional) backup

- full wipe (system/data/dalvik/cache)

- reboot recovery

- flash rom/components

- accept cache/dalvik wipe if offered

- reboot system

I recognize some of these steps are redundant and/or unnecessary but it yields a consistent experience with little added time/effort.
[Kindle Fire HDX 7" & 8.9" General] slvr32:
Please excuse the extra chatter, but I also wanted to thank the OP and the contributors in this thread, since I (also) now have a much better 4.5.5.2 setup w/unlocked bootloader, TWRP, trivial rooting and flashing, better Google Play Store support, Xposed, etc... after searching for a few more things related to my new HDX reality, e.g.

https://xdaforums.com/showthread.php?t=2787813 (improved Google Play Store w/rooted device vs not being rooted before)

https://xdaforums.com/xposed/xposed-android-4-4-4-t3249895 (Xposed fix that works w/4.5.5.2)

https://xdaforums.com/showthread.php?t=2618158 (HDXPosed)

Edit: On second thought, a more functional Google Play Store and HDXposed have a few caveats, e.g. Google Play Services 10.0.84 creates apparent latency (network or other) in several apps and/or breaks certain apps and/or install efforts, so the practical compromise is more of a semi-functional Google Play Store, HDXposed module disabled, reverting to Google Play Services 9.8.77, etc... and slightly older versions of some apps, e.g. Google Docs, Google Sheets, Gmail, Maps, etc... that work reasonably well w/FireOS 4.5.5.2, but root and Xposed are still useful for a few other things.

I'll probably give CM11 and CM12 and Fire Nexus and other ROMs longer looks another time.
[Kindle Fire HDX 7" & 8.9" General] bileg:
thank you

Thank you everybody. Fyi for Python you need 2.7 version otherwise it will give you that

Print... problem. Google Gmpy2 you can find .exe file that you can install. For people that having problem with Not correct unlock code

python.exe cuberHDX.py 0xmmssssssss

mm stands for last 2digit manfid

ssssssss stands for serial #.

After 24hrs messing with it, almost wanted to just throw it out the window.?
[Kindle Fire HDX 7" & 8.9" General] draxie:
Stop the madness

I apologize in advance for venting my frustration right here, right now,

but I got so awfully tired of these posts that I decided to remove that

obsolete archive with cuberHDX.py from my old post [MENTION=5594063]ONYXis[/MENTION] linked to

(no idea why, I must say), and added a link to the newer tool that had

fixed all known issues years ago (it ran on the then-most-recent 3.x

series python and does NOT need gmpy2 at all).
[Kindle Fire HDX 7" & 8.9" General] DB126:
I'll have a more comprehensive response later (travelling) but you're on the right track. HDXposed is obsolete and there are easy workarounds to some of the other issues without having to pin older GAaps builds. Stay tuned.
[Kindle Fire HDX 7" & 8.9" General] fldash:
Would love to hear more... I installed Google Account Manager, Google Framework Services (both that target Android 4.4) and Google Play Service 9.8.77 and the latest Play Store but I'm getting the RH-01 error in the play store. I loaded Google Play Games thru PureAPK app and it is working well without any issues however. The Google Play Services app also launches as well and seems to work fine...
[Kindle Fire HDX 7" & 8.9" General] DB126:
Rereading in a proper environment it became obvious the context was GAaps on FireOS v4 vs a custom HDX ROM. The former will almost always be a less than satisfying experience; I have long abandoned attempts to codify the ever shifting mix of Play Services components and versions that work with FireOS v4... today... maybe tomorrow... probably not next month as interdependencies and back end assumptions continue to evolve. GAaps compatibility is less of an issue on FireOS v5, possibly due to Lollipop roots, different component builds or closer AOSP alignment (cough). I don't dislike FireOS but one needs to understand integration with Google Play Services is not part of Amazon's play book.

Bottom line: Need to go with a custom ROM if you seek a stress free GAaps experience on a 3rd gen HDX.
[Kindle Fire HDX 7" & 8.9" General] fldash:
Thanks. I like FireOS if I have to run Android 4.4. The lack of stable bluetooth on non-Fire OS roms greater than or equal to 5.0 is a deal breaker for me, so that pretty much leaves CM11 or FireOS.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Don't forget Fire Nexus HDX which I ran for nearly 18 months. No issues with bluetooth.
[Kindle Fire HDX 7" & 8.9" General] slvr32:
One more off-topic update for FireOS 4.5.5.2 (w/unlocked bootloader, root, Xposed, etc....)

I actually managed to get Google Play Services 10.0.84 working perfectly this morning, (no more weird latency issues), and Google Play Store is also updated and working perfectly, w/HDXposed activated, after a slight amount of tinkering, and updating Google Account Manager, Google Services Framework, and Google Play Store... using the following post for hints on app versions...

https://xdaforums.com/showpost.php?p=69618386&postcount=163

I also removed my Exchange account from the stock FireOS app, and added the Exchange account to the (updated) Gmail app instead, after I updated several of my apps via normal Google Play Store app updates.

Notifications still suck, e.g. Gmail email notifications, but overall this is now the best, most current setup of apps (Google and others) I've ever had on my HDX7 w/FireOS.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Great! With a bit of luck those versions will continue to work going forward. Thanks for posting your experience, findings and (implicit) recommendations.
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
Stuck at 1.2 Instructions

Can someone tell me where I am going wrong? I am rooted and running 4.5.5.2 Fire OS. When I enter the python.exe it tells me it is not found. I would really like to unlock the bootloader and drop Fire OS.

Thanks.
[Kindle Fire HDX 7" & 8.9" General] DB126:
- do not quote the entire OP; burdensome to scroll through on small screens

- see if you can find a friend to help with installing and executing programs on the host you are using
[Kindle Fire HDX 7" & 8.9" General] schwinn8:
python.exe is a windows program - not something you run on the phone. You need to install python on your computer and (and gmpy if required) and run it in the windows command line... not in ADB.

There is a version of cuber for ARM, which you can run on ADB... that might be easier than installing python and gmpy, etc. See https://xdaforums.com/kindle-fire-hdx/development/pure-c-implementation-cuber-using-t3241011/ Don't just download and run what you see there... there's a bit of reading and understanding to do before you jump in to the activity. I would suggest running cuber using some of the other people's codes shown on this thread, to make sure you're getting the same EXACT unlock file... so you know you're doing that part right before trying to flash it on your device.

Please be sure to read LOTS more before attempting anything, because you may brick your device otherwise. If you have questions, certainly ask... I know I'd rather hear questions before you break something.
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
I did install Python and gmpy, I will read more and try what you posted. Thanks....This is the first device that has been a struggle to root and unlock the bootloader.
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
XDA is my go to. I wish I had a friend here who could help me.
[Kindle Fire HDX 7" & 8.9" General] stangri:
Post the required values from your device as a text, I'll create an unlock file for you.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Error message suggests python executable can not be found. Either change to the folder where python.exe is installed or specify the full path when calling python. Keep in mind cyberhdx.py must live in the same folder as python or have its path specified.
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
That would be AWESOME! Thanks.

Manfid 0x000045

Serial 0x81f493c7
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
Thanks! I am guessing I unzip, change to a bat file and run in adb
[Kindle Fire HDX 7" & 8.9" General] stangri:
Yes, you need to unzip. You only need one command to unlock the bootloader, but sure, you can create a bat file.
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
Not trying to be a pain...What steps do I do? Thanks
[Kindle Fire HDX 7" & 8.9" General] DB126:
Go back to OP and follow steps #2 and #3. [MENTION=2226076]stangri[/MENTION] did step #1 on your behalf. Be very careful with step #2. Device will brick if incorrectly executed.
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
Thanks! That worked I am unlocked.....4 days of struggle and I got it thanks to all of you guys!
[Kindle Fire HDX 7" & 8.9" General] DB126:
Great! Suggest flashing CM 14.1 as older ROMs will not be supported going forward. Enjoy your liberated device!
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
Liberated is right! Thanks again everyone for the help on this.....I was worried the refurbished deal I got for this little tablet with LTE was going to be a door stop.
[Kindle Fire HDX 7" & 8.9" General] DB126:
As you probably know Bluetooth and LTE support is lacking in most custom ROMs for this device (both work with a couple older KitKat based ROMs). The CM 14.1 developer is trying to address the issue as time permits. Everything else works very well.
[Kindle Fire HDX 7" & 8.9" General] pdanforth:
I have seen BT and LTE not working on some roms, I flashed kk-fire-nexus-rom-thor-20161017, so far it is working smoothly. I have not tested BT yet, I did get project fi working on it even though it only connects via Edge and not LTE (could be my area) I will try my cricket sim next and see what happens.
[Kindle Fire HDX 7" & 8.9" General] DB126:
KK-Fire-Nexus is an excellent ROM; ran it (and its predecessor) for nearly 18 months. Stable and feature complete...recognizing KitKat roots. Consider adding Xposed Framework, GravityBox and Greenify for extended capability.
[Kindle Fire HDX 7" & 8.9" General] Mr McBoatface:
Hi Folks, If you have followed this thread and unlocked your bootloader there is no need to use the TWRP bootloader upgrade "thor-bootloader-13.3.2.3.2_upgrade.zip" on the TWRP Flashable .3.2.3 Bootloader Upgrade thread.

The aboot_vuln.mbn from this thread and emmc_appsboot.mbn in the flashable twrp image are the exact same, both from "update-kindle-13.3.2.3.2_user_323001720.bin" offical amazon image.
[Kindle Fire HDX 7" & 8.9" General] PortableTech:
Could someone hook me up with an unlock file by chance?

cat /sys/block/mmcblk0/device/manfid

0x000015

cat /sys/block/mmcblk0/device/serial

0xf7189db3
[Kindle Fire HDX 7" & 8.9" General] econoblesse@gmail.com:
I have an HDX 7 3rd gen that I rolled back to 3.2.8 and rooted. I've been running cm11 and want to unlock my bootloader and upgrade my rom.

I'm stuck on step 1.2 of the OP "creating the unlock file. " I've installed python and gmpy2 and added cuberHDX.py. I have my mmfid (0x00015) and my serial (0xfe426409). When I enter the command 'python.exe cubrtHDX.py 0x15fe426409' I keep getting the message that the python.exe command isn't recognized. I've insured the python directory is in my path and tried adding path parameters to the directory in the command. Keep getting the same results. Don't know what I'm doing wrong. Need some help. Any suggestions?
[Kindle Fire HDX 7" & 8.9" General] mrvogl:
I'm having the same issue. I have a few python versions installed. I have my manfid and serial. I've tried running

python.exe cuberHDX.py 0x15ff264bc1 from the ADB shell, from a freshly opened CMD prompt, and by opening python and entering the command. When I run it from the same ADB shell as what I used to get the id and serial it says python.exe: not found.

I've been searching for hours trying to figure out how to unlock the bootloader. I currently have 10 tabs open reading threads and posts with information across 3 years. All the threads seem to be loops of redirects to other threads.

Step 1.2 of [Thor][Apollo] redirects me to a post that immediately redirects me to "this tool" which then says "Don't bother with the obsolete cuberHDX.py,

use cublock.py from this post instead." Which is almost 2 years old. Some of the new methods of doing things appear to use methods that are older than other methods. Trying to decipher the correct method is very confusing/time confusing.

EDIT: Ok I read back a few pages and I have opened a normal CMD prompt and navigated to the directory of my python install, currently I don't have cuberHDX.py and I'm wondering if I should get that or use cublock.py ? I do have cublock.py as I downloaded the "Tools.zip"
[Kindle Fire HDX 7" & 8.9" General] Mr McBoatface:
Assuming you have python, gmpy2 and cuberHDX all installed in the same folder and directory like " C:\ python27" you can create a simple batch file with notepad with the command "python.exe cuberHDX 0x15fe426409" inside. Make sure to save it as .bat extension and run it, it will create an unlock file with extension .unlock
[Kindle Fire HDX 7" & 8.9" General] mrvogl:
Has cuberHDX been removed? I can't find it. I saw a post a few pages back that said to use the new tools which I do have downloaded. I tried running python.exe cublock.py 0x000015 0xff264bc1 and it created an unlock.img not sure if that's useful for anything, I cant find cuberHDX nor an alternative method to create a .unlock file.:confused:
[Kindle Fire HDX 7" & 8.9" General] Mr McBoatface:
Was about to reply to you.... Looks like you figured out the command line structure for use with cublock.py which creates a .img file instead of a .unlock file. Both types are flashable from fast boot as per the OP. Personally I only ever flashed a .unlock file

Yeah CuberHDX was removed .... see a few pages back a post called "stop the madness"

The OP could do with a little update to reflect this.
[Kindle Fire HDX 7" & 8.9" General] mrvogl:
Thank you for the response. Yeah I noted his edit saying stop the madness with the cuberHDX removal, but it created more madness for me lol.

So I can flash the unlock.img to unlock the bootloader....? However information using this method is very limited. Is there a way to verify it's correct before flashing? Is there bootloader version limitations with cublock.py method? From my hours of research it seems only certain bootloaders could be unlocked until recently? This this thread says all bootloaders unlock yet reflects a method that has since been removed "cuber.HDX" so am I like the first one to potentially try this unlock.img? or is it known "mostly" safe just as .unlock?
[Kindle Fire HDX 7" & 8.9" General] DB126:
This is ridiculous. The replacement 'tool' is difficult to locate, non-intuitive and makes hard-coded assumptions regarding host folder structure. Give me a few minutes (maybe an hour) to whip up a concise set of instructions and reattach the original CuberHDX.
[Kindle Fire HDX 7" & 8.9" General] Mr McBoatface:
Personally I never had problems with cuberhdx , I have everything in my phyton folder and run a batch file to save all the command prompt issues people are having.

I'll leave it in your capable hands to come up with some instructions..... I'm about to head to bed
[Kindle Fire HDX 7" & 8.9" General] mrvogl:
Sounds good to me. This whole process has been difficult and non-intuitive for me. lol I'm usually pretty good at this sort of thing too. Not having ADB access due to a faulty USB port didn't help - I replaced that earlier today.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Supplement to OP

** THIS POST AUGMENTS STEP #1 FROM THE OP (FIRST POST IN THIS THREAD). READ THAT FIRST - THEN COME BACK **

** THIS POST EXISTS SOLELY TO ASSIST VISITORS WITH THE ORIGINAL UNLOCK METHOD OUTLINED IN THE OP **

** AN ALTERNATE TOOL EXISTS THAT DRAMATICALLY SIMPLIFIES THE UNLOCK PROCEDURE (AUTOMATES STEPS 1 & 3) **

** A LINK IS PROVIDED IN THE OP; MODIFICATIONS TO THE BATCH FILES MAY BE NEEDED; HENCE THIS POST **
​

The following assumes unlock code generation will be performed on a Windows PC/laptop running XP/Win7/Win8.x/Win10. You must know if you have a 32/64 bit installation, how to launch a Windows command prompt and navigate to various folders. Minimal ADB and Fastboot (or equivalents) should already be installed.

Please execute step #1.1 and step #2 from the OP before tackling the following procedure. Yes - it is ok to skip step #1.2 for now. Step #2 is dangerous if performed incorrectly. Attention to detail is key. There is no need to put yourself through the following procedure if you can't get through steps 1.1 and 2 (or if you brick device executing step #2 ... or opt to forgo bootloader unlocking and stick with KitKat based ROMs).

To generate unlock file (after executing step 1.1):

- install python 2.7.x from here (choose appropriate Windows installer)

- install gmpy2 2.0.8 from here (gmpy2-2.0.8.win-amd64-py2.7.exe)

- download, extract and copy cuberHDX.py attached to this post into c:\python27 folder created by python installer

- open a permanent windows command prompt (shell)

- navigate to c:\python27 folder: (cd c:\python27)

- enter the command shown in step #1.2 of the OP; this will create an unlock file and store it in the c:\python27 folder

- type 'exit' to close the windows command shell

Copy the unlock file created above to the folder where adb/fastboot commands (executables) are located on the host PC. Return to the OP and execute step #3 to unlock the bootloader.
[Kindle Fire HDX 7" & 8.9" General] mrvogl:
Thanks for the clear instructions, and thanks to the original poster ONYXis, between the two of them I was able to easily generate the unlock file and unlock the bootloader. I had a little hiccup "waiting for device" when trying to flash .unlock in fastboot mode. I installed the PDAnet adb drivers and that solved that. Besides that the only other advice I can give anyone else doing this is the 0xmmssssssss is a combination of manfid and serial. That wasn't clear in the original post, at least for me.

Ill use my device as an example, take the bold and add it to 0x:

manfid = 0x000015

Serial = 0xff264bc1

0xmmssssssss =

0x15ff264bc1
[Kindle Fire HDX 7" & 8.9" General] draxie:
Oh my... Don't get hung up on the filename. It's the contents that matter.

Just flash that 'unlock.img' the same way you'd flash '0xmmsssssss.unlock'.

fastboot -i 0x1949 flash unlock unlock.img

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

I'm not sure why you think the new version is difficult to locate or non-intuitive,

but the assumption about folder structure relies on the contents of the archive

being extracted to the same folder.

I'd rather you spent your valuable time on writing instructions for the new version,

as I don't want to see the old one floating around. Please respect that.

Also note that the person you "helped" to jump through unnecessary hoops

with your instructions was able to generate the unlock code, they just didn't

realize it. I'll augment my "jump post" with that apparently non-obvious detail.

---------- Post added at 20:41 ---------- Previous post was at 20:39 ----------

I'd like to ask you to remove the re-post of my code.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Nope. It works, helps people achieve their objective and poses no risk to device or liability to you. Posting on XDA placed code in the public domain. I am happy to advocate for newer builds/methods but will not deny visitors the opportunity to easily unlock or enforce a more difficult path for no good reason. Feel free to engage a titled XDA moderator if you feel further action is warranted.
[Kindle Fire HDX 7" & 8.9" General] draxie:
Surely, the code is in the public domain. No questions about that. BUT, you happen to be wrong about the "liability" part,

although not in the legal sense, only in the sense of keeping my sanity in the face of all the posts asking for help for issues

I had fixed years ago.

Technically, the obsolete path you so neatly documented is more difficult

(as evidenced by the sheer number of posts reporting errors and asking for assistance in this thread).

Of course, your easy-to-follow instructions help; by recreating an ancient setup for no good reason.

Neither python 2.7, not gmpy are required for the new version.

Will do.
[Kindle Fire HDX 7" & 8.9" General] DB126:
And who serviced those posts/requests? Nuff said.
[Kindle Fire HDX 7" & 8.9" General] draxie:
Keep it SIMPLE! (-;

**

SIMPLER

UNLOCK CODE GENERATION ON (ANY) WINDOWS **​

If you don't have python installed, download and install your preferred Python version

Download and extract tools.zip

Open a command shell (cmd.exe) and navigate to the directory where you extracted the archive

To generate your unlock code type

py cublock.py 0xmm 0xssssssss

NB: the filename of the unlock code is 'unlock.img',

as opposed to the '0xmmssssssss.unlock' pattern that cuberHDX.py used to generate,

but the contents are the same and the unlock code is flashed the same way.

fastboot -i 0x1949 flash unlock unlock.img

---------- Post added at 22:18 ---------- Previous post was at 22:10 ----------

Do you have my login credentials?

I didn't think you had access to PM:s.

I've just posted the (much) simpler procedure

using the new tools. Can you see if it works

for you, and if so, reconsider my request?
[Kindle Fire HDX 7" & 8.9" General] DB126:
Seriously?

Yes - will try new build as time permits.