[
https://issues.apache.org/jira/browse/CB-9172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14612904#comment-14612904
]
ASF GitHub Bot commented on CB-9172:
------------------------------------
Github user alsorokin commented on a diff in the pull request:
https://github.com/apache/cordova-android/pull/188#discussion_r33843283
--- Diff: bin/templates/cordova/lib/emulator.js ---
@@ -238,13 +242,13 @@ module.exports.wait_for_emulator =
function(num_running) {
*/
module.exports.wait_for_boot = function(emulator_id) {
var self = this;
- return exec('adb -s ' + emulator_id + ' shell getprop
init.svc.bootanim', os.tmpdir())
+ return exec('adb -s ' + emulator_id + ' shell ps', os.tmpdir())
.then(function(output) {
- if (output.match(/stopped/)) {
+ if (output.match(/android\.process\.acore/)) {
return;
} else {
process.stdout.write('.');
- return Q.delay(3000).then(function() {
+ return Q.delay(7000).then(function() {
--- End diff --
From my observations, `shell ps` (getting the list of all processes) is
more time consuming than `shell getprop` (getting one property) so I increased
the polling time.
This is only my feeling, we can safely return it back to 3s I think.
> Android "cordova run" sometimes locks up the emulator
> -----------------------------------------------------
>
> Key: CB-9172
> URL: https://issues.apache.org/jira/browse/CB-9172
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: Master
> Environment: Android on OSX and Windows
> Reporter: Dmitry Blotsky
> Labels: adb, android
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> ADB commands used in "cordova run" for Android don't always wait for proper
> success conditions on Android, sometimes calling operations at the wrong
> time. For example, sometimes installation happens too soon after emulator
> boot, and the emulator locks up.
> The implementation of "cordova run" for Android should be made more robust. A
> reference implementation can be found in the Jenkins Android code, here:
> https://github.com/jenkinsci/android-emulator-plugin/blob/master/src/main/java/hudson/plugins/android_emulator/InstallBuilder.java.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]