23

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..

3 Answers 3

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

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

0
25

Actually you can just push the "home" button

adb shell input keyevent KEYCODE_HOME

KEYCODE_HOME

Key code constant: Home key. This key is handled by the framework and is never delivered to applications.

Constant Value: 3 (0x00000003)

8

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

input keyevent KEYCODE_HOME

1
  • 1
    FYI, KEYCODE_HOME is 3.
    – frogatto
    Oct 3, 2017 at 9:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .