Last active
August 29, 2025 02:51
-
Star
(457)
You must be signed in to star a gist -
Fork
(100)
You must be signed in to fork a gist
-
-
Save mrk-han/66ac1a724456cadf1c93f4218c6060ae to your computer and use it in GitHub Desktop.
Revisions
-
Mark Han revised this gist
Oct 7, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ I recommend always using the new `google_atd` or `aosp_atd` images when possible **Note**: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) Passing in a device will make the Emulator settings (usually found in the `~/.android/avd/emulator.avd/config.ini` file) try to mimic that device. It is not actually the device. But, certain settings like pixel density, resolution, memory, partition size, etc will be changed. Generally the lower resolution devices will be less taxing on your CPU resources on CI, and are preferred especially without GPU/Hardware acceleration. ## Continued... -
Mark Han revised this gist
Oct 7, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5_api30_google_atd_emulator" --package "system-images;android-30;google_atd;arm64-v8a" --tag "google_atd" --abi "arm64-v8a" --device "pixel_5"` **For M1/M2 Macbooks**, use `arm64-v8a` as your "tag" or "target". **For Intel Macbooks** use `x86`. -
Mark Han revised this gist
Oct 7, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,8 @@ I recommend always using the new `google_atd` or `aosp_atd` images when possible **Note**: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) Passing in a device will make the Emulator settings (found in the ~/.android/avd/emulator.avd/config.ini` file) try to mimic that device. It is not actually the device. But, certain settings like pixel density, resolution, memory, partition size, etc will be changed. Generally the lower resolution devices will be less taxing on your CPU resources on CI, and are preferred especially without GPU/Hardware acceleration. ## Continued... For generic skin emulator with default apis (without google apis) for use with Intel Macbook on CI (Can use google_atd too): -
Mark Han revised this gist
Oct 6, 2022 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,11 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5_api30_google_atd_emulator" --package "system-images;android-30;google_atd;arm64-v8a" --tag "google_atd" --abi "arm64-v8a" --device "pixel_5"` **For M1/M2 Macbooks**, use `arm64-v8a`. **For Intel Macbooks** use `x86`. I recommend always using the new `google_atd` or `aosp_atd` images when possible. In my benchmarks, they are about 40% more efficient than the `google_apis` image. **Note**: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) -
Mark Han revised this gist
Oct 6, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5_api30_google_atd_emulator" --package "system-images;android-30;google_atd;arm64-v8a" --tag "google_atd" --abi "arm64-v8a" --device "pixel_5"` For M1/M2 Macbooks, use arm64-v8a. For Intel Macbooks use x86. I recommend always using the new `google_atd` or `aosp_atd` images when possible. They saved 10 minutes on my 25 minute benchmark with Github Actions using the macos-latest Agent. The new run finished in 15 instead of 25 minutes =~ 40% more efficient. **Note**: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) -
Mark Han revised this gist
Oct 6, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5_api30_google_atd_emulator" --package "system-images;android-30;google_atd;arm64-v8a" --tag "google_atd" --abi "arm64-v8a" --device "pixel_5"` For M1/M2 Macbooks, use arm64-v8a. For Intel Macbooks use x86. Google_ATD image saved 10 minutes on my 25 minute benchmark with Github Actions using the macOS Agent. The new run finished in 15 minutes, or was about 40% more efficient. **Note**: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) -
Mark Han revised this gist
Oct 6, 2022 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,23 +6,23 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` 2. **Download Image:** `sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5_api30_google_atd_emulator" --package "system-images;android-30;google_atd;arm64-v8a" --tag "google_atd" --abi "arm64-v8a" --device "pixel_5"` For M1/M2 Macbooks, use arm64-v8a. For Intel Macbooks use x86. Google_ATD image saved 8 minutes on my 28 minute benchmark with Github Actions using the macOS Agent. **Note**: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) ## Continued... For generic skin emulator with default apis (without google apis) for use with Intel Macbook on CI (Can use google_atd too): 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` 2. **Download Image:** `sdkmanager --install "system-images;android-30;aosp_atd;x86"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "generic_api30_aosp_atd_emulator" --package "system-images;android-30;aosp_atd;x86" --tag "aosp_atd" --abi "x86"` If you do not use the --device flag, I recommend adding these lines to: ~/.android/avd/generic_10.avd/config.ini or else your emulator will have a very low resolution. Note: Increasing resolution will decrease performance on CI. @@ -35,7 +35,7 @@ For generic skin emulator with default apis (without google apis): Keep in mind, you can also pass the --device flag and use a device name from the avdmanager list device command which should also set a default resolution because it will inherit the set of properties of that "device" in the config.ini. 4. **Run Emulator:** `emulator @generic_api30_aosp_atd_emulator &` or `emulator @pixel_5_google_atd_emulator &` ### Docs -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -72,4 +72,5 @@ Output of ``sdkmanager --list | grep atd``: system-images;android-30;google_atd;x86 | 1 | Google APIs ATD Intel x86 Atom System Image ``` 2) `avdmanager list device` is great to figure out which emulators you can create 3) The newest cmdline-tools located at `$HOME/Library/Android/sdk/cmdline-tools/latest/bin` were created for Java 9/10/11. If you are running into issues running sdkmanager, make sure to update your path in your `~/.zshrc` to the tools to the new tools if you are on Java 11, e.g. `export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin`. If you are still on Java 8, you can use the old tools. -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5" --package "system-images;android-33;google_apis;arm64-v8a" --tag "google_apis" --abi "arm64-v8a" --device "pixel_5"` For M1/M2 Macbooks, use arm64-v8a. For old Intel Macbooks use x86_64. Generally prefer x86_64 over x86. **Note**: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu For M1/M2 Macbooks, use arm64-v8a. For old Intel Macbooks use x86_64. **Note**: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) ## Continued... -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu For M1/M2 Macbooks, use arm64-v8a. For old Intel Macbooks use x86_64. Note: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. (This includes tablets, etc) ## Continued... -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,8 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5" --package "system-images;android-33;google_apis;arm64-v8a" --tag "google_apis" --abi "arm64-v8a" --device "pixel_5"` For M1/M2 Macbooks, use arm64-v8a. For old Intel Macbooks use x86_64. Note: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. ## Continued... -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,8 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu Note: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. ## Continued... For generic skin emulator with default apis (without google apis): 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -55,8 +55,12 @@ Add aliases to your `~/.zshrc` or `~/.bashrc` to run the emulators with paramete You can pass the `-read-only` parameter when starting up an emulator `emulator @pixel_5 -read-only` to run multiple devices at the same time. ### Other 1) aosp_atd and google_atd system images are only available on x86 and ARM architecture at API level 30. See also: https://android-developers.googleblog.com/2021/10/whats-new-in-scalable-automated-testing.html Output of ``sdkmanager --list | grep atd``: ``` system-images;android-30;aosp_atd;arm64-v8a | 1 | AOSP ATD ARM 64 v8a System Image system-images;android-30;aosp_atd;x86 | 1 | AOSP ATD Intel x86 Atom System Image -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,11 +36,11 @@ For generic skin emulator with default apis (without google apis): ### Docs See: [Google's Emulator CLI Documentation](https://developer.android.com/studio/run/emulator-commandline) for more info. See: [Google's AVDManager Documentation](https://developer.android.com/studio/command-line/avdmanager) for more info. See: [Google's SDKManager Documentation](https://developer.android.com/studio/command-line/sdkmanager) for more info. ### Aliases -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,9 +36,11 @@ For generic skin emulator with default apis (without google apis): ### Docs See: [Google Documentation on Start the emulator from the command line](https://developer.android.com/studio/run/emulator-commandline) for more info. See: [AVDManager Documentation](https://developer.android.com/studio/command-line/avdmanager) for more info. See: [SDKManager Documentation](https://developer.android.com/studio/command-line/sdkmanager) for more info. ### Aliases -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,6 +37,8 @@ For generic skin emulator with default apis (without google apis): ### Docs See: [Google Documentation on Start the emulator from the command line](https://developer.android.com/studio/run/emulator-commandline) for more info See: https://developer.android.com/studio/command-line/avdmanager for more info on AVDManager. See; https://developer.android.com/studio/command-line/sdkmanager for more info on SDKManager. ### Aliases -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 18 additions and 54 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,8 @@ For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architectu 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5" --package "system-images;android-33;google_apis;arm64-v8a" --tag "google_apis" --abi "arm64-v8a" --device "pixel_5"` Note: To check which devices you can create from the command line, run `avdmanager list device`and pass in the device name as the value of --device, e.g. `--device "pixel_5"` at the end of the command on step 3. For generic skin emulator with default apis (without google apis): 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` @@ -32,68 +34,30 @@ For generic skin emulator with default apis (without google apis): 4. **Run Emulator:** `emulator @generic_api31_emulator &` or `emulator @pixel_5 &` ### Docs See: [Google Documentation on Start the emulator from the command line](https://developer.android.com/studio/run/emulator-commandline) for more info ### Aliases Add aliases to your `~/.zshrc` or `~/.bashrc` to run the emulators with parameters more easily. `alias generic_api31_emulator='emulator @generic_api31_emulator -no-boot-anim -netdelay none -no-snapshot -wipe-data -skin 768x1280 &'` `alias pixel_5 ='emulator @pixel_5 -no-boot-anim -netdelay none -no-snapshot -wipe-data &'` ### Starting multiple emulators You can pass the `-read-only` parameter when starting up an emulator `emulator @pixel_5 -read-only` to run multiple devices at the same time. ### Other 1) aosp_atd and google_atd system images are only available on x86 and ARM architecture at API level 30. `sdkmanager --list | grep atd` See also: https://android-developers.googleblog.com/2021/10/whats-new-in-scalable-automated-testing.html ``` system-images;android-30;aosp_atd;arm64-v8a | 1 | AOSP ATD ARM 64 v8a System Image system-images;android-30;aosp_atd;x86 | 1 | AOSP ATD Intel x86 Atom System Image system-images;android-30;google_atd;arm64-v8a | 1 | Google APIs ATD ARM 64 v8a System Image system-images;android-30;google_atd;x86 | 1 | Google APIs ATD Intel x86 Atom System Image ``` 2) `avdmanager list device` is great to figure out which emulators you can create -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,21 +2,21 @@ ## TL;DR For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook): 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` 2. **Download Image:** `sdkmanager --install "system-images;android-33;google_apis;arm64-v8a"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5" --package "system-images;android-33;google_apis;arm64-v8a" --tag "google_apis" --abi "arm64-v8a" --device "pixel_5"` For generic skin emulator with default apis (without google apis): 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` 2. **Download Image:** `sdkmanager --install "system-images;android-31;default;x86_64"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "generic_api31_emulator" --package "system-images;android-31;default;x86_64" --tag "default" --abi "x86_64"` If you do not use the --device flag, I recommend adding these lines to: ~/.android/avd/generic_10.avd/config.ini or else your emulator will have a very low resolution. Note: Increasing resolution will decrease performance on CI. -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ For generic skin emulator with default apis (without google apis): 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "generic_api31_emulator" --package "system-images;android-31;default;x86_64" --tag "default" --abi "x86_64"` For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook): 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ For generic skin emulator with default apis (without google apis): 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "generic_api31_emulator" --package "system-images;android-31;default;x86_64" --tag "default" --abi "x86_64"` For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1 Macbook): 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs: 2. **Download Image:** `sdkmanager --install "system-images;android-33;google_apis;arm64-v8a"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5" --package "system-images;android-33;google_apis;arm64-v8a" --tag "google_apis" --abi "arm64-v8a" --device "pixel_5"` If you do not use the --device flag, I recommend adding these lines to: ~/.android/avd/generic_10.avd/config.ini or else your emulator will have a very low resolution. Note: Increasing resolution will decrease performance on CI. -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs: 2. **Download Image:** `sdkmanager --install "system-images;android-33;google_apis;arm64-v8a"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5" --package "system-images;android-33;google_apis;arm64-v8a" --tag "google_apis" --abi "arm64-v8a" --profile "pixel_5"` If you do not use the --device flag, I recommend adding these lines to: ~/.android/avd/generic_10.avd/config.ini or else your emulator will have a very low resolution. Note: Increasing resolution will decrease performance on CI. -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs: 2. **Download Image:** `sdkmanager --install "system-images;android-33;google_apis;arm64-v8a"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5" --package "system-images;android-33;google_apis;arm64-v8a" --tag "google_apis" --abi "arm64-v8a" --profile pixel_5` If you do not use the --device flag, I recommend adding these lines to: ~/.android/avd/generic_10.avd/config.ini or else your emulator will have a very low resolution. Note: Increasing resolution will decrease performance on CI. -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ For an emulator that mimics a Pixel 5 Device with Google APIs: Keep in mind, you can also pass the --device flag and use a device name from the avdmanager list device command which should also set a default resolution because it will inherit the set of properties of that "device" in the config.ini. 4. **Run Emulator:** `emulator @generic_api31_emulator &` or `emulator @pixel_5 &` -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 14 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,11 +6,20 @@ For generic skin emulator with default apis (without google apis): 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` 2. **Download Image:** `sdkmanager --install "system-images;android-31;default;x86_64"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "generic_api31_emulator" --package "system-images;android-31;default;x86_64" --tag "default" --abi "x86_64"` For an emulator that mimics a Pixel 5 Device with Google APIs: 1. **List All System Images Available for Download:** `sdkmanager --list | grep system-images` 2. **Download Image:** `sdkmanager --install "system-images;android-33;google_apis;arm64-v8a"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "pixel_5" --package "system-images;android-33;google_apis;arm64-v8a" --tag "google_apis" --abi "x86_64" --profile pixel_5` If you do not use the --device flag, I recommend adding these lines to: ~/.android/avd/generic_10.avd/config.ini or else your emulator will have a very low resolution. Note: Increasing resolution will decrease performance on CI. skin.name=1080x1920 # proper screen size for emulator hw.lcd.density=480 @@ -22,6 +31,8 @@ For generic skin emulator with default apis (without google apis): 4. **Run Emulator:** `emulator @generic_10 &` ## About - The goal of this gist is to quickly pre-install a range of system images to provide our project teams the ability to run emulators on a range of API levels, from API 19 to API 28. -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 8 additions and 101 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,9 @@ For generic skin emulator with default apis (without google apis): 2. **Download Image:** `sdkmanager --install "system-images;android-29;default;x86"` 3. **Create Emulator:** `echo "no" | avdmanager --verbose create avd --force --name "generic_10" --package "system-images;android-29;default;x86_64" --tag "default" --abi "x86_64"` If you do not use the --device flag, I recommend adding these lines to: ~/.android/avd/generic_10.avd/config.ini or else your emulator will have a very low resolution. However, increasing resolution will decrease performance on CI. skin.name=1080x1920 # proper screen size for emulator hw.lcd.density=480 @@ -41,135 +41,42 @@ See: [Google Documentation on Start the emulator from the command line](https:// - Instead of using `emulator @{EMULATOR NAME}` to run devices, you can use the aliases if they are added. - If you run this locally, you can use the `-read-only` parameter to run multiple devices at the same time. You can then manually run automation against various APIs for added device coverage during regression. ## Step 1 - Install the variant you want with SDKManager. ### OREO (8.1) API 27 `sdkmanager --install "system-images;android-27;google_apis;x86_64"` ### PIE (9.0) API 28 `sdkmanager --install "system-images;android-28;google_apis;x86_64"` ## Step 2 - Use AVDMANAGER to create emulators ### Pixel Emulator with Google Apis and x86 architecture `echo "no" | avdmanager --verbose create avd --force --name "pixel_9.0" --device "pixel" --package "system-images;android-28;google_apis;x86_64" --tag "google_apis" --abi "x86_64"` ### Generic Emulator with Google Apis `echo "no" | avdmanager --verbose create avd --force --name "generic_9.0" --package "system-images;android-28;google_apis;x86_64" --tag "google_apis" --abi "x86_64"` ## Extra Steps - Aliases and notes on resolutions ### Aliases to run emulators more optimally **Note:** Add this alias to `~/.bashrc` or `~/.zshrc`, or just run using these parameters for best results. `-skin 768x1280` is useful to run default emulators successfully because they have a very low resolution out-of-the-box. `alias generic_9.0='emulator @generic_9.0 -no-boot-anim -netdelay none -no-snapshot -wipe-data -skin 768x1280 &'` **Note:** Add this alias to `~/.bashrc` or `~/.zshrc`, or just run using these parameters for results. Pixel emulators should run at default resolution of 1080x1920 by default, but can specify this just in-case with the parameter: `-skin 1080x1920` `alias pixel_9.0 ='emulator @pixel_9.0 -no-boot-anim -netdelay none -no-snapshot -wipe-data -skin 1080x1920 &'` **Note** You can run all of the emulators above with a `-read-only` parameter to run multiple emulators at the same time, but this is an experimental feature right now. ## Other 1) aosp_atd and google_atd system images are only available on x86 and ARM architecture at API level 30. 2) `emulator -list-avds` will print list of available devices 3) `avdmanager list` , `avdmanager list target`, `avdmanager list devices` , `avdmanager list avd` -
Mark Han revised this gist
Oct 5, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,6 +17,8 @@ For generic skin emulator with default apis (without google apis): hw.keyboard=yes # enables keys from your laptop to be sent to the emulator If you cannot do this, you can still pass -skin 1080x1920 as an argument when starting the emulator. Keep in mind, you can also pass the --device flag and use a device name from the avdmanager list device command which should also set a default resolution because it will inherit the set of properties of that "device" in the config.ini. 4. **Run Emulator:** `emulator @generic_10 &` -
Mark Han revised this gist
Sep 2, 2022 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,6 @@ For generic skin emulator with default apis (without google apis): - The goal of this gist is to quickly pre-install a range of system images to provide our project teams the ability to run emulators on a range of API levels, from API 19 to API 28. - These can be run locally or on the base build agent. - We create two sets of emulators here, one set with pixel hardware emulation and one set with default oem emulation. See: [Google Documentation on Start the emulator from the command line](https://developer.android.com/studio/run/emulator-commandline) for more info -
Mark Han revised this gist
Jan 30, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,8 @@ For generic skin emulator with default apis (without google apis): skin.name=1080x1920 # proper screen size for emulator hw.lcd.density=480 hw.keyboard=yes # enables keys from your laptop to be sent to the emulator If you cannot do this, you can still pass -skin 1080x1920 as an argument when starting the emulator. 4. **Run Emulator:** `emulator @generic_10 &`
NewerOlder