apexd: support zero-hash on dm-verity mount

When activating APEX package which has zero-ed hashtree for
smaller OTA update size, APEXD generates hashtree on device and
stores it for later use in /data/apex/hashtree/.

Note that dm-verity allows us to create a device with separate hash
device and it should be a block device. So, we need an additional loop
device for hash.

TODOs:
- remove unused hashtree files on boot complete
- set unique name for hashtree file instead of package id(name@ver).
  package id may not be unique among APEX files.
- database entries for additional loop device(hashtree)
- tests

Bug: 120058143
Test: activate via dm-verity with generated hashtree
Change-Id: Id75dec08897f96628f3b45eeadcb552e9ffc87ab
6 files changed
tree: aae8bb9dbd2453d71c3d988328bcd3572a65ac79
  1. apexd/
  2. apexer/
  3. docs/
  4. proto/
  5. shim/
  6. tests/
  7. CleanSpec.mk
  8. OWNERS
  9. PREUPLOAD.cfg