1

I am trying to get an apk from the aurora directory on the device onto a linux pc. There is not an issue copying in and out of the Download directory. If I connect the device with a cable and right click on the folder and list its contents in the terminal, it looks like this:

cardamom@northsea:/run/user/1000/gvfs/mtp:host=%5Busb%7A019%2C004%7F/Interner Speicher $ ls -la
total 0
drwx------ 1 cardamom cardamom 0 Jan  1  1970 .
dr-x------ 1 cardamom cardamom 0 Jan  1  1970 ..
drwx------ 1 cardamom cardamom 0 Jan  5  2019 Alarms
drwx------ 1 cardamom cardamom 0 Jan  5  2019 Android
drwx------ 1 cardamom cardamom 0 Aug 11 18:53 Aurora
drwx------ 1 cardamom cardamom 0 Aug 26 08:35 DCIM
drwx------ 1 cardamom cardamom 0 Dec  8 10:41 Download
drwx------ 1 cardamom cardamom 0 Jan  5  2019 Movies
drwx------ 1 cardamom cardamom 0 Jan  5  2019 Music
drwx------ 1 cardamom cardamom 0 Jan  5  2019 Notifications
drwx------ 1 cardamom cardamom 0 Jan  5  2019 Pictures
drwx------ 1 cardamom cardamom 0 Jan  5  2019 Podcasts
drwx------ 1 cardamom cardamom 0 Jan  5  2019 Ringtones
drwx------ 1 cardamom cardamom 0 Jan  5  2019 storage

Now files from the Download folder can be copied to the PC without a problem but if I try it from Aurora, this happens:

cp: error reading 'app.some.app.330.apk': Input/output error

If I list the Download or the Aurora folder with ls -la, all files have the same permissions.

I tried the suggestions here but it did not really help.

Then I went into a file manager on the device - one called 'open manager' which I installed from FDroid and copied the file I wanted from Aurora to Downloads. Now it gets strange - the file is visible in Downloads in the file manager on the device, but nowhere to be seen in Download when looking over usb!

Any ideas what is happening, how to remedy it?

3
  • 1
    your question is about mtp, but have you tried adb it is a simple command line alternative. you need android-tools-adb (android-tools-fastboot is not required but recommended to install too) and you must enable usb-debugging in developer options. regarding "not visible" reconnect mtp each time something has changed. Input/output error sounds like dirty file system
    – alecxs
    Dec 10, 2019 at 11:01
  • 1
    Ok thanks, that worked, but it took me a long time to work out how to get to the sdcard through adb shell, give adb shell root access then do a pull command. Also ran remount. Last command to do it was adb pull /mnt/sdcard/Aurora/app.some.app.330.apk Following links are useful 1, 2
    – cardamom
    Dec 10, 2019 at 13:18
  • 1
    mtp itself is just a file transfer protocol based on client-server request/response model. GVfs is a virtual filesystem which uses mtp as a back-end to let programs like Nautilus and Thunar (which use GIO library) to explore files remotely. However it's not meant to be used on CLI. You may use FUSE-based mtpfs or adbfs to mount phone storage as a filesystem. // Invisible file is due to buggy MTP implementation, see answer here: android.stackexchange.com/a/209119/218526 Dec 10, 2019 at 13:40

0

You must log in to answer this question.