Blob pattern in action "init variable system setting
Moderator: Martin
Blob pattern in action "init variable system setting
Can you support blob in action "init variable system setting" to iterate over them?
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Re: Blob pattern in action "init variable system setting
I'm not sure if I understand your request properly. Do you want to enter a glob pattern in the action 'init variable system setting' so that the action would return a list of all matched settings?
In this case I would prefer to return a map that contains the key and the value of each matched setting.
You could already build a loop to query each setting of interest. To achieve this you can initialize a list with the setting names of interest in a script action and then add a template to loop over the list:
-in the script action build the list with: items = newList("setting1", "setting2", "setting3");
-save the script action
-drag the plus-icon from the script action down, select 'Template', 'Loop over list (condensed)'.
-replace action 'Notification on Screen' by action 'Init Variable System Setting' and one more action to do whatever you want to do with the setting value.
Regards,
Martin
In this case I would prefer to return a map that contains the key and the value of each matched setting.
You could already build a loop to query each setting of interest. To achieve this you can initialize a list with the setting names of interest in a script action and then add a template to loop over the list:
-in the script action build the list with: items = newList("setting1", "setting2", "setting3");
-save the script action
-drag the plus-icon from the script action down, select 'Template', 'Loop over list (condensed)'.
-replace action 'Notification on Screen' by action 'Init Variable System Setting' and one more action to do whatever you want to do with the setting value.
Regards,
Martin
Re: Blob pattern in action "init variable system setting
That does not apply to the scenario where i want to use it: i want a object containing all system setting (or a part of them) so i know all entries in the system settings. For example to find anything containing "ad" or "id"You could already build a loop to query each setting of interest. To achieve this you can initialize a list with the setting names of interest in a script action and then add a template to loop over the list:
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Re: Blob pattern in action "init variable system setting
+1 for this. Having a map that contains all available value from each global, secure, system, will be nice. Previously, I ended up using execute root command, cat those 3 xml and parse them using regex, rearrange them into new map. This require root.Martin wrote: In this case I would prefer to return a map that contains the key and the value of each matched setting.
@Bluscre : What android version you are using? I created the flow for Oreo 8.1. The configuration files has been changed after Nougat (CMIIW), it will stored as xml in /data/system/.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Blob pattern in action "init variable system setting
6.1Desmanto wrote:What android version you are using? I created the flow for Oreo 8.1. The configuration files has been changed after Nougat (CMIIW), it will stored as xml in /data/system/.
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Re: Blob pattern in action "init variable system setting
Marshmallow 6.0.1 seems still using the SQLite database, as opposed to xml in Nougat 7.0+. But I found that the root command should work (probably require busybox)
Each of this will output the key-value in format
KEY=VALUE
So you can split them or parse them into a list which you can iterate later.
But of course, it will better if the init variable system setting can provide us the full map of the whole system. Even then, we still need the global pattern support as has been supported in the trigger "System Setting Changed". Speaking of the trigger, now we can use the trigger to detect any changes in the system setting, so we can use to avoid using Control UI. I just found so many wonderful things can be done. I am recreating my flow from scratch now.
As additional request, because it is very similar, please provide a new action and trigger for the LOS too. Maybe can be called trigger "System Setting Changed (LineageOS)" and action "Init Variable System Setting (LineageOS)". Both are similar to the default android, except they are for LineageOS ROM. This will benefit LOS users and its derivative, since it is one of the most popular custom ROM and has so many forks based on it. I am using RR 6.2.0, which is based on LOS 15.1, and I can still use the Set LineageOS System Setting to change some setting, such as color calibration. I already have some evil things added to the to-do list
Code: Select all
settings list global
settings list secure
settings list system
KEY=VALUE
So you can split them or parse them into a list which you can iterate later.
But of course, it will better if the init variable system setting can provide us the full map of the whole system. Even then, we still need the global pattern support as has been supported in the trigger "System Setting Changed". Speaking of the trigger, now we can use the trigger to detect any changes in the system setting, so we can use to avoid using Control UI. I just found so many wonderful things can be done. I am recreating my flow from scratch now.
As additional request, because it is very similar, please provide a new action and trigger for the LOS too. Maybe can be called trigger "System Setting Changed (LineageOS)" and action "Init Variable System Setting (LineageOS)". Both are similar to the default android, except they are for LineageOS ROM. This will benefit LOS users and its derivative, since it is one of the most popular custom ROM and has so many forks based on it. I am using RR 6.2.0, which is based on LOS 15.1, and I can still use the Set LineageOS System Setting to change some setting, such as color calibration. I already have some evil things added to the to-do list
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.