yashsingh1/xdaforums huggingface dataset:
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
I'm thinking Windows users will need to use Cygwin (or a similar framework);

so, the bundled "usual" diff command should fit the bill...

I cannot comment on winmerge, as I don't use Windows.
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
Time...

If you're not in a hurry, you might want to wait for a beta...

Note, however, that I have very little time.

The wait can be more than a week or two.

Doing the research and performing the deed

all by yourself is a great learning experience, though. ;)

Just. be careful, as it's not completely risk-free...
[Kindle Fire HDX 7" & 8.9" Android Development] xknobi:
Relock?

Can the bootloader be locked again once it is unlocked? I want to ask this becauseI want to know wether it is safe to do stock update after unlocking.
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
Yes, the bootloader can be relocked,

and unlocked again - as long as you know the key or have a bootloader vulnerable to cuberoot signature forgery...

BUT, perhaps more interesting to you, my understanding is that doing a stock update

will wipe your bootloader as well (

including

locking/unlocking and all);

so, it really shouldn't matter if it's locked or unlocked to start with...
[Kindle Fire HDX 7" & 8.9" Android Development] lekofraggle:
In addition, there seems to be an anti rollback switch that is included in many of the newer updates. This tool removes them, but be careful just letting the device update with a newer *.bin. You probably will not be able to go back.
[Kindle Fire HDX 7" & 8.9" Android Development] xknobi:
Thanks for the advices and infos. So there is no efuse which can't be changed again once blown. Then I should be careful even with an unlocked device. :rolleyes:
[Kindle Fire HDX 7" & 8.9" Android Development] FotixChiang:
I am sorry i didn't get the point about using the new cublock.py

for example my manfid is 0x000015 and serial is 0xd71c7d13

if i want the unlock file, how should i type in the cmd? i used the following commond:

python.exe cublock.py 0x000015 0xd71c7d13

is that right?

and one more question: can we use cuber.py to get the same umlock file as cublock.py does? if yes, what commond should i type in? that makes me confused.
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
Yes, that should be right.

You can just try if the generated code unlocks your device.

There are no known side effects of trying to unlock even if the code were wrong...

BTW, if you run the script without any arguments, it should also tell you what input it expects.

And, that should also apply to the other scripts as well...
[Kindle Fire HDX 7" & 8.9" Android Development] FotixChiang:
Kind of you for your tips :D

I have tried the cublock.py, and got unlock.img.

then i tried the cuber.but failed with:

python.exe cuber 0x15d71c7d13

and shows the text:

Traceback (most recent call last):
File "cuber.py", line 83, in <module>
a = forge(read(0, (b >> 3) - 11), b)
NameError: name 'b' is not defined

but that works:

python.exe cuber
0x15d71c7d13

and gives me the long string

00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000032cbfd4a7adc7905583d78ce434cc9bdb894abb28933d68c2296dde533
8a9940464783d02d8223269f62cddcd811dd33b5683a66962bd0cff861f35ea0f260c1656d477887
32e562640b16982dbc3abb8817851a80

That is unless for unlock bootloader, right? I mean only the cublock.py plays the role of old cuberHDX.py, right?

sorry for my bad english expression, and thx for your efforts and help again!
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
Another one bites the dust...

Perfect! You should then flash that unlock.img from 'fastboot' and you should be set. ;)

I cannot fathom why you'd do that, but you did catch a bug. Thanks! :o

I uploaded a new version with a fix.

No, this is not quite "unless", but you'd need to convert it from a printable hex-string to the corresponding byte-array.

If you just pipe its output to a file, 'cuber.py' will do that for you. The result should be the same as the 'unlock.img' you

got from 'cublock.py'.

That's right, except that in an attempt to make users' lives even simpler,

'cublock.py' takes manfid and serial as separate arguments

and formats the right input string to be "signed".
[Kindle Fire HDX 7" & 8.9" Android Development] davekaz:
adb is fine but when i reboot bootloader kindle goes into fastboot ready but when i put fastboot with unlock img waiting for device.. I reinstalled drivers several times please help
[Kindle Fire HDX 7" & 8.9" Android Development] DB126:
Most likely the drivers on the host machine still aren't right. Read this and this along with the entire thread for additional ideas. It can be a struggle on Windows; you may want to create a quick & dirty Linux image to get the job done.

