2 ms·
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 ta
by 1vuio0pswjnm7 3y ago
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.
- joshspankit 3y agoThe 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.
- 1vuio0pswjnm7 3y agoFor 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".