yashsingh1/xdaforums huggingface dataset:
[Kindle Fire HDX 7" & 8.9" General] stangri:
I just ran cublock on my Mac (with the default python install which came with the system) and it did generate an unlock.img file binary identical to the file I generated by cuberHDX.py which I used to unlock my apollo.

I still like the way old script named the file -- as per the actual device ID submitted. Makes it easier to help people who can't get python working on their PC differentiate which posted unlock code is which and also makes it easier if you have more than 1 compatible tablet and want to save the unlock code -- no need to rename the files.

Sadly, I don't know enough python to quickly change line 14, but would be great to have the old file naming scheme back.
[Kindle Fire HDX 7" & 8.9" General] draxie:
No, not really. I was just trying to kid. (-;

Thanks in advance!

Just for the record, this is not a new build in any way.

The linked tools.zip is the one I posted here in March 2015.

If you read carefully and have the patience to put together the pieces,

even the instructions are burried in that post.

---------- Post added at 15:23 ---------- Previous post was at 15:22 ----------

You surely know how to rename a file in any OS, right? (-;

No python knowledge or changes to the script are needed.
[Kindle Fire HDX 7" & 8.9" General] DB126:
I realize it is simply repackaged. Like it or not packaging is key for 95% of the XDA community who are primarily consumers of deliverables from the small development community (not armchair hacks) that still inhabit these forums. Opening a command prompt and renaming files on ANY platform remain out of reach for many.

BTW - I put myself among the 95 percenters (not maligning anyone) despite a rich technical background and years of programing in machine language. Life is simply too busy take the deep dives I use to enjoy.
[Kindle Fire HDX 7" & 8.9" General] draxie:
No, actually, it's not. It's untouched.

This may be unintended bundling on your part, but most modern OS:s let you get away with point&click renaming, without any command prompts involved.

(Of course, you do need a command prompt for adb/fastboot anyways [unless you happen to use 1-Click, which I'm *still* working on]; so, that's partly moot.)
[Kindle Fire HDX 7" & 8.9" General] DB126:
From your perspective, yes. I'm going to disengage from the hair splitting contest as it does not serve the accessibility point which is all I am really interested in pursuing.

Dug up a dusty locked HDX (rocking FireOS 13.1.x!) that hasn't been fired up in months. Charging now; will run the reposted whatever and provide feedback. I fully expect it to work.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Worked as expected; easily generated an unlock code for a dusty old HDX with minimal fuss. The simple py.bat that prefixes the appropriate python directory (assuming standard install locations/names) adds more value than you might think :). Novice contributors will still have to deal with relocating unlock.img if fastboot is not globally recognized on whatever host is being used. This is not your issue and pales on comparison to the challenges many have dealing with Windows driver wackiness. Part of what the informal 'support network' (you, [MENTION=2226076]stangri[/MENTION], [MENTION=5594063]ONYXis[/MENTION], [MENTION=2839177]schwinn8[/MENTION], @Mr McBoatface, [MENTION=4267571]sd_shadow[/MENTION] and MANY unnamed others [!!THANK YOU!!]) deal with on a daily basis across multiple forums and device types.

In time, yes. I will strongly advocate for use of the simpler tool set/method and observe contributor feedback. If all goes as expected I will depreciate my prior post and remove the cuberHDX attachment. Also need to get the OP updated as no one is going to find this latest series of posts and attached tool suites a few weeks from now. Note the comments from [MENTION=3264655]mrvogl[/MENTION] in the second half of this post which accurately captures the frustrations of several others since cuberHDX was unceremoniously removed.

Speaking for myself and (hopefully) on behalf of the HDX community: your efforts are sincerely appreciated and valued. We are in a better place now than a few days ago. :good::good:
[Kindle Fire HDX 7" & 8.9" General] unwissend:
perfect what?

Hi

I get the confirm "unlock code is correct", but now when I restart my kindle fire hdx 7, 3rd Gen. I remain trapped in the fastboot. How can I reboot normaly?

Thanks

unwissend
[Kindle Fire HDX 7" & 8.9" General] DB126:
If you followed OP in this thread (specifically step #2) TWRP should already be installed. Power down device and restart using <power>+<vol+up>. Then flash your preferred ROM following guidance in the ROM thread.
[Kindle Fire HDX 7" & 8.9" General] unwissend:
Hi Dewey and many thanks for your hurry advice.

I can enter in the TWRP with <vol up>, but I havn't yet copied the ROM files and I can't se my device on the computer anymore ("adb devices" dosn't work). So also "ads push" comand no works. Is there some fastboot comand in "fastboot mode" to copy the ROM file from the PC to the tablet?

Greeting
[Kindle Fire HDX 7" & 8.9" General] DB126:
Host driver issue. Delete and then re-add device; should be visable in Windows File Explorer or Linux/Mac equivalent. Also insure MTP is enabled in TWRP. No file transfer capabilities in native fastboot.
[Kindle Fire HDX 7" & 8.9" General] unwissend:
I

deactivated (!)

MTP in TWRP, only then the device was finally displayed again on the PC. With "adb push" I copied the ROM to the device. Then I could install the OS...

Thanks a lot for your support!
[Kindle Fire HDX 7" & 8.9" General] Shoog03:
Got a strange outcome here.

I bought a second hand Kindle HDX7 with the intention of flashing either safestrap and CM11 or one of the later CM12 or CM13.

Firstly I did the rollback of my FireOS 4..5.5 to FireOS 3.2.8. I attempted to use some of the stock bin files to upgrade back to 4.5.2, but every time it told me that these files were invalid. I tried a few different versions. I rooted this and blocked OTA updates.

I followed the instructions to create the unlock img at the start of the thread, but my HDX7 would boot into fast boot using "adb reboot bootloader", but when I got there fastboot was not accepting any instructions. I tried this in both Suse Linux and Win7 to the same result. I therefore never got to the point of getting an accepted unlock message. However I managed to push the TWRP and bootloader file via dd as instructed so had an active TWRP recovery to work with.

At this stage I flashed a zip of CM13.0-20161107-Nightly.zip and when I booted in things seemed to be working. However the camera and the WIFI were not working which was a common issue with the port of CM13 for the Kindles. I heard that the CM12 builds were more reliable so I attempted to flash two different versions of that, but both with the same outcome of a Kindle stuck in the grey boot screen.

I had made a back up of my initial FireOS 3.2.8 so I reinstalled it and it all came back to how it was after rooting.

However in the process of trying a few more flashes I did a factor reset and lost the Fire OS backup. This left me in the situation where the only thing that would load and run was the CM13, but that was broken.

I suspect what I have is a Kindle that was wiped by a reseller and a locked down bootloader was installed. I cannot seem to penetrate the bootloader using the method here and suspect that I am only getting a limited subset of the zips to load because they are using the same bootloader underneath. If I could find a zip version of FireOS 3.2.8 I could reload it with TWRP (but that would be a bit pointless). I could stick with CM13 which I suspect works because the bootloader is the same. However I would have to track down a build which at least had a functional WIFI.

I could go back to the start and try to work out why Fastboot is not been recognised in either windows or Linux. The strange thing is that it is recognised by the kernel as lsusb describes it in some detail but as "unconfigured".

At the moment I have a Kindle that is stuck on a broken CM13. If I could get it to a working CM13 I would be more than happy. Any ideas ?

Shoog
[Kindle Fire HDX 7" & 8.9" General] mrboognish:
I think I followed the steps mentioned and I am seeing the unlock code is not correct

shell@thor:/ $ cat /sys/block/mmcblk0/device/manfid
0x000045
shell@thor:/ $ cat /sys/block/mmcblk0/device/serial
0x3040804c

python cublock.py 0x45 0x3040804c

fastboot -i 0x1949 flash unlock unlock.img
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

I might be doing something wrong as this is a new area for me, but I am willing to try out different things if you want.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Damn lucky you didn't brick the thing randomly flashing ROMs to a locked HDX. All Android 5/6/7 ROMs for this device require an unlocked bootloader for stable operation. The bootloader on your device *can* be unlocked. The symptoms you describe suggest a host driver issue or poor connections (host, USB cable and/or device port). Happy to assist with some diagnostics but it will be 48-72 hours before I can reengage. Suggest you not mess with further flashes of any kind but focus exclusively on unlocking the bootloader. Will check back in a couple days to see if you have things sorted.

BTW - the rollback to 3.2.8 was totally unnecessary and likely complicated matters.

---------- Post added at 05:46 AM ---------- Previous post was at 05:24 AM ----------

Did you perform step #2 from the OP?
[Kindle Fire HDX 7" & 8.9" General] Shoog03:
Step 2 worked initially and thats how I got a functional TWRP.

However since I tried again to reflash the vulnerable aboot and it gives me access denied on permissions.

The only reason I rolled back was because it was my original intention to go the safestrap cm11 path, for which a rollback and upgrade is the first step. The problems started when none of the upgrade .bin files would pass the internal FireOS upgrader.

So far I have been lucky not to hard brick the device - but I still have a fully functional adb and the hdx7 mounts on my PC, I just don't have a working Safestrap.

Shoog
[Kindle Fire HDX 7" & 8.9" General] mrboognish:
Upload from my previous issue, I had skipped step 2. After completely Step 2, flash worked great. Thanks for the help.

fastboot -i 0x1949 flash unlock unlock.img
target reported max download size of 536870912 bytes
sending 'unlock' (0 KB)...
OKAY [ 0.083s]
writing 'unlock'...
OKAY [ 0.064s]
finished. total time: 0.146s
mkemac-jkd-497:tools jkd$
[Kindle Fire HDX 7" & 8.9" General] Shoog03:
OK status update on my situation. I have gone through the excellent instructions about setting up fastboot to be found here

https://xdaforums.com/showthread.php?t=2277112

After a reboot and trying a few different USB ports I finally managed (for the first time) to get fastboot to recognize my Kindle. I then attempted to flash the unlock.img but got the message

error: cannot load '0x45210d4151.unlock'

The Kindle produces the following messages:

getvar:slot-count ...Ok.

getvar:slot-suffixes...Ok

getvar:has-slot:unlock ...Ok.

getvar:partition-type:unock...Ok.

Ready.

So its seems all the checks are OK but it fails at the last hurdle in actually flashing the unlock.img

This is a massive step forward and very promising but I don't know what is wrong with my unlock.img to progress further.

My keys are:

manfid:0x000045

seriel:0x210d4151

The command issued is

fastboot -i 0x1949 flash unlock 0x45210d4151.unlock

Edit: I just tried a different version of the command

fastboot -i 0x1949 flash unlock unlock.img

and the Kindle reported that the unlock code is correct.

Happy days.

EDIT: So I loaded the CM13 rom again and it still had the same persistent issues with the camera and the internet. I Downgraded to CM12.1 and it worked straight away. Only thing left to do now is flash gapps.

Stephen
[Kindle Fire HDX 7" & 8.9" General] DB126:
Great! Glad you got it sorted. Best non-KitKat ROMs at present are CM 12.1 and CM 14.1. Of the two only CM 14.1 is being actively maintained. I still run CM 12.1 due to an Xposed requirement. Hope to mitigate that soon and move to Nougat. Enjoy your liberated HDX!
[Kindle Fire HDX 7" & 8.9" General] draxie:
Generate the unlock code on your own Kindle (no python required)

Prerequisites

Platform tools (adb + fastboot) from Google

Fire drivers from Amazon

(if you want something that works with *both* adb *and* fastboot, make sure you hand-pick the 'Android Composite ADB Interface' driver under 'Fire Devices' in Device Manager)

Update Driver Software... >> Browse my computer for driver software >> Let me pick from a list [...] >> Fire Devices

Download and extract unlock.zip (SHA256: e5db0b8d82c8fd2a25a22b0a598014d22a2ec33cef27a8d4b65a36acde08f27a)

to the same directory that holds the adb and fastboot executables (default: platform-tools)

unless, of course, you have added that directory to your PATH

Code Generation & Unlock

Click on get_code.bat in the extracted folder (default: platform-tools)

--- this replaces step 1 (including *both* 1.1 & 1.2) of the OP ---

Check that two hex-numbers are printed (manfid+serial) and a new file 'unlock.code' appears in that folder

Perform Step 2 of the OP

Click on unlock.bat in the extracted folder (default: platform-tools)

--- this replaces step 3 of the OP ---

if you see < waiting for any device > in the Command window, you'll need to manually select a driver

That's all folks...
[Kindle Fire HDX 7" & 8.9" General] corryvreckan:
I was able to unlock my Apollo with 4.5.5.2 using draxie's python tools. Panicked a little when I forgot to use sudo with fastboot (on linux) but it all worked out. Here's what I did in case it helps anyone else:

Factory reset.

Allow unsigned APKs. Install Kingroot from their website, wait for root

Get manfid/serial over adb, generate unlock

Copy aboot/twrp to /data/local/tmp instead since sdcard locks, write using adb root

Reboot to fastboot, flash unlock code

Flash TWRP 3.0.0, reboot, wipe everything using TWRP

Install CM 14.1 and Gapps using TWRP

Cheers
[Kindle Fire HDX 7" & 8.9" General] RiseT:
Hi there,

I've been around here a rather long time ago, when the bootloader signature bypass just had been discovered, but there wasn't a method yet to factually unlock the bootloader.

I've finally picked up again my Thor device from back then :o and wonder if I have to do each and every step of the unlocking procedure (especially the aboot thing) given the current state of my device.

Here is what I currently have:

A Thor device (bootloader still locked) with

- TWRP 2.8.6.0 recovery (cubed) installed

- CM 11-20150226-UNOFFICIAL-thor installed

Further, I've already created an unlock.img.

This setup is fully working currently. Where to go from here?

I have two questions and one problem:

Questions:

Do I have to flash exactly the OP-linked (there's no info which version that is) version of the cubed TWRP or can I use the one already installed?

More importantly, do I have to flash the aboot image (as described in step 2 of OP)? Or can I just go ahead and flash the unlock file via fastboot? I guess this question arises because I don't understand the purpose of flashing the aboot image.

Problem:

While I have no problems getting ADB running and recognizing the device from Win 10, somehow I have been unable so far to make fastboot recognize the device (Windows doesn't find an appropriate driver). I'm aware that configuring fastboot sometimes can be a pain in the butt, but is it possible that the culprit for this is the fact that I haven't flashed the aboot image?

Thanks in advance!
[Kindle Fire HDX 7" & 8.9" General] DB126:
No need to immediately update aboot or TWRP. At some point you may have to bring TWRP to v3 to support flashing newer ROM packages. I don't recall how well 2.8.6.x supports MTP which facilitates file transfer operations from within TWRP. That can be important if everything you need isn't onboard.

Host driver/connectivity issue issue. Keep trying using tips from others in this thread and elsewhere. Also try different USB cables, USB ports (avoid hubs) or a different host.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Above tool/procedure worked great on my sample Thor running FireOS 13.3.1.0! A couple quick clarifications for new visitors:

- Minimal Fastoot and ADB can be used instead of Android Platform Tools (much smaller package)

- steps #1 and #3 are executed with device tethered and booted to whatever ROM is currently installed (with appropriate ADB/USB permissions granted)

[MENTION=5594063]ONYXis[/MENTION] - recommend updating link in OP to point to this post; full credit (clearly) to [MENTION=5828306]draxie[/MENTION]
[Kindle Fire HDX 7" & 8.9" General] mzk1:
Also, if you forget to update old drivers like i did (amazon released new ones in November 2016 -> kindle_fire_usb_driver.zip ), after you get into fastboot mode - unlock.bat won't be able to flash your unlock code. The reason is - your tablet will be running on Microsoft's drivers, not Amazon's. To fix that simply uninstall drivers for android device in your device manager, scan for hardware change, select let me pick driver - all devices - browse for the folder with amazon's drivers, select .ini file and install those drivers. Fastboot will pick up commands from unlock.bat immediately after. That's for step 3 if you will get stuck at <waiting for any device>
[Kindle Fire HDX 7" & 8.9" General] DB126:
Can also try other composite drivers installed on the host if you don't have immediate access to Amazon's offerings. In my case Motorola's Composite ADB interface (v2.0.2) works for every Android device in my portfolio - including fussy Amazon gizmos. Amazing! YMMV.
[Kindle Fire HDX 7" & 8.9" General] sega dude:
I successfully generated the unlock code using get_code.bat. Now I am trying to flash the unlock file with unlock.bat. The kindle boots into fastboot, and the command window says < waiting for any device >. I did install the Android Composite ADB Interface driver. This shows up in device manager when the kindle is booted up normally with USB debugging enabled. When I run unlock.bat, Android Composite ADB Interface no longer appears in device manager. This is what it looks like in device manager when the kindle is connected when booted into fastboot. Do I need to manually install the Android Composite ADB Interface for the "Android" device, as described in post 550? I just want to make sure.
[Kindle Fire HDX 7" & 8.9" General] DB126:
You can uninstall/reinstall various drivers while fastboot is waiting. When you find one that works the device will immediately connect and unlock.bat will continue as if there was no interruption.

Keep in mind there is no risk associated with failed bootloader unlock attempts. It will either work or not. Your data/device/livelihood are not in jeopardy. :)
[Kindle Fire HDX 7" & 8.9" General] sega dude:
I installed the Android Composite ADB Interface and it worked. Thanks for your help.
[Kindle Fire HDX 7" & 8.9" General] GSLEON3:
Been away for a couple years, on iOS & Windows...

Lost my remote for 4k Fire TV & charged up the ole KF HDX 8.9. Of course as soon as I did, I was hit with 4.5.5.2, after nothing for over a year & now my gapps no longer work. Lo & behold I see a lot has come to pass here & I have read thru a lot of the threads, but a few things are still unclear.

1. Do I have to flash the vuln aboot to unlock?

2. Is it okay to flash vuln aboot on 4.5.5.2 OTA'd stock & rooted?

3. Do I need to install the older 2.x version of TWRP, or will a 3.x version work? (I'm assuming 3.0 works fine).

Thx.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Welcome back! Yes to questions #1 and #2.

As for question #3 TWRP 3.x is preferred; believe OP link yields 3.0.2.x. I opted to stick with 3.0.0.1 due to an annoying permissions issue in higher builds that complicates copying backup images to a secure host.

Be sure to scroll back a few posts to snag the updated code generator posted by [MENTION=5828306]draxie[/MENTION]. Worked well on my test device & host. No need to monkey around with Python, Gmpy2, etc. Replaces steps 1, 1.1 and 3 in the OP; still need to do step #2.
[Kindle Fire HDX 7" & 8.9" General] unhappybirthday:
Many thanks to ONYXis, Davey126, and draxie for the tools and instructions. The python-free process worked smoothly and was easy to do.

I wasn't ready to install a new ROM yet and tried to boot back into system... which now takes me into fastboot. Did I miss that I couldn't boot back into my safestrap ROM after this process?
[Kindle Fire HDX 7" & 8.9" General] DB126:
hum...when I unlocked FireOS remained bootable. But that was quite a long time ago and all my devices had vulnerable bootloaders (did not have to flash aboot). Did you try to boot into TWRP and then boot into system from there?
[Kindle Fire HDX 7" & 8.9" General] unhappybirthday:
Yeah, TWRP reboot system leads back to fastboot. I was running Fire Nexus on safestrap 4. I'm thinking of installing the TWRP flashable version. Sounds like it should be happy with my existing data...
[Kindle Fire HDX 7" & 8.9" General] DB126:
Yes, either of the KK Nexus builds should adopt your populated data partition (although obviously recommend this one).

BTW - you can upgrade from Fire Nexus -> CM 12.1 w/o wiping data. Be sure to create a backup of boot/data/system partitions in TWRP before upgrading. That said, nothing beats Fire Nexus for full functionality and speedy boot times! Still love that rom...
[Kindle Fire HDX 7" & 8.9" General] unhappybirthday:
Getting this flashing ROM in TWRP:

symlink: some symlinks failed

Updater process ended with ERROR: 7

Error installing zip file '/sdcard/_install/kk-fire-nexus-rom-thor-20161017.zip

I'm wondering if the old vulnerable aboot is affecting this. Looks like a user encountered a similar error and fixed it by flashing newer bootloader. Some scary stuff at the end of the bootloader flashing thread linked by that user, though. Don't want to brick this but need to figure a way around this problem.

UPDATE: Rebooted into TWRP and it flashed fine this time. Weird. I'm back in business. I'm really amazed at the tremendous amount of help you give in these forums. It is greatly appreciated.
[Kindle Fire HDX 7" & 8.9" General] DB126:
Thanks for the kind words. Just a messenger ... smarter folks do the heavy lifting. :)

My personal SOP is to immediately reboot upon encountering symlink errors or other post-wipe weirdness in TWRP (on this device). If the problem persists a cold start often fixes it. Typically can't reproduce on demand so hard to help out the development team with hard evidence. At one point even laided off the booze to make sure the wackiness was real. A disappointing experience all around: errors continued and an empty glass. Reboot and bottle opener fixed that. :silly:
[Kindle Fire HDX 7" & 8.9" General] fabische:
Well folks, last year I have managed to change my system to a CM11/safestrap 4.01 setup, so I am not a complete rookie. However, the instuctions for unlocking the bootloader in this and the quoted threads are a complete mess. I already get stuck in the part of generating the required unlock code ( https://goo.gl/o9fM0V ) . I would really appreciate if one of the experts could post a structured and comprehensible procedure of how to unlock the bootloader (Apollo). Can't be that hard. Thanks a lot!

p.s.: what does "OP" stand for?

p.p.s: with safestrap 4.01 installed, do I need to unlock the bootloader at all in order to install CM14.1 ?

cheers!