1st let's see how much free space i'm having:
#
df -h | grep data
/dev/block/mtdblock5 147.6M 76.7M 70.9M 52% /data
#
du -sk /data/data/* | sort -rn | head
18641 /data/data/com.navngo.igo.javaclient
14911 /data/data/com.opera.browser
6756 /data/data/com.google.android.gm
5194 /data/data/com.android.providers.contacts
3661 /data/data/com.htc.launcher
3083 /data/data/com.htc.googlereader
1276 /data/data/com.swype.android.inputmethod
1172 /data/data/com.android.settings
1144 /data/data/com.htc.android.mail
1084 /data/data/and.blogger
Ok so it seems that iGO and Opera is eating 32 megs together. I'll leave data/data/com.google.android.gm alone since it's gmail and I want to be more responsive by keeping its files to nand(i only have a class 4 card). Lets get to work. 1st we need to make a folder on sd-ext where to keep the files.
#
mkdir /system/sd/.moreapps First we move them:
mv /data/data/com.navngo.igo.javaclient /system/sd/.moreapps/com.navngo.igo.javaclient
# Then we symlink them:
#
#
Now we repeat the operation for opera:
Move:
#
Symlink:
ln -s /system/sd/.moreapps/com.opera.browser /data/data/com.opera.browser
Now let's check again my free space.
#
/dev/block/mtdblock5 147.6M 51.8M 95.9M 35% /data
Now let's check if we made the symlinking right
#
lrwxrwxrwx 1 0 0 38 Feb 22 05:46 /data/data/com.opera.browser -> /system/sd/.moreapps/com.opera.browser
Yap all seems right. Opera and iGO are working at same speed, i freed up some space. Everyone's happy.
The advantage of this method is that you can choose what to move to sd-ext you don't have to have all to sd-ext.
Now make sure you don't name your folder in /system/sd "data" since a2sd script will move back on nand all its contents.
This method is recommend for GPS software, Browsers, Games, some apps you got from market. It's best to leave system apps there to avoid FCs or slowdowns. If anything goes wrong with your app after this you can always move them back.
1st you delete the symlink (rm /data/data/whatevar) then move it back
Thank you mate!!!
ReplyDeleteYou're really doing very good work with all that stuff!! ;) Congratulations!!!
hi,
ReplyDeleteim sorry to sound noob but could you how you do it?i mean is it in ADB?or terminal emulator?and how do you input | ? and last question is what would happen if i decide to backup those applications say with my backup pro/or my backup root? would they backup and restore as normal or should i undo everything and then backup.
thanks as it looks like great method to free up some space is just sad that i dont know how its done :)
hello,
ReplyDeleteI got the following error when creating the moreapps folder:
¨can't create directory '/system/sd/.moreapps': Read-only file system¨
how can this be solved?
...and I got
ReplyDeletefailed on '/data/data/com.navngo.igo.javaclient' - Cross-device link
hi,
ReplyDeleteafter i did cmd "du -sk /data/data/* | sort -rn | head"
i got error "sort: standard output: broken pipe"
any ideas?
@giedrius you start by writing in cmd the path starting with cd C:\blabla where balbla = tools folder and then type adb shell; thats it
ReplyDeleteAmazing!
ReplyDeleteI might not have to buy the SG2 just yet ;)
1) It will be much easier to go into recovery.
ReplyDelete2) # mv /data/data to /sd-ext/data
(can only be done in recovery - i.e. when phone is "off")
3) # ln -s /sd-ext/data /data/data
Cheers,
fusionstream.
Sry. Forgot to add:
ReplyDeleteBetween steps 1 and 2
1.1) In clockworkmod, mount all the necessary partitions (I usually mount them all just in case)
1.2) In clockworkmod, restart adb
1.3) Connect phone to pc via usb
1.4) In your cmd prompt, type "adb shell" to connect to your phone.
thanks again baadnws, i use this method every time i flash a new rom... it's great.
ReplyDeletebut to avoid typos and generally to speed up things i do it this way:
example, i want to move facebook data (/data/data/com.facebook.katana), in shell I do:
for i in com.facebook.katana ; do mv /data/data/$i /system/sd/.moreapps/$i && ln -s /system/sd/.moreapps/$i /data/data/$i ; done
where every "$i" assumes the value i put in the first part, in this case "com.facebook.katana"
then to move another app's data i just have to change that part and the script will do the rest.. :D
i hope this can be useful to someone!
cheers
Sometimes when I try doing this after flashing a new rom it says-
ReplyDelete"mv /data/data/com.adobe.air /system/sd/.moreapps/com.adobe.air
mv: can't rename '/data/data/com.adobe.air': No such file or directory"
I keep having to reinstall the apps it says this at, any suggestions?
I noticed that when you typed:
ReplyDeletels -al --color=none /data/data/com.opera.browser
you had the following permissions lrwxrwxrwx 1 0 0
I have 1 root root...
How do I change that? The application force closes now and I had to remove the link and the folder, but that takes me to square 1