Chad Freeman Chad Freeman - 1 year ago 85
Android Question

Setting Android AVD Command Line Hardware Profile

When creating a new Android AVD through command line through the following command:

android create avd -n <name>

You're met with the following output:

Do you wish to create a custom hardware profile [no]

I've been tasked with created a fully-automated script that will create a new AVD and run some tests (using Robotium). So far, I've just been using simple batch file commands to achieve this, however, I can't seem to find a way to prevent the above message from appearing and requiring user input. Is there any way I can either set the hardware profile prior to this message appearing?

Since the default hardware profile is actually preferred in my case, simply hitting 'Enter' when this message appears (in some automated way) would work fine as well, however I am not aware of a way to do this through scripting.

I am fairly new to both aspects of this question, both Android and scripting, so any help is much appreciated!

Answer Source


echo no | android create avd -n <name>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download