Hi all,
As I got the information that chromium os can support MTP connection now,
I tried to test MTP related modules and research them.
Test environment : Release-R38-6158.B (with some modification for my work)
But after I plugged in my android phone, it could not work.
I tried to find out what happened, so I started "mtpd" services manually.
minijail0 -u mtp -g mtp -G -- /opt/google/mtpd/mtpd -minloglevel=1
And then I plugged in in the phone, it showed,
Device 0 (VID=12d1 and PID=1051) is a Huawei Honor U8860.
libusb_open() failed!: Permission denied
LIBMTP PANIC: Unable to initialize device
I tried to fix this problem, so I found a solution from the network.
I added a file "51-android.rules" in /etc/udev/rules.d, and listed my phone's information in it.
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="1051", MODE="0666"
Then I restarted udev service and mtpd service, tried to connect my phone again, it worked.
Device 0 (VID=12d1 and PID=1051) is a Huawei Honor U8860.
Android device detected, assigning default bug flags
But, I tried my phone in my chromebook, it worked well without "51-android.rules".
And I searched in libmtp support list, device 12d1:1051 was already supported.
I tried another Sansung phone, it showed the same problem.
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
libusb_open() failed!: Permission denied
LIBMTP PANIC: Unable to initialize device
I don't think it's a good idea to change "51-android.rules" each time I plug in a different device.
So it should work as chromebook which can access different devices automatically.
I think maybe some configuration I modified causes this problem, but I cannot find out what it is.
Would you please help to provide some suggestion what problem may cause this error?
Thanks.
A.B