Forrest logo
back to the am tool

am:tldr:d5b7b

am: Start an activity matching a specific action and [c]ategory.
$ am start -a ${android-intent-action-MAIN} -c ${android-intent-category-HOME}
try on your machine

The command "am start" is used to start an Android component (like an activity) using an intent. It sends an intent to request the system to launch a particular component.

In this specific command:

  • "-a ${android-intent-action-MAIN}" refers to the action of the intent. It is specifying the desired action as the "MAIN" action. The "MAIN" action is typically used to start the main entry point of an application.
  • "-c ${android-intent-category-HOME}" refers to the category of the intent. It is specifying the desired category as the "HOME" category. The "HOME" category is used to indicate that the component is a home activity, which means it is a launcher for the application.

So, essentially, the command is instructing the system to start the main entry point of the application as the launcher (home) activity.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the am tool