Skip to content

Instantly share code, notes, and snippets.

@vaibhaw
Last active December 26, 2023 08:19
Show Gist options
  • Save vaibhaw/1a4c4e177107287bd917 to your computer and use it in GitHub Desktop.
Save vaibhaw/1a4c4e177107287bd917 to your computer and use it in GitHub Desktop.
android_utils
adb shell ls /foo/bar | tr -d '\015' | while read file
do
folder="/foo/bar/$file"
adb pull $folder download
done
adb shell ls /sdcard/ | tr -d '\015' | while read file
do
echo "copying >>>>>>>> /sdcard/$file to >>>>>>>>> OnePlusOne_Backup"
/usr/lib/adb-sync --reverse "/sdcard/$file" "OnePlusOne_Backup"
done
/usr/lib/adb-sync --reverse "/sdcard/*" "OnePlusOne_Backup/"
pip install BetterADBSync
# BetterADBSync behaves like rsync
adbsync pull /sdcard/DCIM/Camera <local-path>
adbsync push <local-path> <phone-path>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment