Recognize

Post your questions and help other users.

Moderator: Martin

Post Reply
Akt
Posts: 133
Joined: 25 May 2014 08:57

Recognize

Post by Akt » 12 May 2019 05:10

I have 2 queries
Attachments
Screenshot_2019-05-12-10-35-44-413_lockscreen.png
What is the trigger for this message box USB charging this device. Tried ui event, but unable to find trigger on lockscreen.
Screenshot_2019-05-12-10-35-44-413_lockscreen.png (371.25 KiB) Viewed 14817 times
Screenshot_2019-05-12-10-35-55-436_com.miui.home.png
.How to click reboot button. (Control ui not working)
Screenshot_2019-05-12-10-35-55-436_com.miui.home.png (170.64 KiB) Viewed 14817 times

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Recognize

Post by Desmanto » 12 May 2019 06:38

For USB Charging, that is trigger Notification on Statusbar Displayed, filter for the text "USB charging this device"

Power dialog is special function that always run on top of other element. At mine, RR 7.0.1 Pie 9.0, I can still access the element, but the green border will be available only after dismissing the power dialog.

If you can't tap the INFO after pressing power button, try to use sleep() and then use action Show Control UI Infos. Or you can directly put this script in Control UI.

Code: Select all

powerDialog();
sleep(1000);
After this, add action Show Control UI Infos. Execute the flow, wait 1 second and dismiss the power dialog. The Control UI Infos should show the green border which you can select the power dialog element now. Use the one that click the reboot button.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Recognize

Post by Akt » 12 May 2019 09:43

Thanks desmanto for your help.
But automagic is not able to click reboot button anyhow.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Recognize

Post by Desmanto » 12 May 2019 09:59

Do the green border appear? Do you try all possible combination : click(x,y), click("Reboot") and clickById(id) ? Most likely the click(x,y) still can work, but maybe you have to guess the x,y point. You can use show Pointer Location from developer options to help you determine the x,y.

Try to check the quicksetting button too. I remember MIUI has the reboot button there. You can try to use Control UI to click it.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Recognize

Post by Akt » 12 May 2019 11:44

Yes, green box appears and tried all the three options but none of them works.

In quick setting tiles also there is no button.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Recognize

Post by Desmanto » 12 May 2019 12:56

Make sure you give sleep enough long to test the click. Try 3 seconds to be sure. Repeat test for each variant.

Code: Select all

powerDialog();
sleep(3000);
click("Reboot");
If that still doesn't work, your only chance left is to root the phone.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Recognize

Post by Akt » 12 May 2019 14:47

It didn't work for me.
Is there any other way without rooting the phone.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Recognize

Post by Desmanto » 14 May 2019 06:26

I have search for several alternatives, it seems there is no other way from Control UI or root. But MIUI 9 above has Automatic power on/off : http://en.miui.com/thread-541385-1-1.html

You can use control UI to go this menu and set the clock and enable the option. Of course set it to the next minute. Phone reboot and then use Trigger Automagic startup with Control UI again to disable it back (if not, it will reboot again based on the schedule).

There might be some secure setting correspond to this. You can try my secure setting logger flow to check if it works. If there is key-value for it and can be modified (system reflect the changes), you can do this without Control UI and without root too (still need write secure permission).

Or maybe if what you want is simply reboot on certain hour, you don't have to use Automagic at all for this. Just set the time in that menu.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Recognize

Post by Akt » 14 May 2019 16:26

Thanks desmanto for your search and helping.

Post Reply