tree: 5e48bcba510ab30c09ba66903222015223720d3c [path history] [tgz]
  1. Android.bp
  2. README.md
  3. usb_cmd.h
  4. usb_cmd_attach.cpp
  5. usb_cmd_attach.h
  6. usb_cmd_control_transfer.cpp
  7. usb_cmd_control_transfer.h
  8. usb_cmd_data_transfer.cpp
  9. usb_cmd_data_transfer.h
  10. usb_cmd_device_list.cpp
  11. usb_cmd_device_list.h
  12. usb_cmd_heartbeat.cpp
  13. usb_cmd_heartbeat.h
  14. virtual_adb_client.cpp
  15. virtual_adb_client.h
  16. virtual_adb_server.cpp
  17. virtual_adb_server.h
host/libs/vadb/README.md

Virtual ADB

VirtualADB serves the purpose of making Cuttlefish device available locally as a USB device. VirtualADB uses USB/IP protocol to forward USB gadget from Cuttlefish to localhost.

Requirements

To compile the VirtualADB package you need to install:

sudo apt-get install libudev-dev

VirtualADB requires vhci-hcd kernel module to be loaded. Module is part of kernel extra modules package:

sudo apt-get install linux-image-extra-`uname -r`

Usage

VirtualADB uses currently virtio channel to communicate with usb forwarder on cuttlefish. The tool instruments kernel to attach remote USB device directly. To do that, it requires super-user privileges - primarily because it's adding a new device to your system.

To start VirtualADB simply execute:

sudo vadb /path/to/usb_forwarder_socket

where usb_forwarder_socket is the socket used by usb forwarder to communicate.