Is there a terminal command to go to the home screen?

I need to do this via ssh, so I cannot just push the "home" button, I need to send a command-line action..

am start -a android.intent.action.MAIN -c android.intent.category.HOME

More info about shell commands: an archived version of the AndroidWiki page

| improve this answer | |

Actually you can just push the "home" button

adb shell input keyevent KEYCODE_HOME
| improve this answer | |

Consider taking at look at the following link: http://developer.android.com/reference/android/view/KeyEvent.html

input keyevent KEYCODE_HOME

| improve this answer | |
  • 1
    FYI, KEYCODE_HOME is 3. – frogatto Oct 3 '17 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.