Hacker News new | ask | show | jobs
by goosedragons 879 days ago
You also ONLY need Android File Transfer on Macs because Apple is too shit to implement MTP and wants to cripple non-Apple devices. On Windows/Linux/BSD you just plug in your android device and it works. A lot of devices support USB 3 speeds too so transferring is fast and not miserable unlike most iPhones and iPads.

They also have a Nearby Share app for Windows that lets you use Nearby Share on Windows. Would be nice if there was a Linux version.

2 comments

Hey, if you don't mind a question...I need to help a friend back up all the photos off an Android phone and have had a lot of difficulty doing it on my Mac for the reasons you've stated. I do have a Windows notebook at work, are you saying if I plug the Android phone into a ThinkPad, it will just show up like a drive and let me copy photos?

It's critical that the photos (thousands of them) keep their original EXIF data and filesystem dates, and the methods I've found to get them onto my Mac don't accomplish this.

Thanks for any advice!

I'm not who you asked, but yes this is correct. If the photos are from the phone's camera they will be in the DCIM folder. There is also a Pictures folder that stores photos downloaded from other apps. At least, that is how my Pixel Fold is.
HN may dislike it because it's an old protocol and it's more reliable than the newest crap today's developers are promoting, but I like PrimitiveFTP for this task. The .apk file is available at f-droid.org. MacOS should have tnftp(1) which is a preferred program of mine. Type ftp -h on the Mac to check.

The entire process can be scripted according to preference.

There are many way to do it. The following should work

Put phone and laptop on same network

For example,

192.168.1.1 is gateway

192.168.1.8 is phone

192.168.1.9 is laptop

Start PrimitiveFTP on the phone

On the laptop use tnftp to retrieve the photos

   # get list of the photos, where PrimitiveFTP has been set to use port 2121
   echo ls DCIM/Camera|ftp -P2121 ftp://192.168.1.8 > photos.txt

   # get the 1st 100 photos
   (echo cd DCIM/Camera;sed 's/.* //;s/^/get /;100q' photos.txt )|ftp -P2121 ftp://192.168.1.8

   # get all photos created/modified in 2023
   (echo cd DCIM/Camera;sed 's/.* //;/2023/s/^/get /' photos.txt )|ftp -P2121 ftp://192.168.1.8
The file attributes should be preserved.
For avoidance of doubt, 192.168.1.x in the example means a network that user set up, using a router chosen by user, running OS that user compiled from source. It does not mean a network open to the public, or someone else's network. Apps like "Airdrop" and other "secure" file transfer apps seem to encourage use on other people's networks, and many of them require an internet connection, and often use third party servers by default. In the example, neither phone nor laptop has an internet connection, only a connection to the router that user controls. The router does not have an internet connection either. (Compare using Wi-Fi Direct via a closed source app from Apple.)

Best solution: Do not take photos with a "phone". Use a "camera".

The biggest valid concern about FTP is that it’s not encrypted. If you access files through any network that’s being even casually monitored, the monitor gets access to the username and password for you phone’s FTP server.

In my experience, a lot of security-related pushback on HN specifically is because many of us have seen how easy it is to forget that not everyone knows to be careful or how.

The best way I have found is to create a SMB network folder on your local wifi network (you can do this in Windows and Mac, its usually the default folder share method in the OS, or you can use a NAS) and then use TotalCommander to move the entire Android filesystem (or just the DCIM folder) to that network folder in one go. It took me about an hour to transfer ~128 GB over wifi.

Do not use Android File Transfer (its a horrible app that transfers in a weird slow serial mode over a wired connection). Do not use Pairdrop/snapdrop/etc. Those Airdrop clones do not handle big folders of files well.

If you have Windows available, ignore my advice and do that. It probably isn't as difficult as Mac.

Try sweech from the playstore.

It starts a web server on the phone on port 4444. Then point a browser at the phone & view/download anything.

The best way to transfer files reliably off an Android device has always been an FTP server app on the phone in my experience. MTP can be really buggy with big files and it can be tough to reliably resume interrupted transfers.
Syncthing works for me. I think it's the best way to do it for devices that you own.
If you are comfortable with a terminal, install termux (from fdroid, not play store).

Then you can use scp or rsync as if it was any other computer.

That's exactly how it works.
Never knew macs aren't capable of mpt. Both Windows and Linux handle this easily.
MTP implementation on Windows was clusterfsck as fsck. It was very slow and hangs frequently. Is it okay now?