Binder
2022-01-24 23:36:41 0 举报
Android IPC Binder 机制原理流程图
作者其他创作
大纲/内容
IPCThreadState::getAndExecuteCommand() 中的 mIn
ServiceManagerProxy.addService()
IPCThreadState::talkWithDriver()
binder_ioctl_write_read()
ContextImpl.bindServiceCommon()
IPCThreadState::transact()
APP 进程
ActivityManagerNative.getDefault()
IPCThreadState::getAndExecuteCommand()
BR_NOOP(命令)
Native
mOut 数据部分(数据)
Java
onZygoteInit()
binder_loop 中的 readbuf
bio_put_ref()
ActivityManagerNative.onTransact()
BinderProxy.transact()
Kernel
JNI
新线程
主线程
IPCThreadState::waitForResponse()
SM 进程
ProcessState::spawnPooledThread()
android_os_BinderProxy_transact()
PoolThread::run()
flat_binder_object(封装结构)
binder_loop()
binder_parse()
BBinder::transact()
BpBinder::transact()
binder_transaction()
mOut
JavaBBinder::onTransact()
binder_thread_read()
IPCThreadState::joinThreadPool()
IPCThreadState::sendReply()
binder_thread_write()
ActivityServiceManager.bindService()
BR_TRANSACTION(命令)
AMS 进程
BR_SPAWN_LOOPER(命令)
binder_send_reply()
IPCThreadState::executeCommand()
reply.readStrongBinder()
do_add_service()
BC_ENTER_LOOPER(命令)
AMS 名称
ActivityManagerProxy.bindService()
oneway
service_manager.svcmgr_handler()
BC_TRANSACTION(命令)
binder_transaction_data(数据结构)
do_find_service()
ServiceManager.getService(\"activity\")
AMS 实例
ServiceManagerProxy.getService(\"activity\")
创建新的 Binder 线程
Binder.execTransact()
收藏
0 条评论
下一页