Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
x86_64/ | 14-Jan-2024 | - | 81 | 65 | ||
README.md | D | 14-Jan-2024 | 2.6 KiB | 74 | 63 | |
aaos-sys-img2-1.xml | D | 14-Jan-2024 | 17.7 KiB | 178 | 100 | |
create_avd_config.sh | D | 14-Jan-2024 | 2.7 KiB | 97 | 61 | |
git_clone_projects.sh | D | 14-Jan-2024 | 1.7 KiB | 63 | 37 | |
mk_car_avd.sh | D | 14-Jan-2024 | 61 | 1 | 1 | |
pack_avd_img.sh | D | 14-Jan-2024 | 3.1 KiB | 101 | 58 | |
remount.sh | D | 14-Jan-2024 | 1,010 | 30 | 12 | |
run_local_avd.sh | D | 14-Jan-2024 | 2.6 KiB | 110 | 69 | |
test_pack_avd_img.sh | D | 14-Jan-2024 | 1.3 KiB | 45 | 21 | |
test_run_local_avd.sh | D | 14-Jan-2024 | 1.2 KiB | 39 | 17 |
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