Can't find a way to access my files on an Android device. mtpfs fails, AFT is not good enough.

Hello. Please correct me if I’ve put the thread into the wrong category.

Now I have my Android Redmi Note 5 I want to have my photos and videos from.

Windows 10 works fine with the file transferring from the phone.

As you may know, using the standard file manager on OpenSuse 15.0 causes many bugs, I installed Android file transfer and was able to download the files by using it. It obviously lacks functionality of a file manager as it can’t move files from the phone on the PC (you have to copy them first, than delete). Also it doesn’t show video thumbnails and doesn’t allow the preview of both photos and videos, witch really complicates the media selection process.

Than I found out there was mtpfs utility, which gets me access to the phone file system. I’ve installed it and it doesn’t seem to work. What I did was:

  1. Changed mtpfs configuration according to
  2. Connected the phone
  3. Unlocked the screen lock on the phone
  4. Tried to mount mtpfs -o allow_other ~/mnt

The only thing I got

(base) aleksandr@aleksandr-pc:~> mtpfs -o allow_other ~/mnt
Listing raw device(s)
Device 0 (VID=2717 and PID=ff40) is a Xiaomi Mi-2s (id2) (MTP).
   Found 1 device(s):
   Xiaomi: Mi-2s (id2) (MTP) (2717:ff40) @ bus 1, dev 7
Attempting to connect device 0
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
LIBMTP_Get_Storage() failed:-1

I also tried tried switching my phone on USB file transfer mode just right after connecting it, here I got:

(base) aleksandr@aleksandr-pc:~> mtpfs -o allow_other ~/mnt
Listing raw device(s)
Device 0 (VID=2717 and PID=ff40) is a Xiaomi Mi-2s (id2) (MTP).
   Found 1 device(s):
   Xiaomi: Mi-2s (id2) (MTP) (2717:ff40) @ bus 1, dev 7
Attempting to connect device 0
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
fuse: bad mount point `/home/aleksandr/mnt': Transport endpoint is not connected

Could somebody please help me to figure out why mtpfs does not work or maybe suggest other means to transfer my files?

Install KDEconnect both on your computer and phone. Open the firewall ports on your computer, set the permissions on the phone. Works great. Also on GNOME, Xfce

I have KDE connect, but I am not satisfied with the experience. It takes much time to load the thumbnails for the pictures and once I tried to open a 400Mb video the computer just froze and I had to restart.

I have a similar problem. KDE Connect works perfectly, but I’m interested in connecting an Android device through a USB port.
Android device: Xiaomi Redmi 6A.
HP desktop - CPU AMD Athlon X2 - USB ports on OHCI controller and USB ports on EHCI controller.
HP laptop - CPU Intel Core i5 - USB ports on two EHCI controllers.

Two identical installations of Leap 15.0.
On the desktop the USB connection works perfectly (on both OHCI and EHCI controllers); on the laptop it does not work!
On the laptop, every time I try to access the Android device through Dolphin, it gets unmounted and remounted; the battery charge led on the device turns on ant then turns off.

Really weird.

Assuming this is a USB power management issue, you could try configuring TLP to inhibit usb-autosuspend for the device concerned ie edit USB_BLACKLIST= entry in /etc/default/tlp as explained here

deano_ferrari, you are absolutely right! :good:
It was a power management issue.
This happens because USB_AUTOSUSPEND=1 (default setting) enables USB auto-suspend also on AC power.

Probably, USB_AUTOSUSPEND=1 is enough, but I have also set USB_BLACKLIST_PHONE=1 (default=0); in fact:
0=do not exclude, 1=exclude (enable charging).

Thank you very much for your help.

Sorry. Obviously I did mean “Probably, USB_AUTOSUSPEND=0 is enough, …”

Good result! :slight_smile:

I tried changing the parameters you adviced… Nothing changed. It doesn’t seem to be the power issue I have.
Still get error like “mtp has died unexpectedly” when trying to open my photos.

Just in case the advice in this post is relevant. Specifically…

If you connect the device while it is locked, the system will not recognize it even after you unlock it.

For everything to be recognized and you can transfer the files, you must first unlock the device and only then connect it to the PC. If the smarthphone goes back to lock mode before you connect to the PC, you will need to disconnect, unlock again and just plug it in.

Credit for this advice to user McCloud.

For anybody not averse to the command-line or interested in automating regular data transfers or backups with an Android phone, I recommend the versatile adb command. Examples:

*# list connected Android devices (»USB Debugging« needs to be activated in the devices’ developer options):*
**adb** devices 
*# list stats about the battery of the device: *
**adb** shell cat /sys/class/rtc/rtc0/since_epoch /sys/class/power_supply/battery/status /sys/class/power_supply/battery/health /sys/class/power_supply/battery/capacity
*# copy all photos of this month (2019-09) from Android to Linux:*
**adb** shell find "/mnt" -iname "img_201909*.jpg" | tr -d '\015' | grep -v ': Permission denied' | while read f; do adb pull $f; done
*# create a backup of the device’s user data/apps/system data:*
**adb** backup -f backup.ab
**adb** backup -apk -shared -all -system -f backup08262012.ab
*# install a number of app packages:*
**adb** install FDroid.apk
**adb** install com.danielkim.soundrecorder_130.apk
**adb** install
**adb** install
**adb** install com.vonglasow.michael.satstat_3030.apk
*# etc. etc.*

I’ve been using adb almost exclusively for everything Android-related. The fact that I unlocked the bootloader and rooted my Moto G as soon as I got it helped a lot. I also took a month experimenting with the phone (just as a Linux system, not as a phone), securing it with a firewall app and making it independent from Google while still using my old Symbian-based Nokia as a »daily driver«. This gave me ample opportunity to try a few macOS- and Linux-GUI based tools before settling on adb for everything.

Also, just search for anything adb-related, the discussions over there have been instrumental for me embracing Android as a platform without exposing my private life to Google. Cheers!

I tried it, but I still don’t have the thumbnails in Dolphin and the ability to access my pictures with Gwenview.

I can’t help further, except to suggest you try the KDE Connect (network-based) approach instead.

Are you pulling down your notification bar, clicking the notification then hitting the “Connect USB storage” button? You can also get to this by Menu > Settings > Wireless and network > USB utilities and hit “Connect storage to PC”. In this case, you will plug in your phone after you hit the button.

If you’re doing this, the last thing I can think of is your computer has a USB driver issue or your cable went bad.

there are many resin why file can not access android device mtpfs fail there are some resin my point of view is that you do not have enough stories that’s way fail for more resin some points are discoed here animeflix