yashsingh1/xdaforums huggingface dataset:
[Kindle Fire Android Development] tobiascuypers:
Very nice write up [MENTION=4243514]Hashcode[/MENTION]. Im just wondering what "unforseen changes" would you be talking about?
[Kindle Fire Android Development] Hashcode:
There were a few devices which were running a CWM recovery built from the initial 3.0 kernel back in May 2012. That kernel was not patched for MMC_CAP_ERASE, and on our emmc chip it caused a wear levelling bug which basically made the device unusable.

The entire thread is here:http://xdaforums.com/showthread.php?t=1651413

This issue should not be hit by current Kindle Fire users.
[Kindle Fire Android Development] Entropy512:
This is a major victory in the fight against Superbrick.

Unfortunately, the users hit hardest by the Superbrick bug (Samsung Galaxy S2 family) have devices that cannot be USB-booted in any way.

Also, you might want to rename the command to be more descriptive. "vendor" could be anything - this is a very specific vendor command sequence here.
[Kindle Fire Android Development] Hashcode:
Yeah I'll probably set it up "mmc_utils vendor bootsize <size> <device>" as there is a report summary I may add later.
[Kindle Fire Android Development] vbdss:
[MENTION=4243514]Hashcode[/MENTION] my device suffered from the brick but i could "fix" it, but i lost some blocks on my partitions. I had to shrink some partitions, so i could use the device again.

Doing this process can fix this for me, will i have back all my partition size right?
[Kindle Fire Android Development] Entropy512:
It should. Unlike workarounds that avoid touching damaged areas, this resets the chip so completely that the corrupted wear leveller data structures are reset. At least that was the theory, and Hashcode's results with his Superbricked KFire confirm that this appears to be the case.
[Kindle Fire Android Development] soupmagnet:
Great! Now all we have to do is get him to brick his HD :D
[Kindle Fire Android Development] oVeRdOsE.:
Wow cool!

I had this exact problem back in days. You've helped me on that and most user find out that it was probably a emmc bricked problem.

Fortunately, I had no problem to get a new one from amazon. I was happy after weeks working on it. I even tried to restore it from knoppix.

For now, I'm running the most recent roms on the board, hope this problem will never come back.

If it does, you'll be my hero.
[Kindle Fire Android Development] alarien:
Greetings, @Hashcode!

Got bricked Kindle Fire 1st Gen with also cracked battery pins, so I can't even tell if my battery is working or not. Battery is working. Tried this new method and got this:

./usb_boot_twrp
Loading bootloader through USB...
?
waiting for OMAP44xx device...
sending 2ndstage to target...
waiting for 2ndstage response...
sending image to target...
Loading TWRP through fastboot...
< waiting for device >

