Re: Running ADB on a "stock" distribution (g_ffs)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2015-05-21 at 08:42 +0200, Krzysztof Opasiak wrote:
> On 05/20/2015 06:42 PM, Bastien Nocera wrote:
> > Hey,
> > 
> > After discussing this with Andrzej, I'm no closer to being able to 
> > get
> > this working...
> > 
> > I'm trying to run adbd (the service that would usually run on an
> > Android phone in developer mode) on a stock distribution, on a 
> > device
> > that used to run Windows 8 (and now a Fedora).
> > 
> > This is my version of adbd:
> > https://github.com/hadess/adbd/
> > 
> > This is the systemd service file I eventually want to use, but I'm
> > running those commands "by hand" right now, and they fail in the 
> > same
> > way.
> > 
> > https://github.com/hadess/adbd/blob/master/adbd.service
> > 
> > I'm getting this error from adbd:
> > OPENING /dev/usb-ffs/adb/ep0 [ /dev/usb-ffs/adb/ep0: writing 
> > strings failed: errno=16]

Using ffs-test from tools/usb/ffs-test.c I have the same problem.
Writing descriptors works, but writing strings throws -EBUSY.

Those are the options used (from /boot/config-4.1.0
-0.rc0.git13.2.fc22.i686)
CONFIG_USB_GADGET=m
CONFIG_USB_FUNCTIONFS_GENERIC=y
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
CONFIG_USB_LIBCOMPOSITE=m
CONFIG_USB_F_ACM=m
CONFIG_USB_U_SERIAL=m
CONFIG_USB_F_SERIAL=m
CONFIG_USB_F_OBEX=m
CONFIG_USB_F_FS=m
CONFIG_USB_CONFIGFS=m
CONFIG_USB_CONFIGFS_F_FS=y
CONFIG_USB_FUNCTIONFS=m
CONFIG_USB_FUNCTIONFS_GENERIC=y
CONFIG_USB_G_SERIAL=m

> > Which comes from this error message:
> > https://github.com/hadess/adbd/blob/master/adb/usb_linux_client.c#L
> > 275
> > 
> > It looks like this can only happen if the gadget FS was already 
> > registered:
> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tre
> > e/drivers/usb/gadget/legacy/g_ffs.c#n301
> > 
> > Any ideas?
> > 
> 
> Could you please try to use ConfigFS interface instead of using 
> g_ffs?

Could you explain how I would set that up? Is that the way:
http://www.spinics.net/lists/linux-usb/msg96121.html
?

> I have used this setup some time ago and it worked fine, so it 
> should be 
> a good method of checking if adbd is working properly.
> 
> (tools/usb/ffs-aio-example) with g_ffs instead of adbd and see what 
> happen.

ffs-test fails in the same way, as mentioned above.

Does one need specific hardware to make this work? This is a tablet,
so I usually use a USB OTG adapter to plug in keyboard/mouse/network,
but I unplug all this to run the test tool, or adbd.

> BTW.
> Which kernel version do you use?

I'm still on Linus' 4.1.0-rc0, but if anything relevant changed, I can
certainly update to a newer version.

Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux