mirror of
https://github.com/ARM-software/devlib.git
synced 2025-09-01 17:41:54 +01:00
tools/android: Add support for creating Android virtual devices
Introduce ``tools/android/install_base.sh`` [1] script to install Android command line tools including necessary platforms and system-images for Linux and create Android Virtual Devices (AVD) for Pixel 6 with Android v12 & v14 as well as an Android virtual *desktop* device (v13) for ChromeOS tests. [1] Forked from https://github.com/ARM-software/lisa/blob/main/install_base.sh Signed-off-by: Metin Kaya <metin.kaya@arm.com>
This commit is contained in:
43
doc/tools.rst
Normal file
43
doc/tools.rst
Normal file
@@ -0,0 +1,43 @@
|
||||
Tools
|
||||
=====
|
||||
|
||||
Android
|
||||
-------
|
||||
|
||||
``tools/android/install_base.sh`` script installs Android command line tools
|
||||
for Linux and creates Android Virtual Devices (AVD).
|
||||
|
||||
The script creates ``android-sdk-linux`` directory under ``tools/android`` and
|
||||
sets it as ``ANDROID_HOME`` directory (see
|
||||
https://developer.android.com/tools/variables).
|
||||
|
||||
Your ``ANDROID_USER_HOME`` and ``ANDROID_EMULATOR_HOME`` environment variables
|
||||
point to ``tools/android/android-sdk-linux/.android``. Hence, removing
|
||||
``android-sdk-linux`` folder will clean all artefacts of ``install_base.sh``.
|
||||
|
||||
It fetches Android command line tools, then installs Android SDK
|
||||
Platform-Tools, SDK Platform 31 (for Android 12) & 34 (for Android 14), and
|
||||
Google APIs for platforms 31 & 34 for the associated ABI type.
|
||||
|
||||
Finally the script creates AVDs per Pixel 6 for Android 12 & 14.
|
||||
|
||||
Shell commands below illustrate how to list available AVDs and run them via
|
||||
Android emulator:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
ANDROID_HOME="/devlib/tools/android/android-sdk-linux"
|
||||
export ANDROID_HOME
|
||||
EMULATOR="${ANDROID_HOME}/emulator/emulator"
|
||||
|
||||
export ANDROID_EMULATOR_HOME="${ANDROID_HOME}/.android"
|
||||
|
||||
# List available AVDs:
|
||||
${EMULATOR} -list-avds
|
||||
|
||||
# Run devlib-p6-14 AVD in emulator:
|
||||
${EMULATOR} -avd devlib-p6-14 -no-window -no-snapshot -memory 2048 &
|
||||
|
||||
# After ~30 seconds, the emulated device will be ready:
|
||||
adb -s emulator-5554 shell "lsmod"
|
||||
|
Reference in New Issue
Block a user