PIT file method to revive your phone from a MMC_CAP_ERASE brick

hg42

Senior Member
Feb 1, 2011
647
551
93
This is not a "full" MMC_CAP_ERASE brick. The OP can still access recovery and Odin, so he can repartition/repair his emmc. However, if you can't access it anymore (if SBL/PBL is broken), this won't be of any use.
yes, but as I read most people brick their /system and/or /data, right?

Also, I think if the brick still allows download mode, it should be possible to recover from the brick.
Note some report they can go (blindly) to download mode, but cannot see it, because of a have a black screen.
 

hg42

Senior Member
Feb 1, 2011
647
551
93
to hg42:
The .pit file you are creating is all the command to clear the partition and make brick device working again right? I really hope so because I have no idea about adb shell. My device is bricked too. thanks.
I don't really know what the PIT file does exactly, but I think it is the same as repartitioning by other ways.

I currently have a structure definition file for a multi-platform tool (java) called DataWorkshop, which allows looking at binary data in structured form.
I added the structure file to the first post for those who want to try it.
The tool is not very comfortable when it comes to copy/paste etc. but you can edit the values (just put the cursor at the correct digit before typing the number).
 
Last edited:

garwynn

Retired Forum Moderator / Inactive Recognized Deve
Jul 30, 2011
5,182
8,589
0
NE Ohio
www.extra-life.org
To all following this thread,

We found this workaround to work in similar cases with the Epic 4G Touch; however, most people will only suggest this as a temporary measure to restore phone functions until it can be replaced. There has been no long term testing to see the effects of the eMMC operating in this condition; as it has also been noted there is no easy way to ODIN or flash other things by CWM.

Also, not every "superbrick" will boot as we've been told by the Android team themselves, so this solution may not work for every case.

Bottom line - for now replace it if you can. If you absolutely can't but you can boot and need the device working - then this is a good short term solution. Hopefully this problem will be improving soon.
 

blue_panther9_9

Senior Member
Aug 15, 2010
125
20
0
I don't really know what the PIT file does exactly, but I think it is the same as repartitioning by other ways.

I currently have a structure definition file for a multi-platform tool (java) called DataWorkshop, which allows looking at binary data in structured form.
I added the structure file to the first post for those who want to try it.
The tool is not very comfortable when it comes to copy/paste etc. but you can edit the values (just put the cursor at the correct digit before typing the number).

Which firmware did you install it to? I cant seems to install it. everytime I use ODIN it seems to be wiping the device first.

I assume you used thorkernel and recovery to install a zip file?
 
Last edited:

hg42

Senior Member
Feb 1, 2011
647
551
93
I generally agree with you...

but one note:

there is no easy way to ODIN or flash other things by CWM
my new partition scheme only moves the two partitions and keeps their sizes, partition indexes, and names:

Code:
...-|-FACTORYFS-|-DATAFS-|-UMS------------------------------------|...
...-|     empty space    |-FACTORYFS-|-DATAFS-|-UMS---------------|...
This should be in no way different from repartitioning for a different sized firmware.
So, nearly all things work exactly as before, Odin and CWM generally work as before.

Only flashing a new PIT or other means of repartitioning will not work like before.
From what I know this doesn't happen very often.

In this case the scheme would have to be customized again (PIT file patched etc.).
 
Last edited:

hg42

Senior Member
Feb 1, 2011
647
551
93
Which firmware did you install it to? I cant seems to install it. everytime I use ODIN it seems to be wiping the device first.

I assume you used thorkernel and recovery to install a zip file?
hmm, the pit.str file was not a *.pit file!
This is only a description of the structure of a pit file for use with DataWorkShop.
 

hg42

Senior Member
Feb 1, 2011
647
551
93
The pit file is in the works.
I successfully repartitioned via the new PIT file and Odin.
Made a CWM backup first and restored it afterwards.
The system runs.

Also, I copied /sdcard to /emmc/backup-sdcard (this is on cm9, on stock you need to copy the contents of /sdcard to /sdcard/external_sd/backup-sdcard).
This is necessary because the repartitioning deletes the internal sdcard (this is really the UMS partition).
So the files have to be copied back afterwards.

