GitHub user filmaj opened a pull request:
https://github.com/apache/cordova-android/pull/366
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:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Platforms affected
Android
### 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 here:
https://code.google.com/p/android/issues/detail?id=235461
### 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](https://issues.apache.org/jira/browse/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 https://github.com/filmaj/cordova-android CB-12546
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-android/pull/366.patch
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 <[email protected]>
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 <[email protected]>
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.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]