platform_bootable_recovery/tests
Tao Bao 35e0f6d290 Add misc_writer.
bootloader_message.h currently divides /misc into four segments. The
space between 2K and 16K is reserved for vendor use (e.g. bootloader
persists flags). This CL adds a vendor tool "misc_writer", to allow
writing data to the vendor space in /misc, before getting a dedicated
HAL for accessing /misc partition (b/131775112).

Targets need to explicitly include the module, then invoke the
executable to write data. For example, the following command will write
3-byte data ("0xABCDEF") to offset 4 in vendor space (i.e. 2048 + 4 in
/misc).
$ /vendor/bin/misc_writer --vendor-space-offset 4 --hex-string 0xABCDEF

Bug: 132906936
Test: Run recovery_unit_test on crosshatch.
Test: Call the command via init.hardware.rc on crosshatch. Check that
      the call finishes successfully. Then check the contents written to
      /misc (`dd bs=1 skip=2048 if=/dev/block/sda2 count=32 | xxd`).
Change-Id: I79548fc63fc79b705a0320868690569c3106949f
Merged-In: I79548fc63fc79b705a0320868690569c3106949f
(cherry picked from commit 7ae0169842)
2019-05-20 15:58:53 -07:00
..
common tests: Pick up testdata with LOCAL_TEST_DATA. 2018-04-02 14:14:29 -07:00
component Add misc_writer. 2019-05-20 15:58:53 -07:00
manual tests: Move ResourcesTest into component test. 2018-04-16 11:29:06 -07:00
testdata Allow RSA 4096 key in package verification 2019-03-26 12:28:23 -07:00
unit Move install to separate module 2019-03-29 10:27:51 -07:00
Android.bp Move install to separate module 2019-03-29 10:27:51 -07:00
AndroidTest.xml tests: Pick up testdata with LOCAL_TEST_DATA. 2018-04-02 14:14:29 -07:00