Should I try few more times or is battery some internal/external loose connection the cause of problem (e.g can't power on screen/something, load bootloader, enter fastboot, load TWRP, etc.)?

Thank you very much. Miss you and your work since that brick.
[Kindle Fire Android Development] soupmagnet:
When you get to that point, leave the script running, power the device completely down, and put the device into usbboot again.
[Kindle Fire Android Development] alarien:
Unfortunately, that didn't work.

I think, before loading recovery, we send bootloader on the device for a reason.

Thank you for your help and thoughts, anyway.

Edit. Also, I can feel that on

Loading TWRP through fastboot...
< waiting for device >

step chipset is warm (memory and CPU, at least) and power button LED is on and green.
[Kindle Fire Android Development] Shawnsch:
my kindle has become bricked im not really sure but if i plug it in it says device not recagnized and it only boots to the kindle fire logo and sits there any idea what i can do? any help is appreciated
[Kindle Fire Android Development] soupmagnet:
What does that have to do with anything that I said?

Just tinkering around and testing various things on my device, I've used usbboot w/shorting trick to replace my bootloader and recovery more times than I care to imagine. In maybe 80% of those cases, I've run into the exact same problem that you are dealing with right now.

When you put the device in usbboot using the shorting trick, fastboot is only available for a short period of time, which is why the script sometimes hangs at "waiting-for-device". When this happens, you have to power the device completely off, unplug it, then put it in usbboot with the shorting trick to get fastboot working again. Once fastboot is available, the script will pick up where it left off.

If you aren't getting the right results, there's a good chance you're not doing it correctly. Timing and technique have a lot to do with whether or not it will work properly, and many times you'll have to go through the same process over and over again before getting it right.

I'm willing to bet that your cracked battery pin has nothing at all to do with the fact that you have been unsuccessful in your attempts to restore the device, unless you are (for some strange reason) trying to unplug it beforehand.

Oh, and you might want to be sure to check the md5sums of the files you downloaded to make sure you don't have any corrupted files.

[Edit:] The fact that your first and second stage bootloaders have been installed and your power LED is lit, suggests that there is something wrong with your display, or that you may have a loose connection somewhere (not in your battery). If you have a factory cable, plug it in and see if you get a response from...'fastboot getvar product'
[Kindle Fire Android Development] alarien:
I'm sorry, didn't mean to sound rude at all.

I just thought that usbbooting bootloader is making fastboot available and if my device is Superbricked, the bootloader will not be saved after complete power off. So fastboot will not be available on next usbboot. [MENTION=4243514]Hashcode[/MENTION] may correct me, though.

MD5 checked, of course.

You think, before loading bootloader/accepting fastboot commands, it checks availability of the display? I'll check my connection, you mean PC to device or some internal parts of the device? Unfortunately, I got no fastboot cable, it would be simple otherwise. :)

Thank you very much once more. Will try further. Your help is greatly appreciated.

Edit. Used another USB cable, result is the same.

Also tried another bootloaders, fff-1.4a and pokey9000's u-boot.bin from FireKit with the same result except for no LED at all.

To exclude timing problem, also opened 2 Terminal windows with

sudo ./usbboot ./aboot.bin ./fix2-u-boot.bin

and

sudo fastboot boot ./openrecovery.img

Didn't worked as well.

Tried for approximately 100 times with no luck.

Just can't get into fastboot mode.

Please, tell me, what else can I do? Is there another way, except getting fastboot cable?
[Kindle Fire Android Development] alarien:
One more update.

So, I just got fasboot cable. Tried simply plugging it in when device is completely off with no luck.

Also, tried plugging it in with the shorting trick, running ./usb_boot_twrp script with the same output as if I was using regular USB cable. Also, no response from

fastboot getvar product

.

May it be a sign of totally bricked eMMC chip = no bootloader to enter fastboot, or should fastboot cable work without bootloader?

And if some parts of the device is broken (eg, display) would it be possible to add/remove check of them from the bootloader? As LED seems working, simple blinking if something is broken and bootloader can't be loaded would be enough.

What should I try next?
[Kindle Fire Android Development] Hashcode:
Believe it or not, there is no such thing as "totally bricked". The usbboot solves that for us. If done correctly, it will boot your device to a usable state and you can re-write literally every partition from backups.

I'm sort of with [MENTION=4425761]soupmagnet[/MENTION] on this one. Booting from usbboot is alot about timing and technique. If it doesn't look like it's working then it's best to long press the power button and try it again. I have the fortunate ability to watch serial output while it's coming up, so I immediately know if usbboot is working or not. For the normal user it will be trial and error.

Definitely give it another shot.
[Kindle Fire Android Development] alarien:
Thank you very much.

I will try more. If I correctly understand you, usbboot and fastboot is a single process in this case and despite of usbboot success ("sending image to target" message) and green LED etc. almost every time I try it, if fastboot commands (e.g. "fastboot boot ./recovery.img") failed on "waiting for device" message, than whole "usbboot" process is failed, too.

And one more question, is fastboot cable useless for now, until chip is fixed?

Thank you once more for your time. I'm sorry if my questions are too stupid.
[Kindle Fire Android Development] Hashcode:
Yes, you probably don't need fastboot cable for this procedure. And remember, there's no such thing as stupid questions.. :P

Well, I take it back this is XDA and you'll get eaten alive if you ask something really silly.
[Kindle Fire Android Development] alarien:
One more update.

Tried for a few more dozens of times, with no luck entering fastboot even once.

Also, got

dmesg | tail -n 15
[25331.112041] usb 1-1: USB disconnect, device number 33
[25463.860703] usb 1-1: new high-speed USB device number 34 using ehci-pci
[25463.994678] usb 1-1: unable to get BOS descriptor
[25463.995797] usb 1-1: New USB device found, idVendor=0451, idProduct=d00f
[25463.995810] usb 1-1: New USB device strings: Mfr=33, Product=37, SerialNumber=0
[25463.995819] usb 1-1: Product: OMAP4430
[25463.995828] usb 1-1: Manufacturer: Texas Instruments
[25464.039378] usb 1-1: USB disconnect, device number 34
[25523.124150] usb 1-1: new high-speed USB device number 35 using ehci-pci
[25523.256612] usb 1-1: [B]unable to get BOS descriptor[/B] - [I]what is this, by the way?[/I]
[25523.257730] usb 1-1: New USB device found, idVendor=0451, idProduct=d00f
[25523.257742] usb 1-1: New USB device strings: Mfr=33, Product=37, SerialNumber=0
[25523.257752] usb 1-1: Product: OMAP4430
[25523.257761] usb 1-1: Manufacturer: Texas Instruments
[25523.301463] usb 1-1: [B]USB disconnect, device number 35[/B] - [I]despite cable is connected and LED is green.[/I]

So, device is somehow recognized.

"fastboot getvar product" still stuck on "waiting for device".

I've got usbboot success and LED green almost every time now. But still no fastboot.

Also, may disfunctional battery be the problem? Is USB power enough to boot up?

Some advises on timing or technique, please, anyone? Just really needs a success story here :(

Thank you.
[Kindle Fire Android Development] Hashcode:
Do you have a /etc/udev/rules.d/51-android.rules (this could really be anything) entry for the TI vid/pid?

0451/d00f
[Kindle Fire Android Development] alarien:
Yes, just like this, but I'm not sure if it is correct.

cat /etc/udev/rules.d/otter-adb-fastboot.rules
#	Amazon Kindle Fire
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", SYMLINK+="android_adb"
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", SYMLINK+="android_fastboot"
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f"
[Kindle Fire Android Development] Hashcode:
Here's what I have on mine (99-android.rules):

# Texas Instruments
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", MODE="0666", GROUP="plugdev"
# Amazon Kindle Fire
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666", GROUP="plugdev"
[Kindle Fire Android Development] alarien:
Thank you very much. I'll try it ASAP along with possibly fixing my battery.

I really, really appreciate your help and care.

Sent from my Galaxy Nexus
[Kindle Fire Android Development] Jeffjb:
Is there a possibility of booting everything from USB (incl ROM)? It seems my eMMC is completely dead as well as not being able to mount the sdcard.

original thread I created about my attempts to revive my KF1 if you want to take a read: http://xdaforums.com/showthread.php?t=2445930
[Kindle Fire Android Development] lovejoy777:
Still stuck

Hi Hash

I recently got my new screen for my mmc damaged kindle. i have tried to follow your instructions but I cant figure it out.

Have you changed the file names? also my recovery partition is corrupt can you please give any more advice for a noob like me.

I can preform the usbboot trick and it says its loaded recovery but it just hangs on the twrp boot logo. any help would be great. cheers steve
[Kindle Fire Android Development] lovejoy777:
Edit. How many files should i have downloaded. I have 5 including the openrecovery-twrp-2.6.0.0-otter.img. should i have 2 more. I cd into the dirictory with those files inside and run ./usb_boot_twrp in terminal and all i get back is ./usb_boot_twrp: No such file or directory. sorry but i don't understand where its getting usb_boot_twrp from. should i have a file called mmc_utils?
[Kindle Fire Android Development] lovejoy777:
[MENTION=4243514]Hashcode[/MENTION] and anyone with any info to my above questions would be of great help
[Kindle Fire Android Development] kinfauns:
usb_boot_twrp is in pokey9000's Firekit distribution -> http://xdaforums.com/showthread.php?t=1430038

a prebuilt mmc_utils binary is in Hashcode's github repository for the project -> https://github.com/Hashcode/mmc-utils

I'm afraid you're on your own for the rest of it because I've never tried the shorting trick to force it into usbboot mode.
[Kindle Fire Android Development] lovejoy777:
thank you so much. i know all about the short trick, so no problems there. its just the files i couldn't find. i will try again this evening when I'm back. thanks for the heads up on the files. cheers steve
[Kindle Fire Android Development] lovejoy777:
[MENTION=4422144]kinfauns[/MENTION] do i push all of the files from mmc-utils-master or just mmc-utils from within mmc-utils-master.

also my damage is in my recovery partition so the only recovery i can boot into and get adb working is "cwm-based recovery v5.0.2.7 full (by DooMLoRD)" I remember this from when i first got curupted all those months ago. even when I usb boot into twrp from pokey's firekit it just hangs on the twrp boot animation (all other recoveries do this except DooMLoRD's, hence "I think its my recovery partition thats screwed) anymore help please. cheers for your time Steve

Maybe a little more detailed explanation for a mere noob like me.... Thanks again:)

Edit.

I tried just the 1 file mmc_utils and just get this

lovejoy@acer:~$ adb devices

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

List of devices attached

4FC6000600000001	recovery

lovejoy@acer:~$ adb push '/home/lovejoy/Desktop/kindleemmc/mmc-utils-master/mmc_utils' /sbin

545 KB/s (22232 bytes in 0.039s)

lovejoy@acer:~$ adb shell

~ # mmc_utils vendor 0 /dev/block/mmcblk0

/sbin/sh: mmc_utils: not found

~ #

am i doing something wrong?
[Kindle Fire Android Development] lovejoy777:
[MENTION=4422144]kinfauns[/MENTION] [MENTION=4243514]Hashcode[/MENTION] pleaser see edits above
[Kindle Fire Android Development] kinfauns:
I've never attempted the process Hashcode has outlined here, so I'm not the best person to be helping you. These answers/tips are just based on my experience with other things...

- Hopefully, you've managed to pull those two files mentioned in the OP.

- Just the mmc_utils binary should be all you need. The other files there are used to build that binary.

- The error you got is telling you that the shell can't find the mmc_utils binary in its known executable path.

- Check to see that the mmc_utils binary is actually in /sbin -> "ls /sbin"

- Make sure that it's executable -> "chmod 777 /sbin/mmc_utils"

- Try using the full path to the executable in your command -> "/sbin/mmc_utils vendor 0 /dev/block/mmcblk0"

- The binary doesn't necessarily have to be run from /sbin... you just need to get it somewhere in the filesystem. You'll have to look around to see what's available to you. Since you've got a damaged storage system, I don't know what your options might be.

As a general tip, you might want to look into some basic unix/linux commands. Being able to get around the directory structure and do some rudimentary file manipulations is going to help you in a lot of other things.

Good luck.
[Kindle Fire Android Development] lovejoy777:
thanks again ill try again tonight. cheers steve
[Kindle Fire Android Development] Hashcode:
I'm about 80% done w/ the new bootloader for the KFire 1st Ed.. While the initial version will only have the same menu options as the existing firefirefire v1.5, I plan on adding a menu option under "Advanced" to support the EMMC fix from inside the bootloader(!)

It's kind of a complicated process to do from a bootloader standpoint, but I feel that it's by far the easiest way for users to recover from hard bricks, as they can use the usbboot process to load it. Basically process looks like this:

- Boot up new otterx bootloader (via pin short trick + usbboot)

- Use the menu system to go into Advanced -> EMMC Corruption Fix

- Select [ CONFIRM] that this will wipe the entire device

- The bootloader backs up the following partitions to memory: bootpart0, bootpart1, xloader, bootloader and recovery.

- Then it runs the Samsung iNAND command series to wipe the entire emmc

- Performs the format to re-establish the partition table

- Restores the backed up partitions

Then it would be up to the user to reboot into recovery and possibly re-flash whatever back to the device.

So if you continue to have issues, there's always that. Probably a week or 2 out tho, as I'm still working on the new menu system.
[Kindle Fire Android Development] Hashcode:
Try grabbing the new binary from:

https://github.com/Hashcode/mmc-utils/blob/master/mmc_utils?raw=true

It's now a full static binary and does not require any of the TWRP libs.
[Kindle Fire Android Development] lovejoy777:
you kind sir are a genius.

thankyou i will give it a go when im home. cheers steve
[Kindle Fire Android Development] lovejoy777:
ok im going to wait for your bootloader as my copper shorting pad on the pcb is nearly gone (due to trying so many times last year). thanks again and i will watchout for your awesome bootloader. Steve
[Kindle Fire Android Development] lovejoy777:
well just an update. i can confirm that the corruption fix defenatly works (Thankyou Hashcode) i now havwe 2x kindles:D :D

use the new bootloader v2.03.
[Kindle Fire Android Development] Maromi:
Now that you are reverting mmc_cap_erase, does that mean you are testing the samsung secure erase bug patch?
[Kindle Fire Android Development] Hashcode:
Yep. I've wiped quite a bit in a recovery that built with it. And everything seems fine.
[Kindle Fire Android Development] Maromi:
i only ask because no one else seems to be using the patch on other devices
[Kindle Fire Android Development] lovejoy777:
Hash i have a perfect testing device if you need anything testing before it goes public:)
[Kindle Fire Android Development] Lanchon:
hi [MENTION=4243514]Hashcode[/MENTION],

