• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Kill process

Scheduled Pinned Locked Moved Unsolved Support
10 Posts 4 Posters 958 Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      magnargj
      last edited by 3 Jul 2021, 14:00

      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?

      Volla 22, Xiaomi Mi A2, Nexus5 (backup)

      D 1 Reply Last reply 3 Jul 2021, 18:23 Reply Quote 0
      • D Offline
        dobey @magnargj
        last edited by 3 Jul 2021, 18:23

        @magnargj IIRC the process is camera-app but for kill command you must pass the PID not the process name. pkill -9 camera should work, and you don't need sudo for it. You should be able to see it near the end of the output of runnin ps fx in terminal.

        M 1 Reply Last reply 3 Jul 2021, 19:13 Reply Quote 0
        • M Offline
          magnargj @dobey
          last edited by 3 Jul 2021, 19:13

          @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

          Volla 22, Xiaomi Mi A2, Nexus5 (backup)

          E D 2 Replies Last reply 4 Jul 2021, 20:08 Reply Quote 0
          • E Offline
            Emphrath @magnargj
            last edited by 4 Jul 2021, 20:08

            @magnargj try killall camera-app

            M 1 Reply Last reply 5 Jul 2021, 11:46 Reply Quote 0
            • M Offline
              magnargj @Emphrath
              last edited by 5 Jul 2021, 11:46

              @emphrath seem the killall command doesn't exist?

              killall camera-app
              bash: killall: command not found

              Volla 22, Xiaomi Mi A2, Nexus5 (backup)

              A 1 Reply Last reply 5 Jul 2021, 13:04 Reply Quote 0
              • A Offline
                AppLee @magnargj
                last edited by 5 Jul 2021, 13:04

                @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...

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dobey @magnargj
                  last edited by 5 Jul 2021, 17:56

                  @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.

                  M 1 Reply Last reply 5 Aug 2021, 11:40 Reply Quote 0
                  • M Offline
                    magnargj @dobey
                    last edited by 5 Aug 2021, 11:40

                    @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?

                    Volla 22, Xiaomi Mi A2, Nexus5 (backup)

                    D 1 Reply Last reply 6 Aug 2021, 14:19 Reply Quote 0
                    • D Offline
                      dobey @magnargj
                      last edited by 6 Aug 2021, 14:19

                      @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.

                      M 1 Reply Last reply 6 Aug 2021, 14:30 Reply Quote 0
                      • M Offline
                        magnargj @dobey
                        last edited by 6 Aug 2021, 14:30

                        @dobey ok, thanks. I will follow up on that...

                        Volla 22, Xiaomi Mi A2, Nexus5 (backup)

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post