app_process command in Android

What is this app_process

Although not that popular “app_process” command is used heavily in Android, for example the well know “am” script is using it. Everybody knows how to start an application from adb shell:

am start -n yourpackagename/.activityname

However “am” is just a shell script and what stays in the base of the am script is our app_process binary:

root@android:/ # cat /system/bin/am
cat /system/bin/am
# Script to start "am" on the device, which has a very rudimentary
# shell.
export CLASSPATH=$base/framework/am.jar
exec app_process $base/bin "$@"

root@android:/ #

So app_process is the binary used to start java code. All the apps, instrumentations or installations are tarted using this.

Usage … NOT:

Lets see the official usage output:

root@android:/ # app_process
Usage: app_process [java-options] cmd-dir start-class-name [options]

Not quite complete as usual 🙂

Usage (full):

app_process [vm-options] cmd-dir [options] start-class-name [main-options]


  • vm-options – the VM options passed.
  • cmd-dir – the parent dir (/system/bin)
  • options – the arguments for this binary :

–application (api>=14)
–nice-name=nice_proc_name (api>=14)

  • start-class-name – the start-up class that contains main()  (
  • main-options – the arguments that are passed to the main() of the start-up class

Note for options:

  1. –start-system-server works only if –zygote
  2. if –zygote, start-class-name =
  3. and nice-name=zygote
  4. cmd-dir for api>=14 can be after options but always before start-class-name

Source code:

api < 14 :

api >= 14 :