Bug: 251425963 Test: Build Change-Id: I471f8fb9c7eb1044ea0b920d55728613188bfbdf Signed-off-by: Jack Wu <wjack@google.com>
minadbd
minadbd is analogous to the regular adbd, but providing the minimal services to support
recovery-specific use cases. Generally speaking, adbd = libadbd + libadbd_services, whereas
minadbd = libadbd + libminadbd_services.
Although both modules may be installed into the recovery image, only one of them, or none, can be active at any given time.
-
The start / stop of
adbdis managed via system propertysys.usb.config, when setting toadbornonerespectively. Upon starting recovery mode,adbdis started in debuggable builds by default; otherwiseadbdwill stay off at all times in user builds. See the triggers inbootable/recovery/etc/init.rc. -
minadbdis started byrecoveryas needed.- When requested to start
minadbd,recoverystopsadbdfirst, if it's running; it then forks and execsminadbdin a separate process. minadbdtalks to host-sideadbserver to get user requests.minadbdhandles some requests directly, e.g. querying device properties for rescue service.minadbdcommunicates withrecoveryto fulfill requests regarding package installation. See the comments inbootable/recovery/install/adb_install.cppfor the IPC protocol betweenrecoveryandminadbd.
- Upon exiting
minadbd,recoveryrestartsadbdif it was previously running.
- When requested to start