yashsingh1/xdaforums huggingface dataset:
[Fire HD 6 and 7 Android Development] powerpoint45:
[MENTION=6680544]bibikalka[/MENTION] I think I got what you wanted. Here is the log file: Log1: https://drive.google.com/file/d/0Bx_94ujbh0qoUFJFNER2NThCNEU/view?usp=sharing and Log2: https://drive.google.com/file/d/0Bx_94ujbh0qoOXFWMnIyTlk4U3M/view?usp=sharing

Both logs are of the same issue (with the blank screen brick) but log 2 might be a bit cleaner.

Here is the part of the log I notice:

and

I hope this helps. Let me know if you figure anything out or whatnot.
[Fire HD 6 and 7 Android Development] YamiRioru:
I see pyserial 3.1.1 but no 2.7 and will having it being 32 bit, will it work on my 64 bit windows 10???

---------- Post added at 04:21 PM ---------- Previous post was at 04:18 PM ----------

the site has update 3.1.1 but no 2.7 listed in the downloads???

---------- Post added at 04:22 PM ---------- Previous post was at 04:21 PM ----------

nevermind: found 2.7 on the github page :D
[Fire HD 6 and 7 Android Development] YamiRioru:
am I able to fix this kind of brick with a factory cable? because installing the drivers for pyserial are a pain in the ass without some kind of video tutorial or some physical guidance...
[Fire HD 6 and 7 Android Development] bibikalka:
post #1, Option A. LK @ 0x1300000

It seems that you have FireOS 4.5.5, is it bootlooping then ?
[Fire HD 6 and 7 Android Development] bibikalka:
Factory cable does not work with this Fire, so you have to persist with the driver install. Sorry ...
[Fire HD 6 and 7 Android Development] bibikalka:
Go back to post #1, where I linked a couple of threads for different Amazon devices. Those were using Linux with AFTV2 tools, and you should find all kinds of advice in those threads.
[Fire HD 6 and 7 Android Development] bibikalka:
Excellent effort!

I've dug up your ancient UART logs, and found this :

Old fire6boot.txt (16 Gb device):

[BLDR_MTEE] aes128cbc takes 10 (ms) for 956240
[COLOR="Red"][BLDR_MTEE] tee img ver: 0x3001 (<=0x0000FFFF)[/COLOR]
[HW CRYPTO PL] AXI = 0x0000885B
[BLDR_MTEE] succeed to load mtee image from TEE1 patition at address 0xB8A00000 (required ext mem size: 0x07600000)
[PLFM] ram_console(0x2)=0x2 (boot reason)

New log2.txt (8 Gb device):

[BLDR_MTEE] aes128cbc takes 13 (ms) for 1187200
[COLOR="Red"][BLDR_MTEE] tee img ver: 0x3003 (<=0x0000FFFF)[/COLOR]
[HW CRYPTO PL] AXI = 0x0000885B
[BLDR_MTEE] succeed to load mtee image from TEE1 patition at address 0xB8A00000 (required ext mem size: 0x07600000)
[COLOR="Red"][DEV]Prod bit is set in eFUSE[/COLOR]
[HW CRYPTO PL] AXI = 0x0000885B
[HW CRYPTO PL] AXI = 0x0000885B
0x3F,0x3B,0xDF,0x77
[LIB] HW DEC
[BLDR] fail to load mtee image, error: -8
[PLFM] preloader fatal error...
[COLOR="Red"][PLFM] emergency download mode(timeout: 300s).[/COLOR]
mtk_arch_reset at pre-loader!

I've highlighted the interesting lines in red, it seems that there is a mention of eFUSE in the new log. Overall, this is the confirmation of eFUSE presence & use in Fires. Strangely enough, it did not complain about any version mismatch, and just stopped working.

Also, I wonder if one could exploit what is called "emergency download mode" in the above log.

It'd be interesting to unbrick this Fire via AFTV2 tools, and with 4.5.3 bootloaders get the UART log. Then flash the FireOS 5 bootloaders that work, and then get UART log again. This way there will be 3 different logs on the same device. - Not needed anymore.

