LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   ChromeOS (https://www.linuxquestions.org/questions/chromeos-130/)
-   -   Unable to mount Android Phone using mtp in Chrome OS crostini terminal for rsync backup (https://www.linuxquestions.org/questions/chromeos-130/unable-to-mount-android-phone-using-mtp-in-chrome-os-crostini-terminal-for-rsync-backup-4175705317/)

Middle.Earth 12-23-2021 07:26 AM

Unable to mount Android Phone using mtp in Chrome OS crostini terminal for rsync backup
 
When I plug in our phones which are usb-c devices, the phone mounts in Chrome OS Files and I can copy and paste.

In Linux Mint I can easily do external USB backups of our GoogleDrive data, laptops, and Android phones and tablets using rsync, rclone, and mtp which works very well.

I can successfully do the same in Crostini using RClone and Rsync BUT NOT for our Android devices.

I have tried adb push which was complicated to install and was not any different then copy and paste to the mounted phone on Chrome OS Files.

I clicked the above link to "Find Similar Threads" but did not find a solution, most of them are very old posts.

I want to setup rsync so as to quickly and accurately copy/sync/mirror the phone directories to the backup.

In our Linux Mint laptop I do:
Code:

cd /run/user/1000/gvfs
THEN I plug in the phone and find the device info using ls which returns:
Code:

ls
mtp:host=%5Busb%3A002%2C010%5D

THIS I use for my rsync backup and it works great:
Code:

rsync -h --progress --stats -r -tgo -p -l -D --delete \ "/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C006%5D/Internal shared storage" \ /home/dell/Phone_BAKUPS
In order to get a gvfs directory under /1000 I installed gvfs-fuse and mtp-tools. I installed jmtpfs because Debian (crostini) said: "Unable to locate package mtpfs")
Code:

sudo apt-get gvfs-fuse mtp-tools jmtpfs
I am not a vi user so I installed nano to modify the fuse.conf file to uncomment user_allow_other.
Code:

sudo nano /etc/fuse.conf
Code:

# Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other

Next I did ls on gvfs which showed it is an empty directory:
Code:

cd /run/user/1000/gvfs
Code:

sudo jmtpfs -o allow_other /Phone (/Phone for mount directory)
Returns:
Code:

Device 0(VID=2e04 and PID=c026) is a Nokia 6.1.
STOPS HERE WITH BLINKING TERMINAL CURSOR
(I had to use Ctrl-s to return to terminal prompt)

Code:

lsusb
Bus 002 Device 010:ID 2e04:c026

lsusb and jmtpfs seem to "see" the phone but I am unable to get mtp to find: mtp:host=%5Busb%3A002%2C006%5D
without mtp:host=... I am unable to target rsync for a backup.

Chrome OS Files can see our phones fine and I can copy to and from them, however, this is unsuitable for proper backups such as rsync provides.

I have tried various mtp apps suggested in different forum posts, I have also tried adb, however they do not do what I want which is to simply plug in the Android device and run rsync to back it up.

How do I get mtp:host=... to show?

I have an adequate device to perform these activities:
ASUS Chromebook Flip C536EA-BI3T
11th Generation Intel® Core™ i3-1115G4
8 GB RAM,128 GB SSD + MicroSDCard

Your suggestions will be greatly appreciated.


All times are GMT -5. The time now is 03:21 AM.