My current problem is, that this internal sdcard isn't mountable, and I don't know why. When I look at it with a simple cat (like "type" on windows), I see all the data, but I can't mount it in any way.

I use cm9 and sadly they don't include e2fsck or parted.
Also mkfs.vfat doesn't work:
~ # mkfs.vfat /dev/block/mmcblk0p11
mkfs.vfat: lseek: Value too large for defined data type
update:
cm9's mkfs.vfat or mkfs.ext2 don't work on this partition, may be because of it's size.
But cm9's mke2fs works.
But after booting the phone I still don't get a mounted internal sdcard.
 
Last edited:

hg42

Senior Member
Feb 1, 2011
647
551
93
ok, flashing a PIT file a second time doesn't do anything, that means, this is only partitioning and doesn't format.
This is because Odin works with partition images, so the formatting is included in these *.img files.
So providing a PIT file will not help users to get up and running.They would need partition images, too.
Standard firmware files for Odin usually include system and data, so only an UMS image is needed.
 
  • Like
Reactions: travis82

Latoc

Senior Member
Feb 17, 2010
338
89
48
You can get a UMS image from sammobile's firmware page, get a GB non-kies firmware, the kind that comes with 3 .tar files.

Sent from my GT-N7000 using XDA
 

hg42

Senior Member
Feb 1, 2011
647
551
93
but i cant flash it with odin i can just flash it with mobile odin pro
I think mobile odin cannot be used if you can not boot to gui, right?

If you are using linux? --> use heimdall + heimdall-frontend

but this has one problem, if I select a PIT file, I have to use another file as well, else it will not do anything, so you cannot do partitioning only (I think).
Perhaps with the command line version.
 

hg42

Senior Member
Feb 1, 2011
647
551
93
You can get a UMS image from sammobile's firmware page, get a GB non-kies firmware, the kind that comes with 3 .tar files.

Sent from my GT-N7000 using XDA
I thought so, too, but this shouldn't work, because the partition image has a different size (old UMS - FACTORYFS - DATAFS)
 
  • Like
Reactions: EdgaBimbam

cgjones

Senior Member
Nov 27, 2007
222
24
0
Chester
www.screedmaster.com
I'm guessing that many people who have ended up with 'bricks' are not as technically competent as most people in this thread seem to be. Is it at all possible to generate a flashable update or even a batch command to replicate the process?
 

hg42

Senior Member
Feb 1, 2011
647
551
93
PIT file added

Finally added patched PIT file (only for 16GB!!!) to first post!
Please read update comments written there.
 
Last edited:
  • Like
Reactions: EdgaBimbam

hg42

Senior Member
Feb 1, 2011
647
551
93
I'm guessing that many people who have ended up with 'bricks' are not as technically competent as most people in this thread seem to be. Is it at all possible to generate a flashable update or even a batch command to replicate the process?
should be very difficult.
Each of those bricks are different.
They first have to be sure, that it's really this kind of brick.
Then they have to make backups. This can be done in various ways.
E.g. I use Titanium Backup, which I payed and it needs a rooted phone.
They must be able to restore their backups afterwards.
This is'nt a job for non technical users.
Scripting in the adb shell sadly depends very much on the installed recovery.

I added a PIT file ion my last post, which is the maximum I can do for them.
This takes away the burden to play with adb.

I think to get even easier, it would have to be like a complete firmware package for Odin.

Anyone has an idea for an easier strategy?

Btw. you can use my PIT file (beware: this is only for 16GB phones) in Odin together with a standard firmware package (without a PIT file), first flash my PIT, then flash the firmware or you may add all these files and flash in one step.

PS: I could create a PIT for 32GB, too, but I cannot test it.
 
  • Like
Reactions: EdgaBimbam

blue_panther9_9

Senior Member
Aug 15, 2010
125
20
0
Today I will start a holiday trip until Monday, so please don't expect any answer from me until Monday evening (or so).
Sorry I forgot to tell you that I managed to get back to my SGS last nite.. Thanks to both you and HG42..:)


Also your PIT works perfectly with ICS LP9..