how to run a specific app's action via terminal?
Use this:

am start -a android.intent.action.MAIN -n &lt;package_name&gt;/&lt;full_class_name&gt;


To control an app, you'll have to put correct values of &lt;package_name&gt; and &lt;full_class_name&gt; in the command. For example, you can use com.google.gmail/com.google.gmail.check_mail (Hypothetical names) as last part of command.

Obtaining package name of an app is easy, but obtaining class name of action isn't. There are two problems:


Many app developers keep class info private.
Not all developers do smart modular programming. Its good habit to divide an app in multiple classes which could be triggered by intents, but not all developers are smart.


Solution of 1st problem: Decompile the app using apktool and see all info. There are also other ways, but this one is always-working method (unless app is based on NDK instead of SDK).

Solution of 2nd problem: Nothing.

Don't worry, most of popular apps follow best programming practice and they provide Public API from which you can get class info.