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

        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)

        dobeyD 1 Reply Last reply Reply Quote 0
        • dobeyD Offline
          dobey @magnargj
          last edited by

          @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 Reply Quote 0
          • M Offline
            magnargj @dobey
            last edited by

            @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 dobeyD 2 Replies Last reply Reply Quote 0
            • E Offline
              Emphrath @magnargj
              last edited by

              @magnargj try killall camera-app

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                magnargj @Emphrath
                last edited by

                @emphrath seem the killall command doesn't exist?

                killall camera-app
                bash: killall: command not found

                Volla 22, Xiaomi Mi A2, Nexus5 (backup)

                AppLeeA 1 Reply Last reply Reply Quote 0
                • AppLeeA Offline
                  AppLee @magnargj
                  last edited by

                  @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
                  • dobeyD Offline
                    dobey @magnargj
                    last edited by

                    @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 Reply Quote 0
                    • M Offline
                      magnargj @dobey
                      last edited by

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

                      dobeyD 1 Reply Last reply Reply Quote 0
                      • dobeyD Offline
                        dobey @magnargj
                        last edited by

                        @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 Reply Quote 0
                        • M Offline
                          magnargj @dobey
                          last edited by

                          @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