Add install flag --bypass-low-target-sdk-block
Added a PM shell install flag to bypass the low target sdk block for
installing apps that are using low targetSdkVersion.
When set, this flag will bypass the install block and
allow the app to be installed.
Added some additional broad exclusions that will allow this
feature to be ramped up earlier.
The plan will be to follow this up with changes that remove
exceptions for skipping the install block when installed
via adb, or when the package name isn't set.
Will also follow up with a change that removes the bypass
flag if the caller isn't root or shell.
Bug: 237321649
Test: adb install app.apk
Test: adb install --bypass-low-target-sdk-block
Test: adb shell pm install app.apk
Test: Sideloaded apk using the Files app
Test: adb shell device_config put package_manager_service MinInstallableTargetSdk__install_block_enabled true
Test: adb shell device_config put package_manager_service MinInstallableTargetSdk__min_installable_target_sdk 23
Test: atest PackageManagerTests
Test: atest CtsPackageManagerParsingHostTestCases
Change-Id: I88261b25e6d7360251385e15eb3a352e1213fe76
3 files changed