How to know which process the class is running in?

Viewed 139

Just for Android, for example ActivityThread could run in app process and system process, and ActivityManagerService is running in another, how could I know which process the class is running in.

Take the following scenario for example, Context.startService method is actually implemented by ActivityManagerService.startService, I want to know the detail, so I want to debug ActivityManagerService, but I don't know which process to debug, how can I know which process the ActivityManagerService is running in, and other class as well, I want to know how, not what.

1 Answers

I found some ways, read the source code, and find the manifest of the apk, but this will only work for code under packages dir

Related