看init.usb.rc
,adbd 应该都是配置系统属性sys.usb.config
后受到触发启动的。
但是在最初启动时property_load_boot_defaults()
的时候,还没有queue_property_triggers()
。应该不至于触发服务启动。
莫非是usb 插入事件导致的?但是好像串不起来。
![]() | 1 howellz OP 莫非是 QueueAllPropertyActions()再次将所有的 properties 重新触发了一次? |
2 bog 2020-09-22 21:28:27 +08:00 via Android 记得好像是 init.usb.rc 设置的 property |
![]() | 3 VYSE 2020-09-22 21:46:14 +08:00 init 进程启动的, 根据服务里写的触发条件 |
![]() | 4 SupperMary 2020-09-22 22:12:45 +08:00 印象中是编译 userdebug 的时候编译过程中会设置一个属性,这个属性会被 rc 文件读取并启动。 没记错的话这个属性是`persist.sys.usb.config`。如果 vendor 不设置这个属性。这个属性会在编译过程中被设置为`adb`。然后经过层层转接启动`adbd` |
5 gtxtitan 2020-09-23 09:39:43 +08:00 USB 插入-》 RC 脚本时间触发,设置 persist.sys.usb.cOnfig=adb ->configfs 里面写入 adb->gadget 启动 adbd 或者通常使用的安卓上层 debug 方式,其最终控制也是写 persist.sys.usb.config |