Installation of the app failed
- Dominant language
- Java
- Stars
- 4k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
I often encounter this problem when using bundletool to install apks with a resource size of 3G: installation fails due to the remote host forcibly closing the adb connection. However, I have successfully installed apks with a resource size of 1G using the same method. Below is the related error log, and I hope to get an answer.
java.io.IOException: The remote host forcibly closed an existing connection.
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:625)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:758)
at com.android.ddmlib.SplitApkInstaller.uploadApk(SplitApkInstaller.java:140)
at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:76)
at com.android.ddmlib.internal.DeviceImpl.installPackages(DeviceImpl.java:1166)
at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:180)
at com.android.tools.build.bundletool.commands.InstallApksCommand.lambda$execute$2(InstallApksCommand.java:236)
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.execute(InstallApksCommand.java:236)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:117)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:55)
[BT:1.15.6] Error: Installation of the app failed.
com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: Installation of the app failed.
at com.android.tools.build.bundletool.model.exceptions.InternalExceptionBuilder.build(InternalExceptionBuilder.java:57)
at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:196)
at com.android.tools.build.bundletool.commands.InstallApksCommand.lambda$execute$2(InstallApksCommand.java:236)
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.execute(InstallApksCommand.java:236)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:117)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:55)
Caused by: com.android.ddmlib.InstallException: Connection refused: connect
at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:94)
at com.android.ddmlib.internal.DeviceImpl.installPackages(DeviceImpl.java:1166)
at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:180)
... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Unknown Source)
at sun.nio.ch.Net.connect(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at java.nio.channels.SocketChannel.open(Unknown Source)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:595)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:468)
at com.android.ddmlib.internal.DeviceImpl.executeShellCommand(DeviceImpl.java:702)
at com.android.ddmlib.SplitApkInstallerBase.installAbandon(SplitApkInstallerBase.java:108)
at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:82)
... 8 more
Contributor guide
Assessment
This issue has not been assessed yet.