USER_ID="0"
fi
- BASE="/storage/emulated/$USER_ID"
+ BASE="/storage"
+ EMULATED="$BASE/emulated/$USER_ID"
# Files: full copy
- #adb pull $BASE files/
+ #adb pull $EMULATED files/
# Remove multimedia cache from backup
#rm -rf files/Music
# Files: full basic copy
- #adb shell ls -1 $BASE | grep -v ^Music | while read file; do
- # adb pull $BASE/$file files/
+ #adb shell ls -1 $EMULATED | grep -v ^Music | while read file; do
+ # adb pull $EMULATED/$file files/
#done
mkdir -p files/$USER_ID
# Files: incremental basic copy
- for file in `adb shell ls -1 $BASE | grep -v '^Music'`; do
- adb-sync --delete --reverse $BASE/$file files/$USER_ID/
+ for file in `adb shell ls -1 $EMULATED | grep -v '^Music'`; do
+ adb-sync --delete --reverse $EMULATED/$file files/$USER_ID/
+ done
+
+ # SD cards
+ for file in `adb shell ls -1 $BASE | grep -v "^self" | grep -v "^emulated"`; do
+ adb-sync --delete --reverse $BASE/$file files/
done
}