yashsingh1/xdaforums huggingface dataset:
[Kindle Fire Android Development] vbdss:
fastboot erase data
< waiting for device >
erasing 'data'... FAILED (remote: : partition doesn't exist)
finished. total time: 0.000s

fastboot erase cache
erasing 'cache'... OKAY [ 2.995s]
finished. total time: 3.011s

fastboot erase system
erasing 'system'... OKAY [ 1.217s]
finished. total time: 1.217s

fastboot erase sdcard
erasing 'sdcard'... FAILED (remote: : partition doesn't exist)
finished. total time: -0.000s

thats whats happen

hashcode, could please see my last post about zeroing the boot partition?

EDIT: WOOOOOOOOOOOOOW, TWRP Booted alright

I can use USB Mass Storage to access sd card, thats is something

a log from twrp

http://pastebin.com/ZdhQy2Mu
[Kindle Fire Android Development] lovejoy777:
no fastboot here:-(

vbdss has fb, maybe he can try?
[Kindle Fire Android Development] bowen873:
I tried fastboot erase data and erase cache (as well as OEM format). They all appeared successful, but I still couldn't install a ROM or restore a recovery. I tried with CWM and TWRP after running the fastboot commands.
[Kindle Fire Android Development] lovejoy777:
WOOOOOOOOOOOOOW, TWRP Booted alright

how?
[Kindle Fire Android Development] vbdss:
Read the entire post, after hashcode said to try fastboot erase i tried to erase cache, sdcard, system and data.

Read the code i posted
[Kindle Fire Android Development] jsantiago.antonio:
Partition is gone?
[Kindle Fire Android Development] kinfauns:
@vbdss - they were talking about an entirely different boot partition.

fastboot erase uses the partition names and not the mount points.

The userdata partition gets mounted on /data

The cache partition gets mounted on /cache

The system partition gets mounted on /system

The media partition gets mounted on /sdcard or /mnt/sdcard

In any case, those completion times are entirely wrong. Here's what I get...

$ fastboot erase userdata

erasing 'userdata'...

OKAY [122.697s]

finished. total time: 122.697s

$ fastboot erase cache

erasing 'cache'...

OKAY [ 31.195s]

finished. total time: 31.195s

$ fastboot erase system

erasing 'system'...

OKAY [ 54.632s]

finished. total time: 54.632s

$ fastboot erase media

erasing 'media'...

OKAY [107.434s]

finished. total time: 107.434s

I've tried erasing them a couple of times and they are more or less the same each time. None of them ever complete in 1-3 seconds.
[Kindle Fire Android Development] Hashcode:
Can you print your new /proc/kmsg output to pastebin from recovery?

adb shell "cat /proc/kmsg" > dmesg.txt

(you will need to ctrl-c this to make it stop)
[Kindle Fire Android Development] vbdss:
cat /proc/kmsg

<3>[ 151.505035] init: untracked pid 1348 exited

EDIT: my idme ? now returns something

~ # idme ?
idme ?

<================== idme nvram info ==================
Name offset value
----------------------------------|---|---|---|---|---|
serial 0x0000 xxxxx
mac 0x0030 xxxxxxx
sec 0x0040 xxxxxxx
pcbsn 0x0060
bootmode 0x1000 4000
postmode 0x1010 0
bootcounter 0x1020 7d
=================== idme nvram info ==================>

Ive had success with command idme bootmode 4000

EDIT 2: tried to install team kang rom, still cant mount data and cache from twrp

EDIT 3: installed the rom, success message from TWRP, booting into the system now, will let you know if i succeed

EDIT 4: Stays on boot animation and thats it, no more than boot animation.

EDIT 5: adb shell "cat /proc/kmsg" and logcat from rom boot animation

http://pastebin.com/r0DQH496

http://pastebin.com/VcyPgt4L

EDIT 6: parted /dev/block/mmcblk0 now returns something on print

~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 849MB 2041MB 1192MB userdata
11 2041MB 2309MB 268MB cache
12 2309MB 7690MB 5380MB fat32 media
[Kindle Fire Android Development] vampyrex13:
Damn, that explains how my Kindle's entire mmcblk0 partition took a dump on me when I did a restore. :-(

Sent from my CM9 Epic 4G
[Kindle Fire Android Development] kinfauns:
I'm guessing that you x'd out the first three values manually when you posted, but was the idme information still intact or did you rebuild it?
[Kindle Fire Android Development] lovejoy777:
sounds great, I can't do these steps as i have no fbmode. but i managed to flash twrp with rekindle. what script is in there does it use fastboot. if so how?

---------- Post added at 02:26 AM ---------- Previous post was at 02:16 AM ----------

just made a factory cable to see if that would give me fastboot. no joy:-(
[Kindle Fire Android Development] vbdss:
Yes, i x'd everything. I didnt redo anything, right after fastboot erase everything started to work like parted and idme

Will try to make the filesystem

If anyone wanna know, im using twrp 2.1.1 and fff 1.4a

Btw i remember i had to reinstall and modify the driver to fastboot work
[Kindle Fire Android Development] lovejoy777:
Btw i remember i had to reinstall and modify the driver to fastboot work ?

modify: please share
[Kindle Fire Android Development] pbailey212:
You know you have some true inner nerd in you, when you are on the edge of your seat reading this, I suspense, hoping every new post has the solution. Sorry to clutter, just wanted to share
[Kindle Fire Android Development] vbdss:
; Kindle Fire

%SingleAdbInterface%	= USB_Install, USB\VID_1949&PID_0006

%CompositeAdbInterface%	= USB_Install, USB\VID_1949&PID_0006&MI_01

%SingleAdbInterface%	= USB_Install, USB\VID_1949&PID_0001

%CompositeAdbInterface%	= USB_Install, USB\VID_1949&PID_0001&REV_0216&MI_01

(parted) mkfs 11 ext4
mkfs 11 ext4
mkfs 11 ext4
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
parted: invalid token: 11
Yes/No? Y
Y
Y
Partition number? 11
11
11
File system type? [ext2]? ext4
ext4
ext4
No Implementation: Support for creating ext4 file systems is not implemented
yet.
[Kindle Fire Android Development] kinfauns:
These values are basically the same for everybody. I don't see anything here that would make fastboot do anything special.

Sorry, my bad... slipped my mind that parted won't make ext4 filesystems.

Try these...

mke2fs -T ext4 /dev/block/mmcblk0p10
mke2fs -T ext4 /dev/block/mmcblk0p11

They are not parted commands. You just run them from the shell prompt, but you can go back into parted after they've been made and make sure it shows ext4 for those partitions.
[Kindle Fire Android Development] pokey9000:
You don't need fbmode if you can get to TWRP. fbmode is a reimplementation of idme that only sets the bootmode to fastboot (4002) for initial rooting purposes.

With TWRP running (or the TWRP loader, I think) just adb shell in and run idme.
[Kindle Fire Android Development] soupmagnet:
I may be off base, but there have been a few users here with the same issue of hanging at the boot animation after flashing AOKP, even with TWRP. Have you tried flashing a stock rom to see if you get a better result?
[Kindle Fire Android Development] kinfauns:
I'm not sure if you know this already, but you might find it amusing to know...

TWRP 2.1.1 now has reboot to system, recovery, and bootloader buttons that actually use your nbmode, rcmode, and fbmode binaries to set the bootmode before rebooting the device. So, you don't actually need to use idme at all. You can just do it straight from its GUI. The "bootloader" button is badly named (IMHO), but it should put the KF into fastboot mode.
[Kindle Fire Android Development] Hashcode:
I'm very interested in the results of the mke2fs commands.

And if there are more current versions of these binaries that we want to try, just let me know what to compile.

I know that system/extras has quite a few file system related tools in it. And I can see what the current distro of binutils looks like as well.

Worst case for lovejoy777 is we make a special recovery.img with a bunch of static compiled tools and a menu to use them.
[Kindle Fire Android Development] lovejoy777:
i only get splash screen in twrp 2.1

but still hsve adb

Edit: is there a way to do all the above with just adb as it seems everything started going right after issuing the commands.

fastboot erase cache, etc, can i erase data etc with adb shell?
[Kindle Fire Android Development] forest1971:
Not sure if can be of any help since your case seems to be very difficult:

1. Can you adb push u_boot.bin to the bootloader partition (partition 2)?

2. Also from time to time try to run parted while phone is in TWRP recovery:

~ # parted /dev/block/mmcblk0

see if it works since vbdss just got it work at some point after try with few other things.
[Kindle Fire Android Development] lovejoy777:
sorry.

adb push u-boot.bin /?????????????

what is the path of part2?
[Kindle Fire Android Development] forest1971:
The path is /dev/block/mmcblk0p2

Or:

Chainfire use this command to put kernel image to partition5 with guide below:

maybe just change the name of partition to 2 and change other items in the if part.

(Place the zImage file on your phone (example: /data/local/zImage) and execute this command in a rooted shell:

dd if=/data/local/zImage of=/dev/block/mmcblk0p5 bs=4096)
[Kindle Fire Android Development] soupmagnet:
dd if=/sdcard/u-boot.bin of=/dev/block/mmcblk0p2
[Kindle Fire Android Development] forest1971:
Also need bs=4096?
[Kindle Fire Android Development] lovejoy777:
steve@lovejoyub:~$ adb shell

~ # dd if=/sdcard/u-boot.bin of=/dev/block/mmcblk0p2 bs=4096

just hangs on blinking curser
[Kindle Fire Android Development] forest1971:
Maybe use:

~ # dd if=/sdcard/u-boot of=/dev/block/mmcblk0p2 bs=4096

(leave out ".bin" in "u-boot.bin")
[Kindle Fire Android Development] lovejoy777:
it seems that vbdss started to work after he erased all partitions with fastboot.

is there any way of doing this with adb?

im on fff that comes with usb_boot script and twrp 2.1 (only boots to splash screen)(but still have adb shell).

vbdss only managed to boot into twrp after fastboot erase commands.

if i could issue the same in adb shell, it might help.

edit same as before.

steve@lovejoyub:~$ adb shell

~ # dd if=/sdcard/u-boot of=/dev/block/mmcblk0p2 bs=4096

just hanging
[Kindle Fire Android Development] forest1971:
I understand that fastboot do not work under adb shell. But right after booting the device will be in fastboot for some time.
[Kindle Fire Android Development] lovejoy777:
my fastboot doesn,t work, hence the reason i would love to be able to erase data etc in a shell and not fastboot.

i've tried everything to get fastboot but it just isn't working.

---------- Post added at 10:05 AM ---------- Previous post was at 10:02 AM ----------

i think hash is looking into something with this comment he made.

Worst case for lovejoy777 is we make a special recovery.img with a bunch of static compiled tools and a menu to use them.

i hope this can be done.

---------- Post added at 10:42 AM ---------- Previous post was at 10:05 AM ----------

thanks all im off to work and will be on in 8 hours or so.

thanks again all for your help

steve
[Kindle Fire Android Development] vbdss:
Lovejoy777 before i changed the values on the driver, i couldnt make fastboot work.

I tried to push the fbmode from versions 6.3 and maybe i got success with it, but i dont remember now.

ok, the command mke2fs on system initialization

root@android:/ # mke2fs -T ext4 /dev/block/mmcblk0p11
mke2fs -T ext4 /dev/block/mmcblk0p11
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
65536 inodes, 262144 blocks
13107 blocks (5%) reserved for the super user
First data block=1
Maximum filesystem blocks=262144
32 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185
mke2fs: short write

1|root@android:/ # mke2fs -T ext4 /dev/block/mmcblk0p10
mke2fs -T ext4 /dev/block/mmcblk0p10
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
72864 inodes, 291072 blocks
14553 blocks (5%) reserved for the super user
First data block=0
Maximum filesystem blocks=4194304
9 block groups
32768 blocks per group, 32768 fragments per group
8096 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
mke2fs: short write

on twrp

~ # mke2fs -T ext4 /dev/block/mmcblk0p10
mke2fs -T ext4 /dev/block/mmcblk0p10
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
72864 inodes, 291072 blocks
14553 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=301989888
9 block groups
32768 blocks per group, 32768 fragments per group
8096 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information:
Warning, had trouble writing out superblocks.done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

~ # mke2fs -T ext4 /dev/block/mmcblk0p11
mke2fs -T ext4 /dev/block/mmcblk0p11
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
16384 inodes, 65536 blocks
3276 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=67108864
2 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information:

and hangs there forever
[Kindle Fire Android Development] forest1971:
I would suggest to using parted to remove and then recreate partition 10:

~ # parted /dev/block/mmcblk0

(parted) rm 10

(parted) mkpartfs primary ext2 849 2041

(parted) name 10 DATA

this will make ext2 file, then convert to ext4 file:

(parted) quit

~ # tune2fs -j /dev/block/mmcblk0p10

~ # e2fsck -fDp /dev/block/mmcblk0p10

~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p10

~ # e2fsck -fDp /dev/block/mmcblk0p10

If e2fsck complains that it needs to be run manually, you should omit the -p flag.

~ # e2fsck -fD /dev/block/mmcblk0p10

see how it goes

Also can do it with 11:

~ # parted /dev/block/mmcblk0

(parted) rm 11

(parted) mkpartfs primary ext2 2041 2309

(parted) name 11 CACHE

this will make ext2 file, then convert to ext4 file:

(parted) quit

~ # tune2fs -j /dev/block/mmcblk0p11

~ # e2fsck -fDp /dev/block/mmcblk0p11

~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11

~ # e2fsck -fDp /dev/block/mmcblk0p11
[Kindle Fire Android Development] lovejoy777:
Lovejoy777 before i changed the values on the driver, i couldnt make fastboot work.

I tried to push the fbmode from versions 6.3 and maybe i got success with it, but i dont remember now.

thanks for reply, i take it your using windows, as im linux abuntu. if so i might try getting a windows os.

---------- Post added at 12:39 PM ---------- Previous post was at 12:30 PM ----------

just tried to push fbmode again. can anyone see if im doing this right?

steve@lovejoyub:~$ adb push '/home/steve/Desktop/fbmode' /sbin

6191 KB/s (510876 bytes in 0.080s)

steve@lovejoyub:~$ adb shell chmod 755 /sbin

steve@lovejoyub:~$ adb shell /sbin

/sbin/sh: /sbin: Permission denied

steve@lovejoyub:~$ adb push '/home/steve/Desktop/fbmode' /sbin/fbmode

5712 KB/s (510876 bytes in 0.087s)

steve@lovejoyub:~$ adb shell chmod 755 /sbin/fbmode

steve@lovejoyub:~$ adb shell /sbin/fbmode

steve@lovejoyub:~$
[Kindle Fire Android Development] kinfauns:
The second set of commands is correct.

If you are using TWRP 2.1.1, you don't need to push fbmode into /sbin because it's already there. You can just execute the command.

If you are using any version of TWRP, you don't need fbmode at all. You can just run the equivalent idme command.

idme bootmode 4002

Whether you use fbmode or idme to set the bootmode, you need to reboot afterwards and see if it will go into fastboot mode.

On linux, you need root privileges to run fastboot commands unless you've added the appropriate udev rules to give your user permission to do so.

e.g...

sudo fastboot getvar product
[Kindle Fire Android Development] lovejoy777:
I understand about idme bootmode 4002 being the same as fastboot. but this doesn't work for me either. is it because my idme partition is screwed?

steve@lovejoyub:~$ adb devices

List of devices attached

4FC6000600000001	recovery

steve@lovejoyub:~$ adb shell

~ # idme bootmode 4002

it just hangs here!
[Kindle Fire Android Development] soupmagnet:
Have you made sure the u-boot.bin is on your sdcard?
[Kindle Fire Android Development] lovejoy777:
like this.

steve@lovejoyub:~$ adb push '/home/steve/Desktop/rekindle/u-boot.bin' /sdcard

just hangs here
[Kindle Fire Android Development] vbdss:
Thank you for your help, but now i think that something on hardware level may be compromised

~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) rm 10
rm 10
rm 10
(parted) mkpartfs primary ext2 849 2041
mkpartfs primary ext2 849 2041
mkpartfs primary ext2 849 2041
writing per-group metadata... 17% (time left 00:23)

And stays on 17%

EDIT: ok, after this hang on 17% the partition 10 and 11 are gone, doesnt show up on Parted print. But now the system will boot but will say the encription failed

but i can see the status bar, the system itself doesnt work, but i can see the keyboard, there is a reset tablet button, the home, back and recent apps showing.

But cant do anything.

I can even access the shutdown menu
[Kindle Fire Android Development] Adeel1234:
no any command will work we have hardly bricked our kindles
[Kindle Fire Android Development] vbdss:
thank you for you support, if you have nothing to say, just stay shut up

Cant we format the partition with fastboot?
[Kindle Fire Android Development] forest1971:
It seems to show that you have some faulty blocks in partition 10. In that case a workaround of re-partition to leave those faulty area unused can help to revive it. Still, if the faulty area is big then it will reduce the remaining space significantly.

You can try to change the start and end of the block see if it work. sometimes we have to leave out the whole partition and used the remaining space to create new partitions with smaller sizes.

Maybe try:

(parted) mkpartfs primary ext2 1549 2449

Edit: Ah you also need to rm 11 and 12 First as well to make room for creating new partition with different sizes. You will loose all data on sdcard though.

see how it goes.

I posted a link in you PM for further info.

and the code to create 12 is:

~ # parted /dev/block/mmcblk0

(parted) mkpartfs primary fat32 <startblock> <end>

(parted) name 12 MEDIA

cheers,
[Kindle Fire Android Development] airmaxx23:
Why say something like this, maybe you should follow your own advice.
[Kindle Fire Android Development] vbdss:
btw after the partitions were "gone" i tried again the fastboot erase userdata and cache

now the partitions are back
[Kindle Fire Android Development] Hashcode:
Please stop with the non-related comments. I think we can all agree this is a tense situation for those involved.

Try and keep on target.
[Kindle Fire Android Development] Hashcode:
What was the output of the "e2fsck" commands?
[Kindle Fire Android Development] forest1971:
I can see that the process stuck right after he run mkpartfs

so he has not run e2fsck yet.

I have encounter many similar cases in the G-Note forum where a few a dozen of people have brick their note after using a buggy ICS kernel.

They have had their phone fixed after re-partition to leave out the faulty areas in the system and data partitions.
[Kindle Fire Android Development] Hashcode:
Lovejoy777: Can you PM me your /etc/udev/rules.d/51-android.rules file? I know it's probably setup correctly, but a 2nd set of eyes can't hurt.

I'm looking at the bootloader's fastboot driver here:

https://github.com/KFire-Android/kf_u-boot/blob/master/drivers/fastboot.c

For how it handles the erase command.
[Kindle Fire Android Development] vbdss:
Thats right, didnt go to the part of e2fsck

and forest i am exploring the thread you pm'ed me
[Kindle Fire Android Development] Hashcode:
I also see some kind of superblock issue, and that can be solved by copying from a backup superblock. But that might be handled automatically in 1 of the other commands.
[Kindle Fire Android Development] forest1971:
That would be very good.

So far there seems to be no fundamental solution to repair the faulty blocks. I am also searching with the hope to help repair faulty blocks. Right now the method that successful is a workaround to leave the faulty blocks unused and sacrifice some faulty storage space.

When people run e2fsck it freeze in the areas that are faulty.
[Kindle Fire Android Development] vbdss:
quick update: the command that bought partitions 10 and 11 back after deleted is the fastboot oem format
[Kindle Fire Android Development] pokey9000:
emmc is NAND with a controller that does wear leveling and bad block management, just like a SATA SSD. If you have bad blocks, it's either something unrelated to physical issues or your emmc is about to completely die.
[Kindle Fire Android Development] pokey9000:
Not fastboot erase? Hadn't you tried firekit's usb_fix_parts_and_... script?
[Kindle Fire Android Development] vbdss:
i can only say thank you to you all

After rm 10 11 12 and going forward with partition 10, now starting ate 2500 (its a big difference i will try others values) now things are better i think

How do i create a fat32 partition for sdcard?

(parted) print
print
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 2500MB 3692MB 1192MB ext4 userdata
11 3692MB 3948MB 256MB ext4 cache

EDIT: found it

(parted) print
print
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 2500MB 3692MB 1192MB ext4 userdata
11 3692MB 3948MB 256MB ext4 cache
12 3948MB 7690MB 3742MB fat32 media msftres

EDIT 2: TWRP booted alright, no errors in log, will install a ROM now
[Kindle Fire Android Development] Hashcode:
Thoughts on how to integrate the fastboot driver from the u-boot source into an executable which would be run via adb so that persons without fastboot access could do "fastboot erase __"-like commands?

https://github.com/KFire-Android/kf_u-boot/blob/master/drivers/fastboot.c

We need a list of commands which worked for vbdss in order.