Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 907
Chad Freeman Avatar asked Oct 28 '11 16:10

Chad Freeman


People also ask

How do I open AVD Manager from terminal?

Starting the emulator Use the emulator command to start the emulator, as an alternative to running your project or starting it through the AVD Manager. Here's the basic command-line syntax for starting a virtual device from a terminal prompt: emulator -avd avd_name [ {- option [ value ]} … ]

How do you use Avdmanager?

Commands and command options-f : Force creation of the AVD. Use this option if you need to overwrite an existing AVD with a new AVD using the same name. -p path : Path to the location where the directory for this AVD's files will be created. If you do not specify a path, the AVD will be created in ~/.

What is skin in Android Emulator?

An Android emulator skin is a collection of files that define the visual and control elements of an emulator display. If the skin definitions available in the AVD settings don't meet your requirements, you can create your own custom skin definition, and then apply it to your AVD.


1 Answers

try

echo no | android create avd -n <name>
like image 181
weberik Avatar answered Oct 16 '22 05:10

weberik