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

USBDEVFS_CLAIMINTERFACE EBUSY #31

Open
bphd opened this issue Mar 22, 2023 · 0 comments
Open

USBDEVFS_CLAIMINTERFACE EBUSY #31

bphd opened this issue Mar 22, 2023 · 0 comments

Comments

@bphd
Copy link

bphd commented Mar 22, 2023

How to debug further that problem?

Maybe doing some verifications in jmtpfs when that happen so it can output more precise errors permitting to troubleshoot

For example (in shell), to get the name and PID of the process hanging the phone

sudo lsof /dev/bus/usb/`lsusb | grep MTP | cut -d ' ' -f 2`/`lsusb | grep MTP | cut -d ' ' -f 4 | cut -d ':' -f 1` | cut -d ' ' -f 1-3 | grep -v COMMAND

(Assume that the phone will have MTP in its name. Adapt to what you see in the command for it to grep your phone. Command can be largely optimized)

To mount if it's not already mounted, otherwise to say what hangs it:

if [ "$(sudo lsof /dev/bus/usb/`lsusb | grep MTP | cut -d ' ' -f 2`/`lsusb | grep MTP | cut -d ' ' -f 4 | cut -d ':' -f 1` 2>/dev/null | cut -d ' ' -f 1-3 | grep -v COMMAND)" = '' ]; then sudo fusermount -u /mnt; sudo jmtpfs /mnt; else printf '%s ' Phone already hanged:; sudo lsof /dev/bus/usb/`lsusb | grep MTP | cut -d ' ' -f 2`/`lsusb | grep MTP | cut -d ' ' -f 4 | cut -d ':' -f 1` 2>/dev/null | cut -d ' ' -f 1-3 | grep -v COMMAND; fi
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

1 participant