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

Bundle tool "install apks" command isn't working #8

Closed
saurabhkpatel opened this issue May 21, 2018 · 8 comments
Closed

Bundle tool "install apks" command isn't working #8

saurabhkpatel opened this issue May 21, 2018 · 8 comments

Comments

@saurabhkpatel
Copy link

saurabhkpatel commented May 21, 2018

Describe the bug
Bundle tool install apks command isn't working bundletool install-apks --apks=my_app.apks

Bundletool version(s) affected
Version: [e.g. 0.3.3]

Stacktrace
11:03:02 E/SplitApkInstaller: Failed to finalize session : INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl1034936521.tmp/0_universal has no certificates at entry AndroidManifest.xml [BT:0.3.3] Error: Installation of the app failed. com.android.tools.build.bundletool.exceptions.InstallationException: Installation of the app failed. at com.android.tools.build.bundletool.exceptions.InstallationException$Builder.build(InstallationException.java:47) at com.android.tools.build.bundletool.exceptions.InstallationException$Builder.build(InstallationException.java:41) at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:98) at com.android.tools.build.bundletool.device.ApksInstaller.installOnDevice(ApksInstaller.java:89) at com.android.tools.build.bundletool.device.ApksInstaller.installApks(ApksInstaller.java:78) at com.android.tools.build.bundletool.device.ApksInstaller.installApks(ApksInstaller.java:45) at com.android.tools.build.bundletool.commands.InstallApksCommand.lambda$execute$4(InstallApksCommand.java:138) at com.android.tools.build.bundletool.io.TempFiles.lambda$withTempDirectory$0(TempFiles.java:67) at com.android.tools.build.bundletool.io.TempFiles.withTempDirectoryReturning(TempFiles.java:51) at com.android.tools.build.bundletool.io.TempFiles.withTempDirectory(TempFiles.java:70) at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:122) at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:85) at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:44) Caused by: com.android.ddmlib.InstallException: Failed to finalize session : INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl1034936521.tmp/0_universal has no certificates at entry AndroidManifest.xml at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:91) at com.android.ddmlib.Device.installPackages(Device.java:926) at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:92) ... 10 more

To Reproduce

  • Generate the andorid app bundle
  • Generate apk archive set
  • Try to install the from apk archive set and it's giving the above error.

Known workaround

  • Do I have to sign my apk?
  • What's the recommended way if I want to install the debug application from APK set archive without signing it.

Environment:
OS: MAC OS High Sierra : 10.13.4
Device : Pixel 2XL

@saurabhkpatel saurabhkpatel changed the title Bundle tool install apks command isn't working bundletool install-apks --apks=my_app.apks Bundle tool "install apks" command isn't working May 21, 2018
@plecesne
Copy link
Contributor

When building the APK Set, set the --ks and --ks-key-alias flags to ensure that the APKs are signed. Only signed APKs can be installed on a device.

The Android SDK should come with a debug keystore. Try looking under ~/.android/debug.keystore (alias: AndroidDebugKey, pwd: android).

@saurabhkpatel
Copy link
Author

Thanks, @plecesne, it worked as suggested.

@rafirafika
Copy link

Hello, same problem here, file .apks already generated and I have 2 apk inside it (base and dlc_module).
image
I tried to install using bundletool with command "bundletool.jar install-apks --apks=myApks.apks"
and the apps installed but only base apk and my dlc_module is not install yet.
could you please help me..
I already tried to install using Android Studio and my all apk (base and dlc_module) are installed.

@plecesne
Copy link
Contributor

By default, bundletool installs only the modules that are not on-demand. If you want other modules to be installed, use the flag --modules=dlc_module.

(Also, in the future, unless you have the same symptoms as the person reporting the bug, please file a separate bug)

@rafirafika
Copy link

thank @plecesne, it works :)
and sorry for not asking in new thread, I'll when I have another problem..

@MarcusCwl
Copy link

@plecesne
Really? In my case, I do not use the flag --modules for my on-demanded dynamic-features module when use bundle tool to install apks. But it still been installed together with base module!!

@plecesne
Copy link
Contributor

plecesne commented Jan 8, 2019

Please file a separate bug.

@DhiralKaniya
Copy link

Just want to add related resource here.

Bundle tool generate with keystore.

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

5 participants