yashsingh1/xdaforums huggingface dataset:
[Kindle Fire Android Development] aarons510:
I have not installed any version of CWM yet, so I don't have the problem being discussed here. But, for what it's worth, I'll mention that when I boot into TWRP 2.0.0 and run 'cat /proc/partitions', I get the same list without those two extra partitions. mmcblk0boot[01]. Moreover, the directory, '/dev/block', that shows all the mmcblk0p* entries, for '*' from '1' to '12', as well as mmcblk0, does not show anything else whatever beginning with 'mmc'.

BTW, looking at '/dev/block/platform/mmci-omap-hs.1' and its sub-directories gives a lot of symbolic links to these 'mmcblk0' partitions. I'm not sure if this is only with TWRP or is more universal, and I have no idea where these links are used, but there is probably a use for them somewhere.
[Kindle Fire Android Development] vbdss:
see my previous post

on TWRP mount command

~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk0p12 on /sdcard type vfat (rw,nodev,noatime,nodiratime,fmask=00
00,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixe
d,errors=remount-ro)

mount sdcard command

~ # mount sdcard
mount sdcard
mount: mounting /dev/block/mmcblk0p12 on /sdcard failed: Device or resource busy

adb shell parted /dev/block/mmcblk0 unit B print returns nothing, just hangs in there
[Kindle Fire Android Development] lovejoy777:
ive just done a usb boot to boot into twrp and issued the idme command and got this?

~ # idme ?

<================== idme nvram info ==================

Name	offset	value

----------------------------------|---|---|---|---|---|

serial 0x0000

mac 0x0030

sec 0x0040

pcbsn 0x0060

bootmode 0x1000

postmode 0x1010

bootcounter 0x1020

=================== idme nvram info ==================>

~ #

any help?
[Kindle Fire Android Development] kinfauns:
I think this might be the key to resolving at least some of the problems you guys are having... like why it won't go into fastboot in some situations.

Whether that data has been wiped from the nvram or there's something blocking it from being read, I have no idea. You'll have to count on Hashcode or pokey9000 to do some low-level digging and figure out what's going on here.
[Kindle Fire Android Development] Hashcode:
What happens if you try and set an idme value?

Like: idme bootmode 4000

For those that don't have idme binaries, they can be pushed via adb to whatever recovery you're booting into:

idme: https://dl.dropbox.com/u/41149741/KFire-Android/idme

libidme.so: https://dl.dropbox.com/u/41149741/KFire-Android/libidme.so
[Kindle Fire Android Development] lovejoy777:
what is the path i want to push them to? ie. adb push /path/of/idmebinary /?????
[Kindle Fire Android Development] Hashcode:
put idme in /sbin

and libidme.so in /system/lib
[Kindle Fire Android Development] vbdss:
without your files i was geting nothing, ive enter the command and nothing happens

with you files, i get permission denied

EDIT: after reboot, same thing, nothing happens but might be something to do with my idme ? all blank

idme ?

<================== idme nvram info ==================
Name offset value
----------------------------------|---|---|---|---|---|
[Kindle Fire Android Development] pokey9000:
It would be good to get the following from an affected Fire:

dmesg (right after boot)

logcat

Collect emmc info:

cd /sys/bus/mmc/devices/mmc0:0001 (last part may differ but will be the only sub directory)

cat cid

cat csd

cat block/mmcblk0/ro
[Kindle Fire Android Development] vbdss:
dmesg (right after boot) we can only go to recovery, so it means recovery right?

EDIT:

~ # cd /sys/bus/mmc/devices/mmc0:0001
cd /sys/bus/mmc/devices/mmc0:0001
/sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001 # cat cid
cat cid
1501004d3847324641116d09e2629e73
/sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001 # cat csd
cat csd
d02701320f5903fff6dbffef8a404067
/sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001 # cat block/mmcblk0
/ro
cat block/mmcblk0
/ro
0

dmesg

http://pastebin.com/qnM9r5Qf

logcat

/sbin/sh: exec: line 1: logcat: not found
[Kindle Fire Android Development] pokey9000:
Thanks vbdss. It seems like there are a few different failure modes going on in this thread. let's tackle your symptoms first.

The card checks out as healthy, nothing is read only. But your boot partition is empty. On the Fire, this is a memory region outside of mmcblk0 that it uses for the idme data and has nothing to do with booting. It requires special operations that repartitioning or otherwise writing crap to the mmc can't randomly do. idme and fbmode are the only tools that can do this. idme is pretty badly written, and I wouldn't be surprised if there was no bounds checking on the input such that you could overwrite neighboring tokens. That's the only way I could think it got wiped out.

The bad news is that even if you can rebuild it, you have likely lost the Amazon key that lets your Fire sign into Amazon services in the stock rom. The good news is that if you can get idme working you can manually add all the critical tokens by hand.

Btw, your Fire does boot to FFF from flash still, right?
[Kindle Fire Android Development] vbdss:
Dont know what you mean, my english is basic.

But i can change FFF to any other bootloader and the recovery too, i can put CWMR or TWRP

I dont mind about amazon services, here in brazil we cant access most of their content, i only want to use ICS based ROMs, no amazon services.

If i put adb devices it returns me different things on each recovery, on CWMR was something like abcdef12345 on twrp is more complicated, lots of 0000 and other numbers and a few letters.

Since my kindle is now a walking dead (zombies right!), i am pretty much accepting any support that you gurus could give me.

I am a desesperate man, my only wife has been infected with this partitioning virus and i can only hope that you guys help me.

