Linux

Android - Disable Volume Warning

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

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).

So install the ADB binary onto your computer followed by the driver for your device.

Go to Settings –> About Phone and tap on Build Number 7 times. Now select Settings –> Developer Options and enable USB Debugging. Connect the phone to the computer and open a terminal.

Grant the permission required using adb:

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

Grant the permission required using a shell in the device:

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 an 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.

 

© 2019 Mteam7 - All rights lorem ipsum dolor sit amet, consectetur adipiscing elit.*