very long story happend to me today would take days to be written to sync my massive media dir to be 1:1 with my android phone usually I used jmtpfs it’s good but I had to mess with udev rules for kernel usb autosuspend (not configured on archlinux by default) and more headaches until I came to
rsync
sshfs
sshd (termux)
I would simply move and delete files around after while sync them to my android phone over network for destination to be 1:1 as my source directory
on my phone with termux :
# if openssh not install
# pkg install openssh
# set a user password with passwd
passwd
sshd
#default port is 8022 not 22 because Android's security rules block normal apps from using any port number below 1024
from my archlinux pc :
# now i mount my phone using sshfs over sftp
sshfs [email protected]:/sdcard/ phone/ -p 8022
# and simply rsync my media direction
rsync -av --size-only --partial --delete /mnt/base/mcore/ phone/mcore/
that’s saved much of my time around 3000 files get removed added automatically
with the help of rsync
also special thanks for @hydn for his amazing blog about rsync it helped me understanding it better
At some point, it became too much trouble with FAT32’s 4 GB file size limitation. The documentation was unclear whether Android could reformat the microSDXC card as exFAT or EXT4 to surpass 4 GB. By that time, I was uneasy with Google possibly having access to my backups…even if they were encrypted and not synched to a Google account.
I have been trying to move .mp3 and .mp4 files between my Linux machine to my android device over the network all summer long! (Mostly unsuccessfully ) I’ve got to try this, glad you shared!