I want to create emulator in command line with some options, like hw.mainKeys = false
.
I need it to be an shell script so can run on automation test,however here I could not find a place to set those values.
android create avd
do not have a place to specify those options.
One alternative is create a 'platform' type avd, however, the shell is a interactive shell that is great for human but hard for script
Android 4.1 is a basic Android platform.
Do you wish to create a custom hardware profile [no]yes
Name of the AVD being run:
avd.name [<build>]:
Are there some tools I can just pass options as parameters, like --hw.mainKeys false
?
just use
echo no | android create avd -n name -t 9
Take a look at here
The non-deprecated command has fewer commandline options, but they are:
From
android --help create avd
:You can create text file config.ini with desired parameters
See official documentation here