Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to enable mtp&adb at same time #67

Closed
Roy996 opened this issue Oct 21, 2021 · 3 comments
Closed

how to enable mtp&adb at same time #67

Roy996 opened this issue Oct 21, 2021 · 3 comments

Comments

@Roy996
Copy link

Roy996 commented Oct 21, 2021

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
Copy link
Member

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
Copy link
Member

jfdelnero commented Oct 21, 2021

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
Copy link
Author

Roy996 commented Oct 22, 2021

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 :)

@Roy996 Roy996 closed this as completed Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants