Copying photos from pixel phone onto mac

I regularly copy photos and videos off my Android phone onto my Macbook (Why? See below). With my more recent Pixel phones this has become surprisingly difficult. I’ve ended up doing this in a terminal. I thought I’d share a little how-to on that in case anyone else needs it:

Using ADB in terminal

Plug your android phone in with a USB cable, and enable file transfers

Install a thing called “Android Debug Bridge (ADB)” on mac:

    brew install android-platform-tools

List USB connected android devices with this command:

    adb devices -l

You should see some device details e.g. model:Pixel_7a.

Copy the whole DCIM directory off the phone like so:

    adb pull /sdcard/DCIM ~/Downloads/DCIM

Obviously check that worked and move the photos to where you want them, being sure to think about how they’ll be backed up, before doing the next step.

Optional of course, but I’ll tend to delete them all off my phone to make space, with this command:

    adb shell 'rm -rf /sdcard/DCIM/*'

So that’s my routine. But I skipped some gnarly details about getting this working in the first place. Here’s where it gets messy

I’m not sure if this step was necessary, but unfortunately I think you do need to Enable developer options and USB debugging (even for file access)

On the phone:

  • Settings → About phone
  • Tap Build number 7 times
  • Settings → Developer options
  • Enable USB debugging
  • (Optional but helpful) Default USB configuration → File Transfer
  • Reconnect the cable after doing this.

Less surprisingly, you also need to Enable file transfers. You should be able to do this from the notifications screen when you first plug your phone in. You’ll need to “Allow USB debugging?” if you get that prompt (otherwise it will list the device as “unauthorized”). You may need to ensure the phone stays unlocked at first. And obviously none of this will work unless you’ve found your good USB cable

Look, I know this is all terrible. That “tap Build number 7 times” secret manoeuvre is insane, and obviously a command-line approach is never going to be the pinnacle of user-friendliness, but let me tell you about the alternatives…

Android File Transfer

I’m raking over some ancient history with these first two alternatives, since they’re no longer even available, but “Android File Transfer” in particular, used to be the thing everyone linked to, and indeed the thing I used. On the plus side, it felt very mac-native, opening what looked like a standard mac finder window where you could simply drag your files off the android device onto another finder window for your local disk. Perfect.

It was infuriating though because when first connecting, it would open a dialog box on the desktop complaining that it was not authorised on the phone, and at the same time a popup on the phone would appear letting you authorise. Authorise on the phone, and you would still need to close the dialog box on the desktop, which then caused it to drop the connection and no longer be authorised! But then some combination of doing things fast enough would eventually allow it to work! I assume it originally worked better and some android security change must’ve broken it. But for several years this was the recommended software, and so I did that merry dance trying to get connected every time.

Handshaker

This appears to be no longer available on the AppStore (It’s supposed to be on the mac appstore with companion android app on the play store). Made by “Smartisan Digital Co. Ltd.”. Plenty of other dodgy looking websites listing it still.

This had a nice UI including the very handy ability to connect to the phone over wifi. It seemed less good at connecting over USB cable and eventually that stopped working. It also eventually lost the ability (when I moved to a newer phone) to write to the phone, showing an error message written in Chinese. So read-only, which mean I couldn’t do the delete step except via some fat-fingered slow approach on the phone. I went looking for support which was all in Chinese too. Anyway, no longer available.

OpenMTP

OpenMTP is free and open source. We like that! The interface is a bit clunky. It was annoying the way a copying operation with several hundred photo files would show a progress bar flitting back and forth for progress of each file, but with no progress of the whole group of files. And then when I come to delete lots of files: absolutely no progress indication while it is, in fact, quietly slowly deleting!

But I did use this for a while, and I think ultimately I just had one too many occasions where I couldn’t get it to connect to my phone. Connection problems are recurring theme across all these alternatives, but there were problems at the software level (or with the MTP protocol?) with this one, e.g. occasions where re-booting my laptop would resolve something. But quite a few occasions where I just couldn’t persuade it to connect.

MacDroid

I haven’t tried this one. If you follow links to the old Android File Transfer recommendation, it’s pointing people to MacDroid nowadays, and this looks like a pretty glossy and presumably functional alternative, but… 7 day free trial and then $$$. Maybe I should try it and see if it’s worth it. Act like a proper Apple fanboy MacBook user and just splash the cash! but honestly…

Why is this so hard??

I really feel like the ability to transfer photos off my phone shouldn’t be this hard. It’s an easy simple thing no? (and not a paid for feature). Is my memory playing tricks on me, or did my very first android phone basically just act like a USB key, instantly mounting and popping up a standard file browsing window? Why has this become so difficult? “Security” maybe. You probably want to be forced to unlock your phone at least, before you (or somebody) can copy off all your photos. But beyond that, this could be straightforward?

Why? Just use Cloud Storage!

Normal people don’t worry about this of course. They send their photos to Google/Apple, follow the prompts to pay for storage, and forget about it. I’m being very old fashioned hoarding my files on ye olde local disk. I put my photos in directories organised by month, and sometimes by holidays. I split off the boring OpenStreetMap surveying photos, and I try to be organised about backing them up onto other disks. Newer phone photos sit nicely alongside my older digital camera photos from the era before smartphones. Kids these days don’t even know how to manage files in directories or… maybe ridiculous old farts like me spend do much time folder-fiddling.

Even the concept of a local disk is being phased out. When I bought my MacBook I foolishly assumed that if I needed a bigger disk, I could buy a bigger disk, but no. My MacBook cannot have a bigger disk, but they do want to sell me cloud storage! Meanwhile, I do send my photos direct to Google, as an alternative back-up, but I’m bumping up against the free tier storage limit. I’m periodically trying to delete old photos to make space, but seeing a lot of nagging to upgrade either way.

So that’s two sets of subscriptions I could sign up for, and I probably should, but I’m allergic to subscriptions. I probably wouldn’t even have Netflix if my wife didn’t do the sign up. And even if there are advantages, I definitely resent being prodded by Google and Apple into paying them regularly due to user-hostile designs and deliberate degradations they are foisting upon us.

And yet all of this is clearly swimming against the tide. So why am I doing this? I don’t really know!

If anyone finds my command-line how-to useful, please let me know. Or just let me know I’m not the only old-fashioned file-wrangling fool!