Solution(ish)
Apparently dbus is a thing that could be used to change settings. The short version is that the following python script, when ran as root, turns off silent mode:
import dbus
session = dbus.SystemBus()
proxy = session.get_object('org.freedesktop.Accounts','/org/freedesktop/Accounts/User#####')
interface = dbus.Interface(proxy,'org.freedesktop.DBus.Properties')
interface.Set('com.ubuntu.touch.AccountsService.Sound','SilentMode',False)
The slightly longer version is:
qdbus --system
Seems to list all the services associated with the system dbus.
qdbus --system org.freedesktop.Accounts
Seems to list the paths associated with that service.
qdbus --system org.freedesktop.Accounts /org/freedesktop/Accounts/User#####
Seems to list all the methods and properties associated with that path (in this case a path to a specific user). This had the following relevant methods:
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
Here the GetAll and Set methods require an interface name which we can find out by calling the Introspect function like this:
qdbus --system org.freedesktop.Accounts /org/freedesktop/Accounts/User##### org.freedesktop.DBus.Introspectable.Introspect
Which prints a xml-like document to the screen showing the interface definitions. Getting the silent mode value is done as follows:
qdbus --system org.freedesktop.Accounts /org/freedesktop/Accounts/User##### org.freedesktop.DBus.Properties.Get com.ubuntu.touch.AccountsService.Sound SilentMode
The problem now was that I couldn't figure out how to format it so qdbus
interprets an argument as a boolean value, which is why I ended up using python as a workaround.
adb shell
from terminal on computer), watch for dconf changes:dconf watch /
and then toggle silent mode in the phone settings, then no changes to dconf are recorded. (However, if you, say toggle "Keyboard sound", then you do see/com/canonical/keyboard/maliit/key-press-feedback false
so it's not just the case that dconf watch isn't working.)dbus-monitor "path=/com/canonical/indicator/sound"
(in a terminal "debugging" your phone), toggling the "silent mode" setting and then somehow duplicating the signal sent (usingdbus-send
) might be promising, but I do not really understand dbus.