File-transfer Android to Linux using rsync

tom butz <[email protected]>
Newsgroups gmane.org.user-groups.linux.waikato
Message-ID <CABxfBrsRRMEjHjGuYJsdd7MM9PK3v8e-BtQY53bkchZQyfocYg@mail.gmail.com>
_______________________________________________
wlug mailing list | [email protected]
Unsubscribe: https://list.waikato.ac.nz/mailman/listinfo/wlug
oppo_to_laptop.txt (text/plain, 1.7 KB)
HOW TO TRANSFER FILES FROM ANDROID-PDA TO LINUX-LAPTOP
======================================================

I'm running Android 7.1 on an OPPO A73 phone/PDA, and sometimes
need to transfer photos and other files to a laptop running Linux Mint 19.1.

Steps required on the PDA:

1) install termux from Android PlayStore
2) install rsync (in termux, type: pkg install rsync)
3) install perl  (in termux, type: pkg install perl)
4) in termux, type: termux-setup-storage (also automatically creates links) 
5) in termux, type: cd storage, then type: ls to see the following directories:

 dcim: photos/videos taken with the PDA
 downloads: stuff you downloaded
 movies:
 music:
 pictures:
 shared: everything (includes the above directories)

In the following examples we will use /dcim/ and /downloads/:

oppopictures.prl
================
In termux, type: perl system "rsync -av /sdcard/DCIM/ username_on_laptop\@1.2.3.4:/oppo_pictures/"

This will transfer photos (*.jpg) and videos (*.mp4) to /oppo_pictures/Camera/, 
and screenshots to /oppo_pictures/Screenshots/. Directory /oppo/pictures/ must exist on 
the laptop and grant world-access (chmod 777). Ignore rsync error-messages regarding
file-attributes.

oppodownloads.prl
=================
In termux, type: perl system "rsync -av /storage/downloads/ username_on_laptop\@1.2.3.4:/oppo_downloads/"

This will transfer files to /oppo_downloads/. Directory /oppo_downloads/
must exist on laptop and grant world-access (chmod 777). Ignore rsync error-messages 
regarding file-attributes.

NOTE: REPLACE the numbers 1.2.3.4 in the above examples with your laptop's
IP-address (as provided by your IP-router). Get them using ifconfig.

Theoretically you could do the above using the /shared/ directory to get a copy of Android-files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.