avd_name=my_avd
api_level=23
abi=x86_64
tag=google_apis
device="Nexus 5" # list of available devices see below
${ANDROID_HOME}/tools/bin/avdmanager --verbose create avd --name ${avd_name} \
--package "system-images;android-${api_level};${tag};${abi}" \
--device "$device"
Note that -skin
option can be resolution (in the form 'height'x'width') of emulator rather than real skin name
${ANDROID_HOME}/tools/emulator @${avd_name} -skin "1920x1080"
The valid device names are hardcoded in ${ANDROID_HOME}/tools/lib/sdklib-26.0.0-dev.jar
where 26.0.0
can be replaced by your build tools version.
Extract the following files:
jar -xf ${ANDROID_HOME}/tools/lib/sdklib-26.0.0-dev.jar com/android/sdklib/devices
grep -r "d:id" com/android/sdklib/devices/*.xml | sed 's/^.*\<d:id\>//g' | sed 's/\<\/d:id\>//g'
The list for my SDK is:
2.7in QVGA
2.7in QVGA slider
3.2in HVGA slider (ADP1)
3.2in QVGA (ADP2)
3.3in WQVGA
3.4in WQVGA
3.7in WVGA (Nexus One)
3.7 FWVGA slider
4in WVGA (Nexus S)
4.65in 720p (Galaxy Nexus)
4.7in WXGA
5.1in WVGA
5.4in FWVGA
7in WSVGA (Tablet)
10.1in WXGA (Tablet)
Nexus 7
Nexus 7 2013
Nexus 5
Nexus 6
Nexus 9
Nexus 5X
Nexus 6P
pixel_c
pixel
pixel_xl
tv_1080p
tv_720p
wear_square
wear_round
wear_round_chin_320_290