Wish I could provide the magic solution. I struggled for hours with the same situation before stumbling on something that worked. Documented here although there is no corroboration this approach had anything to do with my device starting to communicate. Good luck.
[Kindle Fire HDX 7" & 8.9" Android Development] lekofraggle:
Try deleting your driver from device manager, and then connecting the device while it is in fastboot mode. That was what I did and it worked for me win 8.1 64 bit. I was two seconds away from dusting off my linux box, but it just worked.
[Kindle Fire HDX 7" & 8.9" Android Development] davekaz:
Thanks for reply. I finally uninstalled and updated driver while in fastboot mode.. I'm unlocked and running cm12. Its fantastic so far. Thanks again for your help
[Kindle Fire HDX 7" & 8.9" Android Development] conan1600:
Doing a youtube tutorial on how to unlock bootloader from start to finish would reallly help.
[Kindle Fire HDX 7" & 8.9" Android Development] fryheit:
So, after reading for several hours I think I understand everything, there is just one problem, that i dont understand, i should downgrade to .3.1.0 that is fine, but the it says to upgrade the bootloader to the latest vulnerable version .3.2.3.2. but this link is to a flashable TWRP ZIP file.. How do I get to Install this Zip or TWRP in the first place!? Thanks a lot
[Kindle Fire HDX 7" & 8.9" Android Development] DB126:
Yes, the guidance can be a bit circular. Here's the scoop:

- grab the latest version of twrp here. Only use this source or another 'approved' thread from this forum. The unlocked 3.2.3.2 bootloader 'prerequisite' is strongly recommended but not a hard requirement

- instructions for flashing via tether contained with the above post. Or download/install Flashify from your favorite app market (v1.9.1 md5=12659777F4B559DC2C06C842F7583ED5)

- then flast 3.2.3.2 bootloader (here) using twrp or flashify

Suggest verifying image hashes

on device

prior to flashing. A corrupt image will ruin your day (and perhaps device). There are a number of ways to accomplish this; I use Hash Droid. Good luck.
[Kindle Fire HDX 7" & 8.9" Android Development] fryheit:
7 or 8,9 your Kindle?

---------- Post added at 07:36 PM ---------- Previous post was at 07:22 PM ----------

Could you maybe really upload your 4.5.3 File without the new bootloader so we could flash it? and how do you install the play store on fire os? Best and thanks for your work!!

---------- Post added at 07:44 PM ---------- Previous post was at 07:36 PM ----------

Thanks for everything, I think it worked, the best thing is that my new HDX 8.9 LTE shipped with 3.1.0 already :D so i just had to unlock the bootloader and flash the stuff!! I did all that, so what can i put on it now? and how do I upgrade my FireOS or get the Play Store to Work. The Roms that I see are not for Apollo or they are for the WIFI Version only.. What should I be careful of now that I unliked and how do I get in the Recovery Mode without Flashify? ( what Keys I have to press?) Thanks again, So happy now!! :)
[Kindle Fire HDX 7" & 8.9" Android Development] DB126:
This has been discussed and I believe at least one experienced user has managed to pull it off. But there must be issues as no procedure or image was posted. If I find the thread I'll post back (or maybe someone else will).

You can enter recovery by pressing power + vol-up (volume up) from a cold start. Release the power button when the gray logo appears.

You should flash twrp recovery and the 3.2.3 bootloader update if not previously done.

With an unlocked bootloader you can flash the following roms on Apollo: Nexus 2.0.5, CM11 or (soon) CM12. None support LTE although that capability is said to be coming.

Be sure to block OTA if you stick with Fire OS (any version). An unexpected update can ruin your day and potentially strip much of the capability you have recently obtained. Once you go beyond 3.2.6 there is no rolling back.
[Kindle Fire HDX 7" & 8.9" Android Development] lekofraggle:
Sorry, I am not willing to post my images for two reasons...

I am not comfortable enough with my knowledge of the device to help people troubleshoot flashing a corrupt update (it is possible) and do not have a reliable host.

Also, I agree with Draxie that you will learn how these devices work by making your own sanitized update. Then, you will know the risks you are taking. You can do this on a windows machine without an emulator. It is just a bit more involved.

Once you have a sanitized 4.5.3 update, root is easy, just grab super su from chainfire's site and flash it from twrp.
[Kindle Fire HDX 7" & 8.9" Android Development] DB126:
@lekofraggle For what it's worth I support your choice and agree with the rational behind it. You and Draxie have stated what needs to happen; those who wish to reap the benefits should also understand the risks and be an a position to troubleshoot if things go wrong. You can only do this by getting your hands dirty. At some point the process may be reliable enough (or recovery options sufficiently robust) to offer a canned solution. Not there yet. Also, it is a moving target with new releases of Fire OS appearing in the wild. One of those is bound to contain a 'killer' feature that folks want - then the request process begins all over again.
[Kindle Fire HDX 7" & 8.9" Android Development] pinksummer17:
unlock bootloader for kindle hdx 7" 13.3.2.8

