diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2011-12-09 23:38:35 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2011-12-09 23:38:35 +0700 |
commit | 99b17323e14b17277d96967755c57e51c1675565 (patch) | |
tree | 1c5d3f11c660c0bf3ab6fde3be9404186691d787 | |
parent | 1cc51de5db2ea98417534a99bb0b31e1ef2cc082 (diff) | |
download | device_samsung_aries-common-99b17323e14b17277d96967755c57e51c1675565.zip device_samsung_aries-common-99b17323e14b17277d96967755c57e51c1675565.tar.gz device_samsung_aries-common-99b17323e14b17277d96967755c57e51c1675565.tar.bz2 |
Improve cache migration script and migrate GMail cache
-rw-r--r-- | setupdatadata.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/setupdatadata.sh b/setupdatadata.sh index d5ff03e..ce9c389 100644 --- a/setupdatadata.sh +++ b/setupdatadata.sh @@ -27,11 +27,10 @@ function migrate_cache { if test -e /data/data/$1 ; then if ! test -h /data/data/$1/cache ; then OWNER="`ls -ld /data/data/$1/ | awk '{print $3}'`" - rm -r /data/data/$1/cache # It's a cache, we don't care about its content rm -r /data/data2/$1 # In case it exists - mkdir -p /data/data2/$1/cache + mkdir -p /data/data2/$1 chmod 751 /data/data2/$1 - chmod 771 /data/data2/$1/cache + busybox mv -f /data/data/$1/cache /data/data2/$1/ ln -s /data/data2/$1/cache /data/data/$1/cache chown $OWNER.$OWNER /data/data2/$1 /data/data2/$1/cache busybox chown -h $OWNER.$OWNER /data/data/$1/cache @@ -59,6 +58,8 @@ if test "$CRYPTO_STATE" = "unencrypted" ; then # Migrate download provider's cache out of /data/data because that's where market stores its downloads migrate_cache com.android.providers.downloads + # GMail stores attachments in here + migrate_cache com.google.android.gm fi fi # else: Encrypting, do nothing |