[TIMOB-14785] CLI: Create Android Emulator Library
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-09-06T22:23:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 18 Core, 2013 Sprint 18, Release 3.2.0 |
Components | Android, Tooling |
Labels | module_CLI |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2013-08-08T17:24:29.000+0000 |
Updated | 2013-12-05T23:00:40.000+0000 |
Description
We need an Android emulator library that provides the following functions:
* create AVD
** improve emulator naming convention (TIMOB-1872 Android: Fix AVD naming scheme)
* launch emulator
** make sure adb server is running
** if the emulator we want is already running, return
** if avd does not exist, create it
** if skin is not specified, select a valid skin for the AVD's Android SDK (TIMOB-13582 CLI: Launching emulator without specifying skin will use HVGA and will fail if chosen AVD does not support HVGA)
** custom launch params (TIMOB-2646 Android: Feature Request: Customized launch params)
** gracefully handle when emulator doesn't start in timely manner (TIMOB-9153 Android: Deployment: Android Emulator intermittently fails to launch app after timed out)
** NOTE: do not launch a useless emulator, especially on Windows (TIMOB-4730 Android 3.2 Simulator behavior on windows is very poor (not launched at all or useless emulator launched))
** pipe emulator output to logger (TIMOB-13381 Android Emulator: process launches in new terminal on Windows)
** fire callback when emulator has booted
** fire callback when sdcard is ready
** fire callback when emulator is quit (TIMOB-12604 Android: Closing the emulator, 'Emulator has exited' log in not printed on console)
** NOTE: be careful when running multiple x86 instances as to avoid "Starting emulator for AVD 'titanium_10_800x1280_armeabi-v7a' \ emulator: The memory needed by this VM exceeds the driver limit. \ HAX is not working and emulator runs in emulation mode" errors
* kill emulator
** NOTE: make sure emulator is properly killed on Windows (TIMOB-7468 Android: tooling - Rhino/V8 - On windows systems during emulator build, console reports error attempting to kill emulator process)
* NOTE: make sure to support directories with &, especially on Windows (TIMOB-2527 Android: App launch/build problem if ampersand in home folder name)
Pull request: https://github.com/appcelerator/titanium_mobile/pull/4646 To test: 1) cd support/node_modules/titanium-sdk/tests 2) node test-avd.js You'll have to modify test-avd.js to uncomment the test to run as well as set valid emulator names. The basic tests are detect, start, and stop.
Test steps as above. The path in step one is actually SDK/node_modules/titanium-sdk/tests
Followed the steps given by Chris Barber & it works as expected. Environment: Appcel Studio : 3.2.0.201312042306 Ti SDK : 3.2.0.v20131204220843 Mac OSX : 10.8.5 Alloy : 1.3.0-beta CLI - 3.2.0-beta