PackageManager plumbing to support non-staged APEX installs
This is a minimal set of changes to support non-staged APEX installs in PackageManager and friends. In a nutshell, PackageManager simply passes the APEX around and delegates the actual installation to ApexManager, which will do the following: * Check that outer .apex container is well formed. * Check that outer .apex container is signed with the correct cert. * Check that install is not a downgrade. * Call into apexd to perform an actual install. * Update internal data structures used by PackageManager's query APIs (getPackageInfo, getAppliationInfo, getInstalledPackages, etc.). In addition this CL implements the following set of policies around non-staged APEX install (some of them are likely to be relaxd in T): * Multi apk install of both APEXes and APKs is not supported. * Rollback enabled non-staged install of an APEX is not supported. Since there are a bunch of host-side tests that expects `adb install foo.apex` to perform a staged install, I've temporarily added `--force-non-staged` option to provide a way to trigger a non-staged APEX update via adb. Once we've migrated all the test cases to explicitly mention `--staged` flow, we can remove this flag and make APEX adb install follow the same logic as APK one (if a developer wants to perform a staged install, they need to explicitly add --staged flag). Test: adb install --force-non-staged shim.apex Test: atest CtsStagedInstallHostTestCases Test: atest CtsRollbackManagerHostTestCases Bug: 187864524 Bug: 188714038 Change-Id: Ia1fb1d07dee465bae572321a510ae78b56c35614 Merged-In: Ia1fb1d07dee465bae572321a510ae78b56c35614
Loading
Please register or sign in to comment