summaryrefslogtreecommitdiffstats
path: root/minadbd/Android.bp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* minadbd: statically link libadbd.Josh Gao2020-03-311-3/+9
| | | | | | | | | 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
* Use adbd_system_binaries to track adbd's dependencies.Josh Gao2019-10-231-0/+4
| | | | | | | | required doesn't propagate from apexes, so we need a separate phony target to track adbd's dependenecies. Test: m Change-Id: I13977d1376de63839bf182d2cfa56b5c6c63aba9
* minadbd: Return battery level via getprop.Tao Bao2019-10-051-0/+4
| | | | | | | | | | | | | `adb rescue getprop rescue.battery_level` returns the current battery level. Bug: 134560109 Test: Build and boot into rescue mode. Test: `adb rescue getprop ro.build.fingerprint` Test: `adb rescue getprop rescue.battery_level` Test: `adb rescue getprop` to dump all the properties. Test: Run recovery_unit_test. Change-Id: I78a9e8ab9783ffc8532cb93e6a64fb2157c19bd5
* minadbd: Export minadbd/types.h to libinstall.Tao Bao2019-09-261-2/+9
| | | | | Test: mmma bootable/recovery Change-Id: I503e942b23cc51024aa752c1eb3db5455a44a9d1
* Link libcrypto dynamically for recovery unit tests.Pete Bentley2019-09-131-1/+1
| | | | | | | | | | | | | | Tested by running recovery_unit_test as described in https://android.googlesource.com/platform/bootable/recovery/+/refs/heads/master/README.md Attempted to build and boot a recovery image with the same change to confirm it still works, but m recoveryimage-nodeps fails for me. Bug: 140940227 Test: See above Change-Id: I00545968a0e5684823e505f2ddbe7e993319b5d4
* Implement FuseBlockDataProviderxunchang2019-05-011-0/+5
| | | | | | | | | | Adds a fuse data provider that parses the metadata from a block map, reads the data from the given ranges of the block device; and provides the data to the fuse. Bug: 127071893 Test: unit tests pass, install a package from block map Change-Id: Ie9925ee9144e98642505b3f5e1a4a186d2b21ed0
* Add test for minadbdxunchang2019-04-231-0/+2
| | | | | | | | | | | Ass some unit tests to check if the minadbd service exit correctly in the failure case. Also start the fuse and verify the socket communication between minadbd with adb host, and minadbd with recovery. Bug: 131037235 Test: run unit tests repeatedly, injects some errors and test fails without dangling process. Change-Id: I2f073b701b25d7f1aafc59868a7a91a8cbefaf49
* minadbd: Support rescue install and getprop commands.Tao Bao2019-04-191-1/+0
| | | | | | | | | | Bug: 128415917 Test: Enter rescue mode on taimen. Send the following commands: `adb rescue getprop ro.build.fingerprint` `adb rescue getprop ro.build.date.utc` `adb rescue install /path/to/package.zip` Test: Sideload on taimen w/ `adb sideload /path/to/package.zip`. Change-Id: Ibc25daf9fd13f7002e54789f67aaf85d06976bb8
* Add socket communication between recovery and minadbdxunchang2019-04-111-1/+30
| | | | | | | | | | | | | This cl adds a socket pair to support the communication between recovery and minadbd. Therefore, minadbd will be able to issue multiple commands to recovery and get back the status of each command. This cl also switches the adb sideload from the recovery menu to use this protocol; and moves minadbd to a separate binary. Bug: 130166585 Test: sideload a package Change-Id: I80d36d5c4e6fe1ae3ea23640907bc50c0dc0d482
* Create a FuseDataProvider base classxunchang2019-03-191-0/+1
| | | | | | | | | | | | The fuse data provider for adb/sdcard shares common code and structures. This cl creates a FuseDataProvider base class and provides implementations for adb and sdcard. In the follow cls, we can kill the provider_vtab struct; and also add another implementation to parse a block map file and provides data. Test: unit tests pass, sideload a package, apply a package from sdcard Change-Id: If8311666a52a2e3c0fbae0ee9688fa6d01e4ad09
* minadbd: daemon_service_to_fd takes std::string_view.Tao Bao2019-01-021-0/+2
| | | | | | | | | | | | The caller of daemon_service_to_fd() in core adb has switched to std::string_view in [1]. The mismatch breaks the sideload service, as it picks up the wrong daemon_service_to_fd() when serving sideload. [1] https://android-review.googlesource.com/c/platform/system/core/+/850392 Bug: 122171762 Test: `adb sideload` on taimen. Change-Id: Ie828400768523c35c5576e2c029e38fc0ad0aff9
* C++17 is the default now.Elliott Hughes2018-12-031-1/+0
| | | | | Test: builds Change-Id: I91923da25f470621189589711c50f3d67e435c68
* minadbd: track adb C++ version change.Josh Gao2018-11-131-0/+1
| | | | | | | | adb is going to start using shiny new C++17 features like std::optional in headers that minadbd includes. Test: mma Change-Id: I7eb100c48abbf2364d6ff5f30aa223480e2466a6
* Move to new isolation test runner.Christopher Ferris2018-10-011-1/+1
| | | | | Test: Ran tests. Change-Id: I5fa99f7b6b03c7b9247b4f340f3df982063b0e3e
* Reland "Build and use minadbd as a shared library."Tao Bao2018-08-131-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | This relands the previously reverted CL in commit c70446ce7b4db79f296833b16ce38eb8a01d83df ("Build and use minadbd as a shared library."). `recovery` has been built with Soong, so the previous concern (unintentionally installing `libminadbd_services.so` to normal system image) no longer holds. Note that `reocvery` can't use `libminadbd_services.a`, as functions like `daemon_service_to_fd()` (needed by `libadbd.so`) won't be linked into `recovery`. This CL moves the dependency of `libminadbd_services` from `librecovery` into `recovery`, as only the latter actually relies on it (via `recovery_main.cpp`). Note that we no longer need to list the transitive dependency on `libadbd` or `libasyncio`. Bug: 112494634 Test: `mmma -j bootable/recovery` Test: Build and boot into recovery with aosp_taimen-userdebug. Verify that sideloading keeps working. Test: `build/soong/build_test.bash --dist` Change-Id: Ic086470b86d6770bede317e0f5534f608fa7b7d2
* Build `recovery` with Soong.Tao Bao2018-08-101-0/+1
| | | | | | | | | | | | | | Fixes: 110380063 Test: `mmma -j bootable/recovery` with aosp_taimen-userdebug Test: Build and boot into recovery on taimen. Check the basic functionalities (`Apply update from ADB`, `View recovery logs`, `Run graphics test`). Test: Run recovery_unit_test and recovery_component_test on marlin. Test: Modify `recovery.cpp` locally to trigger the call to is_battery_ok(). Check that the battery info is reported correctly. Test: `build/soong/build_test.bash --dist` Change-Id: I391eb201d57c760e457ba2bf2410ceb72596795c
* Revert "Build and use minadbd as a shared library."Tao Bao2018-08-081-9/+7
| | | | | | | | | | | | | | | | | | | This reverts commit 4fd4f89591fe826cf26167bccaeb2802f14fbdc8. The reverted CL has a side effect that unintentionally installs a copy of libminadbd_services.so to the system image. This breaks the check with `build/soong/build_test.bash --dist` which detects and prevents vendor modules from installing files to the system image. Prior to fully converting `recovery` to be built with Soong, we have to statically link recovery-specific modules into `recovery`. Bug: 110380063 Test: `m -j bootimage` with aosp_marlin-userdebug Test: Run minadbd_test on marlin. Test: Boot into recovery and verify that sideloading still works. Test: `build/soong/build_test.bash --dist` Change-Id: I290d55c82e17aa60a5afdf2ff7f896afc4dae8b3
* Build and use minadbd as a shared library.Tao Bao2018-08-071-7/+9
| | | | | | | | | | | | | | | | | The former `minadbd` module is now built as a shared library (`libminadbd_services.so`) that serves sideloading under recovery, with a dynamic dependency on `libadbd.so`. This allows sharing and reusing libadbd code on device (both of `adbd` and `recovery` now uses `libadbd.so`). As a result, it reduces the size of `recovery` binary from 1407360-byte to (1272880 + 33032)-byte (aosp_marlin-userdebug). Bug: 78793464 Test: `m -j bootimage` with aosp_marlin-userdebug Test: Run minadbd_test on marlin. Test: Boot into recovery and verify that sideloading still works. Change-Id: I6c2bc3d351d5af71220a9b9f956c8c039e52c781
* Export fuse_sideload.h for libfusesideload.Tao Bao2018-03-071-1/+1
| | | | | | | | | | Move the module into a separate directory so that we can export only the expected header. With this change, minadbd no longer needs to include bootable/recovery. Test: mmma -j bootable/recovery Change-Id: I69b888ceb160a33a67d79c5bda208dc17ad6ed86
* minadbd: Move to Soong.Tao Bao2018-03-071-0/+78
Test: mmma -j bootable/recovery Change-Id: Ic4cd676a842f0e8c4735cc6731fcbf13b844510c