* test: remove target validator test
these appear to have too much maintenance burden as they only ever
add more over time
* fix: allow google_apis_ps16k and google_apis_playstore_ps16k as valid targets
Fixes#403
Co-authored-by: Yang <reactivecircus@gmail.com>
* fix: remove target validation entirely, any valid sdkmanager target will work
no longer requires code changes here to access new targets
---------
Co-authored-by: Yang <reactivecircus@gmail.com>
* Optimize config.ini updates by batching shell executions
- Reduce up to 5 separate shell executions to 1 for AVD configuration
- Improves performance by eliminating redundant process spawns
- Add comprehensive efficiency report documenting all identified improvements
- All existing tests pass, no functional changes
Co-Authored-By: Yang <reactivecircus@gmail.com>
* Add compiled JS files and remove standalone efficiency report
- Include built lib/emulator-manager.js with batched config optimization
- Remove EFFICIENCY_REPORT.md as requested
- Efficiency report content will be moved to PR description
Co-Authored-By: Yang <reactivecircus@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Yang <reactivecircus@gmail.com>
* Avoid changing the owner of unnecessary files
Source files shouldn't matter for the purposes of this tool.
% ls -R $ANDROID_HOME/sources/android-34 | wc -l
17750
* Remove non-existant directory
* Avoid another unnecessary chown
* Push js
* Add port parameter
* Fix a typo in test description
* Fix avd not being started with correct port
* Fix wrong port being used to kill an emulator if there was an exception
* Support non-integer API level
* update lib
* Add test
* No need to install platforms.
Mostly application will use different SDK platform.
* Update lib
* Add `pre-emulator-launch-script` to `action.yml`
* Add `pre-emulator-launch-script` in `main.yml`
* Implement pre emulator launch script
* Try to use `pushd`
* print working directory
* Add `README`
* Run `npm run build`
* Fix `working-directory`
* Run `npm run build`
* Run pre emulator launch in group
* Run `npm run build`
* Update README.md
Co-authored-by: Yang <reactivecircus@gmail.com>
* Add type "pre-emulator-launch-script"
Co-authored-by: Yang <reactivecircus@gmail.com>
* Update build-tools to 31.0.0. Add API 31 emulator to workflow. Update SDK command-line tools to 5.0
* Update test fixture dependencies.
* Test API 31 with macos-11.
* Add android:exported to AndroidManifest.
* Format
* Add non-mobile targets to allowlist
* Add new targets to input validator tests
* Update built input-validator.js
* Update README with new targets
* Update action.yml with new targets
The exec() command only runs a program with literal argument strings.
It does not know how to do things like expanding environment variables,
or piping/redirection. Hence the way to get "shell intelligence"
is to use exec() to run the `sh` process with the command line string
as a parameter.
But the method being used to do this was:
exec.exec(`sh -c \\"${script}"`)
This has problems, because wrapping the script in quotes creates
issues when the script itself contains quotes. Escaping the string
correctly is a non-trivial problem, which also would create "noise"
in the debug output which would add confusion.
http://mywiki.wooledge.org/BashFAQ/050
The easiest way to work around this here is to use the array form of
exec() to pass exactly two parameters to `sh`. No manipulation of the
script string is needed with this approach:
exec.exec("sh", ["-c", script])
There are more cases in the project of `sh -c` usage which should also
be changed, and likely abstracted (shellExec()?) But this small patch
just fixes the most important case for the user-provided script.
---
Additionally, this removes the escaped backslash (`\\`) from the
start of the executed command. That was presumably to suppress the
use of aliases:
https://unix.stackexchange.com/questions/524254/why-are-backslashes-included-in-this-shell-script
But because this is invoking a non-interactive shell session, aliases
would not apply. Hence the extra backslash shouldn't be needed.