From 2ff464c7ce959ff6efab0d15e6922536a5ccba7f Mon Sep 17 00:00:00 2001 From: g_it Date: Wed, 28 Jan 2026 23:04:29 +0100 Subject: [PATCH] Fixing the repo for upload. --- .DS_Store | Bin 6148 -> 6148 bytes .gitignore | 2 -- license | 21 --------------------- mobisync.sh | 31 ++++++++++++++++--------------- octopus-logo.icns | Bin profile.platypus | 0 readme.md | 10 ++++------ 7 files changed, 20 insertions(+), 44 deletions(-) mode change 100644 => 100755 .DS_Store delete mode 100644 .gitignore delete mode 100644 license mode change 100644 => 100755 octopus-logo.icns mode change 100644 => 100755 profile.platypus mode change 100644 => 100755 readme.md diff --git a/.DS_Store b/.DS_Store old mode 100644 new mode 100755 index 0a74bb68fe11bb1010d065f4e9833da7fd0c5d23..6dc99fbb11469db360976a14608a8221d38b56b2 GIT binary patch delta 113 zcmZoMXfc?uEVhsV2v`{O7}6Os8A@{VU0jlK@{@pK94Ef2zunV)*b!Ae1+RQThGB4W aer^HCP(JpA&4P^I*d`Y6ZD!~A%MSo7?jTzL delta 113 zcmZoMXfc?uEH;~kfq{XAL60GwA(NpbH{Zo2DJMS(D8|8Axyakr_OK(WdPy8r+H diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1581e58..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -mobisync-log.txt -Sizakele diff --git a/license b/license deleted file mode 100644 index 73bf615..0000000 --- a/license +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 g* - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/mobisync.sh b/mobisync.sh index a0a8ed1..9648f09 100755 --- a/mobisync.sh +++ b/mobisync.sh @@ -1,7 +1,7 @@ #!/bin/zsh # This script syncs an Android with a Mac using adb and adb-sync. -# Version 12.1.2 (09 June 2021) -# Added excluding .DS_Store. Unfortunately can only exclude one file +# Version 13.0 (13 October 2021) +# Replaced adb-sync with timepigeon/adb-sync and delete thumbnails folder before pull # Export paths for use if the script is turned into an app using Platypus. export LC_ALL=en_US.UTF-8 @@ -48,47 +48,48 @@ 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 12.1"; echo "Log: " `date`; line; } >> $LOG +{ echo "mobisync 13.0"; echo "Log: " `date`; line; } >> $LOG # Syncing images and video on device to the Downloads folder on computer. { adb shell find "/sdcard/DCIM/" -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 find "/sdcard/Pictures/" -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 "/sdcard/Pictures/.thumbnails/"; adb shell find "/sdcard/Pictures/" -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; } >> $LOG catcher Images line # Syncing documents on device to the Downloads folder on computer. { - adb-sync --reverse --times "/sdcard/Documents/Checkin/" ~/Documents/Checkin/; - adb-sync --reverse --times --delete "/sdcard/Documents/Logistics/" ~/Documents/Logistics/; - adb-sync --reverse --times --delete "/sdcard/Documents/Exercise/" ~/Documents/Exercise/; - adb-sync --reverse --times --delete "/sdcard/Documents/Finances/" ~/Documents/Finances/; - adb-sync --exclude .DS_Store --delete ~/Documents/Papers.sparsebundle/ "/sdcard/Documents/Papers.sparsebundle/"; - adb-sync --reverse "/sdcard/Download/" $DOWNLOADS; + adb-sync --reverse --delete /sdcard/Documents/Checkin/ ~/Documents/Checkin; + adb-sync --reverse --delete /sdcard/Documents/Logistics/ ~/Documents/Logistics; + adb-sync --reverse --delete /sdcard/Documents/Exercise/ ~/Documents/Exercise; + adb-sync --reverse --delete /sdcard/Documents/Finances/ ~/Documents/Finances; + adb-sync --delete ~/Documents/Papers.sparsebundle/ /sdcard/Documents/Papers.sparsebundle; + adb-sync --reverse /sdcard/Download/ $DOWNLOADS; + adb shell rm -rf /sdcard/Download/*; } >> $LOG catcher Documents line # Syncing Automate data on device to the computer. { - adb-sync --two-way --exclude .DS_Store ~/Projects/Programming/push/automate/ "/sdcard/.automate/Interface/"; - adb-sync --reverse "/sdcard/.automate/" ~/Mobile/Automate/; + adb-sync -2 --exclude .git ~/Projects/Programming/push/automate /sdcard/.automate/Interface/; + adb-sync --reverse --delete /sdcard/.automate/ ~/Mobile/Automate/; } >> $LOG catcher Automate line # Syncing app, recovery and backups. { - adb-sync --reverse "/sdcard/Restore/" ~/Mobile/Restore/; - adb-sync --reverse --times "/sdcard/Backup/" ~/Mobile/Backup/; + adb-sync -2 ~/Mobile/Restore /sdcard/Restore/; + adb-sync --reverse /sdcard/Backup/ ~/Mobile/Backup/; } >> $LOG catcher Backup line # Syncing Music from the computer. { - adb-sync --delete --exclude .DS_Store ~/Music/ "/sdcard/Music/"; + adb-sync --delete ~/Music /sdcard/Music/; } >> $LOG catcher Music line diff --git a/octopus-logo.icns b/octopus-logo.icns old mode 100644 new mode 100755 diff --git a/profile.platypus b/profile.platypus old mode 100644 new mode 100755 diff --git a/readme.md b/readme.md old mode 100644 new mode 100755 index 3586dcc..b2ce050 --- a/readme.md +++ b/readme.md @@ -1,22 +1,20 @@ # mobisync -[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT) +![Shell](https://img.shields.io/badge/zsh-F15A24?style=flat&logo=zsh&logoColor=white) ![Status](https://img.shields.io/badge/Status-inactive-orange) [![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT) -![mobisync-logo](https://gugulet.hu/site/wp-content/uploads/mobisync-logo-1200x600-1.png) - -This script syncs an Android with a Mac using adb and adb-sync. You will need to edit the script to meet your own needs. You will need to enable 'USB Debugging' mode in Developer options on your Android in order for this to work. +> This script syncs an Android with a Mac using adb and adb-sync. You will need to edit the script to meet your own needs. You will need to enable 'USB Debugging' mode in Developer options on your Android in order for this to work. **WARNING: This app will delete files on your android. Be careful!** ## Dependencies -**adb** +- `adb` ```bash brew install android-platform-tools ``` -**adb-sync** +- `adb-sync` ```bash git clone https://github.com/google/adb-sync.git