I know I can start the emulator avd by typing
我知道我可以通过打字启动模拟器avd
emulator.exe @avdname
But is there a command to list the available avdnames? Where are this avd configuration stored?
但是有命令列出可用的avdnames吗?这个avd配置存储在哪里?
6 个解决方案
#1
107
AFAIK
android list avd
avdmanager list avd
is what you need.
AFAIK android列表avd avdmanager列表avd是你需要的。
#2
50
Using sdk/tools/emulator
使用sdk / tools / emulator
This will list all available avds
这将列出所有可用的avds
emulator -list-avds
#3
15
I try few combination and it worked :), it was pretty obvious
我尝试了几个组合,它工作:),这是非常明显的
android list avd
the output is something like this
输出是这样的
Available Android Virtual Devices:
Name: EMULLL
Path: /home/krste_ristevski/.android/avd/EMULLL.avd
Target: Android 2.3.3 (API level 10)
Skin: WVGA800
Sdcard: 512M
now with
现在用
emulator @EMULLL
I can start the emulator from console
我可以从控制台启动模拟器
#4
9
List all your emulators:
列出所有模拟器:
emulator -list-avds
模拟器-list-avds
Run one of the listed emulators:
运行列出的模拟器之一:
emulator @name-of-your-emulator
模拟器@ name-of-your-emulator
where emulator is under:
模拟器在哪里:
${ANDROID_SDK}/tools/emulator
$ {} ANDROID_SDK /工具/仿真器
#5
4
This is an old post, but I am currently using this script to display the avd names and start one.
这是一个旧帖子,但我目前正在使用此脚本显示avd名称并启动一个。
#! /bin/bash
# (@) start-android
# If the emulator command exists on this device, displays a list of emulators
# and prompts the user to start one
# Check if the emulator command exists first
if ! type emulator > /dev/null; then
echo "emulator command not found"
exit 1
fi
# Gather emulators that exist on this computer
DEVICES=( $(emulator -list-avds 2>&1 ) )
# Display list of emulators
echo "Available Emulators
----------------------------------------"
N=1
for DEVICE in ${DEVICES[@]}
do
echo "$N) $DEVICE"
let N=$N+1
done
# Request an emulator to start
read -p "
Choose an emulator: " num
# If the input is valid, launch our emulator on a separate PID and exit
if [ $num -lt $N ] && [ $num -gt 0 ];
then
DEVICE=${DEVICES[$num-1]}
emulator "@$DEVICE" > /dev/null 2>&1 &
exit 0
else
echo "Invalid Entry : $num"
exit 1
fi
Here is an example run and output:
这是一个示例运行和输出:
./start-android.sh
Available Emulators
----------------------------------------
1) Nexus_5X_API_23
2) Nexus_9_API_23
Choose an emulator: 1
#6
2
I have a simple method (Only for windows):
我有一个简单的方法(仅适用于Windows):
-
First of all set permanent path to adb in your system (Pretty similar like java). Find yours, For most of cases -
C:\Program Files\android\android-sdk\platform-tools
and copy it. Now go through your system properties and find Advance System Setting. Now find Environment Variable, in system variable tab find path. If there is no path then create a new variable and name it Path and paste the copied value in next field. But if there is already a Path, then open it and put a;
semi-colon at the last of value box and paste the copied value.首先在系统中设置adb的永久路径(非常类似于java)。找到你的,对于大多数情况 - C:\ Program Files \ android \ android-sdk \ platform-tools并复制它。现在浏览您的系统属性并找到高级系统设置。现在找到Environment Variable,在系统变量tab中找到路径。如果没有路径,则创建一个新变量并将其命名为Path并将复制的值粘贴到下一个字段中。但如果已经有一条路径,那么打开它并放一条;在值框的最后一个分号并粘贴复制的值。
-
Now you are almost done.! Check it by typing
adb
in cmd现在你差不多完成了。通过在cmd中键入adb来检查它
-
and now type
adb devices
, thats what you wanted. Cheers.!现在键入adb设备,这就是你想要的。干杯。!
#1
107
AFAIK
android list avd
avdmanager list avd
is what you need.
AFAIK android列表avd avdmanager列表avd是你需要的。
#2
50
Using sdk/tools/emulator
使用sdk / tools / emulator
This will list all available avds
这将列出所有可用的avds
emulator -list-avds
#3
15
I try few combination and it worked :), it was pretty obvious
我尝试了几个组合,它工作:),这是非常明显的
android list avd
the output is something like this
输出是这样的
Available Android Virtual Devices:
Name: EMULLL
Path: /home/krste_ristevski/.android/avd/EMULLL.avd
Target: Android 2.3.3 (API level 10)
Skin: WVGA800
Sdcard: 512M
now with
现在用
emulator @EMULLL
I can start the emulator from console
我可以从控制台启动模拟器
#4
9
List all your emulators:
列出所有模拟器:
emulator -list-avds
模拟器-list-avds
Run one of the listed emulators:
运行列出的模拟器之一:
emulator @name-of-your-emulator
模拟器@ name-of-your-emulator
where emulator is under:
模拟器在哪里:
${ANDROID_SDK}/tools/emulator
$ {} ANDROID_SDK /工具/仿真器
#5
4
This is an old post, but I am currently using this script to display the avd names and start one.
这是一个旧帖子,但我目前正在使用此脚本显示avd名称并启动一个。
#! /bin/bash
# (@) start-android
# If the emulator command exists on this device, displays a list of emulators
# and prompts the user to start one
# Check if the emulator command exists first
if ! type emulator > /dev/null; then
echo "emulator command not found"
exit 1
fi
# Gather emulators that exist on this computer
DEVICES=( $(emulator -list-avds 2>&1 ) )
# Display list of emulators
echo "Available Emulators
----------------------------------------"
N=1
for DEVICE in ${DEVICES[@]}
do
echo "$N) $DEVICE"
let N=$N+1
done
# Request an emulator to start
read -p "
Choose an emulator: " num
# If the input is valid, launch our emulator on a separate PID and exit
if [ $num -lt $N ] && [ $num -gt 0 ];
then
DEVICE=${DEVICES[$num-1]}
emulator "@$DEVICE" > /dev/null 2>&1 &
exit 0
else
echo "Invalid Entry : $num"
exit 1
fi
Here is an example run and output:
这是一个示例运行和输出:
./start-android.sh
Available Emulators
----------------------------------------
1) Nexus_5X_API_23
2) Nexus_9_API_23
Choose an emulator: 1
#6
2
I have a simple method (Only for windows):
我有一个简单的方法(仅适用于Windows):
-
First of all set permanent path to adb in your system (Pretty similar like java). Find yours, For most of cases -
C:\Program Files\android\android-sdk\platform-tools
and copy it. Now go through your system properties and find Advance System Setting. Now find Environment Variable, in system variable tab find path. If there is no path then create a new variable and name it Path and paste the copied value in next field. But if there is already a Path, then open it and put a;
semi-colon at the last of value box and paste the copied value.首先在系统中设置adb的永久路径(非常类似于java)。找到你的,对于大多数情况 - C:\ Program Files \ android \ android-sdk \ platform-tools并复制它。现在浏览您的系统属性并找到高级系统设置。现在找到Environment Variable,在系统变量tab中找到路径。如果没有路径,则创建一个新变量并将其命名为Path并将复制的值粘贴到下一个字段中。但如果已经有一条路径,那么打开它并放一条;在值框的最后一个分号并粘贴复制的值。
-
Now you are almost done.! Check it by typing
adb
in cmd现在你差不多完成了。通过在cmd中键入adb来检查它
-
and now type
adb devices
, thats what you wanted. Cheers.!现在键入adb设备,这就是你想要的。干杯。!