普通APP 的Process Name 来源

普通APP 的Process Name 来源

在AMScallstartProcessLocked中,将Mainclass:android.app.ActivityThread以及app的ProcessName,uid,gid等等都通过Process.Start传递给zygote.

ActivityManagerService.java

->Process.java

->Zygoteinit.java

->ZygoteConnection.java

->runOnce()

->zygote.java->dalvik_system_Zygote.cpp->fork()->setuidgid....

newChildProcess->handleChildProc->Process.setArgV0->android_util_Process->android_os_Process_setArgV0->ProcessState.cppsetArgV0->system/core/libcutils/process_name.c->prctl

相关推荐