pashanpp 发表于 2018-12-10 15:39:08

不停打开camera,出现cameraserver被kill,camera黑屏

使用脚本不停的打开关闭camera,出现cameraserver被kill,camera黑屏
[ 4382.347906] init: Service 'cameraserver' (pid 280) killed by signal 11
[ 4382.348106] init: Service 'cameraserver' (pid 280) killing any children in process group

使用脚本
#!/system/bin/sh
i=0;
while [ i -le 10000000000000 ];
do echo $i;
i=$(($i+1));
    am start -n com.android.camera2/com.android.camera.CameraLauncher;
    sleep 5;
    input keyevent KEYCODE_BACK;
    sleep 1;
    input keyevent KEYCODE_BACK;
    sleep 1;
done

pashanpp 发表于 2018-12-10 16:06:14

使用lsof查看,发现media_profiles.xml打开的次数一直在增加
cameraser   283 cameraserv199r      REG             179,13   25574      17590 /data/camera/media_profiles.xml

pashanpp 发表于 2018-12-11 09:34:51

已解决

molabo 发表于 2018-12-11 09:40:32

怎么解决的呢?我的也出现了。
init: Service 'surfaceflinger' (pid 9725) killed by signal 6
init: Service 'surfaceflinger' (pid 9725) killing any children in process group
init: Service 'zygote' is being killed...
init: Service 'zygote' (pid 9724) killed by signal 9
init: Service 'zygote' (pid 9724) killing any children in process group
init: write_file: Unable to open '/sys/android_power/request_state': No such file or directory
init: write_file: Unable to write to '/sys/power/state': Invalid argument
init: Service 'audioserver' is being killed...
init: Service 'cameraserver' is being killed...
init: Service 'media' is being killed...
init: Service 'netd' is being killed...
init: Service 'audioserver' (pid 9494) killed by signal 9
init: Service 'audioserver' (pid 9494) killing any children in process group
init: Service 'cameraserver' (pid 9495) killed by signal 9
init: Service 'cameraserver' (pid 9495) killing any children in process group

pashanpp 发表于 2018-12-11 09:44:45

你这个是服务全被kill了,现象不一样

pashanpp 发表于 2018-12-11 09:48:31

我的cameraserver(只有这个被kill,其他服务正常)被kill的原因是media_profiles.xml打开了没有关闭导致

molabo 发表于 2018-12-11 09:56:03

我想将这些服务全关了,不知在哪里关闭的

杰仔 发表于 2020-2-12 18:42:00

molabo 发表于 2018-12-11 09:40
怎么解决的呢?我的也出现了。
init: Service 'surfaceflinger' (pid 9725) killed by sig ...

我遇到同样的问题您的问题解决了嘛?

yy596 发表于 2023-7-21 16:48:43

pashanpp 发表于 2018-12-10 16:06
使用lsof查看,发现media_profiles.xml打开的次数一直在增加
cameraser   283 cameraserv199r      REG...

大佬可以加下qq交流一下吗:qq   1219387577
页: [1]
查看完整版本: 不停打开camera,出现cameraserver被kill,camera黑屏