EDIT: BTW, if i let my device run thru the boot processes, like if it was going to boot the system, it will flash a white light and then a blank (black screen) screen stays on but cant access adb
[Kindle Fire Android Development] kinfauns:
It means the idme information that is supposed to be stored in the nvram on the device is gone. The 'idme ?' command should return something that looks like this... (I've obscured the data for the first 3 values)

root@android:/ # idme ?

<================== idme nvram info ==================
Name	offset	value
----------------------------------|---|---|---|---|---|
serial 0x0000 0123456789ABCDEF
mac 0x0030 0123456789AB
sec 0x0040 0123456789ABCDEF0123
pcbsn 0x0060
bootmode 0x1000 4000
postmode 0x1010
bootcounter 0x1020 5
=================== idme nvram info ==================>

Yours is blank and needs to be rewritten to the device in some way.

If I was in your shoes, I'd try using idme to write at least the serial, mac, sec, bootmode and bootcounter values. I'm guessing idme has the name to offset mappings hard coded and might let you do this.

It looks to me like the values should be...

serial - 16 character alphanumeric (registered with Amazon, so you might find it in your Amazon account. It's also on a sticker as the FSN on your Kindle Fire box)

mac - 12 character hexadecimal (Network interface identifier. It might be cached on your network router, but I doubt it. Probably safe to spoof one. As long as you don't have a duplicate on your network, it should be OK.)

sec - 20 character alphanumeric (I have no idea, this might be the "Amazon key" pokey9000 referred to in his post. You might have to just make one up.)

bootmode - 4 character hexadecimal (probably should set it to 4000)

bootcounter - ? character hexadecimal (probably safe to set it to 1)

So, you would do something like...

idme serial H38DK2MND892J3RT

and so on so forth for the rest of them. Good luck.
[Kindle Fire Android Development] pokey9000:
lovejoy777: what kernel or recovery is this? This kernel seems to be mapping the 2 boot partitions as mmcblk0boot0 and mmcblk0boot1, and tries to read a partition table off of boot0. This is where the idme data is stored. If this is the kernel used for CWM, then it gives easy device access to crapping all over your idme tokens. Your idme isn't working because it's probably not in your path, but I doubt it would work since idme goes through other channels to access this flash space.

Hashcode, is there a way CWM might be doing some glob on /dev/mmcblk0 including boot0 and doing something nasty to it?
[Kindle Fire Android Development] lovejoy777:
how did you get fastboot working, i've tried everything.

the only way i can change anything (twrp/cwm or bootloader) is with the firekit with shorting trick.

---------- Post added at 04:08 PM ---------- Previous post was at 04:00 PM ----------

im on cwmrv5.5.0.4

and my kernal is hashcodes #10a

i have booted into twrp before using firekit (but on reboot it goes back to cwmr)

and thats how i got the results i posted earlier.
[Kindle Fire Android Development] Adeel1234:
we have messed our kindles with lovely cwmr

welcome to messed kindles club..

i have bricked my kindle using cwm successfully with not powering up the device and using firekit always waiting for device error occured..even my device turns on on given command..

i think we have died internal mmc through cwm..
[Kindle Fire Android Development] vbdss:
very very thank you, but when i put the command idme serial .... it gives me nothing, only blinking cursor

~ # idme serial .....
idme serial ....

On TWRP splash screen

tried on cwmr 5.0.2.7 with no success even after trying to push idme files. says no permission

What if we try to flash through fastboot a update.zip ?
[Kindle Fire Android Development] pokey9000:
If the boot partition doesn't have nulls in the right places, idme will probably flip out.
[Kindle Fire Android Development] pokey9000:
Since you have nothing to lose, try doing:

dd if=/dev/zero of=/dev/mmcblk0boot0

That should initialize the boot partition (idme storage) with nulls (empty strings). Then try to get any idme (in twrp, or otherwise) and see if it lets you set the bootmode.

If that works, try to make up the rest of the entries like kinfauns suggests.
[Kindle Fire Android Development] Hashcode:
@Pokey9000: Not sure about globbing on /dev/mmcblk0. I double-checked recovery.fstab to make sure there wasn't some kind of typo linking directly to blk0 (and there isn't). I'm also checking into the recovery source and possible unforeseen links to mmcblk0. Right now I see references in:

./mmcutils/mmcutils.c:72:#define MMC_DEVICENAME "/dev/block/mmcblk0"

./mmcutils/mmcutils.c:271: g_mmc_state.partition_count = mmc_read_mbr(MMC_DEVICENAME, g_mmc_state.partitions)

source to mmc_read_mbr:

http://pastebin.com/t6HAkL6B

I notice that the dmesg first logs:

<6>[ 3.683288] mmcblk0boot1: unknown partition table

and then falls back to mmcblk0boot0

for whatever that's worth.
[Kindle Fire Android Development] kinfauns:
FYI...

I'm sure pokey9000 meant /dev/block/mmcblk0boot0 for the tail end of that command.

Also, that device is only in Hashcode's CWMR and not in TWRP.
[Kindle Fire Android Development] pokey9000:
Neither boot partition should have a valid partition table. Mmcblk0boot1 never gets used, and boot0 contains the idme null terminated strings at fixed locations (see u-boot source for the offsets). Boot0 should not have a valid partition table either.

The boot partitions are intended to serve the same purpose on emmc as the xloader and bootloader GPT partitions, but because they require special emmc commands to access should be safe from wiping the disk proper. But the omap doesn't know how to boot from the boot partitions, so they're reserved for the idme data.
[Kindle Fire Android Development] pokey9000:
Thanks, I don't have a Fire for reference...
[Kindle Fire Android Development] lovejoy777:
~ # dd if=/dev/zero of=/dev/mmcblk0boot0

dd: writing '/dev/mmcblk0boot0': No space left on device

436305+0 records in

436304+0 records out

223387648 bytes (213.0MB) copied, 1.870269 seconds, 113.9MB/s

~ # idme ?

/sbin/sh: idme: Permission denied

how do i sort permissons , I got this in cwmr?
[Kindle Fire Android Development] pokey9000:
Go to where you uploaded idme, and do:

chmod 755 idme

Then try idme again
[Kindle Fire Android Development] pokey9000:
Oh, and try the dd command again, but instead use:

dd if=/dev/zero of=/dev/block/mmcblk0boot0

All the previous one did was fill up your ramdisk...
[Kindle Fire Android Development] lovejoy777:
# dd if=/dev/zero of=/dev/block/mmcblk0boot0

dd: writing '/dev/block/mmcblk0boot0': Operation not permitted

1+0 records in

0+0 records out

0 bytes (0B) copied, 0.000763 seconds, 0B/s

just trying to set permissions

am i right with this?

/sbin chmod 755 idme

i pushed idme to /sbin
[Kindle Fire Android Development] Hashcode:
I probably need to check the dmesg from the 2.6 kernel to see what is referenced there instead.

In the 3.0.21 kernel source the output: "unknown partition table" comes from here in a function called "check_partition":

https://github.com/KFire-Android/kernel_omap/blob/4AI.5/fs/partitions/check.c#L203

It's shown when there's an I/O error accessing the state of the partition.

That function is called from: rescan_partition here:

https://github.com/KFire-Android/kernel_omap/blob/4AI.5/fs/partitions/check.c#L580
[Kindle Fire Android Development] lovejoy777:
am i right with this?

~ # /sbin chmod 755 idme

as it returned with

/sbin/sh: /sbin: Permission denied

i pushed idme to /sbin
[Kindle Fire Android Development] pokey9000:
Hmm...

Do:

chmod 755 /sbin/idme
[Kindle Fire Android Development] lovejoy777:
steve@lovejoyub:~$ adb shell

~ # dd if=/dev/zero of=/dev/block/mmcblk0boot0

dd: writing '/dev/block/mmcblk0boot0': Operation not permitted

1+0 records in

0+0 records out

0 bytes (0B) copied, 0.000702 seconds, 0B/s

~ # chmod 755 /sbin/idme

~ # dd if=/dev/zero of=/dev/block/mmcblk0boot0

dd: writing '/dev/block/mmcblk0boot0': Operation not permitted

1+0 records in

0+0 records out

0 bytes (0B) copied, 0.000428 seconds, 0B/s

~ #
[Kindle Fire Android Development] pokey9000:
I don't think the dd will work, try after the chmod:

idme ?
[Kindle Fire Android Development] lovejoy777:
ok so i booted into twrp splash screen by the following

steve@lovejoyub:~$ cd '/home/steve/Desktop/rekindle'
steve@lovejoyub:~/Desktop/rekindle$ sudo su
[sudo] password for steve:
root@lovejoyub:/home/steve/Desktop/rekindle# ./usbboot aboot.bin u-boot.bin; ./fastboot boot twrp-blaze-2.0.0RC0.img
?
waiting for OMAP44xx device...
sending 2ndstage to target...
waiting for 2ndstage response...
sending image to target...
< waiting for device >
downloading 'boot.img'...
OKAY [ 1.396s]
booting...
OKAY [ 0.004s]
finished. total time: 1.399s
root@lovejoyub:/home/steve/Desktop/rekindle#

then i did this

steve@lovejoyub:~$ adb shell
~ # dd if=/dev/zero of=/dev/block/mmcblk0boot0
dd: writing '/dev/block/mmcblk0boot0': No space left on device
456673+0 records in
456672+0 records out
233816064 bytes (223.0MB) copied, 2.046875 seconds, 108.9MB/s
~ #

then

steve@lovejoyub:~$ adb devices
List of devices attached
4FC6000600000001	recovery

steve@lovejoyub:~$ adb shell
~ # idme ?

<================== idme nvram info ==================
Name	offset	value
----------------------------------|---|---|---|---|---|

so i take it i can get idme in twrp

Edit: is there a way to get twrp flashed instead of just booted onto my kindle, with the use of rekindle script as my fastboot is down?
[Kindle Fire Android Development] kostos:
try

./usbboot aboot.bin u-boot.bin; ./fastboot flash recovery twrp-blaze-2.0.0RC0.img
[Kindle Fire Android Development] kinfauns:
Unfortunately, this did nothing for you because TWRP doesn't have the /dev/block/mmcblk0boot0 device. All you did was create a new file by the same name and filled it with zeroes until the memory on your KF ran out.

This is the WRONG partition and the 2.0.0 distribution probably won't even fit on the boot partition anyway. Don't even bother.

You can try removing "flash" from that command if you want to try and flash 2.0.0 that way, but I think getting a recovery on there is the least of your worries at the moment.

Regardless, the right fastboot command to flash a recovery is

fastboot flash recovery recovery.img
[Kindle Fire Android Development] lovejoy777:
i can boot but not flash. it is like fastboot is on for too short a time?

root@lovejoyub:/home/steve/Desktop/rekindle# ./usbboot aboot.bin u-boot.bin; ./fastboot flash boot twrp-blaze-2.0.0RC0.img
?
waiting for OMAP44xx device...
sending 2ndstage to target...
waiting for 2ndstage response...
sending image to target...
< waiting for device >
sending 'boot' (5568 KB)...
it just hangs here and the fff triangle is on screen
then after reboot

FAILED (data transfer failure (Cannot send after transport endpoint shutdown))
finished. total time: 69.294s
root@lovejoyub:/home/steve/Desktop/rekindle#

---------- Post added at 08:17 PM ---------- Previous post was at 07:54 PM ----------

i was just trying to get fastboot working because all i have that works is the rekindle scripts.

and idme is in twrp and hash wanted, idme ?

pokey suggested as an option to try /dev/block/mmcblk0boot0 device

sorry but i don't really know what some of these commands do, i'm just trying anything you guys throw at me.

thankyou all so much. i don't want to choke this thread up. so i will stop posting until anything changes or you guys post something for me to try.

thanks again all

Steve
[Kindle Fire Android Development] kinfauns:
I wasn't trying to come down on you for posting or trying different ways to fix your device. You're eager to get it working again and I totally get that.

I think we've tried everything we can try for now without really knowing the actual source of the problem. I'm betting on Hashcode and pokey9000 to dig around and see what caused all this to happen in the first place. Once they know the reasons why, maybe they can figure out how to come up with a fix.
[Kindle Fire Android Development] Hashcode:
So troubleshooting the "unknown partition table" message is a red herring. I see it in my dmesg as well:

Here is the related lines from lovejoy's dmesg:

<6>[ 3.597625] mmc0: new high speed DDR MMC card at address 0001

<6>[ 3.605163] mmcblk0: mmc0:0001 M8G2FA 7.20 GiB

<6>[ 3.614868] mmcblk0boot0: mmc0:0001 M8G2FA partition 1 512 KiB

<6>[ 3.623138] mmcblk0boot1: mmc0:0001 M8G2FA partition 2 512 KiB

<6>[ 3.671386] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12

<6>[ 3.683288] mmcblk0boot1: unknown partition table

<6>[ 3.703247] mmcblk0boot0: unknown partition table

things go south here:

<3>[ 7.511383] musb_g_ep0_irq 719: SetupEnd came in a wrong ep0stage setup

and then the sector errors:

end_request: I/O error, dev mmcblk0, sector 3986434

end_request: I/O error, dev mmcblk0, sector 3986435

Here is my dmesg related output:

<6>[ 3.516723] mmc0: new high speed DDR MMC card at address 0001

<6>[ 3.529235] mmcblk0: mmc0:0001 M8G2FA 7.20 GiB

<6>[ 3.537628] mmcblk0boot0: mmc0:0001 M8G2FA partition 1 512 KiB

<6>[ 3.550872] mmcblk0boot1: mmc0:0001 M8G2FA partition 2 512 KiB

<6>[ 3.618225] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12

<6>[ 3.642791] mmcblk0boot1: unknown partition table

<6>[ 3.671447] mmcblk0boot0: unknown partition table
[Kindle Fire Android Development] lovejoy777:
http://forums.freescale.com/t5/68K-ColdFire-reg-Microprocessors/SD-card-I-O-error/td-p/81655

is this any use? they sorted it if it's a simlar issue.

post4&5 have the answer i think (but i have no idea how to do it) if it is the answer.
[Kindle Fire Android Development] Hashcode:
vbdss's dmesg using the 2.6 kernel shows similar messages/errors:

<6>[ 2.391204] mmc0: new high speed DDR MMC card at address 0001

<6>[ 2.391632] mmcblk0: mmc0:0001 M8G2FA 7.20 GiB

<6>[ 2.391937] mmcblk0:

<4>[ 2.453186] p1 (xloader) p2 (bootloader) p3 (dkernel) p4 (dfs) p5 (recovery) p6 (backup) p7 (boot) p8 (splash) p9 (system) p10 (userdata) p11 (cache) p12 (media)

(no mention of boot0 or boot1)

and then things going south:

<4>[ 10.863128] mmcblk0: retrying using single block read

<3>[ 11.037963] mmcblk0: error -110 transferring data, sector 3986434, nr 2, card status 0xb00

Sector errors:

end_request: I/O error, dev mmcblk0, sector 3986434

end_request: I/O error, dev mmcblk0, sector 3986435

end_request: I/O error, dev mmcblk0, sector 4510722

end_request: I/O error, dev mmcblk0, sector 4510723

end_request: I/O error, dev mmcblk0, sector 4510724

end_request: I/O error, dev mmcblk0, sector 4510725

end_request: I/O error, dev mmcblk0, sector 4510726

end_request: I/O error, dev mmcblk0, sector 4510727

end_request: I/O error, dev mmcblk0, sector 4510592

end_request: I/O error, dev mmcblk0, sector 4510593

end_request: I/O error, dev mmcblk0, sector 3986432

end_request: I/O error, dev mmcblk0, sector 3986433

end_request: I/O error, dev mmcblk0, sector 3986440

end_request: I/O error, dev mmcblk0, sector 3986304

end_request: I/O error, dev mmcblk0, sector 3986305

and they go on
[Kindle Fire Android Development] Hashcode:
Looks like the answer was:

"Turned out we just needed to reformat the card, completely rebuilding the partitions"

And the overall issue was caused by somehow mis-configuring the speed at which the card can read/write (I can do some research here in the 2.6 kernel).
[Kindle Fire Android Development] lovejoy777:
just a thought.

would this have anything to do with installing the v6 supercharge script.

i did this a day before and this was my 1st time after installing that i used my recovery.

also did the other people with same issue also have v6 super script/pdroid?
[Kindle Fire Android Development] Hashcode:
So everything I'm reading indicates that "fastboot oem format" should be the solution to re-setting up the eMMC from scratch.

And scanning back through the thread I see:

"fastboot oem format runs in about 0.6 seconds and returns success. Tried Firekit too, samething"

I'm going to see what fastboot oem format is doing in the source.
[Kindle Fire Android Development] vbdss:
according to this thread

http://xdaforums.com/showthread.php?t=1388996

Boot partition is number 7?

so i have o make dd if=/dev/zero of=/dev/mmcblk0p7 ??? and dont we need the bs= ????

and btw, i can flash and use twrp, cwmr any time
[Kindle Fire Android Development] jsantiago.antonio:
It's pretty hard to diagnose and pinpoint where the error is occurring, i pretty much have accepted the kindle as dead. Even though i'm sure it will gain life at one point once we find the exact error and as a community solve it.

I went ahead and got me a new tablet (Asus TF300t :p) but i do want to help you guys find a fix for the kindle. If hashcode and pk9 want to take my kindle to play around with it and diagnose the exact problem i'm more than happy to ship it out to either of you guys. And if it dies in the process no biggie, but if it comes back to life and you guys have no further need for it you can send it back. Just trying to help out anyway i can. :)
[Kindle Fire Android Development] Hashcode:
For myself: I will try and brick my device here in the next week or so (using recovery in the same method commonly described in the posts). However, Pokey9000 might benefit from having an actual device to work on.

The offer of your device is a very nice gesture.
[Kindle Fire Android Development] Hashcode:
Was anyone able to try:

fastboot erase data

or

fastboot erase cache

?