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?
adb pull /mnt/sdcard/Aurora/app.some.app.330.apk
Following links are useful 1, 2mtp
itself is just a file transfer protocol based on client-server request/response model. GVfs is a virtual filesystem which usesmtp
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-basedmtpfs
oradbfs
to mount phone storage as a filesystem. // Invisible file is due to buggy MTP implementation, see answer here: android.stackexchange.com/a/209119/218526