FORUMS
Remove All Ads from XDA
Thread Deleted Email Thread
Prev Previous Post   Next Post Next
Hello everyone, i was testing 'SD speed tweak' of CF-Root by skin1980 in KPM, and found out that it wasn't working properly, so i decided to fix it and share the results

This tweak aims to increase read speed of both internal and external sd-cards by increasing the buffer size. It should work in any firmware/rom with ROOT privileges, if the rom doesn't support loading scripts from init.d, check the bottom of the post.

Put this script in /etc/init.d with any name, for example 98Sdfix:

Code:
#!/system/bin/sh
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/179:16/read_ahead_kb;
Important! it needs execution permissions (rwxrwxrwx) it can be done in root explorer or on a terminal by doing chmod 777 /etc/init.d/98sdfix

Important! the second path 179:16 may vary according external SD size, check the path with a root explorer and adjust the script if needed.

Reboot or run the script in a terminal as root to see the effects

Info: the number 2048 is the new buffer size (original was 128), it can be anything like 256,512,1024,2048,3072,etc. you can use whichever you found best (i recommend Sd Tools to test)

Option 2 (if the above isn't working for you)

Code:
#!/system/bin/sh
echo "2048" > /sys/devices/platform/mmci-omap-hs.0/mmc_host/mmc1/mmc1:1234/block/mmcblk1/queue/read_ahead_kb; 
echo "2048" > /sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/queue/read_ahead_kb;
Please notice that in the path to the file there are folders named mmc0:0001 and mmc1:1234 this last 4 numbers could vary from different firmware versions/roms check the path with a root explorer and adjust the script if needed.

Note: if the rom doesn't support loading scripts from init.d, it could work anyways using Script manager or any app like it, be sure to check "Run as Root" and 'Run at boot'

Similar Post on http://forum.xda-developers.com/show....php?t=1010807
(it isn't exactly the same since i added external-sd and option 2 is device specific)

I hope it helps

Script attached: unzip and place it in /etc/init.d please check the second path with a root explorer and adjust the script if needed
Attached Files
File Type: zip 98Sdfix.zip - [Click for QR Code] (192 Bytes, 2785 views)
The Following 11 Users Say Thank You to alfrix For This Useful Post: [ View ] Gift alfrix Ad-Free
Subscribe to Thread

Tags
tweak

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes