[FIX] mmcfix for all defy roms (fix for high class sd cards) (27/06/2012)

Search This thread

miziel

Senior Member
Jan 31, 2009
74
13
Gliwice - Poland
Ive tested it second ago, for me it works ;)
I mean sd speed has jumped form 4,3 to 5,2 on ICS o_O its to less for class 10 card, i had 7,3 on other soft (dont remember which;P)
 
  • Like
Reactions: JustWay
I've applied it to MS2Ginger 3.0, but I'm still having the same strange issues as with the stock ROM or before the fix. Sometimes the camera does not save the photo, sometimes Mantano Reader drops Force Close and writes JDBC exception into the system log (trying to update database on SD card). How can I check if the mmcfix module is loaded into the memory? These issues never occur when I use CM-based ROMs, although I'm using the same kernel. Install-recovery.sh is present, I copied the script and the module to the right places and set the right permissions.

Ok, you must have "terminal emulator" (from play store), and run this command :
lsmod

it must say (among other things):

symsearch 667 5 multitouch,mmcfix,backlight,cpufreq_smartass,cpufreq_interactive,[permanent], Live 0xbf015000
..........
mmcfix 1409 0 - Live 0xbf076000

If not, please, pm a logcat after boot

Enviado desde mi MB526 usando Tapatalk
 
I've made a zip file for recovery.

I think it works but i haven't tested it yet. Wil do it later :)

install-recovery.sh is included, i hope that even if somebody have this file i doesn't matter :)

Enjoy!


PS. If it works, add it to the first post :)

How do you manage permissions from zip???? This workaround must need right permissions on all files for well working....

Enviado desde mi MB526 usando Tapatalk
 

Goose-T

Senior Member
Apr 13, 2011
91
59
Budapest
Ok, you must have "terminal emulator" (from play store), and run this command :
lsmod

it must say (among other things):

symsearch 667 5 multitouch,mmcfix,backlight,cpufreq_smartass,cpufreq_interactive,[permanent], Live 0xbf015000
..........
mmcfix 1409 0 - Live 0xbf076000

If not, please, pm a logcat after boot

Enviado desde mi MB526 usando Tapatalk

There's no mmcfix in the lsmod output with MS2Ginger, only overclock, netmux, netmux_linkdriver, modem_pm_driver, sec and vpnclient. I've tried it with CM7 also and seen it. Somehow the MS2Ginger does not load the mmcfix module, strange. I copied everything in place and set the right permissions. My install_recovery.sh looks like this:

#!/system/bin/sh

bb=/system/xbin/busybox