im doing the same thing for the i9100, to recover TRIM and partition ERASE. performance on those devices is crap otherwise.

i think non-secure ERASE and TRIM are safe even on brickbug-affected devices, for reasons i discuss here. however i am recommending people not use my TRIM enabled kernel if they have brickbug. (yet one person is already trying it without problems so far.)

what is your experience with brickbug-affected eMMCs using samsung's patch and fstrim? should i recommend people use a TRIM-enabled kernel in that case?

and what are your thoughts on the WL bug? is samsung's fix applied on your kernel? the fix is version specific to fwrev 0x25 but i guess the bug probably preexists and is present in fwrev <0x25 (ie brickbug chips).

finally, have you seen this? it applies a firmware update to eMMC chips apparently based on the VHX microcontroller (not the typical brickbug affected chip). in that thread they dump eMMC firmwares and talk about possibility of upgrading. just to pick your interest... :)
[Kindle Fire Android Development] overlode:
I am struggling with this one, I get permission denied after opening the adb shell and trying to run mmc_utils? I am not very good with Linux I am afraid :(
[Kindle Fire Android Development] Ixthusdan:
Open your console as root by using sudo or switching to root and launching a console.
[Kindle Fire Android Development] sd_shadow:
You have a Kindle Fire 1 (D01400)?
[Kindle Fire Android Development] overlode:
Yeah, tried all that but still could not get access, managed to get it working by using Kinfauns guide in the end :)

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

