[Defy Android Development] espaciosalter20:
What is mmcfix??? It's a fix developed by epsylon3 for cm7 in order to prevent data corruption on several high class sd cards.

As you all know, our lovely Defy seems to have a problem when it comes to using sd cards... where *GENERALLY* all class 2 cards are fine, and problems may occur with higher class cards.

The problem is basically: the phone loses its write acces to the card, and therefor for example the photo camera app can take pictures, but can't save them... Another sign of this issue would be an absurd "SD Card damages/corrupted, please format" notification, and the sdcard never mounting again untill you well...re-format the card. This happens to me once a week, making me have to backup my stuff to the pc, format the card, and then put it all back on the card, and voila off we go till the next "false corruption".

it's seems that this problem is a software issue, and not hardware, and i have found out it is an OMAP kernel issue:

"SD card problems since 2.2 update is a bug in OMAP kernel sources for froyo. CyanogenMod developpers worked hard to patch the kernel but it is hard to correct motorola bugs due to the locked bootloader." (source: Motorola support forums")

THIS WILL WORK WITH ALL STOCK ROMS NOT WITH CM7 AND DERIVATES

Requirements:

* A rooted Defy

* A recovery installed (preferably Clockworkmod)((Note: if you don't have a recovery installed on your phone, please refer to this post:http://xdaforums.com/showthread.php?t=1032212))

* A recent version of busybox ((https://play.google.com/store/apps/details?id=stericson.busybox&hl=en)) --> if you have titanium backup, you don't need this

NEW (UPDATED) INSTALLATION WAY:

I made a new cwm zip to make this fix fully compatible for stock roms (thanks to popcorn1122 for reporting files and folders to made this fully work on stock):

https://www.box.com/s/78a3a8a672af6f35bd84

(File are attached too)

copy to your sd card, preferably to the root of the SD, reboot your phone, open your recovery and choose "install zip from sd card", select this zip and install it.

THIS IS THE OLD WAY (FUNCTIONAL FOR ALL ROMS WITH INIT.D SUPPORT):

In order to solve this issue, we need Root Manager (or any Root file explorer), and follow this few steps:

1. Download mmcfix.ko http://mir.cr/1BSJ3DNE and 09mmcfix http://mir.cr/ORF4LHOM

2. Check that you have install-recovery.sh on /system/etc, if you doesn't have it, download from here: https://www.box.com/shared/ccd6eddad8bfcda5776b, and copy to the /system/etc folder, and set permissions (owner: Read-write-execute, Group: Read-execute, Others: Read-execute)

3. Copy mmcfix.ko to /system/lib/modules (mount R/0 in Root Manager in order to copy the file)

4. Set permissions for file (owner: Read-write, Group: Read, Others: Read)

5. Copy 09mmcfix script to /system/etc/init.d (mount R/0 in Root Manager in order to copy the file)

6. Set permissions for file (owner: Read-write-execute, Group: Read-execute, Others: Read-execute)

7. Reboot the phone to bootmenu. ((press volume down when led going blue at reboot))

8. You have to set "enable" in load all modules at CPU in bootmenu.

9. Reboot again the phone and let it boot normally.

10. Enjoy the fix!

ALTERNATIVE ZIP FOR ROMS WITH INIT.D SUPPORT:

Here is a installable zip via CMW, http://www.mirrorcreator.com/files/0LKUJ2SV/mmcfix.zip_links , copy to your sd card, preferably to the root of the SD, reboot your phone, open your recovery and choose "install zip from sd card", select this zip and install it. ((Thanx to mys_721tx for the zip))

MD5 (mmcfix.zip) = 6a3c37fedee78825b8e2c42dfe073d59

If you need further help, PM me. If you find this thread helpful, please, hit THANKS button :D

Special thanx to epsylon3 for all the hard work