Commit f5faf238 authored by Haiyang Pan's avatar Haiyang Pan Committed by Commit Bot

Reorder the "Prerequisite" for android emulator doc.

Also add the marshmallow config & builder to the table,
and the doc for `--debug-tags` option

Change-Id: Ife316d632342025899faf4b921f83b9d009ed32d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523358Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: Haiyang Pan <hypan@google.com>
Cr-Commit-Position: refs/heads/master@{#824922}
parent ebd0dc7a
...@@ -20,12 +20,36 @@ currently stored in `//tools/android/avd/proto`. ...@@ -20,12 +20,36 @@ currently stored in `//tools/android/avd/proto`.
| File | Builder | | File | Builder |
|:----:|:-------:| |:----:|:-------:|
| `tools/android/avd/proto/generic_android23.textpb` | [android-marshmallow-x86-rel][android-marshmallow-x86-rel] |
| `tools/android/avd/proto/generic_android28.textpb` | [android-pie-x86-rel][android-pie-x86-rel] | | `tools/android/avd/proto/generic_android28.textpb` | [android-pie-x86-rel][android-pie-x86-rel] |
| `tools/android/avd/proto/generic_playstore_android28.textpb` | [android-pie-x86-rel][android-pie-x86-rel] |
You can use these configuration files to run the same emulator images locally. You can use these configuration files to run the same emulator images locally.
[android-marshmallow-x86-rel]: https://ci.chromium.org/p/chromium/builders/ci/android-marshmallow-x86-rel
[android-pie-x86-rel]: https://ci.chromium.org/p/chromium/builders/ci/android-pie-x86-rel [android-pie-x86-rel]: https://ci.chromium.org/p/chromium/builders/ci/android-pie-x86-rel
#### Prerequisite
* Make sure KVM (Kernel-based Virtual Machine) is enabled.
See this
[link](https://developer.android.com/studio/run/emulator-acceleration#vm-linux)
from android studio for more details and instructions.
* You need to have the permissions to use KVM.
Use the following command to see if you are in group `kvm`:
```
$ grep kvm /etc/group
```
If your username is not shown in the group, add yourself to the group:
```
$ sudo adduser $USER kvm
$ newgrp kvm
```
#### Running via the test runner #### Running via the test runner
The android test runner can run emulator instances on its own. In doing so, it The android test runner can run emulator instances on its own. In doing so, it
...@@ -70,33 +94,14 @@ down. This is how builders run the emulator. ...@@ -70,33 +94,14 @@ down. This is how builders run the emulator.
The test runner will set up and tear down the emulator on each invocation. The test runner will set up and tear down the emulator on each invocation.
To manage emulator lifetime independently, use `tools/android/avd/avd.py`. To manage emulator lifetime independently, use `tools/android/avd/avd.py`.
##### Prerequisite > Note: Before calling `avd.py start`, use `avd.py install` to install the
> emulator configuration you intend to use. Otherwise the emulator won't start
* Make sure KVM (Kernel-based Virtual Machine) is enabled. > correctly.
See this >
[link](https://developer.android.com/studio/run/emulator-acceleration#vm-linux) > ```
from android studio for more details and instructions. > $ tools/android/avd/avd.py install \
> --avd-config tools/android/avd/proto/generic_android28.textpb
* You need to have the permissions to use KVM. > ```
Use the following command to see if you are in group `kvm`:
```
$ grep kvm /etc/group
```
If your username is not shown in the group, add yourself to the group:
```
$ sudo adduser $USER kvm
$ newgrp kvm
```
* Install the emulator configuration you intend to use.
```
$ tools/android/avd/avd.py install \
--avd-config tools/android/avd/proto/generic_android28.textpb
```
##### Options ##### Options
...@@ -134,6 +139,18 @@ To manage emulator lifetime independently, use `tools/android/avd/avd.py`. ...@@ -134,6 +139,18 @@ To manage emulator lifetime independently, use `tools/android/avd/avd.py`.
--no-read-only --no-read-only
``` ```
* `--debug-tags`
`avd.py` disables the emulator log by default. When this option is used,
emulator log will be enabled. It is useful when the emulator cannot be
launched correctly. See `emulator -help-debug-tags` for a full list of tags.
```
$ tools/android/avd/avd.py start \
--avd-config tools/android/avd/proto/generic_android28.textpb \
--debug-tags init,snapshot
```
### Using Your Own Emulator Image ### Using Your Own Emulator Image
By far the easiest way to set up emulator images is to use Android Studio. By far the easiest way to set up emulator images is to use Android Studio.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment