'Set and detect mono audio programmatically in Android (Accessibility)

Android allows me to set combine audio channels into a single, mono channel. It's in accessibility settings, takes to much time (imo). So I want to set it programmatically (or through tasker, Idc) but I can't find it inside the Android accessibility API documentation. I'm not sure if it's there, somewhere else or nowhere. Can someone help me find a way to detect if the settings is available and how to set it.

Thanks in advance!

The picture of the settings



Solution 1:[1]

So far I have not been able to find anything that can do this (on my unrooted Phone) programmatically.

I ended up using AutoInput to scroll down after opening Accessibility Settings with the task of that same name, then tapping the toggle for Mono Audio. Keep in mind to wait ~350ms or more between the actions to wait for things to occur (less issues with AutoInput not working properly) if you don't have a very fast device.

Secure Settings might be able to modify this, but rooting my phone for that one thing is not worth it.

Solution 2:[2]

This app allows me to toggle it as an tile; but I think root is required. https://play.google.com/store/apps/details?id=it.simonesestito.ntiles

Solution 3:[3]

Here is the command to set mono: settings put system master_mono 1

I decompiled that app David mentioned above, and found it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David
Solution 2 SilentLucidity
Solution 3 color color