persist.sys.usb.config stores the usb functions which need to be enabled
when the phone boots up. When the phone is actually booted, setting this
would also activate the following action trigger on sys.usb.config
From init.usb.rc:
Used to set USB configuration at boot and to switch the configuration
when changing the default configuration
on property:persist.sys.usb.config=*
setprop sys.usb.config ${persist.sys.usb.config}
sys.usb.config is anyways set to the actual functions by UsbDeviceManager
once it is set to none. Therefore add "on boot" condition to the above
action trigger so that persist.sys.usb.config does not race with
sys.usb.config.
BUG: 30440213
Change-Id: I3333d0b8334fb627469c7faad250bf3151bb1ebf
init.usb.rc and adbd.rc contain similar contents and belong in the same
file.
This file also belongs on the ramdisk as adbd is on the ramdisk, not the
system partition, therefore resolving to keep init.usb.rc in its current
location and combining the contents of adbd.rc is the best approach
Change-Id: I430f8fea58694679e7b8b7be69ce87daadd616f4
Fix typos in the usb typec properties (sys.usb.typec.*),
so the data_role and the power_role can be written properly in the sysfs.
Bug: 23790832
Change-Id: I90f591ab37825a07e0610ef1fec0e831eb19515d
This CL helps to execute a different set of
commands for the usb configs specified in
init.usb.rc. Aimed at using configfs based
commands over android composition driver.
Bug=23633457
Change-Id: Ifa5f804e1cff93d15ad57d0ed553300bc5868936
This can cause init to be stucked in a loop in very rare cases where
persist.sys.usb.config is set to "none" (because the "setprop
sys.usb.config none" action is added twice to the action list).
The original issue on encrypted devices has been fixed differently
by change # I350c5aab986f8ca86b95f316398d03012553e581
This reverts commit 80828af3de.
Change-Id: Id0a7af8dd861c8d10b80a13b540c8a339b432007
On encrypted devices, persistent properties are loaded after the device
is decrypted. To properly change sys.usb.config to its persistent value,
it must first be set to "none" and then to ${persist.sys.usb.config}.
Bug: 7678835
Change-Id: I4f91245cedc04e3178ce9cee21390f5b657733c9