Files
device_google_wahoo/usb/android.hardware.usb@1.1-service.wahoo.rc
Jeff Vander Stoep 84304df642 usb HAL: remove all DAC capabilities
We can verify via selinux policy that no capabilies are allowed,
so there's no reason to grant them in DAC. Currently this is
resulting in an selinux denial.

avc: denied { dac_override } for comm="usb@1.1-service" capability=1
scontext=u:r:hal_usb_impl:s0 tcontext=u:r:hal_usb_impl:s0
tclass=capability permissive=0

Test: build
Change-Id: Iddea654be7c8f374a2c5f3c4fbebf066deca1796
2019-02-06 15:02:11 -08:00

14 lines
475 B
Plaintext

service vendor.usb-hal-1-1 /vendor/bin/hw/android.hardware.usb@1.1-service.wahoo
class hal
user root
group root system shell mtp
capabilities
on boot
chown root system /sys/class/typec/port0/power_role
chown root system /sys/class/typec/port0/data_role
chown root system /sys/class/typec/port0/port_type
chmod 664 /sys/class/typec/port0/power_role
chmod 664 /sys/class/typec/port0/data_role
chmod 664 /sys/class/typec/port0/port_type