How To Increase SD Card Reading Speed of Android Devices

Reading Speed of almost all SD Cards on Android devices is very slow. Whether its 10 Class SD Card, then also the speed is very slow as compared to that of computer and that on Phone. The reason is that the cache size for reading from SD Card is set to 128 kb and on some ROMs, its even more worse to be 4 kb.

You can check the cache size by looking into the below file:
/sys/devices/virtual/bdi/179:0/read_ahead_kb
Increase SD Card Read Speed of Android Devices

You can change this manually but it will be reverted to default after reboot. So, the changes should be done permanently by loading the script on startup through init.d

Other way of changing the cache size is to flash the CWM files. Download the files from below link. Comment here and we will mail the files to you if you are unable to download the link.

You need to check which cache size best fits to your SD card. For XDA Senior Member brainmaster, 3072 kb cache size worked the best.

So, basically there are 2 methods to increase speed of your SD Cards
1. By changing Cache Size with CWM files (Best and Easy to do).
2. By changing Cache Size manually.

Method 1: How To Change Cache Size with CWM Files
* Use Root Explorer to change the value to your desired one.
* Run SD Tools Benchmark App.
* Flash the CWM zip file that fits your SD Card.

A suggestion: Generally, for most of SD Cards, 2048 KB cache size works best.

Method 2: How To Change Cache Size Manually
Make a file with this content:

Version 1:

#!/system/bin/sh
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "128" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;

If the above Version 1 is not working for your ROM, you can try the below version 2
Version 2:

# Tweak mmc read-ahead - rafpigna -
mmcfolder="/sys/devices/platform/msm_sdcc.2/mmc_host/mmc1"
cd $mmcfolder
folderlist='ls -1'
mmcresult='echo $folderlist | grep -o '\bmmc1:\w*' | sed 's/mmc1://''
echo 128 > /sys/devices/platform/msm_sdcc.2/mmc_host/mmc1/mmc1:$mmcresult/block/mmcblk0/queue/read_ahead_kb
cd /

Change the above green color marked number 128 to what you need (for example 2048) and save it as “99sdcardreadfix”.
Copy it with Root explorer or push it with ADB into /system/etc/init.d and set permissions to 777.
Reboot.

Please Note:
1. Some of ROM chiefs have hardcoded this value in the init, that can’t be changed – only by the chief himself.
2. Some of ROM’s already contain this tweak in another script that is saved in the init.d folder. Probably it’s tagged with the number 99 in the filename to be sure that it’s executed at last. You have to change it there.

For ROM Cookers – add this line into init.rc file:

# sd card read speed fix
write /sys/block/mmcblk0/bdi/read_ahead_kb 2048

We prefer and advice you to go with Method 1 by using CWM Files.

via

Leave a Comment

Your email address will not be published. Required fields are marked *

*