You are not logged in.

#1 2023-12-29 07:51:40

gannon
Member
Registered: 2019-06-29
Posts: 29

[SOLVED]Transfer photos from android phone to arch desktop without USB

Hello friends, I regularly copy photos from my android phone to my arch desktop so that if I ever lose my phone I do not end up losing my phone photos too. I use the android-file-transfer gui when I want to copy just one or two photos, and I use aft-mtp-mount with rsync when I want to copy many photos. My android phone is a Samsung Galaxy S10e that I purchased four years ago. The USB female connector in the USB port began degrading a couple years ago so that I sometimes wiggling or re-inserting the male connector was required to connect. But now neither wiggling nor re-inserting help and it has been a couple years since I last achieved a USB connection. I switched from cable charging to inductive charging, so I can recharge my phone battery despite the failed connector, but I have a couple thousand phone photos that I am unable to copy to my arch desktop. Does anyone have a wireless workflow that they recommend? I have some experience using wifi and bluetooth on my phone to connect to my home wifi and my car stereo. I also a little experience using bluetoothctl on my arch desktop to connect to bluetooth speakers.

Last edited by gannon (2024-02-19 22:09:03)

Offline

#2 2023-12-29 08:42:48

just4arch
Member
Registered: 2023-01-07
Posts: 126

Re: [SOLVED]Transfer photos from android phone to arch desktop without USB

For regular use you might look into Syncthing which is available for Android.
For occasional use Primitive FTPd could be an option.

Even though Bluetooth can be used to transfer files, it's usually slow and clunky compared to wifi.

There's a plethora of alternatives, if none of the above suits you.

Offline

#3 2023-12-29 20:49:25

gannon
Member
Registered: 2019-06-29
Posts: 29

Re: [SOLVED]Transfer photos from android phone to arch desktop without USB

Hey just4arch thanks for the reply. I installed Primitive FTPd and was able to connect using the command line ftp client from arch. Running pwd shows a directory but attempting to list the contents causes my client to hang after printing the message "about to open data connection"

ftp> pwd
257 "/storage/emulated/0" is current directory.
ftp> ls
200 Command PORT okay.
150 File status okay; about to open data connection.

I was able to give Primitive FTPd "access to media location", but not "full access to storage", which could be related to the hang.

Offline

#4 2023-12-30 20:42:55

ethersaga
Member
Registered: 2023-12-30
Posts: 10

Re: [SOLVED]Transfer photos from android phone to arch desktop without USB

To copy things from phone to PC I can recommend kdeconnect. With it you can select things from your android filemanager or gallery for example and send to pc using the "share" menu. I use it to transfer the pictures and videos I made with the phone to my PC and its simple and reliable.

Offline

#5 2023-12-30 22:49:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,989

Re: [SOLVED]Transfer photos from android phone to arch desktop without USB

https://aur.archlinux.org/packages/djmount
https://play.google.com/store/apps/deta … dlnaserver

The upside is that you can probably also access your phone from your Tv.
The downside is that there's no access management, you're showing your dick pics to the entire network segment.

Offline

#6 2024-01-01 00:19:03

Maniaxx
Member
Registered: 2014-05-14
Posts: 761

Re: [SOLVED]Transfer photos from android phone to arch desktop without USB

With 'Termux' you can setup an openssh server (sshd). If you're rooted you have full access. I use it with WinSCP (via wine. Needs 'winecfg' to be set to 'Win7' due to a bug).
For larger data folders i use 'adb pull' via USB. Works over WiFi as well.
Another option would be Mixplorer that is able to set up FTP, HTTP, SFTP, SMB1 servers.

Last edited by Maniaxx (2024-01-01 00:37:02)


sys2064

Offline

#7 2024-02-19 22:06:37

gannon
Member
Registered: 2019-06-29
Posts: 29

Re: [SOLVED]Transfer photos from android phone to arch desktop without USB

Hey just4arch, ethersaga, seth, and Maniaxx, thank you for your suggestions. I am very happy to say that I successfully used Primitive FTPd to copy 4791 images and 367 videos from my samsung galaxy s10e to my arch linux box last night. The 16 GB of data required 38 minutes to transfer using sftp. I fixed the client hang that I encountered back on 2023-12-29 by poking a temporary hole in my desktop firewall. Below is a lightly edited paraphrasing of the steps that I used to copy the files. I realized that I had to run sftp -o after running sftp -vvvv to see why my publickey authentication was failing. Different system configurations (namely, ssh key types) may not require the -o option. Good luck to others. Thank you wolpi for writing Primitive FTPd. I will mark my post [SOLVED]. =)

On my phone, open firefox to github.com/wolpi/prim-ftpd/releases
Click the non-googleplay apk file in the latest release (e.g. primitiveFTPd-7.0.apk, *not* primitiveFTPd-7.0-googleplay.apk)
Click to install

On my phone, use instructions on github.com/wolpi/prim-ftpd?tab=readme-ov-file#permission to give file access permission as follows:
Search Special access
Click Special access
Click All files access
Click the slider next to primitive ftpd

On my phone, open the Primitive FTPd app
Click second tab from the right which has an icon of a gear (this is the preferences tab)
Click Anonymous Login to turn it ON
Click the third tab from the left which has an icon of a globe (this is the QR tab)
Look at the IP address and port of the FTP server, which should be like 192.168.1.67:12345
Click the play button in the top right corner to start the server

On my desktop, set firewall to allow all incoming connections from my phone's private ip
ufw allow from 192.168.1.67
Copy my public key to my phone
ftp 192.168.1.67 12345
username: anonymous
password: anonymous@domain.com
ftp> put ~/.ssh/id_rsa.pub Android/data/org.primftpd/files/.ssh/authorized_keys
ftp> quit

On my phone, open the Primite FTPd app
Click second tab from the right which has an icon of a gear (this is the preferences tab)
Click Anonymous Login to turn it OFF
Click Public Key Authentication to turn it ON

On my phone, open the Gallery app.
Click the 3-vertical-dot button in the middle-right of the screen
Click Select all
Click the 3-vertical-dot button in the lower-right of the screen with "More" labeled underneath
Copy to album
Type title Phone photos and vids 2024-02-19
(wait 10 minutes for 5163 files to be copied, with a nice status bar and file count to watch while I wait)

On my phone, open the Primitive FTPd app
If it is not running,
    Click the play button in the top right
If it is running, restart it:
    Drag down the status menu bar on the top of my android phone screen
    Click the down arrow v next to the Primitive FTPd logo which is a blue file with ftp on it and a purple circle with a speaker icon
    Click Stop Server
    Drag up the status menu bar to the top of my android phone screen
    Open Primitive FTPd app again
    Click the play button in the top right

On my desktop, run a script to download the files
echo "progress" >> batch
echo "mget DCIM/Phone\ photos\ and\ vids\ 2024-02-19/*" >> batch
time sftp -oPubkeyAcceptedKeyTypes=+ssh-rsa -P 1234 -b batch 192.168.1.67

On my desktop, delete rule allowing incoming connections from my phone's private ip
ufw status numbered
delete X <-- where X is the integer corresponding to the rule that says Anywhere   ALLOW IN  192.168.1.67

On my phone, open the Primitive FTPd app
Click the pause button in the top right

Offline

#8 2024-05-24 15:28:19

beeblebrox
Member
Registered: 2024-05-16
Posts: 10

Re: [SOLVED]Transfer photos from android phone to arch desktop without USB

If you're using KDE you can also look at . KDE Connect

Offline

Board footer

Powered by FluxBB