Android PackageInstaller and Debug APKs

128 views Asked by At

I'm working on an application that will not be released on PlayStore as it is running on proprietary hardware as a Kiosk Device that will be used under a controlled environment, as such I've implemented a system by which it will download updates, verify them and then install them using PackageInstaller.

For development purposes it would be handy to use the same system to install debug builds i.e. those that specify <application android:testOnly="true"> in the application manifest.

The issue is that the installation fails with the result message of [INSTALL_FAILED_TEST_ONLY: installPackageLI].

I realise that it is possible to install such an apk using a switch on the adb install command, but I would like to know if the same is possible using PackageInstaller or if not with PackageInstaller directly then by changing some system setting?

0

There are 0 answers