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!
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 ]} … ]
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 ~/.
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.
try
echo no | android create avd -n <name>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With