Kill process
-
The camera app keeps freezing on my Xiaomi Mi A2 every now and then. When closing and reopening it is still frozen with the camera icon and a rotating circle below.
So, I suppose the process is still running somewhere even after I close the app, and that is why it won't start over. It helps to turn the phone on and off.
What would be nice to try is to just go to the terminal and do a "sudo kill camera", but I don't know the name of the process (it is not camera). Any tips on how to identify the camera process and how to kill it?
-
@magnargj IIRC the process is
camera-app
but forkill
command you must pass the PID not the process name.pkill -9 camera
should work, and you don't needsudo
for it. You should be able to see it near the end of the output of runninps fx
in terminal. -
@dobey thanks for the quick response! It didn't go as well as I hoped:
pkill -9 camera
pkill: killing pid 21580 failed: Operation not permitted
pkill: killing pid 21851 failed: Permission denied -
@magnargj try killall camera-app
-
@emphrath seem the killall command doesn't exist?
killall camera-app
bash: killall: command not found -
@magnargj
I can confirm that the kill command even with sudo doesn't kill the camera process.
Somehow neat, but not sure if this is the expected behavior ?
This is a bit weird that the process is not even killed by discarding the preview after a long swipe to the left... -
@magnargj That is probably fine, as those are other processes and not the app itself. At least one of them is the camera service which runs in the Android container side, which we use to talk to the hardware.
-
@dobey so does that mean that it is an android level issue I'm experiencing? And not with UT. Any way to restart elements in the android level, except rebooting the whole phone?
-
@magnargj I don't know where exactly the issue is for your device. Whomever is doing the porting work will have to debug it I guess. As for the android layer services, they are running in a container. I'm not sure on the specifics of how to enter the container and restart a service.
-
@dobey ok, thanks. I will follow up on that...