Yes, it is the Kindle Fire 1st Gen but all sorted now :)
[Kindle Fire Android Development] Lanchon:
hi!

just wanted to let everybody know we tried this method to revive a GT-I9250 galaxy nexus whose emmc was locked in read-only mode.

it didn't work, the emmc was not erased by the commands.

details here:

http://xdaforums.com/galaxy-nexus/help/help-gnex-brick-softbrick-emmc-problem-t3020996

thanks for this amazing work!!!
[Kindle Fire Android Development] HaiLT1004:
link download DIE

some links can not be used, if anyone help me with this fix
[Kindle Fire Android Development] sd_shadow:
the Kindle fire 1 has a Texas Instruments Chip...
[Kindle Fire Android Development] Milor123:
Hey dude, Could work it for a mtk 6582 device? (My problem appears after change EBR1, EBR2, then the android says something like "internal storage damaged, do you want format?", and I format it... T_T , after emmc is brick...

something happen, now when I try do a test in spflash tools, it says ERROR: NAND Flash was not detected, y cant mount emmc in my twrp... I can flash all and my phone load the lollipop, but says "the internal storage has error" then ask me if i want format the internal partition....

the Titanium backup can recognize the storage and says that the internal storage have 2.07 (wtf?) and ROM system have 914 (nice)... But my phone have 8 GB...

Can someone help me, What should i do?

Thank you very much

cat /proc/emmc
partno: start_sect nr_sects partition_name
emmc_p1: 00000400 00000002 "ebr1"
emmc_p2: 00004800 00005000 "protect_f"
emmc_p3: 00009800 00005000 "protect_s"
emmc_p4: 0001ec00 00003000 "sec_ro"
emmc_p5: 00028c00 001c2000 "android"
emmc_p6: 001eac00 0003f000 "cache"
emmc_p7: 00229c00 00400000 "usrdata"
emmc_p8: 00629c00 0085a000 "fat"
~ # cat /proc/partitions
major minor #blocks name

179 0 7609856 mmcblk0
179 1 1 mmcblk0p1
179 2 10240 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 6144 mmcblk0p4
179 5 921600 mmcblk0p5
179 6 129024 mmcblk0p6
179 7 2097152 mmcblk0p7
179 8 4378624 mmcblk0p8
179 96 512 mmcblk0rpmb
179 64 4096 mmcblk0boot1
179 32 4096 mmcblk0boot0
179 128 15114240 mmcblk1
179 129 15113216 mmcblk1p1

[MENTION=4243514]Hashcode[/MENTION]
[Kindle Fire Android Development] sd_shadow:
post #1 clearly states that this is the 1st gen Amazon Fire
[Kindle Fire Android Development] dvlad666:
i9100 boot0/boot1 resize

Dear Lanchon,

I have 3 I9100s, two of them have a Superbrick/brickbug (e2fsck with lots of errors even after format, very slow performance), could you please share an algorithm to try a boot0/boot1 resize on i9100?

Currently running Apollo Stock-based 4.1.2 on all devices but may try anything.

Have seen your speeding up thread but came up empty on boot0/boot1 fix in it, just the way to trim what remains working as i got it.

Thanks a lot!