Search code examples
androidandroid-runtime

What does the "AndroidRuntime START" log message mean?


I've seen the following log message near a few crashes I'm working on:

>>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<

What exactly does this mean? Obviously means the "AndroidRuntime" is starting, but what is that? I thought it meant my app is starting but I don't see it every time I start my app. What exactly is starting?

Thanks in advance...


Solution

  • This means that an instance of the virtual machine is being started up in a new process.

    Typically this happens in at least three cases:

    1) When the system itself starts up and starts a process with a vm to be "zygote" - the parent of all app processes. Subsequently, apps do not restart this from scratch, rather they get already-initialized processes forked off of zygote, so you would only see the message from this if the device reboots or the android framework restarts.

    2) When the system starts up the vm from scratch in a special mode to dexopt and otherwise process a freshly installed apk

    3) When various tools start up a temporary instance of the vm to run compiled-from java code to access certain java-only APIs. For example, "am start" does this to fire an intent, and that is likely involved in starting a newly installed application for testing.

    It's possible it also happens for similar reasons subsequent to some types of crash if one of the reporting tools to be run incorporates java code and is not a child of zygote.