I'm implementing a device owner for Android 8.1 and I would like to add the ability to enable packages that have been disabled by the provisioning process. I can do this from the command line with "cmd package install-existing" but I'm not sure how to do this from code. The methods I have seen so far are:
1. PackageManager.installExistingPackage. This is a hidden API however.
2. DevicePolicyManager.installExistingPackage. This was only added in API 28 which I do not have access to.