Mtp protocol osmc

I was wondering if its possible to install mtp protocol like mtpfs (since osmc is based on debian) and access mu phone files by connecting it with the box via USB. I have osmc on my Raspberry Pi 4b

As you wrote OSMC is Debian based. So yes every package in the stable debian repository can by installed via apt.

Yeah but if I install mtpfs or other mtp packages , will they be accessible via kodi like if I install them and connect my phone to kodi will it work?

MTPFS as I understand it is a fuse base solution. You would need it configured to automatically mount your phone when you connect your phone which then would be available in Kodi via the filesystem

Based in your knowledge is there any easier way to get mtp working in kodi in osmc? Like with mtp tools or something else? Thank you for your time

I don’t think there is a Kodi native solution. But it should be easy to setup and it is a onetime setup anyhow afterwards works automatically.

If I set it up how can I use the mtp via which file manager

You can either access it from Kodi via Settings → Filemanager or just add it as a source and then you would have it accessible under “Files” in Video or Music menu

Got it , and if you know about the mtp protocol in debian, which mtp protocol is the easier to set it up?

Like mtp tools ( Debian -- Package Search Results -- mtp-tools ) will work with kodi file manager ?

Would suggest the Fuse way using jmtpfs
https://wiki.debian.org/mtp#Others

  • create as your mount point: $ mkdir -p
  • make sure you have write access to : $ sudo chown $USER:$USER
  • to mount your device: $ jmtpfs

what should i must do in these?If you could explain it would be much appreciated

Assumed you have at least the basic linux knowledge.
Did you install the jmptfs already?

Otherwise you first have to connect via SSH see Accessing the command line - General - OSMC

Then
sudo apt-get install jmtpfs
mkdir -p ~/phone
jmtpfs ~/phone

After that you will find the files in Kodi under your homefolder/phone
Screenshot from 2021-05-05 08-19-20

BTW depending on your phone it might already pop up before as USB Storage.

Okay got it, but one more question ,is there any way that I can mount the device without ssh like if I mount it one time with ssh, the other times that i will connect my device , do I must mount it again?

You would need to check a way to automate that. Guess UDEV is a solution for that. This package seems also to work Debian -- Error
But not sure if it collides with OSMC default automounter.

and how can i install and run it though the terminal because i cant find the package with sudo apt-get install usbmount.
Thank you i am looking forward to your response

Ok, just saw that package was only in Debian Jessie.
I guess easiest is to just check the OSMC UDEV automount rules and extend them.

Could you elaborate that because I am a begginer and I don’t really understand, thank you , I am looking forward to your response

Sorry I am not an expert on UDEV so can not be of help here. But maybe google udev jmptfs might give you some ideas.