I am getting the getprop,dev.bootcomplete
error after building and deploying the new debug-apk file to the Android emulator through Ionic framework.
The
This was a solution for me in Ionic 3 version:
Try to run emulator again.
I was get the same error when working with the following command on my windows 10 machine,
cordova emulate android --target=N5Oreo
Windows 10
Corodva 7.1.0
Oreo based emulator
the issue was fixed temporarily with the answer by jcesarmobile (Failed to execute shell command "getprop,dev.bootcomplete"" on device: error for Android) but it kept on resurfacing.
When i execute the command, the emulator was launched but the error kept coming again and again. I restarted the machine and and then it worked for few days then it kicked in again.
I found that adb
is a powerful tool. So instead of depending on cordova emulate android --target=N5Oreo
to build and launch I used cordova build android
and installed the resultant build by using adb install myApp.apk
to the currently running emulator.
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!