apexd: temp mount packages during staging.
* Refactored lambda inside verifyPackages into verifyPackage function.
* Made verifyPackage temp mount a package.
* Added tests to verify that apexd doesn't leak temp verity devices from
verifyPackage.
This will enable:
* Shim apex content validation.
* Making sure that re-installing a system package is functionally
equivalent to deleting currently active version of that package.
* Do more verification of apex_payload.img if we want to.
Test: apexservice_test
Bug: 128625955
Change-Id: I37bd2e2f3cc0e846040d0f5f049005f46cbc3186
2 files changed