I want to create a shortcut to start a particular AVD with specific parameters. If I create a batch file with start emulator.exe -avd myavd
the emulator.exe command window shows and remains after the device is started. Closing the emulator.exe window closes the device.
How can I start a device without seeing this window like the AVD Manager or Eclipse does?
I found an easy workaround, using SilentCMD
Create batch file, in my case my AVDs is called "PIXEL_MARSHMALLOW_6" so my batch is called emulator_marshmallow.cmd:
Run
This runs the emulator and the cmd.exe windows is hidden. BTW, I found many other utilities like SilentCMD here: https://www.raymond.cc/blog/hidden-start-runs-batch-files-silently-without-flickering-console/
As far as I know you can't. Even if you run emulator -avd Nexus_One from the Windows run dialog a command line like window opens. I can't see any options to hide this, like a silent mode either (running emulator -help shows available options). Eclipse has its own command line built in, so you don't see another window.
Create this java substituting the details for the avd you want:
Then use this as your shortcut:
Substituting your classpath, or removing it if you don't need it. Make sure you use a path to javaw, don't just use java.