From 91a2ff01c351e314df15bcb8148f7b1a46b7471d Mon Sep 17 00:00:00 2001 From: g* Date: Fri, 2 Apr 2021 23:50:11 +0200 Subject: [PATCH] Updated folders and links. --- .DS_Store | Bin 0 -> 6148 bytes mobisync.sh | 56 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0> $LOG open $LOG echo "NOTIFICATION: Syncing completed with some errors." else + { echo "Success: Mobisync completed successfully"; line; } >> $LOG echo "NOTIFICATION: Syncing is complete" fi } @@ -49,40 +65,36 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - >> $LOG # Prints line } # Writes the header for the log file: Program, Version number, Date and Line. -{ echo "mobisync 11.2.1"; echo "Log: " `date`; line; } > $LOG +{ echo "mobisync 12.0"; echo "Log: " `date`; line; } >> $LOG # Syncing images and video on device to the Downloads folder and sync the wallpaper on computer. -{ adb shell find "/sdcard/DCIM/Camera/" -iname "*.mp4" | tr -d '\015' | while read line; do adb pull "$line" $DOWNLOADS; done; adb shell find "/sdcard/DCIM/Camera/" -iname "*.jpg" | tr -d '\015' | while read line; do adb pull "$line" $DOWNLOADS; done; adb shell find "/sdcard/DCIM/" -iname "*.jpg" | tr -d '\015' | while read line; do adb pull "$line" $DOWNLOADS; done; adb shell find "/sdcard/Pictures/" -iname "*.jpg" | tr -d '\015' | while read line; do adb pull "$line" $DOWNLOADS; done; } >> $LOG +{ adb shell find $REMOTE_IMAGES -type f -iname \*.jpg -o -type f -iname \*.mp4 -o -type f -iname \*.dng | tr -d '\015' | while read line; do adb pull "$line" $DOWNLOADS; done; adb shell rm -rf $REMOTE_THUMBNAILS; adb shell find $REMOTE_PICTURES -type f -iname "*.jpg" | tr -d '\015' | while read line; do adb pull "$line" $DOWNLOADS; done; } >> $LOG catcher Images line # Syncing audio on device to the Downloads folder on computer and Music from the computer. -{ adb shell find "/sdcard/Recordings/" -iname "*.mp3" | tr -d '\015' | while read line; do adb pull "$line" $DOWNLOADS; done; adb-sync --delete $MUSIC "/sdcard/Music/" } >> $LOG +{ adb shell find $REMOTE_AUDIO -type f -iname \*.mp3 -o -type f -iname \*.ogg | tr -d '\015' | while read line; do adb pull "$line" $DOWNLOADS; done; adb-sync --delete $MUSIC $REMOTE_MUSIC; } >> $LOG catcher Audio line # Syncing documents on device to the Downloads folder on computer. -{ adb-sync --reverse $DOWNLOADS "/sdcard/Documents/"; adb-sync --reverse $DOWNLOADS "/sdcard/Download/"; adb shell rm -rf '/sdcard/Documents/*'; adb-sync --delete $TRAVEL "/sdcard/Documents/"; } >> $LOG +{ adb-sync --two-way $DOCUMENTS $REMOTE_DOCUMENTS; adb-sync --reverse $REMOTE_DOWNLOAD $DOWNLOADS; } >> $LOG catcher Documents line -# Syncing qSelf data on device to the Documents/qSelf folder on computer. -{ adb-sync --reverse --delete "/sdcard/.tentacles/" $TENTACLES; } >> $LOG +# Syncing Automate data on device to the computer +{ adb-sync --reverse $REMOTE_AUTOMATE $AUTOMATE; } >> $LOG catcher Tentacles line -# Syncing app, recovery and TWRP backups. -{ adb-sync --reverse --delete "/sdcard/Mobile/" $MOBILE; adb-sync --reverse --delete "/sdcard/Signal/Backups/" $SIGNAL; adb-sync --delete $SYSTEM "/sdcard/System/"; } >> $LOG -catcher Backups -line - -# Deleting all synced media from phone. -{ adb shell rm -rf '/sdcard/Recordings/*.mp3'; adb shell rm -rf '/sdcard/Movies/*'; adb shell rm -rf '/sdcard/DCIM/*'; adb shell rm -rf '/sdcard/Pictures/*'; adb shell rm -rf '/sdcard/Download/*'; adb shell rm -rf '/sdcard/Downloads/*' } >> $LOG -catcher Delete +# Syncing app, recovery and backups. +{ adb-sync --two-way $RESTORE $REMOTE_RESTORE; adb-sync --reverse --delete --times $REMOTE_BACKUP $BACKUP; } >> $LOG +catcher Backup line # Notification that the sync is over. printf "Syncing is complete. END" >> $LOG +line verify $ERROR echo "QUITAPP" \ No newline at end of file