Sudhakar Rayavaram
Problem solver (And maker),
Inquisitive (Root to most of my problems),
Software craftsman (Don't ask for estimates)

Works at TarkaLabs

Tech guy behind

Bulk Transfer Files From Android Phone to Mac (Developer Style)
24 Oct 2017

It does not matter how big is the storage capacity of your android phone, you invariably will encounter the situation where there is not enough space left to binge record more pictures & videos

Android File Transfer works but it has limited capabilities. Say if I want to move only last year’s videos, you have to manually select all of them by holding the shift key (which is a mind numbing job)

Fortunately, Android Debug Bridge (adb) will give you command line access to android file system to do more powerful stuff like selecting only last year’s videos and copying them with a single command

  1. Install SDK platform tools
  2. Unzip the download and add it to your path
  3. Enable “Developer mode” in your android along with usb debugging
  4. Connect your phone to mac and run command adb shell
  5. Now, You will be inside phone’s file system
  6. Find the path of the folder in which your videos to move are (using commands like ls & cd)
  7. Exit from the shell (Ctrl+D)
  8. In your mac, Get into the folder where you wanted to copy the videos
  9. Run the command (it is a single command)

adb shell 'ls /vidoes/folder/path/VID_2016*' | tr -d '\r' | xargs -n1 adb pull

It lists all the files in the path with file name starting with ‘VID_2016’ and removes the ‘\r’ character at the end of the line and passes each line to adb pull

Now you can again get into phone file system using adb shell and remove the already copied files