{"id":13990191,"url":"https://github.com/gojuno/swarmer","last_synced_at":"2025-07-22T12:31:07.785Z","repository":{"id":86445990,"uuid":"87332739","full_name":"gojuno/swarmer","owner":"gojuno","description":"Reactive tool to create and start multiple Android Emulators in parallel.","archived":true,"fork":false,"pushed_at":"2019-06-19T18:15:59.000Z","size":7299,"stargazers_count":203,"open_issues_count":11,"forks_count":17,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-29T09:40:14.573Z","etag":null,"topics":["android-emulator","android-sdk"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gojuno.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-04-05T16:35:02.000Z","updated_at":"2024-10-24T11:07:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"967daedc-1ee9-4836-bc58-8456a670bc05","html_url":"https://github.com/gojuno/swarmer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/gojuno/swarmer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fswarmer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fswarmer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fswarmer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fswarmer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gojuno","download_url":"https://codeload.github.com/gojuno/swarmer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fswarmer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266495911,"owners_count":23938621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-emulator","android-sdk"],"created_at":"2024-08-09T13:02:26.550Z","updated_at":"2025-07-22T12:31:06.282Z","avatar_url":"https://github.com/gojuno.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"## Swarmer — create, start and wait for Android emulators to boot in parallel.\n\n`Swarmer` is a replacement for [such bash scripts](https://github.com/travis-ci/travis-cookbooks/blob/master/community-cookbooks/android-sdk/files/default/android-wait-for-emulator) but with features like:\n\n* Start **multiple** Android Emulators and wait for each to boot in parallel.\n* Pass `config.ini` that'll be applied to created emulator.\n* Redirect Logcat output of an emulator to a file.\n\n![Demo](swarmer/swarmer.gif)\n\n## How to use\n\n`Swarmer` shipped as `jar`, so just run it `java -jar swarmer.jar options`.\n\nDependencies:\n\n* JVM 1.8+\n* [Android SDK Tools 26.0.0+](https://developer.android.com/studio/releases/sdk-tools.html)\n\n### Commands\n\n#### Start\n\n```console\njava -jar swarmer.jar start …\n```\n\n##### Options\n\n###### Required\n\n* `--emulator-name`\n  * Name of the emulator, i.e. `test_emulator_1`.\n* `--package`\n  * Package of the system image for this AVD (e.g.'system-images;android-25;google_apis;x86') to pass to `avdmanager create avd --package`.\n* `--android-abi`\n  * Android system image abi, i.e. `google_apis/x86_64`.\n* `--path-to-config-ini`\n  * Path either relative or absolute to the file that will be used as `config.ini` for created emulator.\n  * Easiest way to get `config.ini` is to create AVD on your machine using Android Studio and then copy config from `~/.android/avd/device_name.avd/config.ini`.\n  * We recommend to keep `config.ini` in version control so your team members could review it and builds will be reproducible.\n\n###### Optional\n\n* `--help, -help, help, -h`\n  * Print help and exit.\n* `--emulator-start-options`\n  * Options to pass to `emulator -avd \\$emulatorName` command, i.e. `--no-window -prop persist.sys.language=en -prop persist.sys.country=US`.\n* `--emulator-start-timeout-seconds`\n  * Timeout to wait for emulator to finish boot. Default value is 180 seconds.\n* `--redirect-logcat-to`\n  * Path either relative or absolute to the file that will be used to redirect logcat of started emulator to. No redirection will happen if parameter is not presented.\n* `--keep-existing-avds`\n  * Avoid recreating avds and reuse existing ones whenever possible.\n\n##### Examples\n\n###### Start one emulator\n\n```console\njava -jar swarmer.jar start \\\n--emulator-name test_emulator_1 \\\n--package \"system-images;android-25;google_apis;x86\" \\\n--android-abi google_apis/x86_64 \\\n--path-to-config-ini emulator_config.ini \\\n--emulator-start-options -prop persist.sys.language=en -prop persist.sys.country=US \\\n--redirect-logcat-to test_emulator_1_logcat.txt\n```\n\n###### Start two emulators in parallel\n\n```console\njava -jar swarmer.jar start \\\n--emulator-name test_emulator_1 \\\n--package \"system-images;android-25;google_apis;x86\" \\\n--android-abi google_apis/x86_64 \\\n--path-to-config-ini emulator_config1.ini \\\n--emulator-start-options -prop persist.sys.language=en -prop persist.sys.country=US \\\n--redirect-logcat-to test_emulator_1_logcat.txt \\\n--emulator-name test_emulator_2 \\\n--package \"system-images;android-23;google_apis;x86\" \\\n--android-abi google_apis/x86_64 \\\n--path-to-config-ini emulator_config2.ini \\\n--emulator-start-options -prop persist.sys.language=en -prop persist.sys.country=US \\\n--redirect-logcat-to test_emulator_2_logcat.txt\n```\n\n###### Start two emulators sequentially\n\n```console\njava -jar swarmer.jar start \\\n--emulator-name test_emulator_1 \\\n--android-target android-25 \\\n--android-abi google_apis/x86_64 \\\n--path-to-config-ini emulator_config.ini \\\n--emulator-start-options -prop persist.sys.language=en -prop persist.sys.country=US \\\n--redirect-logcat-to test_emulator_1_logcat.txt\n\njava -jar swarmer.jar start \\\n--emulator-name test_emulator_2 \\\n--package \"system-images;android-23;google_apis;x86\" \\\n--android-abi google_apis/x86_64 \\\n--path-to-config-ini emulator_config2.ini \\\n--emulator-start-options -prop persist.sys.language=en -prop persist.sys.country=US \\\n--redirect-logcat-to test_emulator_2_logcat.txt\n```\n\n#### Stop\n\n```console\njava -jar swarmer.jar stop …\n```\n\n##### Options\n\n###### Optional\n\n* `--timeout`\n  * Timeout for emulators to stop in seconds, default is 15 seconds.\n\n###### Stop all running emulators\n\n```console\njava -jar swarmer.jar stop --timeout 10\n```\n\n### Download\n\nSwarmer is [available on jcenter](https://jcenter.bintray.com/com/gojuno/swarmer).\n\n\u003eYou can download it in your CI scripts or store it in your version control system (not recommended).\n\n```console\nSWARMER_VERSION=some-version\ncurl --fail --location https://jcenter.bintray.com/com/gojuno/swarmer/swarmer/${SWARMER_VERSION}/swarmer-${SWARMER_VERSION}.jar --output /tmp/swarmer.jar\n```\n\nAll the releases and changelogs can be found on [Releases Page](https://github.com/gojuno/swarmer/releases).\n\n### Composer\n\nSwarmer works great in combination with [Composer][composer] — another tool we've built at Juno.\n\n[Composer][composer] can run Android Instrumentation tests in parallel on multiple connected devices/emulators. In our [CI Pipeline][ci pipeline] we start emulators with Swarmer and then Composer runs tests on them.\n\n### How to build\n\nDependencies: you only need `docker` and `bash` installed on your machine.\n\n```console\nbash ci/build.sh\n```\n\n## License\n\n```\nCopyright 2017 Juno, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[composer]: https://github.com/gojuno/composer\n[ci pipeline]: https://github.com/gojuno/engineering/tree/master/articles/ci_pipeline_and_custom_tools_of_android_projects\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojuno%2Fswarmer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgojuno%2Fswarmer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojuno%2Fswarmer/lists"}