Update : Since the the Fire was bootlooping, I found a good section of the new log2 which is very comparable to the old one. I've attached both logs for reference, they can be readily compared in programs such as Notepad++ with the compare plugin. It seems pretty clear that the operation of the older FireOS 5 bootloaders is prevented via eFUSE & version number, and not something else. So this is very similar to Fire 2015, where eFUSE is also preventing the downgrades. This kind of answers most of the questions I had regarding the bricking caused by the downgrade procedure.

Other thoughts ?

[MENTION=6058831]DoLooper[/MENTION], [MENTION=4267571]sd_shadow[/MENTION], [MENTION=5728225]Kramar111[/MENTION], [MENTION=3411776]zeroepoch[/MENTION], [MENTION=4381075]hwmod[/MENTION]
[Fire HD 6 and 7 Android Development] YamiRioru:
but, I don't want to swap my windows 10 os for linux... :/
[Fire HD 6 and 7 Android Development] Killa8:
Factory cable doesn't work with this model, why do you think we are here if it worked?

Swap to Linux for the tutorial, it comes usually with everything pre installed

---------- Post added at 06:40 AM ---------- Previous post was at 06:39 AM ----------

Run as live CD, all Linux distros have that option
[Fire HD 6 and 7 Android Development] mymindstorm:
Can someone check my part files for me please?
[Fire HD 6 and 7 Android Development] bibikalka:
Post #1,

Option C. LK @ 0x1900000

It seems you already have 4.5.3 TEE1 & UBOOT, so you can just write in TWRP by itself!
[Fire HD 6 and 7 Android Development] Killa8:
Hey, great job you're doing

Can I know how exactly you find the correct addresses?
[Fire HD 6 and 7 Android Development] mymindstorm:
Thank you for helping me [MENTION=6680544]bibikalka[/MENTION]!
[Fire HD 6 and 7 Android Development] bibikalka:
Just get a hex editor such as Frhed, and start looking at the partition headers / blocks. You'll see that each partition has its identifying features, and so from the address of the block where this partition sits, one can figure out the offsets. So far we've only seen 3 distinct address choices, so I have added additional reads upfront for LK & TEE1, and it's super easy to see what option one has: a,b, or c from post #1.
[Fire HD 6 and 7 Android Development] Killa8:
Press the thank button in the OP :)
[Fire HD 6 and 7 Android Development] diskopat:
I unbricked my fire too and bricked again same as you.

Before the brick i couldnt send any file from pc to twrp (device name was ariel on pc but i couldnt see sd card)

After i turned off twrp couldnt start again anymore. I can handshake but No more now same as you.
[Fire HD 6 and 7 Android Development] Killa8:
Really strange situation,

If handshake works I think the read.mcc should work too...

Are you sure all drivers are correctly installed?

And are you sure it's the Fire HD 7/6 you're having?
[Fire HD 6 and 7 Android Development] Killa8:
That emergency download mode seems very interesting...

Hope someone can exploit that too
[Fire HD 6 and 7 Android Development] diskopat:
Yes i'm sure. Because i unbricked my device with this tutorial.
[Fire HD 6 and 7 Android Development] powerpoint45:
To [MENTION=6680544]bibikalka[/MENTION] and anyone else. I have created a custom bootable ISO image with AFTV2 tools, img files, drivers, adb, fastboot, ghex (hex editor), and other tools to make it easier for people to do this without all the setup required. It is based off of Archbang (32 bit). It can be installed to a usb stick or cd with dd or whatever burning software. Once booted up, type "root" at login and you will be taken to the desktop. AFTV2 files are located in the root home directory "/root" as well as image files. The only issue is that wifi doesn't work on this os. Somehow systemd got messed up. But it's not an issue because everything required is on the os.

More info and video here: http://xdaforums.com/fire-hd/development/video-linux-iso-unbrick-fire-hd6-hd7-t3474999/page1

You can download the OS here:

Linux ISO

If you do not have a US Keyboard layout, please look here: http://wiki.archbang.org/index.php?title=Setting_Your_Keyboard

ChangeLog:

Updated 10/5/16:

*Optomized scripts

*Added "complete.sh" This reboots the device

Updated 9/27/16:

*Added script to auto-detect which unbrick option to use (determineOption.sh)

