The reason I want this, is that I need to run with --debug-init
First, I find the package name
$adb shell pm list packages |grep -i emac
package:org.gnu.emacs
Then I try to start it
$ adb shell am start -n org.gnu.emacs
Exception occurred while executing 'start':
java.lang.IllegalArgumentException: Bad component name: org.gnu.emacs
at android.content.Intent.parseCommandArgs(Intent.java:8828)
at com.android.server.am.ActivityManagerShellCommand.makeIntent(ActivityManagerShellCommand.java:398)
at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:506)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:222)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:11206)
at android.os.Binder.shellCommand(Binder.java:1085)
at android.os.Binder.onTransact(Binder.java:903)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5643)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3135)
at android.os.Binder.execTransactInternal(Binder.java:1321)
at android.os.Binder.execTransact(Binder.java:1280)
It says I need the ActivityName, but how can I find that?;)
$ adb shell am start -n org.gnu.emacs/.MainActivity
Starting: Intent { cmp=org.gnu.emacs/.MainActivity }
Error type 3
Error: Activity class {org.gnu.emacs/org.gnu.emacs.MainActivity} does not exist.
EDIT: I've installed Emacs from F-Droid.
org.gnu.emacs.EmacsActivity. (Note: I only know about Android in general, having no Emacs knowledge)