开机进不了系统报以下log:init: Service ‘bootanim’ is being killed…
开机进不了系统查看log,得知原因是由于开机动画这条服务进程会被杀掉导致一直进不去系统
[ 11.091036] init: Service 'bootanim' is being killed...
[ 11.128007] init: Service 'bootanim' (pid 302) killed by signal 9
[ 11.137486] init: write_file: Unable to open '/sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq': No such file or directory
[ 11.138305] init: cannot find '/system/bin/glgps' (No such file or directory), disabling 'gpsd'
[ 11.139108] init: Starting service 'exec 3 (/system/bin/bootstat)'...
[ 11.178722] init: Service 'exec 3 (/system/bin/bootstat)' (pid 940) exited with status 0
[ 11.179018] init: Starting service 'exec 4 (/system/bin/bootstat)'...
[ 11.200149] init: Service 'exec 4 (/system/bin/bootstat)' (pid 947) exited with status 0
[ 11.200429] init: Starting service 'exec 5 (/system/bin/bootstat)'...
[ 11.220101] init: Service 'exec 5 (/system/bin/bootstat)' (pid 948) exited with status 0
[ 11.220370] init: Starting service 'exec 6 (/system/bin/bootstat)'...
[ 11.234139] init: Service 'exec 6 (/system/bin/bootstat)' (pid 949) exited with status 0
[ 737.790193] rockchip-vop ff940000.vop: [drm:vop_crtc_enable] Update mode to 1920x1080p61, type: 7
[ 879.811244] rockchip-vop ff940000.vop: [drm:vop_crtc_enable] Update mode to 1920x1080p61, type: 7
[ 1034.923813] rockchip-vop ff940000.vop: [drm:vop_crtc_enable] Update mode to 1920x1080p61, type: 7
[ 1523.780119] rockchip-vop ff940000.vop: [drm:vop_crtc_enable] Update mode to 1920x1080p61, type: 7
**原因:
因为bootanimation服务的进程uid与AID_SYSTEM(system)不一致,也就是匹配bootanimation服务的进程uid不一致,我的uid是graphics
解决方法:
直接修改进程uid。找到启动bootanimation服务的地方**
service bootanim /system/bin/bootanimation
class core
user graphics //将user graphics改为user system
group graphics audio
disabled
oneshot
修改路径为/device/rockchip/rk3288/rk3288_box/init.rc文件,以下就是我修改的补丁
wangxd@build-server-100:~/work/dsy/rk3288-7.0/device/rockchip/rk3288((f3c5a0a...))$ git diff rk3288_box/init.rc
diff --git a/rk3288_box/init.rc b/rk3288_box/init.rc
old mode 100644
new mode 100755
index 8a54b9a..e3ce193
--- a/rk3288_box/init.rc
+++ b/rk3288_box/init.rc
@@ -586,7 +586,7 @@ service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default
service bootanim /system/bin/bootanimation
class core
- user graphics
+ user system
group graphics audio
disabled
oneshot