cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-12546) Latest Android SDK tools introduce bug w/ Android emulator
Date Wed, 08 Mar 2017 17:24:38 GMT


ASF GitHub Bot commented on CB-12546:

GitHub user filmaj opened a pull request:

    CB-12546: More robust support spawning the emulator with newer Android SDK

    Please make sure the checklist boxes are all checked before submitting the PR. The checklist
    is intended as a quick reference, for complete details please see our Contributor Guidelines:
    ### Platforms affected
    ### What does this PR do?
    Two things related to starting emulator:
    1. Adds more versatile support for the changing structure of the Android SDK. In particular,
if spawning the `android` command exits with a non-zero status code (as it does in SDK Tools
25.3.1), attempts to use `avdmanager` and massages its output to conform to the old output
of `android list avd`.
    2. Ensures to spawn the emulator with a `cwd` parameter, to workaround the SDK bug described
    ### What testing has been done on this change?
    Not enough! Unfortunately, I cannot downgrade my Android SDK to test that this works on
older SDK versions. Thus why I attempted not to change any of the old logic leveraging the
`android` binary, and rather just built support for the new SDK on top of the old one, trying
to use feature / failure detection along the way.
    ### Checklist
    - [X] [CB-12546](
    - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.

You can merge this pull request into a Git repository by running:

    $ git pull CB-12546

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #366
commit 73f28541abf9bd372cb2a5402e2ac3b326c15b94
Author: filmaj <>
Date:   2017-03-08T01:04:11Z

    CB-12546: start of work on parsing emulator info from `avdmanager` output. work in progress.

commit 8fc099b8f1b4f7bfb748eb6655d6cd1d0aa3dbdf
Author: filmaj <>
Date:   2017-03-08T17:12:44Z

    CB-12546: tweak parsing of `avdmanager` output to match the old output from `android list
avd`. also explicitly set the CWD of the spawned emulator process to workaround a recent google
android sdk bug.


> Latest Android SDK tools introduce bug w/ Android emulator
> ----------------------------------------------------------
>                 Key: CB-12546
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>            Reporter: Filip Maj
>            Assignee: Filip Maj
> For details:
> A workaround is to change the current working directory to the directory housing the
{{emulator}} binary. E.g.:
> {noformat}
> ~ via ⬢ v6.9.4
> ➔ which emulator
> /Users/maj/sdks/android/tools/emulator
> ~ via ⬢ v6.9.4
> ➔ emulator -avd nexus5-5.1
> [140736778830784]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
> Could not launch '../emulator/qemu/darwin-x86_64/qemu-system-x86_64': No such file or
> ~ via ⬢ v6.9.4
> ➔ cd ~/sdks/android/tools
> sdks/android/tools via ⬢ v6.9.4
> ➔ ./emulator -avd nexus5-5.1
> emulator: WARNING: encryption is off
> Hax is enabled
> Hax ram_size 0x80000000
> HAX is working and emulator runs in fast virt mode.
> {noformat}
> Potential fix: tweak the {{cordova run --emulator}} command to change the current working
directory to be the location of the emulator binary. That might be an easy fix, as cordova
uses the {{superspawn}} node module to kick off the {{emulator}} process. That module takes
an optional {{cwd}} parameter.
> Let's also check for the existence of {{android}} vs. {{sdkmanager}} to fix the listing
of images based on SDK version.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message