Created
January 9, 2013 16:51
-
-
Save anonymous/4494730 to your computer and use it in GitHub Desktop.
This script copies all data from /data/data to any directory(in sdcard) and (soft)links back them in /data/data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To use it, first make sure the DESTDIR exists, change it according to your need, mkdir it. here i used /data/sdext2 which is a ext partition on sdcard mounted by link2sd. | |
copy the script to android, | |
`adb push linkappdata.sh /sdcard/` | |
now goto shell, | |
`adb shell` | |
become root, | |
`su` | |
now run it, | |
`sh /sdcard/linkappdata.sh` | |
wait till it finishes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
cd /data/data | |
DESTDIR=/data/sdext2/skdata/ | |
for DIRS in `find . -mindepth 1 -maxdepth 1 -type d` | |
do | |
cp -r $DIRS /data/sdext2/skdata/ | |
rm -r $DIRS | |
ln -s /data/sdext2/skdata/$DIRS $DIRS | |
done | |
echo finished |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment