Commit graph

19 commits

Author SHA1 Message Date
Nikita Ioffe
4f8e05663e Don't reset sys.usb.configfs during userspace reboot
Test: adb reboot userspace (on blueline)
Test: adb reboot userspace (on cuttlefish)
Bug: 147726967
Change-Id: Id4a367e74b418a85e8454e952e12e0723efc9b8a
2020-01-31 15:59:19 +00:00
Nikita Ioffe
c796f918db Move setprop sys.usb.configfs 0 to on init action
This should solve the problem of
`property:sys.usb.config=adb && property:sys.usb.configfs=0` action
being wrongly triggered during userspace reboot.

Also reset some adbd-related property in `on userspace-reboot-requested`
action to make sure that userspace reboot sequence is as close as
possible to normal boot sequence w.r.t adbd.

Test: adb reboot userspace
Test: checked property:sys.usb.config=adb && property:sys.usb.configfs=0
  action is not triggered

Bug: 135984674
Change-Id: Icf40386399ee84d01228020e65f71ba473d72822
2019-12-10 19:16:15 +00:00
Paul Crowley
449282c021 Merge "Make encryption action an argument to mkdir" 2019-11-07 20:06:47 +00:00
Paul Crowley
68258e8444 Make encryption action an argument to mkdir
FscryptSetDirectoryPolicy no longer tries to infer the action from the
filename. Well mostly; it still assumes top-level directories in /data
should be encrypted unless the mkdir arguments say otherwise, but
it warns.

Bug: 26641735
Test: boot, check log messages
Change-Id: Id6d2cea7fb856f17323897d85cf6190c981b443c
2019-11-05 16:26:43 -08:00
Josh Gao
594f70ffb8 Move adbd to an apex.
Test: adb shell "su 0 readlink /proc/\`pidof adbd\`/exe"
Change-Id: I84dfe4d1b28b619f98c03a2c8eeef2c783d30af2
2019-11-04 15:52:16 -08:00
Michael Groover
7eeda6ba03 Notify the framework when an adb key is authorized
Bug: 124076524
Test: atest AdbDebuggingManagerTest
Change-Id: If73b81ca73ba4d64763cf49c1bbe42de81fa1cb6
2019-05-09 16:05:40 -07:00
bohu
b40193e50a emulator: not start adbd upon ro.kernel.qemu=1
clean up emulator specific rules.

BUG: 72900827

Change-Id: Ica60838562fd773bcde5752c11586183ce55b71a
2018-02-03 17:22:15 -08:00
Bowgo Tsai
7b9a4d5bcd Move adbd from root to system
Bug: 63910933
Test: normal boot sailfish, checks adb works
Test: recovery boot sailfish, checks adb works
Test: normal boot bullhead, checks adb works
Test: recovery boot bullhead, checks adb works

Change-Id: I1b27910c06a4172ca718b3344736ec8e3429f477
Merged-In: I1b27910c06a4172ca718b3344736ec8e3429f477
(cherry picked from commit 93defc17f3)
2017-08-24 14:22:07 +08:00
Badhri Jagan Sridharan
05e04a134e Remove redundant action triggers on persist.sys.usb.config
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
2016-08-01 21:56:23 +00:00
Vincent Palatin
2a0481109b am 100de590: am 5e294902: Merge "init.usb.rc: fix USB typec property names" into mnc-dr-dev
* commit '100de590e7f82e1039eebc10e60ea554deeb1c3f':
  init.usb.rc: fix USB typec property names
2015-09-04 20:06:28 +00:00
Tom Cherry
c74403b4c9 am b00a8a06: am e8b0fcec: Merge "combine adbd.rc with init.usb.rc"
* commit 'b00a8a066f5b6ae5b8d0c03ee7f680389b38a260':
  combine adbd.rc with init.usb.rc
2015-09-04 18:02:32 +00:00
Tom Cherry
2270dbbc84 combine adbd.rc with init.usb.rc
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
2015-09-03 16:19:04 -07:00
Vincent Palatin
3b7995b72e init.usb.rc: fix USB typec property names
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
2015-09-03 13:53:04 -07:00
Badhri Jagan Sridharan
48d59acc57 init.usb.rc: Add new system property for configfs
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
2015-09-01 15:39:22 -07:00
Tim Kilbourn
8c12fdf4ab Use init to write usb typec props
The sysfs nodes are owned by root, so use init to write role changes.

Bug: 21615151
Change-Id: I39ad03a23af0be9ac859d4fb79a46edc27e30f4e
2015-08-17 14:56:57 -07:00
Badhri Jagan Sridharan
97b536f1fb init.usb.rc: Change product id to for add only config
Change product id from D002 to 4EE7 when adb is the
only supported function

Change-Id: I8f6bcb9a1dc5ea6da0493a2dd730f9ac1f0bed24
2014-09-05 12:33:46 -07:00
Benoit Goby
31c8095cac Revert "init.usb.rc: set sys.usb.config to none before changing it"
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
2013-01-15 17:37:32 -08:00
Benoit Goby
80828af3de init.usb.rc: set sys.usb.config to none before changing it
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
2012-12-05 18:04:01 -08:00
Mike Lockwood
4f5d5176a3 init.rc: Add support for new USB accessory configurations
Also moved USB scripts to new file init.usb.rc

Change-Id: I98e099fbd8de3eb3e1e18c9ef69312608033a50c
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-04-11 12:35:49 -07:00