You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace `YourAVDName` with the name of your Android Virtual Device (AVD) and `/path/to/emulator` with the actual path where you extracted the emulator files.
35
+
Replace `YourAVDName` with the name of your Android Virtual Device (AVD) and `/path/to/emulator` with the actual path where you extracted the emulator files. Ensure that the Android version used to create `YourAVDName` matches the Android version of the emulator image.
36
+
37
+
### Building
38
+
To create a secure Android emulator image with the latest security patches, follow these steps:
Replace `android-14.0.0_r1` with the desired Android version.
46
+
47
+
1. Identify the latest security patch tag from the[`platform_build`](https://github.com/aosp-mirror/platform_build/tags) repository on GitHub. For example, [`android-security-14.0.0_r9`](https://github.com/aosp-mirror/platform_build/releases/tag/android-security-14.0.0_r9):
48
+
49
+
2. Fetch the security patch tag across all AOSP repositories:
4. Merge the security patch into the AOSP repositories:
64
+
65
+
```shell
66
+
repo forall -p -c 'git merge FETCH_HEAD'
67
+
```
68
+
69
+
5. Modify the security patch date in the emulator image:
70
+
71
+
In the `build/make/core/version_defaults.mk` file, locate the `ro.build.version.security_patch` variable and change its value to the desired security patch date, e.g., `2024-06-05`.
72
+
73
+
6. Build the Android emulator image:
74
+
75
+
For Android 13 and above:
76
+
77
+
```shell
78
+
source ./build/envsetup.sh
79
+
lunch sdk_phone_x86-userdebug
80
+
make emu_img_zip -j$(nproc)
81
+
```
82
+
83
+
This generates an `sdk-repo-linux-system-images-eng.[username]].zip` file.
84
+
85
+
For Android 12 and below:
86
+
87
+
```shell
88
+
source build/envsetup.sh
89
+
lunch sdk_phone_x86_64-userdebug
90
+
make -j$(nproc) sdk sdk_repo
91
+
```
92
+
93
+
The `make sdk sdk_repo` command creates two files under `aosp-main/out/host/linux-x86/sdk/sdk_phone_x86_64`:
0 commit comments