Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to execute shell command "getprop,dev.bootcomplete"" on device: error for Android

This is a cordova-android bug because Google probably changed the error message when trying to run the app.

It has been fixed already and released in cordova-android 7.1.1 or newer. If you can't update to those versions do:

I think it would work if you apply this change yourself to yourAppName/platforms/android/cordova/lib/emulator.js

Change

if ((error && error.message && (error.message.indexOf('not found') > -1)) || (error.message.indexOf('device offline') > -1))

to

if ((error && error.message && (error.message.indexOf('not found') > -1)) || (error.message.indexOf('device offline') > -1) || (error.message.indexOf('device still connecting') > -1))


Another workaround is to start emulator from Android studio and then run cordova command to run app. This way cordova finds the emulator already running and it avoids the race condition. Thanks!


This was a solution for me in Ionic 3 version:

  1. Open Android studio, go to AVD Manager
  2. Create a new AVD device, click on "show advanced settings"
  3. Select "Cold boot". By default, the "Quick boot" is selected.

Try to run emulator again.