Hi, I'm New at this installing custom ROM on my kindle. I tried searching for ways to do it. I have 13.3.2.8 kindle HDX 7". So far I did downgrade my kindle to 13.3.2.8. Rooted it using towelroot. I have supersu installed and safestrap 3.72. (For some reasons all 3.75 safestrap apk I tried are not working on my kindle). Recovery installed. I tried rebooting it to recovery mode but always not going through. It will flash a little bit white screen and will reboot normally. As I search online, I think it's because of bootloader locked. I'm not sure if I'm doing the right process. I need some help from smart guys out there to help me do it Before I continue. Thank you in advance. :)
[Kindle Fire HDX 7" & 8.9" Android Development] EncryptedCurse:
You can't unlock the bootloader on any version above x.3.2.7. If it was possible, then there wouldn't be any need for Safestrap in the first place.

The obvious explanation is that you're using an outdated build of Safestrap, so you'd need to troubleshoot your problems with 3.75.
[Kindle Fire HDX 7" & 8.9" Android Development] pinksummer17:
I see. I understand now.. can u pls help me find a working safestrap 3.75 apk. Thank u. :)
[Kindle Fire HDX 7" & 8.9" Android Development] kcarden:
Usage: cuber.py [bits] [<data] [>sig]

what pieces of information are [bits] [<data] [>sig] ?

and how does one go about obtaining said info?
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
Well... if you want to "sign" (read: fake a signature, assuming a specific

-and, apparently, quite common- mistake in the signature verification)

something, the parameters should be fairly obvious from your problem.

The optional (hence the brackets) parameter bits refers to the

RSA key size. If you don't specify this, the default value is 2048

(as used on the Kindle HDX).

You need to feed your data to be signed on 'standard input'

(that's what the '<' sign is supposed to signify). And, this is optional in

the sense that you can just type away, close with EOF, and you'll get

the corresponding fake "signature' (i.e. sig) on "standard output'

(hence, the '>' sign; but you may wish to redirect said output, if you want

the actual binary signature, otherwise the script will save you from

messing up your terminal by printing a hexdump instead).

I hope this helps...
[Kindle Fire HDX 7" & 8.9" Android Development] lekofraggle:
I just want to throw another tip of the hat Draxie's way. I used this tool on 4.5.4 and everything seems copesetic. I did not update firmware (not yet that brave with all the bricking going on around this update).

Edit: for those interested, renaming DeviceSoftwareOTA.apk seemed to successfully block updates :)

The only hiccup was, it was a bit difficult to root. I had to delete the supersu folder using the file manager in twrp, and then install again using twrp installed supersu update version 2.65. I had to reinstall the piv-app pieces of the playstore and reinstall xposed framework, set my wallpaper, and that was it. Everything is exactly as it was before (except I have the updated Kindle app, that is the only difference I see thus far). Amazingly smooth upgrade.

~Leko
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
The updater script and all the firmware images

(except the bootloader, which we skip anyway)

are exactly the same in 14.4.5.3 and 14.4.5.4.

diff -rqs update-kindle-14.4.5.[34]*/META-INF/com/google/android/updater-script
Files update-kindle-14.4.5.3_user_453011120/META-INF/com/google/android/updater-script and update-kindle-14.4.5.4_user_454006120/META-INF/com/google/android/updater-script are identical

diff -rqs update-kindle-14.4.5.[34]*/images/
Files update-kindle-14.4.5.3_user_453011120/images/NON-HLOS.bin and update-kindle-14.4.5.4_user_454006120/images/NON-HLOS.bin are identical
Files update-kindle-14.4.5.3_user_453011120/images/emmc_appsboot.mbn and update-kindle-14.4.5.4_user_454006120/images/emmc_appsboot.mbn differ
Files update-kindle-14.4.5.3_user_453011120/images/fwupdate.tar and update-kindle-14.4.5.4_user_454006120/images/fwupdate.tar are identical
Files update-kindle-14.4.5.3_user_453011120/images/modem_update and update-kindle-14.4.5.4_user_454006120/images/modem_update are identical
Files update-kindle-14.4.5.3_user_453011120/images/rpm.mbn and update-kindle-14.4.5.4_user_454006120/images/rpm.mbn are identical
Files update-kindle-14.4.5.3_user_453011120/images/sbl1.mbn and update-kindle-14.4.5.4_user_454006120/images/sbl1.mbn are identical
Files update-kindle-14.4.5.3_user_453011120/images/sdi.mbn and update-kindle-14.4.5.4_user_454006120/images/sdi.mbn are identical
Files update-kindle-14.4.5.3_user_453011120/images/tz.mbn and update-kindle-14.4.5.4_user_454006120/images/tz.mbn are identical

