Skip to content

Instantly share code, notes, and snippets.

@thomashartm
Created September 6, 2025 10:21
Show Gist options
  • Save thomashartm/c994472e6b558a55a0cb0090d54ee7bd to your computer and use it in GitHub Desktop.
Save thomashartm/c994472e6b558a55a0cb0090d54ee7bd to your computer and use it in GitHub Desktop.
Recovering all files from an old Android Phone to macOS using ADB

📱 Extracting Files from an Old Android Phone to macOS using ADB

Connecting an approximately 10-year-old Android phone (likely Android 4–6) to a MacBook is tricky, because Google has barely maintained the official Android File Transfer (AFT) app for years and older devices often only support MTP (Media Transfer Protocol).

This guide explains how to copy all accessible files from an older Android device to a Mac using ADB (Android Debug Bridge).
It works even if your device is 10+ years old, as long as you can enable USB debugging.

1. Prepare the Android Device

  1. Enable Developer Options

    • Open Settings → About phone
    • Tap Build number 7 times until you see “You are now a developer!”
  2. Enable USB Debugging

    • Go to Settings → Developer options
    • Toggle USB debugging on
  3. Connect the device to your Mac with a USB cable

    • When prompted on the phone, accept the RSA fingerprint authorization

2. Install ADB on macOS

Install Android Platform Tools via Homebrew:

brew install android-platform-tools

Verify installation:

adb version

3. Verify Device Connection

Check that the phone is detected:

adb devices

Expected output:

List of devices attached
XXXXXXXX    device

If you see unauthorized, check the phone screen and confirm the fingerprint prompt.

4. Pull User Data (Internal Storage)

Copy everything from the internal storage (/sdcard) to your Mac:

adb pull /sdcard/ ~/AndroidBackup
  • ~/AndroidBackup is the destination folder on macOS
  • This will include photos, videos, downloads, WhatsApp folders, and other app media

5. Optional: Selective Backups

Pull specific folders only:

adb pull /sdcard/WhatsApp ~/AndroidBackup/WhatsApp
adb pull /sdcard/DCIM ~/AndroidBackup/DCIM
adb pull /sdcard/Download ~/AndroidBackup/Download

List files remotely:

adb shell ls -la /sdcard/

6. Advanced: Full System Dump (Rooted Devices Only)

If the device is rooted, you can gain full access:

adb root
adb pull / /Users/yourname/FullAndroidDump

Or create raw partition images:

adb shell su -c "dd if=/dev/block/mmcblk0 of=/sdcard/system.img"
adb pull /sdcard/system.img

⚠️ These dumps are very large and include system partitions you may not need.

Summary

  • Use adb pull /sdcard/ for a complete copy of user data
  • For full system access, root is required
  • Works on old Android devices and modern macOS versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment