• 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.
    • J Offline
      jamieweb
      last edited by jamieweb 3 Sept 2019, 01:12 8 Mar 2019, 23:13

      Hi,

      I would like to be able to use UT on my Meizu MX4, but ideally I'd like to be able to do this without using the physical buttons, as I can in Flyme.

      Does the latest version of UT support tap to wake, swipe to wake, raise to wake, etc? And is there a way to lock the phone without using the physical lock button?

      I remember on UT in 2015 this wasn't possible, but I'm hoping the features have been implemented by now.

      Kind regards,
      Jamie

      L ? 2 Replies Last reply 9 Mar 2019, 14:42 Reply Quote 0
      • L Offline
        Lakotaubp @jamieweb
        last edited by 9 Mar 2019, 14:42

        @jamieweb You do need the button to wake the device, and thats pretty much it. To put the device to sleep just set a low screen lock time in system settings.

        J 1 Reply Last reply 10 Mar 2019, 17:05 Reply Quote 0
        • ? Offline
          A Former User @jamieweb
          last edited by A Former User 3 Sept 2019, 15:18 9 Mar 2019, 15:10

          @jamieweb You can also lock the phone with a slide to the system indicator and than push lock.
          But then, the phone ist just locked and the screen is not off.

          J 1 Reply Last reply 10 Mar 2019, 15:35 Reply Quote 1
          • J Offline
            jamieweb @Guest
            last edited by 10 Mar 2019, 15:35

            @thilov Is there a terminal command I can use to simulate pressing the physical lock button? I could just create a launcher for that.

            ? 1 Reply Last reply 10 Mar 2019, 16:12 Reply Quote 0
            • ? Offline
              A Former User @jamieweb
              last edited by A Former User 3 Oct 2019, 16:16 10 Mar 2019, 16:12

              @jamieweb

              dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
              

              locks the phone but the screen is still on.

              J 1 Reply Last reply 10 Mar 2019, 17:07 Reply Quote 1
              • J Offline
                jamieweb @Lakotaubp
                last edited by 10 Mar 2019, 17:05

                @Lakotaubp Am I able to wake the device using the MX4's touch home ring? Or can I rebind it to a volume button or something? I want to preserve my lock button as it feels like it's about to break.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jamieweb @Guest
                  last edited by 10 Mar 2019, 17:07

                  @thilov Ah awesome stuff, thanks for this. Is there a way to do this and turn the screen off too?

                  A 1 Reply Last reply 10 Mar 2019, 17:29 Reply Quote 0
                  • A Offline
                    AlainW94 @jamieweb
                    last edited by AlainW94 3 Oct 2019, 17:30 10 Mar 2019, 17:29

                    @jamieweb you can spy dbus with dbus-monitor on a adb shell terminal , then try to lock and wake up the phone, you shoulder be able to see the commands that you need .

                    sudo dbus-monitor --system 
                    

                    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 2 Replies Last reply 10 Mar 2019, 18:31 Reply Quote 1
                    • J Offline
                      jamieweb @AlainW94
                      last edited by 10 Mar 2019, 18:31

                      @AlainW94 Cool, I'll try that. Will this work with the on-device terminal as well? Or does it have to be via adb?

                      A 1 Reply Last reply 10 Mar 2019, 18:35 Reply Quote 0
                      • 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
                                          • AlainW94A 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...

                                            AlainW94A 1 Reply Last reply 16 Mar 2019, 19:08 Reply Quote 1
                                            5 out of 21
                                            • First post
                                              5/21
                                              Last post