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

UT on Meizu MX4 without using physical buttons

Scheduled Pinned Locked Moved General
21 Posts 5 Posters 3.8k Views 3 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.
    • A Offline
      AlainW94 @jamieweb
      last edited by 10 Mar 2019, 18:35

      @jamieweb the on device terminal will be paused when the device will go to sleep so you will not see anything with dbus

      Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
      Never forget that they are much more ideas inside two heads than in one...

      J 1 Reply Last reply 10 Mar 2019, 18:37 Reply Quote 1
      • J Offline
        jamieweb @AlainW94
        last edited by 10 Mar 2019, 18:37

        @AlainW94 Ok thanks, hopefully this will solve the ability to lock the phone. Do you have any ideas for how I could wake the phone without using the physical lock button?

        Will dbus be able to read the Meizu MX4's touch home ring when the device is locked?

        A 1 Reply Last reply 10 Mar 2019, 18:45 Reply Quote 0
        • A Offline
          AlainW94 @jamieweb
          last edited by AlainW94 3 Oct 2019, 18:49 10 Mar 2019, 18:45

          @jamieweb I worked on dbus a little with my pro5 finger print reader. included in the home button . From memories the home button send a signal ove dbus or a proximity valus from the finger. I think that an app can read this value but it nerd to run even if the phone is sleeping and this is the problem as when the phone is sleeping, no app are running anymore excepted core apps

          Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
          Never forget that they are much more ideas inside two heads than in one...

          J 1 Reply Last reply 10 Mar 2019, 19:18 Reply Quote 1
          • J Offline
            jamieweb @AlainW94
            last edited by 10 Mar 2019, 19:18

            @AlainW94 Ah right I see. What would be the process for getting a user-written script to run while sleeping as a core app?

            A 1 Reply Last reply 11 Mar 2019, 08:55 Reply Quote 0
            • A Offline
              AlainW94 @jamieweb
              last edited by 11 Mar 2019, 08:55

              @jamieweb You can maybe try with a cron task, but I think that you will have to set the filesystem as writtable before to setup your task. Try to run your task every 2 second if it's a script. if you have a loop insinde then you can run it at startup. PS : I don't know if cron is still running when the phone is sleeping, I think yes but without testing it ...

              Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
              Never forget that they are much more ideas inside two heads than in one...

              D 1 Reply Last reply 11 Mar 2019, 10:01 Reply Quote 1
              • D Offline
                doniks @AlainW94
                last edited by 11 Mar 2019, 10:01

                maybe upstart would be better than cron. at least it doesn't require rw partition. this https://wiki.ubuntuusers.de/Baustelle/Ubuntu_Touch/Snippets/#Skalierung-der-Anzeige uses an upstart job to change the scaling. in a similar way, I'm sure you can write any other job

                1 Reply Last reply Reply Quote 3
                • J Offline
                  jamieweb @AlainW94
                  last edited by 15 Mar 2019, 22:18

                  @AlainW94 I've set up an adb shell and run this command to see what happens on dbus when I press the lock button. Unfortunately there are dozens/hundreds of dbus commands in the log output, rather than just one command that I can put in a launcher.

                  Do you know whether there is a way to find the overarching command that triggers all of this off when the lock button is pressed?

                  On a side note, it looks like most of the dbus commands when pressing the lock button are to make the screen fade out over a short period.

                  A 1 Reply Last reply 15 Mar 2019, 22:36 Reply Quote 0
                  • A Offline
                    AlainW94 @jamieweb
                    last edited by 15 Mar 2019, 22:36

                    @jamieweb Hi ! I did not have my notes under the hand for now but one things that you can try to reduce the amount of dbus messages is to switch off gsm/wifi/bluetooth you should have less messages over dbus. Tomorrow I will take a look at my notes to check what can be useful for you.

                    Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                    Never forget that they are much more ideas inside two heads than in one...

                    J 1 Reply Last reply 15 Mar 2019, 23:16 Reply Quote 1
                    • J Offline
                      jamieweb @AlainW94
                      last edited by 15 Mar 2019, 23:16

                      @AlainW94 Thanks for taking the time to have a look.

                      Unfortunately, I think that all of the dbus messages were actually related to locking the phone, I only ran the monitor command for about 2 seconds - just enough time to press lock.

                      Ideally I'd like to find the command that actually triggers all of this off and just create a launcher for that, rather than trying to reverse engineer with dbus commands.

                      A 1 Reply Last reply 16 Mar 2019, 18:42 Reply Quote 0
                      • A Offline
                        AlainW94 @jamieweb
                        last edited by 16 Mar 2019, 18:42

                        @jamieweb The only things I found back from my notes regarding D-BUS is this :

                        signal time=1544722135.567846 sender=:1.0 -> destination=(null destination) serial=8601 path=/com/ubuntu/Upstart; interface=com.ubuntu.Upstart0_6; member=EventEmitted
                           string "dbus"
                           array [
                              string "SIGNAL=Activity"
                              string "BUS=system"
                              string "INTERFACE=com.canonical.Unity.UserActivity"
                              string "OBJPATH=/com/canonical/Unity/UserActivity"
                              string "SENDER=:1.21"
                              string "ARG0=0"
                           ]
                        
                        signal time=1544722135.795139 sender=:1.0 -> destination=(null destination) serial=8602 path=/com/ubuntu/Upstart; interface=com.ubuntu.Upstart0_6; member=EventEmitted
                           string "dbus"
                           array [
                              string "SIGNAL=Activity"
                              string "BUS=system"
                              string "INTERFACE=com.canonical.Unity.UserActivity"
                              string "OBJPATH=/com/canonical/Unity/UserActivity"
                              string "SENDER=:1.21"
                              string "ARG0=1"
                           ]
                        

                        When the home button is pushed. I'm not sure that this will help you a lot...

                        Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                        Never forget that they are much more ideas inside two heads than in one...

                        1 Reply Last reply Reply Quote 1
                        • A Offline
                          AlainW94
                          last edited by 16 Mar 2019, 18:51

                          With this command you will lock the user screen but not power off the display :

                          loginctl lock-session c1
                          

                          Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                          Never forget that they are much more ideas inside two heads than in one...

                          A 1 Reply Last reply 16 Mar 2019, 19:08 Reply Quote 1
                          • A Offline
                            AlainW94 @AlainW94
                            last edited by 16 Mar 2019, 19:08

                            @jamieweb You can also take a look at repowerd, it seems to be the deamon that is handling the power button : launchpad repowerd I see some event of it in syslog when pressing the power button.

                            Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                            Never forget that they are much more ideas inside two heads than in one...

                            1 Reply Last reply Reply Quote 1
                            19 out of 21
                            • First post
                              19/21
                              Last post