• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

x86_64/14-Jan-2024-8165

README.mdD14-Jan-20242.6 KiB7463

aaos-sys-img2-1.xmlD14-Jan-202417.7 KiB178100

create_avd_config.shD14-Jan-20242.7 KiB9761

git_clone_projects.shD14-Jan-20241.7 KiB6337

mk_car_avd.shD14-Jan-202461 11

pack_avd_img.shD14-Jan-20243.1 KiB10158

remount.shD14-Jan-20241,010 3012

run_local_avd.shD14-Jan-20242.6 KiB11069

test_pack_avd_img.shD14-Jan-20241.3 KiB4521

test_run_local_avd.shD14-Jan-20241.2 KiB3917

README.md

1# AAOS car AVD tools
2This folder contains scripts to help you to build, run and share car AVD images. We intentailly keep this on the AOSP main trunk for vairous branches from Android 10.
3
4## Download the tools
5- To clone the tool only: git_clone_projects.sh
6- Link it into an Android source tree, e.g.:
7```
8ln -s $HOME/avd/car/tools $ANDROID_BUILD_TOP/device/generic/car/tools
9```
10
11## Build an AVD image
12This builds AOSP car x86_64 userdebug AVD.
13```
14. device/generic/car/tools/mk_car_avd.sh
15```
16
17## Pack an AVD image
18The standard way to pack an AVD image is to build emu_img_zip target. Whereas this script is just for a quick validation on other host via Android Emulator during development. Which can pack necessary image files to $HOME/Downloads/x86_64
19```
20device/generic/car/tools/test_pack_avd_img.sh
21```
22* You can use it as an example to create your own script for an AVD target by pack_avd_img.sh.
23* pack_avd_img.sh contains brief descriptions of each file needed.
24* AVD device profile example: x86_64/devices.xml
25* SDK addon xml example: aaos-sys-img2-1.xml
26  * You should edit the xml, e.g. ZIP_FILE_SIZE, SHASUM, zip url & etc. accordingly.
27
28## Start an AVD
29
30### New AVD config
31To create a clean local AVD config and run with the latest Android Emulator engine from the SDK.
32```
33device/generic/car/tools/test_run_local_avd.sh
34```
35
36To run the existing AVD config.
37```
38device/generic/car/tools/run_local_avd.sh
39```
40
41### Multiple AVDs
42run_local_avd.sh allows you to setup and run multiple AVDs. You can crease a script for each of them. e.g.
43```
44AVD_IMAGE_DIR=$HOME/avd/aosp_car_x86_64/x86_64 \
45  WORKDIR=$HOME/avd/aosp_car_x86_64 \
46  ABI="x86_64" \
47  $SCRIPT_DIR/tools/run_local_avd.sh
48```
49* Deleting the WORKDIR will let the script create it from scratch next time as the 1st run.
50
51### Change the config
52The default AVD config.ini are created as the following default settings at the 1st run. You can also change them at the 1st run, e.g.
53```
54ANDROID_SDK_ROOT="/Users/$USER/Library/Android/sdk" \
55  WORKDIR="$HOME/avd/aosp_car_x86_64" \
56  AVD_IMAGE_DIR="$HOME/avd/aosp_car_x86_64/x86_64" \
57  ABI="x86_64" \
58  DISPLAY_DENSITY=213 \
59  DISPLAY_WIDTH=1920 \
60  DISPLAY_HEIGHT=1080 \
61  RAM_MB=3584 \
62  ./run_local_avd.sh
63```
64
65The AVD can also be changed by editing the AVD config.ini directily, e.g. at:
66```
67$WORKDIR/.android/avd/my_car_avd_x86_64.avd/config.ini
68```
69
70### Android Emulator startup options
71You can append [Android Emulator Command-line startup options](https://developer.android.com/studio/run/emulator-commandline#common) as needed. E.g.
72  * to wipe user data:  ./run_local_avd.sh -wipe-data
73  * to cold boot: ./run_local_avd.sh -no-snapshot-load
74