[Kindle Fire HDX 7" & 8.9" General] :
Unlock Fire HDX 7 (Thor) with FireOS 4.5.2 [Detailed Instruction Summary]

Thank you very much for your instructions. Today I have successfully unlocked and flashed a Kindle Fire HDX 7 with FireOS 4.5.2, using Ubuntu Linux.

I encountered a bit of hassle, but finally managed to do it. :)

Because of some confusion during the process, I decided to write the following instructions for all those who need a detailed step by step instruction that hopefully helps others who want to unlock the bootloader of their Fire HDX 7 and flash a custom rom on it.

These instructions where successfully applied to a Kindle Fire HDX 7" (Thor, 3rd Generation) that had FireOS 4.5.2 on it. Everything done using Ubuntu Linux 16.04. However, those instructions are valid for Windows as well, as long as you know how to install ADB drivers for your device in Windows, as well as Python and Gmpy2. You should also be familiar with navigating through directories in command line / terminal prompt.

WARNING:

I do not take any responsibility if you encounter errors or brick your device. You should exactly know what you are doing and be aware of the risk you take. The Kindle Fire HDX is a device that is prone to getting bricked if not handled properly. Read the instructions at least once completely

before

you start to do anything to unlock your bootloader. If you are uncertain or in doubt, do not proceed until you clarified any questions (ask in this forum instead doing anything that you are not sure of).

So, if you know what you are doing, let's start:

Important:

With few exceptions, always put your device into flight mode / Wifi disabled to prevent automatic updates from Amazon. Only connect for the few things needed (download ES File Explorer; Kingroot root procedure). If the automatic update still started and downloaded the update file but hasn't yet started the update itself, then you can later on use ES File Explorer to delete the update file. For this, ES File Explorer needs to be set in root mode. Then navigate to /cache and find the *.bin update file and delete it.

1. Install ADB-Drivers

In Ubuntu, open terminal and enter:

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

Windows users: check original first post of this thread for installing ADB drivers.

2. Install ES File Explorer on your Fire HDX 7

- On your Fire HDX, install ES File Explorer from Amazon App Store (connect to the internet only for this short time of downloading and installing the app; then disconnect immediately again when done.

Unfortunately, for installing ES File Explorer you have to connect to the internet for a short time. Amazon system update might start to download nevertheless in the background; keep an eye on that! As long as it doesn't succeed to download the whole update file, you're okay when you manage to disconnect again before it has completed the download. It may manage to download the whole update file still, but not start the update and give you a notification that the update is available for manual start or saying that it will automatically update as soon as the device is not being used and has enough battery - so keep being busy on your device and don't let it go to sleep until later on you managed to delete the update file and disabled OTA via ES File Explorer in root mode).

3. Root your device:

- Download Kingroot and Kinguser from here:

http://xdaforums.com/android/apps-games/one-click-root-tool-android-2-x-5-0-t3107461

- Copy Kingroot and Kinguser apk files to the internal storage of your device

- From Es File Explorer, install Kingroot and Kinguser

- Execute Kingroot app and wait until it has rooted your device (it will ask for internet connection; enable internet only for this short time, then disable immediately after root is done).

Still keep an eye on possible OTA-update in the background.

If later on you first use adb command to communicate with your device via computer, Kinguser app on your device will display a pop-up asking to confirm root permission. Then confirm with "allow/yes".

4. Disable automatic OTA-Update on your device:

Source:

http://xdaforums.com/kindle-fire-hdx/general/tut-disable-ota-4-5-2-install-gapps-t3043550

- Open ES File Explorer

- Enable root mode in ES File Explorer settings

- In ES File Explorer, find /system/priv-app/ DeviceSoftwareOTA.apk

- Rename "DeviceSoftwareOTA.apk" to something like "DeviceSoftwareOTA-BAK.bak" (don't let it end on *.apk)

- In case the automatic update should have downloaded the OTA update file but not yet installed it: Navigate with ES File Explorer (in root mode) to /cache and delete the update file (should be ending on *.bin).

- Now you can connect to the internet

5. Create unlock file:

Needed:

- Python

- Gmpy2

sudo apt-get install gcc g++ libmpc-dev libmpfr-dev libgmp3-dev libssl-dev python python-dev python-pip

pip install gmpy2

Windows users: Search this forum for how to install Python and Gmpy2 on your computer.

5.1 Get ManfID and Serial:

Important:

ADB Debugging has to be switched on on your device.

(Tap several times the system/serial number of your device in settings and a new menu will appear, called "devoloper options". In developer options you can enable ADB Debugging)

Now execute the following commands in terminal / command prompt:

adb shell
cat /sys/block/mmcblk0/device/manfid

(should display 0x00000mm))

cat /sys/block/mmcblk0/device/serial

(should display 0xssssssss)

Note it down! (mm = ManfID, ssssssss = Serial)

5.2 Create unlock file:

You need python script "cuberHDX.py", download from here:

http://xdaforums.com/showpost.php?p=58864282&postcount=46

Switch to directory where cuberHDX.py is located and execute the following command:

python cuberHDX.py 0xmmssssssss

(replace mm / ssssssss with the numbers you noted earlier)

Windows users:

python.exe cuberHDX.py 0xmmssssssss

A file called "0xmmssssssss.unlock" should have been created in the same directory where cuberHDX.py is located.

The unlock file should not be empty and display something cryptical.

Check with:

cat 0xmmssssssss.unlock

5.3 Download vulnerable bootloader and TWRP:

Download from here:

https://drive.google.com/open?id=0B2twXJIOgv-UMGxXMUZPZTlZTUk

Then you have:

aboot_vuln.mbn

twrp_cubed.img

Copy those files to the root of the internal storage of your device. Use any method you are familiar with. You can push those files via adb to your device or simply drag and drop it there by file browser while the device is connected to your computer.

Now go to terminal and execute the following commands:

(The "su" command will cause a dialog prompt on your device asking for root permission; -> confirm with allow/yes)

adb shell
su
dd if=/storage/emulated/0/twrp_cubed.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
dd if=/storage/emulated/0/aboot_vuln.mbn of=/dev/block/platform/msm_sdcc.1/by-name/aboot

(Note: "sdcard", as in the OP's post, didn't work for me, as I got an error of "no such file or directory";

so I replaced it with "storage/emulated/0" which worked).

You should get feedback in terminal about the bytes being written.

Then reboot and your device will go straight to fastboot mode (Just turn it off and back on again).

If your Firmware is <13(14).4.1.1 you need to execute "adb reboot bootloader" to get into fastboot mode.

5.4 Unlock bootloader / flash unlock file:

Check if your device is properly connected and recognized:

fastboot -i 0x1949 devices

Flash unlock file (has to be in directory where you execute the command):

fastboot -i 0x1949 flash unlock 0xmmssssssss.unlock

On your device it should now say "unlock code is correct" :good:

Now you can boot into TWRP. Switch off, switch on again and hold Power and VolUp; when Kindle logo appears, then release Power, then a few seconds later release VolUp. (Actually I cannot remember exactly the timing; just give it a few tries).

6. Flash custom rom:

- Download custom rom of your choice and copy it to the internal storage of your device.

- In TWRP make "factory reset" (wipe dalvik/cache).

- Choose Zip of your custom rom and flash

CyanogenMod 12.1 for Fire HDX 7:

http://xdaforums.com/kindle-fire-hdx/development/rom-cm-12-unofficial-apollo-thor-t3050199

Important:

Don't flash original Stock-Rom!

You can flash also Gapps etc. together with CM 12.1 all in one turn.

Order of zip file selection in TWRP:

- CM 12.1

- Gapps

- SuperSU

- Xposed

Gapps:

http://opengapps.org/

-> "ARM", "5.1" (because CM 12.1 is based on Android 5.1), "pico"

SuperSU:

http://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133

Xposed:

xposed-v87-sdk22-arm

http://dl-xda.xposed.info/framework/

7. Google Play Games Error Fix:

If Google Play Games doesn't work/install properly, download an older version of it (e.g. v3.3.5) from APKmirror and install. Then update it through Playstore.