Page 1 of 1

Greyscale mode

Posted: 02 Feb 2019 21:12
by icefox56
I want to turn on android 'greyscale mode' permanently. But when I open gallery or video app it should turn off.

What command should I use to toggle Android 'greyscale mode'?

Asus zenfone max pro M1
Android 8.1 stock
Rooted

Re: Greyscale mode

Posted: 03 Feb 2019 10:35
by Desmanto
You can try Action Set System Setting, try to find the value related to "gray", "read", "color" from all three categories of system, secure, global database. Once you find, you can try to toggle the grayscale mode and see if the value change. if it is, then try to execute the Set System Setting, to see if the system reflect the changes immediately. If success, then you are lucky, you can use that.

I have just finished the flow to check changes happen on the secure setting database. Require some testing to make sure it is working perfectly, before I share it. Unfortunately it requires root access for half of the function, because Automagic Init variable system setting doesn't support wildcard (to init all setting). It is not a problem for root user, but will be a problem for others.

Re: Greyscale mode

Posted: 03 Feb 2019 14:42
by icefox56
Thank you @Desmanto

That did it. It was in the 'set system settings option'.

For anybody who is interested:

- Action: set system settings
----------------------------------------------
Category: Secure

# This sets the 'Colour correction' option to ON

accessibility_display_daltonizer_enabled
0 = disabled
1 = enabled

# This select the 'Correction mode'

accessibility_display_daltonizer
-1 = Normal mode
0 = Greyscale mode

(The value given here may be different in your phone.)


@Desmanto What does the 'flow to check changes happening on the secure setting database' do? I mean how will it help users in flow creation?

Re: Greyscale mode

Posted: 03 Feb 2019 16:50
by Desmanto
Thanks too for sharing the key value to set the grayscale.

The flow is one of my flowception (flow to help creation of other flow). It uses the similar concept from my windows recognizer flow and variable logger flow; but this is for Secure setting database. It is very difficult to check which value correspond to what setting in many phones out there. Different version ROM/android can have different value. That's where my flow comes into play.

I simply enable the logger flow. Go to the setting and change something, it will toast me the message of the Category, key, old value and new value. I can even copy-paste and use it directly in Action Set System Setting later. This is so handy, that I will forget how hard it is to search and test which value correspond to certain setting.

Re: Greyscale mode

Posted: 03 Feb 2019 21:38
by icefox56
Wow that sounds so cool. It's definitely going to be a great help for less tech savvy people in the community (including me). Hope you'll share it.

How is the flow going to recognise this UI events? Accessibility or root?

I've always tried to not touch accessibility service because I've heard that turning it on make the phone run slow.

Re: Greyscale mode

Posted: 04 Feb 2019 04:40
by Desmanto
Will share it after I tested it several days. I am still AFK from PC, it is quite difficult to type a full flow sharing. The flow actually has finished partially since about half year ago, but I just finish the other half after being AFK :D

UI event, Control UI, App task started/ended; all using Accessibility services, not root access. Yes, activating it wil slow down the device a bit. But it is almost not noticeable anymore if you haveat least recent mid range SoC. You are using SD636, same as mine, RN5 SD636 too. I don't notice any perfomance hit nor battery drain by using the accessibility. My standby and Screen On Time still similar (even better) than most of other RN5 user which don't use Automagic/activating the accessibility service.

I can't bear using android anymore without Automagic / its accessibilty services. Now I have 80 Control UI and 20 UI Event. Without accessibility, those flows will be broken. Even if it slows down the phone, it still worth it.