[Galaxy Tab General] trevd:
FIRST TIME HERE? - SKIP DOWN AND READ IN FULL THE [ ORIGINAL THREAD CONTENT ]

[ ORIGINAL THREAD CONTENT ]

DISCLAIMER: DON'T TRY THIS IF YOU DON'T HAVE TO - I AM NOT RESPONSIBLE FOR ANYTHING - IF YOU ARE UNSURE ABOUT ANYTHING - ASK

I recently fixed a P1000 with a corrupt internal sdcard - I thought I'd share my experience as unbelievable as It sounds, given the size of the internet

I could not find this procedure /hack anywhere

The Symptoms

When Booting the device got stuck at the Samsung Logo Screen

ODin/Heimdall fails on any rom which include an hidden.rfs and movinand.mst

ODin/Heimdall report success when flashing flashing roms without hidden.rfs and movinand.mst

Recovery Mode reports errors after flashing. The error is different depending on which rom was flashed but are all related to file system functions.

Internal MMC checksum verify failed.

E: failed to mount /system (invalid argument)

E: failed to mount /dbdata (Invalid argument)

E: /dev/block/mmcblk0p2 on /data failed: No such file or directory

E: copy_dbdata_media:Can't mount /dbdata

IMPORTANT: THESE ARE NOT THE ONLY ERRORS AND ARE EXAMPLES. IF YOUR ERROR IS DIFFERENT THEN PLEASE SHARE IT.

THE MAJOIRITY OF THE TIME THE ERROR WILL MENTION WORDS LIKE:

mount

mmcblk

directiory not existing.

The Problem

The recovery errors alone are not enough to diagnose the problem as they can also occur if flashing has been carried out incorrectly.

The main pointer to an Internal SDCard Failure is the inability to flash hidden.rfs and movinand.mst

You should be able to confirm this to be the case by running dmesg on the device using adb from the command prompt of your computer

If you were luckly enough to have left USB Debbugging on than you should be able the run the following command

while the device is booting loop otherwise run it ) while you are in recovery

adb shell "dmesg | grep mmc0"

My output contained the following line:

[COLOR="Red"]<3>[ 4.802004] mmc0: error -110 whilst initialising MMC card[/COLOR]

Another way to check is to use adb to view the devices file system.

adb shell "ls /dev/block"

Do this WITHOUT an external sdcard.

Any Reference to mmcblk will be missing.

Normally you should be able to RMA this as it is an hardware failure.

However as warranties expire or you just can't be bothered to wait here is an alternative solution

The Solution is fairly straight forward, However It's not a repair and it is not possible to recover any data from the Internal memory.

So You've lost your Angry Birds Hi-Score forever.

That's the bad news. The Good News is, You've still got what will soon be a working Tablet again and a chance to get an even higher score.

Note: The Following description maybe considered by some as a little heavy on Technical Details.

Unfortunately. we are taking advantage of how the Linux Kernel Interacts with hardware ports and how the linux sysfs Virtual filesystem works, It's the nature of the beast I'm afraid

The Solution

In one sentence. We will use the external SD Card to store and load The Android OS.

How Do You Plan to pull that trick off?

This is made possible because of how the Linux kernel manages and addresses devices of the same type. Linux gives each device a number which increments by 1 each time.

The Hardware can control what Linux Sees. I.E the Internal Memory is always loaded first and given and index of 0 [ remember computers : Start Countong a zero :) ]

After trying and failing to access from the internal sdcard the Kernel quite sensibly looks for the first functioning SDCard on the System and creates it in the /dev tree with a index of zero for that Class of device. It just so happends that the first (and only) Sdcard on the System is now physically located in the external SDCard Slot.

So What Now?

Now we have to play nice with whatever rom is on the device. which means providing the number of partitions that the rom expects. In my case It was 3.

So go ahead ad format and parition your SDCard.

There is nothing to stop you having more than the base amount with what ever file systems you please as long as the Kernel Can provide a mount point to the device than You're laughing.

This Partition Below table was suitabke for UK Roms. The Fat32 Partition is what will appear when the device is connected to Windows as a disk drive.

From what I recall that is the only reason for having a fat filesystem on the Card. So If you're a Linux Junkie then You should be able to pick what Filesystem is good for you. Format the external sdcard with 3 parititions (you can probably get away with 2) I used a 32 GB card with the follwing

Partition 1: 28 GB Fat 32 (sdcard partition)

Partition 2: 4 GB ext4 (data partition)

Partition 3: 100MB Fat 32 (preload partition)

I Used Heimdall for this and I flashed everything. Odin should do the Job as long you remove hidden.rfs and movinand.mst from the tar balls

heimdall flash --repartition --pit gt-p1000_mr.pit --primary-boot boot.bin \
--cache cache.rfs \
--factoryfs factoryfs.rfs --modem modem.bin \
--param param.lfs \
--secondary-boot Sbl.bin \
--kernel zImage --recovery zImage

After That I Flash a custom kernel which If memory serves enabled the CWM Recovery. The Kernel I used was

one from Team Overcome Kernel 4 which can be downloaded from the teamovercome download page

The choice of kernel isn't any endorsement........ Actully I will say. Use Team Overcome Kernel. It Works!

Seriously any custom kernel should do the trick and In Theory even a stock kernel could be make to work [See Notes]

Boot To Recovery ( You should now see Clockwork Recovery Mod )

edit /system/etc/vold.fstab on the device to look like the following. You can use the adb pull command if you are unsure how to get at the file.

[WINDOWS USERS]

Linux and Windows use different newline characters. If you are editing the file on windows make sure you are using an editor suitable for the task (i.e UltraEdit or Notepad++)

# internal sdcard
{

ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = disable
discard = disable
format_option = -r 1558
}
dev_mount sdcard /mnt/sdcard 1 /devices/platform/s3c-sdhci.2/mmc_host/mmc1

# externel sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = enable
}
dev_mount sdcard /mnt/sdcard/external_sd auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2 /devices/platform/s3c-sdhci.2/mmc_host/mmc1

One final Reboot should make your Still broken but functioning tablet a little less a bitter pill to swallow (see what I did there)

Note: First boot takes a while. if you are worried or think it is boot looping, you can watch the output using adb logcat

You should now have a working galaxy with the added bonus of a re-sizable data partition.

Tool List:

A Micro SD Card - The Bigger The Better , Size and Speed are everrything as this is where you everything pm your tablet will live. I would definitely pitch for a 32GB Class 10.

A Method of formatting and Partitioning the SDCard. - If your a windows user than you need a method of formatting ext4 partitions. I 'm unsure of the current state if the art regarding that.

A Custom Recovery Image. Clockwork Recovery Mod or something similiar. You can use fasboot from the android sdk to flash it to you device

A Custom Kernel Image. with support for the Ext 4and Fat32 Filesystems.

The Next Step Is To Flash A Rom to the devoce . You Should be able to flash any rom to it as long as Your sdcard Is formatted correctly

I Flash Latest Stock Rom at the time and

[Advanced User and Masochists]

You Can use you own custom recovery and kernel if you are so Inclined.

For Extra "Going To Try This Because It's There! an I can" Points

Retain A full Stock Experience. When Booting From SD.

It Should be Possible, If can find a way to format the sdcard partitions to Samsung Proprietary RFS File System.

This was also the reason a custom kernel was used ;