Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The install-apks command fails with "INSTALL_FAILED_TEST_ONLY" code. #88

Closed
kyoungmo-yang opened this issue Jul 12, 2019 · 2 comments
Closed

Comments

@kyoungmo-yang
Copy link

If "android:testOnly" is enabled in the AndroidManifest.xml of an app, it is not possible to install it with install-apks.

 The APKs have been extracted in the directory: /tmp/1656797342218807768
05:01:21 E/SplitApkInstaller: Failed to finalize session : INSTALL_FAILED_TEST_ONLY: installPackageLI
[BT:0.10.0] Error: Installation of the app failed.
com.android.tools.build.bundletool.model.exceptions.InstallationException: Installation of the app failed.
	at com.android.tools.build.bundletool.model.exceptions.InstallationException$Builder.build(InstallationException.java:47)
	at com.android.tools.build.bundletool.model.exceptions.InstallationException$Builder.build(InstallationException.java:41)
	at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:122)
	at com.android.tools.build.bundletool.device.ApksInstaller.installOnDevice(ApksInstaller.java:94)
	at com.android.tools.build.bundletool.device.ApksInstaller.installApks(ApksInstaller.java:82)
	at com.android.tools.build.bundletool.device.ApksInstaller.installApks(ApksInstaller.java:62)
	at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:163)
	at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:88)
	at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:46)
Caused by: com.android.ddmlib.InstallException: Failed to finalize session : INSTALL_FAILED_TEST_ONLY: installPackageLI
	at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:91)
	at com.android.ddmlib.Device.installPackages(Device.java:928)
	at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:106)

The app can be installed on the device using the -t option(allow test packages) of adb.

@plecesne
Copy link
Contributor

We should add support for it, yes.

@plecesne
Copy link
Contributor

Now fixed in 0.12.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants