accessing android with ssh/rsync
Johnny Rosenberg
gurus.knugum at gmail.com
Mon Apr 6 21:19:27 UTC 2015
2015-04-04 10:41 GMT+02:00 robert rottermann <robert at redcor.ch>:
> Colin,
> thanks for your answer
> On 30.03.2015 18:13, Colin Law wrote:
>
>> On 30 March 2015 at 16:39, robert rottermann <robert at redcor.ch> wrote:
>>
>>> ...
>>> I tried to access the device using a usb-cable.
>>>
>>> I do see the the device in the list of the device on my desktop, can
>>> access
>>> it using the file explore ..
>>> But I can not find it in the file system.
>>> In former Ubuntu version the android was mounted as block device under
>>> /media/xx (i believe), so rsync could be used easily.
>>>
>> MTP devices mount under
>> /run/user/$USER/gvfs
>> The folder will be something like mtp:host=%5Busb%3A001%2C009%5D which
>> is the equivalent of mtp:host=[usb:001,009] in my case.
>>
> I can list the list like this:
> ls -l /run/user/1000/gvfs/mtp\:host\=%5Busb%3A001%2C010%5D/Phone/
> DCIM/Camera/
>
> but an atempt to copy them results in an access error:
> cp -ruv /run/user/1000/gvfs/mtp\:host\=%5Busb%3A001%2C010%5D/Phone/DCIM/Camera/
> .
>
> produces:
> ‘/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C010%5D/Phone/
> DCIM/Camera/20150403_152133.jpg’ -> ‘./Camera/20150403_152133.jpg’
> cp: cannot open ‘/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C010%5D/Phone/
> DCIM/Camera/20150403_152133.jpg’ for reading: Operation not supported
>
>
> is there a flag I have to set or something ..
>
> thanks
> robert
>
>
This really sucks these days. I asked a similar question a while ago, but
nobody knows. In earlier Ubuntu (12.04 and earlier, I don't know about
13.x, because I never installed them) it was very easy to access an Android
phone, but now, for some reason, the path is different every time you
connect it (just like old Windows when you connected disc drives to it,
different drive letter all the time, but that behaviour could at least be
corrected), making it more difficult to write a script for it. Yes, you can
determine the path by collecting relevant info from lsusb, but why so
complicated?
In my case I can get the address with ”lsusb | grep Nexus” and then do a
lot of fun stuff with awk and sed to obtain the correct path, but I wish
there was an more obvious way.
About ”cannot open…”, you know that your phone need to be activated, that
is not in any kind of sleep mode or even ”waiting for password mode”?
I also noticed that when I copy files to (and maybe from, I didn't try that
yet) a folder on my Android phone, it is very slow when there are a lot of
files in that particular folder. Very very very slow. I'm talking about a
few kB/s here. kB, not Mb…
My workaround was to put the files in an empty folder and then move them
internally with a file manager app in the Android device…
I have the old Nexus 4 and Ubuntu 14.04, just in case anyone wonders.
Kind regards
Johnny Rosenberg
ジョニー・ローゼンバーグ
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150406/6614d892/attachment.html>
More information about the ubuntu-users
mailing list