I have to create an android emulator from command line in windows with below specifications,
screen size --> 4.7 inch
screen resolution --> 540x960 pixels
android version --> 4.4.2
i trying to create this emualtor from java.
i tried with
android -create avd -n <device_name> -t <apilevel> -c 300M -f
but it does create the emulator with screen size? what is the option and how can we create avd with custom screen size?
When you hit the Start button in the AVD Manager then you get a popup window where you can select Scale display to real size . There you have to set the devices real screen size and your monitors dpi.
Android Official doc : Customize the device resolution or density
Use the create avd command to create a new AVD, specifying the --skin option with a value that references either a default skin name (such as "WVGA800") or a custom skin resolution (such as 240x432). Here's an example:
android create avd -n <name> -t <targetID> --skin WVGA800
OR
android create avd -n <name> -t <targetID> --skin 540x960
UPDATED
This tool is no longer supported. Instead use Android Studio to create AVDs
I know, it's old, but maybe I can help others:
I am using linux, the directories may be different in windows or in custom installations.
hw.lcd.height=2340
hw.lcd.width=1080
I hope I can help you or another person with the same issue.
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