3

I have a Smasung A40, and when I connect it via MTP to get some data off of it, it takes AGES. When I connect it first and attempt to open the phone, it takes a solid 30 seconds before any folder appear, and the same goes if I open any subdirectory. Accessing files also is not particularly fast (like 10s to open a picture)

My google search turned up no results. I am also using a short, USB 3-capabe cable, but the problem still exists, no matter which cable or which USB port I use. I am running Ubuntu 20.04 LTS with all updates installed.

Any idea on what could cause this issue?

1 Answers1

3

MTP is to blame and we can thank Microsoft and Android for that problem. The answer is to either transfer the files using a different protocol like PTP or I would suggest installing a fileserver application like "software data cable" on Android to transfer files wirelessly over your local network or use bluetooth (it's way easier and faster without wires).


Side Note: If you haven't already, install ADB (sudo apt install android-tools-adb) and try transferring the files the same way as before. Sometimes, it solves those problems, and you will still be able to use the graphical file exploreo.

The other option would be to use adb which is significantly faster than MTP.

First, you will need to install ADB:

sudo apt update
sudo apt install adb

note: if you get an "unable to locate package" error, run: sudo add-apt-repository universe and try again

Then, follow these instructions to use ADB commands to "pull" files off of your phone to Ubuntu or to "push" files to your phone from Ubuntu.

You should also be able to use ls and cd commands using and adb shell:

adb shell 

and then use cd and ls as normal to change directories or list files.

If your phone isn't rooted, you will need to list files from the storage directory or you won't have permission so you can use cd /storage before using ls or you could just list everything recursively using the following command (directories will be blue or white):

ls -R --color=always /storage

and you can also use grep to find a particular filename or directory (like your DCIM directory for example):

ls -R /storage | grep DCIM

If you need an easier method to find the location of your files, you could install a shell on your Android device that has access to the find command using an app called "terminal emulator for Android".

find /storage

will list the full path of pretty much every file you have access to if you don't have a rooted phone (and it also has grep).

See here for more information about finding and listing files using adb.


Alternatively, you can also transfer files from your phone to your computer using Google Drive.

First, use the Google Drive app to upload the files to your account.

Then, use a web-browser on any computer to go to drive.google.com and sign into your account where you can download the file(s).

mchid
  • 44,904
  • 8
  • 102
  • 162