Reduce the amount of wasted space on the recovery image by statically linking all of the adb libraries into minadbd. Bug: http://b/150317254 Test: booted aosp_walleye-eng into recovery Change-Id: I5233b1a23c14f9d478bb77c25ebdbb0ce45bcc5a Merged-In: I5233b1a23c14f9d478bb77c25ebdbb0ce45bcc5a (cherry picked from commit 5ee3eba34f0ddf478f53ac4d0774c1ee423a5182)
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