*Added scripts to write img files to correct addresses ( unbrickOptionA.sh, unbrickOptionB.sh, and unbrickOptionC.sh)

*Added scripts to read in and label part files (readerSpecialOptionA.sh, readerSpecialOptionB.sh, and readerSpecialOptionC.sh)

*Nemo open in terminal fixed

*.part files set to open with ghex by default

Updated 9/24/16:

*Nemo as default file manager

*Updated html page with instructions from forum

I will be making a video on unbricking within a couple months or so.
[Fire HD 6 and 7 Android Development] gascomm:
Me again. Since I last posted I've installed Ubuntu & got as far as having Linux handshake pending. I couldn't figure out how to install drivers for the preloader, or how to see if the hd6 was being seen by the system.

I've tried everything in this thread & can only conclude that my fire is beyond my abilities. its heading for the bin unless someone want to offer to have a look at it on a proven setup. DM if in the UK and can offer a hand.
[Fire HD 6 and 7 Android Development] bibikalka:
Excellent effort ! This is going to make a sporadic unhappy bricker very happy !!! :D I'll put a link to your info into my post #1.

Thanks again !!!
[Fire HD 6 and 7 Android Development] powerpoint45:
You might need this file in /etc/udev/rules.d/ : https://drive.google.com/file/d/0BxRGSarVLCwhd1p5UzV3ZkxNbFU/view?usp=sharing reboot afterwards
[Fire HD 6 and 7 Android Development] z1an:
Fire HD 7`` 5th gen HARDBRICK

I have bricked Kindle Fire HD7 5th gen 2015, only mtk preloader com 4, and black screen, i start handshake.py, handshake found com 4, start read mmc from addres to address, which address to put and send to you?

And how much time need to read address?
[Fire HD 6 and 7 Android Development] powerpoint45:
You should send all of them. You can copy/paste commands list into terminal or place the commands in an sh file so you can do all of them at a time. Then zip them all up.
[Fire HD 6 and 7 Android Development] z1an:
I put read mmc command with address, and start the command, i leave pc 2,5 hours, when i back, my pc do nothing, same as i leave, only blink prompt??
[Fire HD 6 and 7 Android Development] powerpoint45:
[MENTION=7751690]z1an[/MENTION] place this file in aftv2-tools folder: https://drive.google.com/file/d/0BxRGSarVLCwhR095aFhQdkJIdTA/view?usp=sharing then cd into aftv2-tools, handshake the device, then type "sh reader.sh", then press enter. It shouldn't take too long and you should see something happening on the terminal window.
[Fire HD 6 and 7 Android Development] Killa8:
If handshake functions then maybe the Pc disconnected the device, idk,

Try to shutdown the Fire by pressing the power button for like a minute, then start the handshake.py and connect your device, should work

Which OS are you on?
[Fire HD 6 and 7 Android Development] z1an:
Thanks, i will test, and tell to you :)

---------- Post added at 12:27 PM ---------- Previous post was at 12:24 PM ----------
[Fire HD 6 and 7 Android Development] Killa8:
Hmm, no need dual boot, just run as live CD, it's easier
[Fire HD 6 and 7 Android Development] z1an:
./read_mmc.py 0x0000000 0x1000 0x0000000.part

Traceback (most recent call last):

File "/usr/local/lib/python3.5/dist-packages/serial/serialposix.py", line 244, in open

self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)

FileNotFoundError: [Errno 2] No such file or directory: 'COM4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "./read_mmc.py", line 352, in <module>

dev = serial.Serial(port, BAUD)

File "/usr/local/lib/python3.5/dist-packages/serial/serialutil.py", line 182, in __init__

self.open()

File "/usr/local/lib/python3.5/dist-packages/serial/serialposix.py", line 247, in open

raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))

serial.serialutil.SerialException: [Errno 2] could not open port COM4: [Errno 2] No such file or directory: 'COM4'

IN linux [Errno 13] Permission denied: '/dev/ttyACM0'

UPDATEEE: Problem Fixed in linux with command & sudo chmod 666 /dev/ttyACM0

BUT PROMPT ONLY BLINKING SAME AS IN WINDOWS Helpp
[Fire HD 6 and 7 Android Development] Killa8:
Hmm, seems like some sectors of your tablet have been like deeply damaged..

