CHROMIUM: device_jail: detach all interfaces

permission_broker iterates through every available interface of
the USB device to detach drivers. We should do the same thing

TEST=On kevin:
  kill permission_broker, set up device_jail_utility server.
  Use lsusb -t to find a device with an attached kernel driver,
  i.e. btusb, add a jail for it
  In python:
  >>> f = open("/dev/jailed-189-XXX", "rb")
  Choose "detach" in the server. Check syslog, lsusb -t again
  to make sure the driver was detached.
  In python:
  >>> f.close()
  Ensure the driver is reattached. (If using btusb you can also
  check visually that the bluetooth menu disables itself when
  you detach the driver, and re-enables itself when you attach
  it again.)

Change-Id: I4fe7f7ccbcba9cfc8d7d5ab8ab44677145f58dca
Commit-Ready: Eric Caruso <>
Tested-by: Eric Caruso <>
Reviewed-by: Dylan Reid <>
1 file changed