Sample Header Ad - 728x90

Installing rsync on Android to transfer files from Android to OSX

1 vote
1 answer
2981 views
I am trying to use rsync to transfer some files from my Android phone (Samsung Galaxy S10+ / Android V10) to my local machine (OSX / Mojave). I did the following: 1. Installed [SSH/SFTP server](https://play.google.com/store/apps/details?id=net.xnano.android.sshserver&hl=en) on my Android device and started the server 2. Verified that I am able to ssh into the phone (although it logs me in as user u0_a312 and not my_user?)
$ ssh my_user@192.168.0.16 -p 2222

The authenticity of host '[192.168.0.16]:2222 ([192.168.0.16]:2222)' can't be established.
RSA key fingerprint is SHA256:3mNL574rJyHCOGm1e7Upx4NHXMg/YnJJzq+jXhdQQxI.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[192.168.0.16]:2222' (RSA) to the list of known hosts.
Password authentication
Password:
:/ $ whoami
u0_a312
3. Attempted to run rsync from my local OSX machine to copy remote Android files to my laptop
rsync -avzhP -e "ssh -p 2222" my_user@192.168.0.16:/storage/6632-6330/DCIM/Camera/* .

Password authentication
Password:
exec request failed on channel 0
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/io.c(453) [receiver=2.6.9]
As you can see, I ran into an error on step 3. From some basic snooping on forums, it seems like rsync needs to be installed on the Android remote device. (That's also backed up by the fact that which rsync returns nothing when executed from the Android shell) However: - How do I go about installing rsync on the phone? Is this even the right solution here? - I never needed to do this on my previous phone (Galaxy S7), the above rsync process "just worked". Did something change with the standard installation of Android with regards to rsync ?
Asked by user2490003 (111 rep)
Jul 22, 2020, 03:25 AM
Last activity: Jul 22, 2020, 08:20 AM