https://lixiaogang03.github.io/2019/09/26/Android-NetworkControl/
源码目录:system/netd/server
启动
init进程会解析/system/etc/init/netd.rc文件,由于是class main
,会被init进程启动。
service netd /system/bin/netd
class main
socket dnsproxyd stream 0660 root inet
socket mdns stream 0660 root system
socket fwmarkd stream 0660 root inet
onrestart restart zygote
onrestart restart zygote_secondary
# b/121354779: netd itself is not updatable, but on startup it dlopen()s the resolver library
# from the DNS resolver APEX. Mark it as updatable so init won't start it until all APEX
# packages are ready.
updatable
netd服务注册流程
https://blog.csdn.net/shijiheike/article/details/116765804
见system/netd/server/main.cpp
NetdNativeService::start()调用BinderService
0 条评论