I\'m following the documentation at this link: https://developer.android.com/studio/run/emulator-console and they give an example to simulate pressing the power button with