Code Monkey home page Code Monkey logo

Comments (7)

plecesne avatar plecesne commented on May 20, 2024 5

Looks like a bug in an old version of ddmlib. We'll update the version to fix the bug properly in bundletool.

A workaround should be to pass the flag --allow-downgrade to bundletool. Can you try and report if that fixes it for you?

from bundletool.

sampalmer avatar sampalmer commented on May 20, 2024 2

I was directed here from #79.

I have tried using --allow-downgrade when installing to an Android emulator running Android 4.0 through 4.4, but I now get a different error:

C:\Users\sam__\Desktop>java -jar C:\Utilities\bundletool\bundletool-all-0.9.0.jar install-apks --apks=64.apks --allow-downgrade
The APKs have been extracted in the directory: C:\Users\sam__\AppData\Local\Temp\5275980875689640840
[BT:0.9.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:44)
        at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:165)
        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: Unknown failure (2 [external]: Install on external media)
        at com.android.ddmlib.Device.installRemotePackage(Device.java:1031)
        at com.android.ddmlib.Device.installPackage(Device.java:902)
        at com.android.ddmlib.Device.installPackage(Device.java:880)
        at com.android.ddmlib.Device.installPackage(Device.java:869)
        at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:113)
        ... 6 more

from bundletool.

devjta avatar devjta commented on May 20, 2024

Yeah, this workaround worked perfectly. Can install it with bundletool now. Thanks for the fast reply.

from bundletool.

Beardemon avatar Beardemon commented on May 20, 2024

The same bug at my Android 4.4 device
Bundletool Version:0.9.0

from bundletool.

Beardemon avatar Beardemon commented on May 20, 2024

Now use the flag --allow-downgrade to bundletool , can install apks . Thanks very much.

from bundletool.

figengungor avatar figengungor commented on May 20, 2024

I had the same issue with @devjta and then used --allow-downgrade flag and this time had the issue @sampalmer mentioned.

Here is mine:

bundletool install-apks --apks=/Users/figengungor/Desktop/app.apks --allow-downgrade

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/usr/local/Cellar/bundletool/0.10.0/libexec/bundletool-all-0.10.0.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
The APKs have been extracted in the directory: /var/folders/_h/08p9wxj16cn9v50qvx7p07r80000gq/T/13846039056705983555
[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:44)
	at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:165)
	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: Unknown failure (2 [external]: Install on external media)
	at com.android.ddmlib.Device.installRemotePackage(Device.java:1031)
	at com.android.ddmlib.Device.installPackage(Device.java:902)
	at com.android.ddmlib.Device.installPackage(Device.java:880)
	at com.android.ddmlib.Device.installPackage(Device.java:869)
	at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:113)
	... 6 more

I'm able to install to the device with Android version 8.0.0

I'm having the described issue when trying to install to the device with Android version 4.1.2.

Any idea? @plecesne

from bundletool.

ymakhno avatar ymakhno commented on May 20, 2024

Obsolete.

from bundletool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.