Backup your Android media, documents, and WhatsApp images to macOS using ADB via command line β incrementally and with optional silent mode.
- Install ADB (Android Debug Bridge):
brew install android-platform-tools
-
Enable Developer Mode on Android:
-
Go to:
Settings > About phone > Tap "Build number" 7 times
-
Then go to:
Settings > Developer options > Enable USB Debugging
-
-
Authorize Device:
-
Connect via USB
-
Accept the "Allow USB Debugging" prompt on your phone
-
- Give execute permission:
chmod +x backup_android_all_incremental.sh
- Run script:
./backup_android_all_incremental.sh # Normal mode ./backup_android_all_incremental.sh --silent # Silent mode (logs only)
-
Backup Location:
Output saved to:~/SamsungBackup_<timestamp>/
-
Log File:
Full activity log saved inside the backup folder:
backup_log_<timestamp>.txt
-
Photos, videos:
DCIM/
,Pictures/
-
Music, recordings, downloads, documents
-
WhatsApp Images:
Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images
-
PDFs from device root
Restore your backed-up Android files (photos, videos, documents, WhatsApp images, etc.) from Mac to Android device using:
restore_android.sh
-
ADB must be installed:
brew install android-platform-tools
-
Enable USB Debugging on your Android:
-
Settings > About phone > Tap "Build number" 7 times
-
Then go to
Settings > Developer options > Enable USB Debugging
-
chmod +x restore_android.sh ./restore_android.sh # Interactive restore ./restore_android.sh --silent # Silent mode (logs only)
-
Enter the full path to your backup folder when prompted (e.g.
~/SamsungBackup_20250725_141000
) -
Script will push content back to appropriate folders on your Android device
-
Photos & Videos β
/sdcard/DCIM
,/sdcard/Pictures
-
Downloads β
/sdcard/Download
-
Documents, Music, Ringtones β respective
/sdcard/
locations -
WhatsApp Images β
/sdcard/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images
-
PDF files from backup root β
/sdcard/
Restore activity is saved inside the backup folder as:
restore_log_<timestamp>.txt