I am looking for a way to record the setting changes I do manually, in order to be able to repeat them later by running the same script.
I tried the MacroDroid app, but it doesn't look it has a "record macro" feature.
Any suggestion welcome.
On a non-rooted device changing the settings automatically is not that simple. However if you have multiple identical devices you might be successful by preparing one device with all the settings you want and then create a backup of just the settings. For doing so you need however first activate the development mode and the Android Debug Bridge (adb) on every device.
adb backup -f settings.ab -noapk com.android.providers.settings
Check that the created file
settings.ab has at least 10 KB of size.
Then you can restore the settings to any other device (with activate adb) via
adb restore settings.ab
An alternative way that however also requires adb would be to use the different settings via
adb shell settings put .... But I am not sure if all settings can be accessed this way and you have to find out all the different option names you want to set.