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

Java error 5 (access denied) when running install-apks #158

Closed
tidann opened this issue Apr 22, 2020 · 2 comments
Closed

Java error 5 (access denied) when running install-apks #158

tidann opened this issue Apr 22, 2020 · 2 comments

Comments

@tidann
Copy link

tidann commented Apr 22, 2020

Describe the bug
When I try to run the install-apks command I have a Java error : Cannot run program "C:\adb": CreateProcess error=5, Access denied.

Bundletool version(s) affected
Version: 0.13.4

Stacktrace

04:03:04 E/adb: Cannot run program "C:\adb": CreateProcess error=5, Accès refusé
[BT:0.13.4] Error: java.io.IOException: Cannot run program "C:\adb": CreateProcess error=5, Accès refusé
java.lang.IllegalArgumentException: java.io.IOException: Cannot run program "C:\adb": CreateProcess error=5, Accès refusé
        at com.android.ddmlib.AndroidDebugBridge.<init>(AndroidDebugBridge.java:602)
        at com.android.ddmlib.AndroidDebugBridge.createBridge(AndroidDebugBridge.java:380)
        at com.android.tools.build.bundletool.device.DdmlibAdbServer.init(DdmlibAdbServer.java:78)
        at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:160)
        at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:88)
        at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:46)
Caused by: java.io.IOException: Cannot run program "C:\adb": CreateProcess error=5, Accès refusé
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at com.android.ddmlib.AndroidDebugBridge$1.run(AndroidDebugBridge.java:660)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=5, Accès refusé
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:444)
        at java.lang.ProcessImpl.start(ProcessImpl.java:139)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 2 more

To Reproduce
Run this command : bundletool install-apks --apks=file.apks with file.apks in the current directory and an android device connected to your computer

Expected behavior
It should install the apk to my device

Environment:
Windows 10, Android 10, Powershell run as administrator

Additional context
I think it is because it runs "C:\adb" and not "C:\adb\adb.exe" but I don't know how to set a custom adb path

@plecesne
Copy link
Contributor

Thank you for the report.

That looks like a bug indeed. While waiting for it to be fixed, you can add the flag --adb C:\adb\adb.exe to the command.

You can also see other flags available in commands by using: bundletool help <command>.

@ymakhno
Copy link

ymakhno commented May 18, 2020

Fixed in 0.15.0.

@ymakhno ymakhno closed this as completed May 18, 2020
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

3 participants