Ah...
thank you for your answer .
in the meantime i format my disk.
Linux mint cannot mounted it now but i try to get it properly mounten. my Handy is a Samsung S7
... Okay. The problem is not Mint. It is not the Android device (Samsung) either. It is the MTPFS software (libmtp). I actually blame the MTP protocol, though. MTP is dog poo that was eaten by another dog and crapped out again. It is unstable and slow. Solution: use ADB. Developer tools for Android. Not so scary, I promise. Now then, I'm going to call your device/handy "Android" to make this feel generic/agnostic. So when I say "Android", I mean any device, your Samsung as well.
- Disconnect Android from PC
- Install adb on PC:
apt-get update && apt-get install adb android-tools-adb --install-recommends -y
.
- Allow "developer mode" on Android. It's a little different for each device. Mostly,
settings --> about/info/something --> maybe another item --> tap build number or OS Version 5-7 times
.
See in this video for your Samsung S7
- Enable "USB Debugging" on Android.
settings --> Developer Options --> USB Debugging (turn on)
- Run
adb devices
in terminal to start adb daemon.
- Connect Android to PC. Android asks to give USB permission now. Say yes to USB debugging and everything else. If the option let's you "trust" the USB connection permanently, do so.
- Again, run
adb devices
in terminal. This time it will show the Android name (Samsung) or "xxxx:xxxx" (vendorID : productID) number if it works.
- Okay, you're ready.
Using ADB: The only commands you need to know are
push
,
pull
, and
ls
.
Let's just learn by example:
Code:
// I want to copy "song.mp3" to my Android. Luckily, I have the path since I use TotalCommander on my Android, but most people do not.
// So let's use adb's ls command to "explore".
adb ls
// You'll see many directories. Usually, from Android 7 up, /storage/ is where all storage is. /storage/xxxx-xxxx is for each SD Car or USB device. /storage/emulated/X (where X is 0 to F) is for internal. So "Music" is probably /storage/emulated/0/Music/ on most.
// However, you may have to use a little intuition. You can use <Tab> key auto-completion, eg:
// adb ls /storage/ <Press Tab> will show you something like "self, emulated, 18FC-12AD".
// adb ls /storage/emulated/ <Press Tab> will show you something like "0, 1"
// adb ls /storage/emulated/0/ <Press Tab> will show you something like "Alarms, Music, Pictures, Porn, DCIM"
// The above will help you find the remote path (remember this).
// So, now I can copy it:
adb push /home/user/song.mp3 /storage/emulated/0/Music/
// Pretty easy!
// Okay, but I want to copy a picture, lolcat.jpg, from my Android to my PC
// Use adb ls again. Spoiler: It's probably in /storage/emulated/0/Download/
adb pull /storage/emulated/0/Download/lolcat.jpg /home/user/Pictures/
// Pretty easy!
Wait... Something felt different...
adb push /path/on/PC/file /path/on/Android/file
adb pull /path/on/Android/file /path/on/PC/file
The order for push and pull are different! Yes, relative to what is being done
Now, in the immortal words of Forrest Gump, "... And that's all I have to say about that."
You'll find loads of other great functions like syncing etc. if you like. Scripting a GUI with Zenity is trivial (a mate of mine did, I shall ask him if he ever published it. If not, maybe I can persuade him to get around to it in the next decade) if one is not available. It probably is, I'm just too comfy with the CLI to care.
Protip: Install TotalCommander from the Google Play Store on your Android since it shows you the full paths and this saves time until you memorise all the locations you use.
Good luck!
-J