In other words, it should be safe to use upHDX (even with firmwares).

I'm in the process of updating (read: creating update, making room on

the Kindle, moving stuff around, etc. etc.). I will report back when I'm done

(which might take a few days as I'm extremely busy with work and family).

BTW, which Playstore/Play services versions are sane these days?

UPDATE: I can confirm that the upgrade **WITH FIRMWARE** worked fine.

Here's a list of annoying "features" in the 2.8.6.0 build of TWRP with workarounds:

Even with compression selected, the uncompressed size is used for the storage check.

Workaround: luckily there's a checkbox to disable the check.

(NB: this may be a BAD idea in general, but helped me make a 6.2GB backup to 4.1GB free space )

The automagic installation of supersu (when rebooting after the update) didn't work.

Workaround: push the latest UPDATE-SuperSU-vX.yZ.zip to the device and install from TWRP

Here's another way to avoid surprise OTA updates while getting HDXposed in place after the update:

turn on 'Airplane Mode' before the update

do the update from TWRP (Including cache wipe and reboot)

make sure SuperSU is installed ;)

run this one-liner to disable OTA

adb shell su -c 'for i in com.amazon.dcp{.contracts{.framework,}.library,}; do pm disable \$i; done'

turn off 'Airplane Mode'
[Kindle Fire HDX 7" & 8.9" Android Development] lekofraggle:
Thanks Draxie. Sane is a relative term. I am running play store version 5.5.12 with Google Play Services 7.0.99. I had to use the hack so google did not update gps, and gmail, maps, and google now whine about the update, but the play store works. I have had no luck with the new gps versions.
[Kindle Fire HDX 7" & 8.9" Android Development] bibikalka:
OK, fellas, help me out here. Yesterday I installed TWRP on Fire HD 7 (ariel) using the bootloader unlock specified in this thread. I got Fire 4.5.3 OS, and would like to update to 4.5.4

I ran upHDX for the older 20.4.5.3 and newer update ROM (20.4.5.4) : https://kindle-fire-updates.s3.amazonaws.com/update-kindle-20.4.5.4_user_454006120.bin

upHDX kind of works and generates a new zip, but not fully since the file names don't fully match. Here is how the partitions are updated in 20.4.5.3 :

$ grep by-name 20-4.5.3/META-INF/com/google/android/updater-script

...

package_extract_file("boot.img", "/dev/block/platform/mtk-msdc.0/by-name/boot");

package_extract_file("images/lk.bin", "/dev/block/platform/mtk-msdc.0/by-name/UBOOT");

package_extract_file("images/tz.img", "/dev/block/platform/mtk-msdc.0/by-name/TEE1");

...

Vs HDX version

$ grep by-name 14-4.5.4/META-INF/com/google/android/updater-script

...

package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");

package_extract_file("images/emmc_appsboot.mbn", "/dev/block/platform/msm_sdcc.1/by-name/aboot");

package_extract_file("images/sbl1.mbn", "/dev/block/platform/msm_sdcc.1/by-name/sbl1");

package_extract_file("images/tz.mbn", "/dev/block/platform/msm_sdcc.1/by-name/tz");

package_extract_file("images/rpm.mbn", "/dev/block/platform/msm_sdcc.1/by-name/rpm");

package_extract_file("images/sdi.mbn", "/dev/block/platform/msm_sdcc.1/by-name/dbi");

package_extract_file("images/NON-HLOS.bin", "/dev/block/platform/msm_sdcc.1/by-name/modem");

...

I think that UBOOT is same as aboot, and TEE1 is same as tz in HDX. So it seems that I just make sure to remove these 2 lines to prevent the updates of the respective partitions, as well as the image files?

The script re-signs boot.img, I don't fully understand this, but OK. Since we could unlock the bootloader using the same script the newly signed boot.img should boot on HD7 ?

There seem to be no provision_anti_rollback.sh on HD7, at least, I could not find it.

