Android - Disable Volume Warning

First you’ll need to install Tasker and Autotools so we can automate this trick.

Tasker: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&hl=en

AutoTools https://play.google.com/store/apps/details?id=com.joaomgcd.autotools&hl=en

Granting Secure Settings Permission to AutoTools

There are certain permissions that applications cannot be granted even if they request it in the Manifest, such as WRITE_SECURE_SETTINGS. This is because granting any application a permission as powerful as this would give that app a ton of control over your device.

By using ADB‘s package manager (pm) tool, we can grant any permission to any application we want (provided that application requests that permission in the Manifest file).

To grant the permission needed install the ADB binary and the driver for your device.

On your device go to Settings –> About Phone and tap on Build Number 7 times. Now select Settings –> Developer Options and enable USB Debugging.

Using a Terminal

Connect the phone to the computer and open a terminal. The command to grant the permission required is:

adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS

Using a shell in the device

To grant the permission required using a shell in (ssh or native terminal) do this:

su
pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS

Disabling Safe Audio Warning on Boot

Open Tasker. At the bottom right-hand corner tap on the + icon to create a new profile. Add a new Event context and go to Tasker –> Monitor Start.

For the first action, go to Task –> Wait and set 30 seconds. This accounts for the “30 second after boot” delay rule used to set the safe volume state.

Next, create a new Action and go to Plugin –> AutoTools –> Secure Settings. Press the pencil to open the configuration screen. Go to Custom Setting.

Below are the configurations for this action.

Type: Global
Name: audio_safe_volume_state
Input Type: int
Value: 2

This is it, you're set!

Next time the system restarts Tasker will make use of AutoTools to se the audio_safe_volume_state value to 2, which means no sound warnings.

{{ message }}

{{ 'Comments are closed.' | trans }}