2

I have Android Studio setup and can run the following command to run it in headless mode (so the window is not showing), but I would like to run it headlessly and have it run an apk. How would I go about doing this?

I currently run the following to load my AVD:

emulator -avd NexusAVD -no-audio -no-window
Onik
  • 19,396
  • 14
  • 68
  • 91
Zabs
  • 13,852
  • 45
  • 173
  • 297

1 Answers1

1

Executing emulator -avd AvdName -no-audio -no-window does not give you "truly" headless Android, meaning zygote, so as most of the system services (incl. ActivityManager), will still be running. You can check it with:

adb shell
service list

That said, you can simply deploy your app from within Android Studio, just same as do for none-"headless" emulator. Check that your app has been successfully deployed and is running using:

adb shell
ps -e | grep packageName
Onik
  • 19,396
  • 14
  • 68
  • 91