platform_bootable_recovery/minadbd
Aditya Choudhary eb84a17080 Migrate Test Targets to New Android Ownership Model
This CL is created as a best effort to migrate test targets to the new Android ownership model.
It is based on historical data from repository history and insights from git blame.
Given the nature of this effort, there may be instances of incorrect attribution. If you find incorrect or unnecessary
attribution in this CL, please create a new CL to fix that.

For detailed guidelines and further information on the migration please refer to the link below,
go/new-android-ownership-model

Bug: 304529413
Test: N/A
Change-Id: Ia2268756e71b22238b17b21d336f5f7e5bd35b0b
2024-02-02 13:56:16 +00:00
..
include/minadbd minadbd: Export minadbd/types.h to libinstall. 2019-09-26 00:04:11 -07:00
Android.bp Migrate Test Targets to New Android Ownership Model 2024-02-02 13:56:16 +00:00
AndroidTest.xml Fix flaky tests by require root for minadbd_tests 2020-08-24 14:36:01 -04:00
fuse_adb_provider.cpp minadbd: Support rescue install and getprop commands. 2019-04-19 12:53:55 -07:00
fuse_adb_provider.h Support starting fuse from a block map 2019-06-20 13:53:40 -07:00
fuse_adb_provider_test.cpp Create a FuseDataProvider base class 2019-03-19 11:11:58 -07:00
minadbd.cpp MinADB: Companion CL to deprecate tMsg 2023-10-20 16:09:28 -07:00
minadbd_services.cpp Track API change. 2022-01-19 15:43:03 -08:00
minadbd_services.h Add test for minadbd 2019-04-23 11:33:57 -07:00
minadbd_services_test.cpp minadbd: Export minadbd/types.h to libinstall. 2019-09-26 00:04:11 -07:00
OWNERS Adding adbd module OWNERS for minadbd compilation unit as well. 2022-06-13 23:31:09 +00:00
README.md minadbd: Update README.md. 2019-09-27 13:17:16 -07:00

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 adbd is managed via system property sys.usb.config, when setting to adb or none respectively. Upon starting recovery mode, adbd is started in debuggable builds by default; otherwise adbd will stay off at all times in user builds. See the triggers in bootable/recovery/etc/init.rc.

  • minadbd is started by recovery as needed.

    • When requested to start minadbd, recovery stops adbd first, if it's running; it then forks and execs minadbd in a separate process.
    • minadbd talks to host-side adb server to get user requests.
      • minadbd handles some requests directly, e.g. querying device properties for rescue service.
      • minadbd communicates with recovery to fulfill requests regarding package installation. See the comments in bootable/recovery/install/adb_install.cpp for the IPC protocol between recovery and minadbd.
    • Upon exiting minadbd, recovery restarts adbd if it was previously running.