Commit graph

6 commits

Author SHA1 Message Date
Steven Moreland
a4eaf64de8 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I0bdffced6af52695c0ef98c9dd659348e56f7aa6
2019-09-05 14:17:42 -07:00
Badhri Jagan Sridharan
abc92991ea usbd: Exit in case of charger mode.
UsbGadget hal is not expected run in charger mode.
This should fix the following errors in charger mode:

[   86.609578] c4    612 init: Received control message 'interface_start' for 'android.hardware.usb.gadget@1.0::IUsbGadget/default' from pid: 565 (/system/bin/hwservicemanager)
[   86.618236] c7      1 init: Could not find 'android.hardware.usb.gadget@1.0::IUsbGadget/default' for ctl.interface_start

Bug: 135566354
Test: Manually verified that usbd exits early in charger mode.
Change-Id: I3ba5be883c49e5ca3e4dad4443528e4eee8b25b9
2019-06-20 12:13:31 -07:00
Badhri Jagan Sridharan
f123d45ce1 usbd: Do not join the thread pool
Work around for the following crash:
02-08 05:34:20.968  root   990   990 F DEBUG   :     #00 pc 000000000001447c  /system/lib64/libhwbinder.so (android::hardware::IPCThreadState::joinThreadPool(bool)+28)
02-08 05:34:20.968  root   990   990 F DEBUG   :     #01 pc 000000000001c174  /system/lib64/libhwbinder.so (android::hardware::PoolThread::threadLoop()+24)
02-08 05:34:20.968  root   990   990 F DEBUG   :     #02 pc 000000000000f934  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+280)
02-08 05:34:20.968  root   990   990 F DEBUG   :     #03 pc 00000000000821e0  /system/lib64/libc.so (__pthread_start(void*)+36)
02-08 05:34:20.968  root   990   990 F DEBUG   :     #04 pc 0000000000023178  /system/lib64/libc.so (__start_thread+68)

Bug: 117470462
Change-Id: I1e8f28a7d0f3041d9be8138a3dc9ed9c74419f91
2018-10-24 01:43:06 +00:00
Elliott Hughes
dc699a269f bpfmt.
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
2018-02-16 17:58:14 -08:00
Badhri Jagan Sridharan
d5db344807 Fix selinux denials for usbd
auditd  : type=1400 audit(0.0:9): avc: denied { dac_override } for comm="usbd" capability=1 scontext=u:r:usbd:s0 tcontext=u:r:usbd:s0 tclass=capability permissive=
auditd  : type=1400 audit(0.0:9): avc: denied { dac_override } for comm="usbd" capability=1 scontext=u:r:usbd:s0 tcontext=u:r:usbd:s0 tclass=capability permissive=0

Bug: 72397740
Test: booted the device to make sure that the denials are no longer
seen.
Change-Id: Ie276103ba261fd762fb8c24234904e3f3ce3d2f1
2018-01-24 00:24:49 +00:00
Badhri Jagan Sridharan
5e1a0ca634 Initial commit for usb daemon
usbd checks whether adb is enabled by default, if yes,
would start adbd and would call into usb hal to configure
usb gadget stack.

Bug: 63669128
Test: Verify that adb gets configured when enabled
Change-Id: If6d06cdadd6d93f181d56619142cbbb04d39a5cd
2018-01-16 18:03:58 -08:00