How do I check the versions of UBOOT and TEE1 ? I tried strings, but could not dig out much of value.

Anyway, if I only update boot.img, and system, without doing anything to recovery, UBOOT and TEE1, I should be good to go ?

And a related post in HD 7 :

http://xdaforums.com/showpost.php?p=61245110&postcount=25
[Kindle Fire HDX 7" & 8.9" Android Development] hecbigcat:
Can you help me to make a stock rom 13.4.5.4 or 13.4.5.3 flashable via TWRP :) i dont understand step by step how to use your toolkit :) thank you
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
Cool! I didn't know the same unlock worked there as well...

OK. Not too suprising, I hope... :o

That makes sense. I think you're definitely right about the bootloader.

I'm not sure if the TEE is a one-to-one match to tz (or, possibly, tz and some other partitions),

but leaving it out is good first approximation.

If your bootloader is unlocked, you don't need to sign boot.img,

but -as you say- it shouldn't hurt... (as long as the script doesn't

mess up something -- in case there may be differences).

Hmm... OK. Better be sure.

Dunno. Why do the versions matter?

I'd expect so; but it's at your own risk, as always...
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
Hmm.... I'm really sorry to disappoint you, but the short answer is: no.

There's only one step to create a close-to-stock TWRP flashable image:

upHDX update-kindle-13.4.5.4_user_454006120.bin

If that doesn't work; do let me know, and I'll try to fix it.

BUT, if you're having trouble getting all the prerequisites in place,

I'm afraid I'm the wrong person to ask.
[Kindle Fire HDX 7" & 8.9" Android Development] bibikalka:
There are tons of misc strings in these 2 files with keywords like : kernel, unlocked, sha256, etc.

It appears as if UBOOT is followed by TEE, and people still could not boot a custom boot.img with unlocked bootloader, but they could boot recovery. So it seems that there is another program in the normal boot chain checking the boot.img unlock for the 2nd time. While the recovery goes directly from UBOOT to recovery.

But supposedly boot.img comes already signed in the Amazon update file. Why do you have to sign it again in your script? That's the part I don't quite understand. What's the explanation?
[Kindle Fire HDX 7" & 8.9" Android Development] draxie:
I don't think your assumed explanation is correct. I'd be __very__ surprised if boot and recovery

had substantially different boot procedure. What I think you're looking at is what we also had

trouble with on the HDX: you may need to adjust the kernel command-line parameters and/or

manipulate the embedded device-tree. And, my guess is that the TWRP build either has those

figured out, or uses a different kernel altogether which doesn't have those issues.

Good question, and I think you already know the answer from above:: the reason for re-signing is

that the original boot.img is changed; so, without re-signing it won't be accepted. Look in cuboot.py

for details. You'll notice that the code won't do much good for you as is, since it's explicitely checking

for either Thor (HDX 7) or Apollo (HDX 8.9); so, you'll need to add something similar for Ariel (?HD 7?).

This may also involve decompiling the device-tree (DT) to get the right video output names...

Good luck!
[Kindle Fire HDX 7" & 8.9" Android Development] bibikalka:
Ariel is MTK, there must be some cultural differences :D Apparently, boot.img will boot if it's written into /recovery, but it will not boot if it's placed in /boot.

Also, now that I double checked things, it seems that TEE1 is booting UBOOT, and then boot.img.

$strings tz.img (TEE1)

[%s] Device Unlocked!!! Skip LK verification.

[%s] Verifying LK...

[%s] fail to verify Second Bootloader.

[%s] This is an Engineering device.

[%s] User build Unlocked!!! Skip LK verification.

$strings lk.bin (UBOOT)

Device or user build unlocked, or non user build on engineering device! Skip kernel verification.

%s androidboot.unlocked_kernel=true

Verifying kernel with engineering key...

Verifying kernel...

%s androidboot.unlocked_kernel=false

I think that due to MTK HD is a bit different from HDX ...

So, why do you need to change boot.img then ? Cannot you just use the one from Amazon update as is? What are you changing? If I write boot.img from the update directly, will it boot?
[Kindle Fire HDX 7" & 8.9" Android Development] kirewade:
So after reading all of this my brain hurts. I am on 3.2.8 and i have a the nexus 2.05 on a safestrap rom. I am assuming i cant unlock my bootloader or roll back to .3.2.3.2 correct?
[Kindle Fire HDX 7" & 8.9" Android Development] EncryptedCurse:
Unfortunately not.