viveris / uMTP-Responder

Lightweight USB Media Transfer Protocol (MTP) responder daemon for GNU/Linux
GNU General Public License v3.0
184 stars 49 forks source link

how to enable mtp&adb at same time #67

Closed Roy996 closed 2 years ago

Roy996 commented 2 years ago

Hi, thanks for your project! I've run MTP on my board. But I met some trouble when I tried to enable mtp&adb at same time.

My script for adb is: adb.txt And it runs pretty well without function MTP. However, it doesn't work when I tried to enable both of them.

When goes to these lines mkdir /dev/ffs-mtp mount -t functionfs mtp /dev/ffs-mtp mkdir /dev/usb-ffs mkdir /dev/usb-ffs/adb mount -o uid=2000,gid=2000 -t functionfs adb /dev/usb-ffs

According to logs, mount: mounting adb on /dev/ffs-mtp failed: No such file or directory

Do you have any ideas about this?

Thanks!

jfdelnero commented 2 years ago

But why you have <<mount: mounting adb on /dev/ffs-mtp failed: No such file or directory>> : (/dev/ffs-mtp)

When the mount command was <<mount -o uid=2000,gid=2000 -t functionfs adb /dev/usb-ffs>> : (/dev/usb-ffs) ?

adb seems to try to use the mtp mount point for some reasons...

jfdelnero commented 2 years ago

Have a look to umtprd-ffs.sh

To enable adb uncomment the lines "#mkdir functions/acm.usb0" and "#ln -s functions/acm.usb0 configs/c.1" and try to change acm to adb

Roy996 commented 2 years ago

It works now!!! I messed up the mount point. Here is my scripts: **mkdir functions/ffs.mtp mkdir functions/ffs.adb ... ln -s functions/ffs.mtp configs/b.1/ffs.mtp ln -s functions/ffs.adb configs/b.1/ffs.adb ... mkdir /dev/usb-ffs mkdir /dev/usb-ffs/mtp mkdir /dev/usb-ffs/adb mount -o uid=1024,gid=1024 -t functionfs mtp /dev/usb-ffs/mtp mount -o uid=2000,gid=2000 -t functionfs adb /dev/usb-ffs/adb

umtprd &

adbd &**

Both mtp and adb run base the "ffs", so changing acm.usb0 to adb.usb0 doesn't work.

Thanks :)