ADBs is unresponsive after 5000ms, killing server and retrying
11:56 23 Aug 2024

I am constantly run into this error when I run an ionic android app on the device or emulator:

ADBs is unresponsive after 5000ms, killing server and retrying... [capacitor] Error: Command failed: I:\apps\androidsdk\platform-tools\adb -s DUM0219506001110 shell am start -W -n com.mycompany.myapp/com.mycompany.myapp.MainActivity

It's more likely to happen when I run it on emulator than on a physical device. It's also more likely to happen when I run it in live reload mode. If more than 5000ms is needed, where do I set this timeout value? In both cases, the app actually got loaded on the device or emulator successfully. But ionic thinks it failed and the dev server will quit after that.

I tried setting ADB_INSTALL_TIMEOUT environment variable but it seems capacitor doesn't use this value.

android ionic-framework adb