google / bundletool

Bundletool is a command-line tool to manipulate Android App Bundles
https://g.co/androidappbundle
Apache License 2.0
3.52k stars 385 forks source link

Install additional splits apks for locatest failed with permission denied on Hornor 50s with Android 11 #298

Closed wangsihao87 closed 1 year ago

wangsihao87 commented 2 years ago

Describe the bug Install additional splits apks for locatest failed with permission denied on Hornor 50s with Android 11

Bundletool version(s) affected Version: [1.11.0]

Stacktrace ADB << rm -rf '/sdcard/Android/data/xxxxxxxxx/files/local_testing' ADB >> rm: /sdcard/Android/data/xxxxxxxx/files/local_testing: Permission denied [BT:1.11.0] Error: Pushing additional splits for local testing failed. Your app might still have been installed correctly, but you won't be able to test dynamic modules. com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: Pushing additional splits for local testing failed. Your app might still have been installed correctly, but you won't be able to test dynamic modules. at com.android.tools.build.bundletool.model.exceptions.InternalExceptionBuilder.build(InternalExceptionBuilder.java:57) at com.android.tools.build.bundletool.device.DdmlibDevice.push(DdmlibDevice.java:235) at com.android.tools.build.bundletool.commands.InstallApksCommand.lambda$pushFiles$11(InstallApksCommand.java:333) at com.android.tools.build.bundletool.device.AdbRunner.run(AdbRunner.java:81) at com.android.tools.build.bundletool.device.AdbRunner.run(AdbRunner.java:43) at com.android.tools.build.bundletool.commands.InstallApksCommand.pushFiles(InstallApksCommand.java:333) at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:218) at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:105) at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:54) Caused by: java.io.IOException: ADB command failed. at com.android.tools.build.bundletool.device.DdmlibDevice$RemoteCommandExecutor.executeAndPrint(DdmlibDevice.java:352) at com.android.tools.build.bundletool.device.DdmlibDevice$RemoteCommandExecutor.access$000(DdmlibDevice.java:310) at com.android.tools.build.bundletool.device.DdmlibDevice.push(DdmlibDevice.java:211) ... 7 more Press any key to continue . . .

To Reproduce Steps to reproduce the behavior. just run ”bundletool install-apks --apks“

Expected behavior Install should success with the official tools, It's the most common used tools when develope

Known workaround Manually copy the splits apks to the target folder would make it run

Environment: OS: [windows 10 19042.1706]

ymakhno commented 1 year ago

This is a duplicate of #196. Unfortunately the root cause is a bug in Android and no workaround exists.