记录一下,在user软件开机后,点击重启后机器无法开机,卡在android界面
log如下
01-03 08:04:27.328 639 639 W zygote64: Landroid/app/SystemServiceRegistry; failed initialization: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
01-03 08:04:27.328 639 639 W zygote64: (Throwable with no stack trace)
01-03 08:04:27.328 656 807 I hwcomposer: [HWCDisplay] [Display_0 (type:1)] fps:12.994192,dur:1077.40,max:161.57,min:26.59
01-03 08:04:27.331 639 639 E Zygote : Error preloading android.app.SystemServiceRegistry.
01-03 08:04:27.331 639 639 E Zygote : java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
01-03 08:04:27.332 639 639 E Zygote : System zygote died with fatal exception
01-03 08:04:27.332 639 639 E Zygote : java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
01-03 08:04:27.333 639 639 D AndroidRuntime: Shutting down VM
修改方案:
将system/apex/apexd/apexd_loop.cpp下的
static constexpr size_t kLoopDeviceRetryAttempts = 3u;
改为
static constexpr size_t kLoopDeviceRetryAttempts = 10u;
原因:
是apex mount wifi apex相关路径的时候,会先创建loop device,需要等loop device 产生。
原生等的时间 有点短,如果系统繁忙一点,会造成等不到,进而造成不会去mount apex wifi, 导致wifi 的jar 不会被
添加到 bootclasspath, zygote 起来在初始systemserviceregistry 类的时候,里面会有wifi 相关的api 调用,但是因为
在bootclasspath 里找不到对应的class,而出现异常 导致zygote 被杀,android 服务都起不来。