if [ -f $bb ]; then
/system/bin/logwrapper $bb run-parts /system/etc/init.d
else
for i in $(ls /system/etc/init.d/*); do
sh $i
done
fi


I think it's OK.
 
There's no mmcfix in the lsmod output with MS2Ginger, only overclock, netmux, netmux_linkdriver, modem_pm_driver, sec and vpnclient. I've tried it with CM7 also and seen it. Somehow the MS2Ginger does not load the mmcfix module, strange. I copied everything in place and set the right permissions. My install_recovery.sh looks like this:

#!/system/bin/sh

bb=/system/xbin/busybox

if [ -f $bb ]; then
/system/bin/logwrapper $bb run-parts /system/etc/init.d
else
for i in $(ls /system/etc/init.d/*); do
sh $i
done
fi


I think it's OK.

Sorry for ask but... Do you have init.d folder??

Enviado desde mi MB526 usando Tapatalk
 

Garuxa

Senior Member
May 12, 2011
580
218
Santiago
That's weird, because i have ms2ginger 4.0 and the fix it's working perfectly.

Check which files are in init.d folder and tell me

Enviado desde mi MB526 usando Tapatalk

Even to me it worked with MS2Ginger 3.0 while using this rom :)

I did many tests to try to corrupt data, Microsd that self-change to read-only, etc.. All these problems occur without the fix.

I am currently with WIUI so I can not generate a log to demonstrate that it works
 
  • Like
Reactions: espaciosalter20

Goose-T

Senior Member
Apr 13, 2011
91
59
Budapest
That's weird, because i have ms2ginger 4.0 and the fix it's working perfectly.

Check which files are in init.d folder and tell me

Enviado desde mi MB526 usando Tapatalk

I've integrated mmcfix into my ROM, you can download it and extract the archive. I think everything's in place, but it just does not get loaded. Btw, the /etc/init.d folder contains the following files:
08backlight
09mmcfix
90multitouch
S70zipalign
S97ramscript
S99SuperCharger
 
I've integrated mmcfix into my ROM, you can download it and extract the archive. I think everything's in place, but it just does not get loaded. Btw, the /etc/init.d folder contains the following files:
08backlight
09mmcfix
90multitouch
S70zipalign
S97ramscript
S99SuperCharger

Sorry for keeping you checking things, but... can you transcribe the content of 09mmcfix? I´m about to think that this problem it's caused for busybox in your rom, because that isn't calling the module to load in kernel in boot....
 

krysha

Member
Aug 4, 2005
24
2
User of stock and ms2ginger roms, please report here if the fix is working or not for you.
Thanx!!!

I tried it on stock ROM (45.0.74.MB526.Retail.en.DE android 2.3.4 kernel 2.6.32.9-gbdd614e, build 4.5.1-134_DFP-74) but lsmod doesn't show mmcfix... when I try to load it manually, I get error:
insmod: can't insert '/system/lib/modules/mmcfix.ko': unknown symbol in module or invalid parameter
 
  • Like
Reactions: Goose-T

Goose-T

Senior Member
Apr 13, 2011
91
59
Budapest
I tried it on stock ROM (45.0.74.MB526.Retail.en.DE android 2.3.4 kernel 2.6.32.9-gbdd614e, build 4.5.1-134_DFP-74) but lsmod doesn't show mmcfix... when I try to load it manually, I get error:
insmod: can't insert '/system/lib/modules/mmcfix.ko': unknown symbol in module or invalid parameter

After a little investigation I found out that:
  1. mmcfix depends on symsearch, as the modules.dep file says in CM7.2 ROMs
  2. mmcfix is loaded after symsearch by /system//bootmenu/2nd-init/init.mapphone_umts.rc in CM

So it should be loaded like this on stock ROMs and MS2Ginger also, not via install-recovery.sh. I will try it this way if I have time. Krysha, that was a very valuable comment! :) Can you try loading symsearch.ko and then mmcfix.ko by hand?
 
Last edited:
Originally Posted by krysha<br />
I tried it on stock ROM (45.0.74.MB526.Retail.en.DE android 2.3.4 kernel 2.6.32.9-gbdd614e, build 4.5.1-134_DFP-74) but lsmod doesn't show mmcfix... when I try to load it manually, I get error:<br />
insmod: can't insert '/system/lib/modules/mmcfix.ko': unknown symbol in module or invalid parameter
<br />
<br />
After a little investigation I found out that:<ol style="list-style-type: decimal"><li>mmcfix depends on symsearch, as the modules.dep file says in CM7.2 ROMs</li>
<li>mmcfix is loaded after symsearch by /system//bootmenu/2nd-init/init.mapphone_umts.rc in CM</li>
</ol><br />
So it should be loaded like this on stock ROMs and MS2Ginger also, not via install_recovery.sh. I will try it this way if I have time.

Yes, that's the other workaround that i was investigating but symsearch is difficult to make it in a persistent way, I tried in init.rc with no positive result. The install-recovery script works for me and others as well. But keep researching for see what else can do the trick.

Enviado desde mi MB526 usando Tapatalk
 

Goose-T

Senior Member
Apr 13, 2011
91
59
Budapest
Yes, that's the other workaround that i was investigating but symsearch is difficult to make it in a persistent way, I tried in init.rc with no positive result. The install-recovery script works for me and others as well. But keep researching for see what else can do the trick.

Enviado desde mi MB526 usando Tapatalk

And what if we load symsearch before in 09mmcfix script like this? I haven't written any linux script like this before, so correct me, if I'm wrong.

#!/system/bin/sh
#
# load mmcfix module

# Module location
SYM="/system/lib/modules/symsearch.ko"
MODULE="/system/lib/modules/mmcfix.ko"

# Load the module
insmod $SYM
insmod $MODULE
 
And what if we load symsearch before in 09mmcfix script like this? I haven't written any linux script like this before, so correct me, if I'm wrong.

#!/system/bin/sh
#
# load mmcfix module

# Module location
SYM="/system/lib/modules/symsearch.ko"
MODULE="/system/lib/modules/mmcfix.ko"

# Load the module
insmod $SYM
insmod $MODULE

Ok, that could work it. Please, try it and tell us the result.

Enviado desde mi MB526 usando Tapatalk
 
And what if we load symsearch before in 09mmcfix script like this? I haven't written any linux script like this before, so correct me, if I'm wrong.

#!/system/bin/sh
#
# load mmcfix module

# Module location
SYM="/system/lib/modules/symsearch.ko"
MODULE="/system/lib/modules/mmcfix.ko"

# Load the module
insmod $SYM
insmod $MODULE

Hey, i found something interesting that could help!! Did you tried to set "enable" in load all modules at cpu in bootmenu?? this will load symsearch at boot and do not need to load in script

Enviado desde mi MB526 usando Tapatalk
 
  • Like
Reactions: Goose-T

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    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
    2
    Sorry haven't read pervious post. looks like I reinvent the wheel again here :p
    ----
    Hi folks! I made a flashable zip file for mmcfix.

    It will copy the files and set them with right permission. Only thing you have to do is load it in the bootmenu.

    I've tested it on my defy, it works. But still here's the disclaimer: please use this zip package on your own responsibility. I am not responsible for including but not limited to bricked devices, dead SD cards.

    Here's the link.

    MD5 (mmcfix.zip) = 6a3c37fedee78825b8e2c42dfe073d59
    2
    Yeah, that totally works! I think you should include this advice in the first post.

    First post updated :D
    1
    So this is the fix that fixes the problem of high class microsd. I have a microsd class 10 and the Walter roms always had the problem that was changed to read-only mode, but never had that problem on CM7

    Thank you for sharing this :)

    Yeah, i decided to work in port this fix for all roms,
    Because I have Ms2ginger Beta 2, and that's problem always bother me. Now it's gone!!!




    Isn't the mmcfix included in CM7 since months?
    Don't know if the mmcfix is required to CM9 :confused:


    Epsylon made this fix for Cm7 A long time ago, because we have a locked bootloader, people with froyo (cm7) kernel on cm9 must have this on for preventing data corruption. Don't know if GB Kernel, solved that problem... But if you want it, check /system/lib/modules, if Mmcfix it's there, the fix are on too




    Good job!! I had this issue on Stock rom but on cm7 it works fine :)
    My class 10 speed got reduced to 2-3 MBps but before it was 10+ MBps.. can I fix that?

    yes... Are you using a stock ROM right now?? Well, mmcfix it's for you. And maybe, you have to install "sd speed increase" in order to unleashed all the speed of your sd card. (this app uses a script written for somebody here in xda that tweak sd access speed)

    Enviado desde mi MB526 usando Tapatalk
    1
    I think that this patch should be included in all the ROM releases lately...we see constantly flashing roms...multiboots...as such flashing these instructions time and again would be a waste and a hindrance

    Sent from ari@defy