Maybe [MENTION=4469251]powerpoint45[/MENTION] or [MENTION=6680544]bibikalka[/MENTION] may help
[Fire HD 6 and 7 Android Development] z1an:
Maybe someone have a sectors for Kindl Fire HD 7 inch 5th gen, can tell to me and after that i can only write mmc, because i have address`s?

[MENTION=4469251]powerpoint45[/MENTION] or [MENTION=6680544]bibikalka[/MENTION]
[Fire HD 6 and 7 Android Development] Bren123:
[MENTION=4469251]powerpoint45[/MENTION] Hey, when I boot up your custom build of arch do I run Reader.sh and Readerspecial.sh and zip the part files I get?
[Fire HD 6 and 7 Android Development] Killa8:
Yes, execute those commands and zip all the files you get, then upload it here
[Fire HD 6 and 7 Android Development] Bren123:
Ok here are my part files I got them by running Reader.sh and readerSpecial.sh.
[Fire HD 6 and 7 Android Development] bibikalka:
Post #1, Option B. LK @ 0x1680000
[Fire HD 6 and 7 Android Development] Bren123:
Thanks I'm writing 453p_teel.img right now

---------- Post added at 04:38 PM ---------- Previous post was at 03:57 PM ----------

Deleted.
[Fire HD 6 and 7 Android Development] Bren123:
Doesn't detect my internal storage and won't sideload 4.5.3 what am I doing wrong but when I plug it into my laptop it shows the 5 gb internal storage
[Fire HD 6 and 7 Android Development] bibikalka:
No need for you to flash 4.5.3 now !!! You already have all you need - TWRP. Either install the latest FireOS 4 as in here :

http://xdaforums.com/fire-hd/general/upgrade-to-4-5-5-root-t3174449

Or Lollipop:

http://xdaforums.com/showpost.php?p=62011228

Follow the instructions carefully !
[Fire HD 6 and 7 Android Development] Bren123:
OK thanks but twrp won't recognize my internal storage do I adb Sideload
[Fire HD 6 and 7 Android Development] bibikalka:
One good way is to use an OTG cable, and just sideload from a USB drive. It seems your Fire has /data/media , so try to access that path, it's the same as /sdcard.
[Fire HD 6 and 7 Android Development] Bren123:
Thanks I got it I just rebooted out of twrp it wouldnt go back into it so I unplugged the battery then booted into twrp and it worked.

---------- Post added at 06:11 PM ---------- Previous post was at 06:08 PM ----------

Do you recommend Kitkat or lollipop?
[Fire HD 6 and 7 Android Development] z1an:
Someone to Help???

Can someone HELP with my problemm?
[Fire HD 6 and 7 Android Development] Bren123:
I decided to go with lollipop got it working thanks [MENTION=4469251]powerpoint45[/MENTION] for the iso and [MENTION=6680544]bibikalka[/MENTION] now where do I donate.

---------- Post added at 10:32 PM ---------- Previous post was at 10:32 PM ----------

What's your problemm?
[Fire HD 6 and 7 Android Development] carlyman:
Thanks powerpoint45! Question tho, as I seem to have the same problem as before.

I boot into your custom build, start handshake and get a response

[root@archbang aftv2-tools]# ./handshake.py
Waiting for preloader...
Found port = /dev/ttyACM1
Handshake complete!
[root@archbang aftv2-tools]#

However, once I run "sh reader.sh" it just hangs with nothing happening on the Terminal. I've also copied over the "51-android.rules" file (although one already appeared to be there) and still no luck.

Any thoughts on the issue?

Thanks,

JC
[Fire HD 6 and 7 Android Development] powerpoint45:
It has a permission denied. Are you on root(sudo su)? have yo tried my iso. Sometimes handshake can be unresponsive and can take a few tries as well.

---------- Post added at 02:14 AM ---------- Previous post was at 02:13 AM ----------

have you tried multiple times? The handshake could have been broken
[Fire HD 6 and 7 Android Development] carlyman:
Yes....before trying your ISO, was having same issues in Linux and Windows (booted with unsigned drivers). With your ISO, tried all USB ports on one desktop with a regular USB and OTG USB cable...as well as two different laptops. Note that no files are created in the directory; readerSpecial.sh hangs as well.
[Fire HD 6 and 7 Android Development] powerpoint45:
Honestly not sure. Have you tried to read a single address. Any ideas [MENTION=6680544]bibikalka[/MENTION]
[Fire HD 6 and 7 Android Development] carlyman:
I've tried inputting single read commands out of both reader.sh and readerSpecial.sh, but same result.
[Fire HD 6 and 7 Android Development] powerpoint45:
does the cursor move to the next line to indicate the command was entered
[Fire HD 6 and 7 Android Development] carlyman:
Looks like it hangs here:

# enable pio mode
if msdc_dma_status():
msdc_dma_off()

---EDIT---

Haha, yes.
[Fire HD 6 and 7 Android Development] powerpoint45:
by chance can you comment that line out and it work?
[Fire HD 6 and 7 Android Development] carlyman:
Ya, tried that...but hangs a couple lines down:

msdc_do_command(MMC_READ_SINGLE_BLOCK, addr + offset)
[Fire HD 6 and 7 Android Development] powerpoint45:
I don't know what to tell ya man. Maybe a different usb cable or usb port
[Fire HD 6 and 7 Android Development] carlyman:
Appreciate the help...just to note tho, I tried regular USB and OTG cables on one desktop PC (multiple USB 2.0 and 3.0 ports) as well as two laptops. ...will keep digging for a little bit more.
[Fire HD 6 and 7 Android Development] powerpoint45:
If you cannot find anything out. A fire hd6/7 motherboard is pretty cheap. You can get one on eBay or get a whole fire hd6/7 with a cracked screen on eBay. pretty cheap and easy to replace. If all else fails of course
[Fire HD 6 and 7 Android Development] gascomm:
thanks for the headsup, you've made a powerful tool there! I may have missed a trick but I can't find the backslash symbol on my uk thinkpad keyboard. is it possible to change keyboard layout from US to UK? I tried cutting+pasting but the terminal just shows the cntrl-V entry.

so close to a decent crack at this horrible little brick of a thing.
[Fire HD 6 and 7 Android Development] bibikalka:
[MENTION=4469251]powerpoint45[/MENTION] - there was a case like that here, a couple of weeks ago. Switching computers, OSes - nothing ... So no unbricking could take place :( Perhaps, some bricks are forever ???

Carlyman - can you explain how it became bricked ? I am curious what the hell happened ...
[Fire HD 6 and 7 Android Development] z1an:
Wrong Frimware
[Fire HD 6 and 7 Android Development] my2k2zx2:
Yup, that was me. I've now had a 2nd KF 4th gen brought my way with the same cache error and no luck with this one either. Both users claim to have no idea what happened before they bricked. If anyone wants to pay shipping to try their luck with either of these, I'll remove the board and mail it out.
[Fire HD 6 and 7 Android Development] powerpoint45:
try this: http://wiki.archbang.org/index.php?title=Setting_Your_Keyboard (then log out and log back in)

if you are trying to read the addresses, type "sh reader.sh" when in aftv2-tools folder
[Fire HD 6 and 7 Android Development] powerpoint45:
Just updated the Linux ISO with a big update. See full changelog here: http://xdaforums.com/showpost.php?p=68802463&postcount=294

[MENTION=6680544]bibikalka[/MENTION]

I mainly just want to point out that this build contains a script that can auto-detect which option to use (A, B, or C). After reading in all the addresses with reader.sh, you can run determineOption.sh and it will tell you which option to use. You can then run readerSpecialOptionA.sh, readerSpecialOptionB.sh, or readerSpecialOptionC.sh. Next Back up those part files to a usb. Finally you can run unbrickOptionA.sh, unbrickOptionB.sh, or unbrickOptionC.sh to write the img files to the correct addresses. If you are trying to use this determineOption.sh script apart from the custom Linux ISO, keep in mind you must have xxd installed.
[Fire HD 6 and 7 Android Development] bibikalka:
OK, fantastic !!! Now, I keep an open mind that perhaps another address combination might show up someday - so hopefully your script can recognize that, and warn accordingly. But it's great that there a lot less need now to read the HEX :D
[Fire HD 6 and 7 Android Development] powerpoint45:
I can make it more obvious, but right now if their is no option that works, it simply just does not give you an option to use.
[Fire HD 6 and 7 Android Development] my2k2zx2:
Well, I gave this a try and still no luck unbricking either of my devices with the cache error. I've given up and just ordered 2 boards from ebay. Oh well, it was worth the try.
[Fire HD 6 and 7 Android Development] bogfrog:
Thanks to the great effort by powerpoint45 :)

Thanks to the great efforts of powerpoint45 in producing an iso image, I have today successfully unbricked a HD7 and 3 HD6's

I'm now a very happy bunny :)
[Fire HD 6 and 7 Android Development] bibikalka:
How did you end up with 4 (!!!) bricks ??? :D
[Fire HD 6 and 7 Android Development] my2k2zx2:
were they all boot loop/black screens or did any of them have a cache errors when going in to the stock recovery?
[Fire HD 6 and 7 Android Development] bogfrog:
I'm an inveterate fiddler!

---------- Post added at 12:29 PM ---------- Previous post was at 12:28 PM ----------

HD6's were boot loops, HD7 was cache error
[Fire HD 6 and 7 Android Development] powerpoint45:
[MENTION=6680544]bibikalka[/MENTION] I just ran into the hard brick where reading and writing does nothing (just stuck). After going through the unbrick method, I flashed Rom version 5.3.1 (and supersu) after rebooting and waiting 40 or so minutes for it to boot (on animation) I shut it down to try to get into recovery. Some reason recovery wouldn't boot up, just would shut down and reboot. Now I'm trying to do the unbrick method again but after the handshake, nothing can be done. Could the preloader protocol be different on version 5.3.1? I'll try and get some logs again...

5.3.1 may not be safe to flash. I would stay away from it until we figure something out.

Question to those who successfully unbricked. What ROM did you flash after the unbrick. And what about those with the hard brick?

Edit: Anyone else reading please note that 5.3.1 should be 100% safe if you follow these instructions: http://xdaforums.com/fire-hd/general/how-to-upgrade-to-lollipop-root-gapps-t3163950/page1
[Fire HD 6 and 7 Android Development] bibikalka:
Well, I just checked my 5.3.1 (with the ancient bootloaders) that I updated via this method :

http://xdaforums.com/fire-hd/general/how-to-upgrade-to-lollipop-root-gapps-t3163950

AFTV2 tools seem to work fine.

So it must be the bootloaders in 5.3.1 that disable this feature. I think another user also reported the same issue after forgetting to flash the older bootloaders along the way.

In your case if the device never booted up, it did not have a chance to update recovery from TWRP to the stock, so now it's not signed, and cannot boot. The AFTV2 tools became known before 5.3.1, so I wonder if they disabled these both on Fire 2015, and Fire HD 2014.

So looks like the method is going to be useless with the bricks which have 5.3.1 bootloaders in them ...
[Fire HD 6 and 7 Android Development] powerpoint45:
Oh... I was wondering about the recovery thing. That makes sense. Here are a couple logs but I'm not sure if it tells us anything.

https://drive.google.com/file/d/0Bx_94ujbh0qoN3J3dF9RaVdzN2M/view?usp=sharing

https://drive.google.com/file/d/0Bx_94ujbh0qobXRtakpvY2syZEk/view?usp=sharing

You think 5.1.2.1 would be safe to flash without flashing old bootloader?
[Fire HD 6 and 7 Android Development] zeroepoch:
[MENTION=6680544]bibikalka[/MENTION], it's quite likely that Amazon blocked the preloader hack with the latest update. They did that for the AFTV2 on 5.2.1.0+. I did a disassembly of the preloader on the AFTV2 to confirm that they removed the commands we are using. There are only the minimal commands necessary now and unless you have a signed download agent there is nothing you can do. You would still be able to handshake, but you would not be able to read/write anything and it would probably hang with my tools. The preloader and lk are the "bootloader" chain, so if you update those and it's now been disabled you are out of luck. I happen to have 2 Fire 2015s (the kids edition), but I haven't messed with them besides installing Google Play so I couldn't confirm anything myself. They're probably running the latest version though since they auto update at night.