[MOD][XPOSED] Unsafe Volume - disable safe media volume popup/check

Search This thread

stammler

Senior Member
Jan 6, 2011
123
222
Frankfurt
Unsafe Volume Xposed mod
disable the safe media volume check

I wrote a tiny Xposed module, which disables the annoying safe media volume popup/check, present in many Jellybean devices. It works by simply setting the config_safe_media_volume_enabled system parameter to false at boot time. Because it uses the Xposed framework, it is device and rom independent :)

Installation
  1. Install the awesome Xposed framework on your rooted device.
  2. Install and activate the mod, which you can download from my Bintray site.

You can find the sources at my Github repository. This software is released under the GNU GPLv3.

Cheers!
 
Last edited:

omniphil

Senior Member
Feb 27, 2008
1,063
144
Does it matter if we are deodexed or odexed? I just got a new phone and I am running the stock samsung 4.2.2 rom, but it is rooted.

Unsafe Volume Xposed mod
disable the safe media volume check

I wrote a tiny Xposed module, which disables the annoying safe media volume popup/check, present in many Jellybean devices. It works by simply setting the config_safe_media_volume_enabled system parameter to false at boot time. Because it uses the Xposed framework, it is device and rom independent :)

Installation
  1. Install the awesome Xposed framework on your rooted device.
  2. Install and activate the mod, which you can download from my Bintray site.

You can find the sources at my Github repository. (They use the gradle build system introduced as default with Google's new android-studio IDE, with which this mod was produced.)

Cheers!
 

stammler

Senior Member
Jan 6, 2011
123
222
Frankfurt
Does it matter if we are deodexed or odexed? I just got a new phone and I am running the stock samsung 4.2.2 rom, but it is rooted.

Short Answer: It works for all roms, odexed and deodexed :)

Long Answer: This question is actually a question whether the Xposed framework works with (de)odexed roms. The first post in the Xposed framework thread says
It will work for odexed and deodexed ROMs.
under the section Advantages in the beginning. And as such does any Xposed mod work with any (de)odexed rom.
 

DaMyth

Senior Member
Dec 8, 2006
322
55
Dub-K
will this stop your device from also stopping the media and turning the volume half way down???
 

stammler

Senior Member
Jan 6, 2011
123
222
Frankfurt
will this stop your device from also stopping the media and turning the volume half way down???

No. Technically, this mod doesn't do anything but setting the system parameter config_safe_media_volume_enabled to false, no other tweaks. It should be possible to write a mod, or extend this one, so that the system doesn't stop the current media from playing when something is plugged in to the earphone jack. Anybody knows how to do this?

But there's an App in the Play store with which you can configure the volume levels that will be set when you (un)plug a cable: Hearing Saver
 
  • Like
Reactions: slmmdtruck05

shadeMe

Senior Member
Feb 10, 2013
222
36
Thanks for releasing this mod :good: I'm however having trouble getting it to function on ICS 4.0.4 - The 'Safe Volume Level' toast pops up even when the mod's enabled.
 

stammler

Senior Member
Jan 6, 2011
123
222
Frankfurt
Thanks for releasing this mod :good: I'm however having trouble getting it to function on ICS 4.0.4 - The 'Safe Volume Level' toast pops up even when the mod's enabled.

I think this popup was introduced into the core Android system with 4.1, so the implementation of this pop-up in ICS roms is probably differently, which should be the reason this mod is not working for you. But I'd be happy to add support to ICS/you particular rom/phone, if you could provide me with some information. Which phone to you have? Which rom are you running? Can you point me to the sources of your rom? Please post the output of /data/xposed/debug.log and maybe the config.xml out of your framework-res.apk (or some other .xml files if there's no config.xml).

Cheers!
 
  • Like
Reactions: jsteve01

shadeMe

Senior Member
Feb 10, 2013
222
36
Thanks - That's very generous of you! I'm running a mostly AOSP stock ROM that came with my phone - It's a Huawei Ascend G600 (U8950-1). The contents of the debug log:
Code:
-----------------
Jul 7, 2013 6:43:17 AM UTC
Loading Xposed (for Zygote)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
android.content.res.Resources$NotFoundException: android:bool/config_safe_media_volume_enabled
	at android.content.res.XResources.setSystemWideReplacement(XResources.java:232)
	at net.cantab.stammler.xposed.unsafevolume.UnsafeVolume.initZygote(UnsafeVolume.java:38)
	at de.robv.android.xposed.XposedBridge.loadModule(XposedBridge.java:282)
	at de.robv.android.xposed.XposedBridge.loadModules(XposedBridge.java:234)
	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:99)
	at dalvik.system.NativeStart.main(Native Method)
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 7, 2013 6:52:14 AM UTC
Loading Xposed (for com.goodmooddroid.gesturecontrol.RemoteContext)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 7, 2013 7:00:40 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 7, 2013 7:05:54 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 7, 2013 7:23:04 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 7, 2013 7:57:05 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 2:36:45 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 2:58:31 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 3:05:54 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 4:15:27 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 5:47:39 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 6:39:23 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 7:40:28 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 8:42:40 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 9:42:53 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 10:40:30 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 8, 2013 11:40:02 PM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 12:43:19 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 1:44:14 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 1:56:26 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 4:46:30 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 6:44:12 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 9:18:25 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 9:32:17 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 9:50:07 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 10:29:05 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 10:52:16 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod
-----------------
Jul 9, 2013 11:00:20 AM UTC
Loading Xposed (for com.android.commands.am.Am)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
Loading modules from /data/app/de.robv.android.xposed.mods.appsettings-1.apk
  Loading class de.robv.android.xposed.mods.appsettings.XposedMod
Loading modules from /data/app/sg.ruqqq.XThemeEngine-1.apk
  Loading class sg.ruqqq.XThemeEngine.Mod

I was unable to find a config.xml inside my framework-res APK so I've attached the manifest file.
 

Attachments

  • AndroidManifest.txt
    55.4 KB · Views: 133

stammler

Senior Member
Jan 6, 2011
123
222
Frankfurt
The log says
Code:
-----------------
Jul 7, 2013 6:43:17 AM UTC
Loading Xposed (for Zygote)...
Loading modules from /data/app/net.cantab.stammler.xposed.unsafevolume-1.apk
  Loading class net.cantab.stammler.xposed.unsafevolume.UnsafeVolume
android.content.res.[B]Resources$NotFoundException: android:bool/config_safe_media_volume_enabled[/B]
so indeed there isn't a config_safe_media_volume_enabled parameter in ICS, as I expected.

I was unable to find a config.xml inside my framework-res APK so I've attached the manifest file.
Thanks, but, unfortunately, the manifest wasn't helpful. I think it makes sense if you just upload the whole framework-res.apk ;)
 

shadeMe

Senior Member
Feb 10, 2013
222
36
I've attached a screenshot. As for the source code to my ROM, I'm afraid the closest we've got right now is the kernel source. And even that's ported from a different model of the phone.
 

Attachments

  • Screenshot_2013-07-12-19-48-43.jpg
    Screenshot_2013-07-12-19-48-43.jpg
    40.2 KB · Views: 1,555

stammler

Senior Member
Jan 6, 2011
123
222
Frankfurt
I've attached a screenshot. As for the source code to my ROM, I'm afraid the closest we've got right now is the kernel source. And even that's ported from a different model of the phone.
The kernel sources wouldn't help... Is it actually just showing the toast but you can increase the volume nevertheless? I couldn't find something useful in the framework-res.apk either, please send me your framework.apk ;)
 

shadeMe

Senior Member
Feb 10, 2013
222
36
Yes, the toast doesn't restrict the volume level. However, occasionally (or should I say randomly), a modal message box gets displayed instead. When it does, the volume level cannot be modified until it's dismissed. And I also recall receiving the message as a notification once.

Where would I find the framework APK? It doesn't seem to be present in the framework directory. Nor does it show up during a search (there was a JAR file of the same name though). Or are you talking about the GoogleServicesFramework APK?

PS: I just noticed that there's a second frameworkres APK, this one a custom Huawei extension. It's named framework-res-hwext.apk. Would you like to take a look at this as well?
 

stammler

Senior Member
Jan 6, 2011
123
222
Frankfurt
Yes, the toast doesn't restrict the volume level. However, occasionally (or should I say randomly), a modal message box gets displayed instead. When it does, the volume level cannot be modified until it's dismissed. And I also recall receiving the message as a notification once.

Where would I find the framework APK? It doesn't seem to be present in the framework directory. Nor does it show up during a search (there was a JAR file of the same name though). Or are you talking about the GoogleServicesFramework APK?

PS: I just noticed that there's a second frameworkres APK, this one a custom Huawei extension. It's named framework-res-hwext.apk. Would you like to take a look at this as well?

The framework-res-hwext.apk file could be helpful. Also, please run the command
Code:
ls -R /system > /sdcard/ls-R_system
in a shell on your phone (either adb shell or any terminal emulator from the play store)
and post the resulting file ls-R_system.
Cheers!
 

cybhunter

Senior Member
Jan 13, 2013
73
25
Although I don't have a Huawei device, there is a similar problem that the samsung galaxy family devices have with the unsafe volume pop-up. From poking around in the adb log on my samsung device, after triggering the message.

Code:
D/PopupuiReceiver(3524):  onReceive() getAction : android.intent.action.EAR_PROTECT_TOAST
D/STATUSBAR-NotificationService(673):  enqueueToast()

from the log I then decompiled the apk "PopuiReceiver" trying to find the string id "EAR_PROTECT_TOAST"

under the decompiled apks "public.xml" ideally look for it under the folder "values"
Code:
<public type="string" name="ear_protect_toast" id="0x7f050007" />

and under the decompiled apks "strings.xml"
Code:
<string name="ear_protect_toast">To lower your risk of hearing damage, do not listen at high volumes for long periods</string>

By being able to remove the string id "ear_protect_toast", when the function is called, the pop-up message is never triggered because there is no coding link to it (ie a dead-end).

Using the advice that stammler is mentioning, use an adb logging tool, ideally with your device connected to the computer. After that forcefully trigger the popup on device (helps to do this a handful of times so the lines of code in the adb log stands out). From the adb log, you should be able to determine what installed app (or line(s) of code) is triggering the popup message.

Hope this helps in removing the nanny message
Joe
 
Last edited:

shadeMe

Senior Member
Feb 10, 2013
222
36
@cybhunter, thanks for the detailed instructions. But I did some more digging and was able to find a build.prop setting to turn off the toast on my device.

@stammler, thanks for taking the time to help me out - Much appreciated :)
 
  • Like
Reactions: cybhunter

shadeMe

Senior Member
Feb 10, 2013
222
36
Of course, my apologies. It's ro.config.hw.security_volume, takes an integer value. Was set to 11 on my device. Although I think it might be Huawei/region specific, for I found the message string in Huawei's framework-res extension APK.
 

slimshouki

Senior Member
Dec 5, 2012
728
147
It makes my device reboots randomly

Xperia z using romaur v8.0 (4.2.2)

Sent from my C6603 using xda premium
 

Top Liked Posts

  • There are no posts matching your filters.
  • 54
    Unsafe Volume Xposed mod
    disable the safe media volume check

    I wrote a tiny Xposed module, which disables the annoying safe media volume popup/check, present in many Jellybean devices. It works by simply setting the config_safe_media_volume_enabled system parameter to false at boot time. Because it uses the Xposed framework, it is device and rom independent :)

    Installation
    1. Install the awesome Xposed framework on your rooted device.
    2. Install and activate the mod, which you can download from my Bintray site.

    You can find the sources at my Github repository. This software is released under the GNU GPLv3.

    Cheers!
    2
    Although I don't have a Huawei device, there is a similar problem that the samsung galaxy family devices have with the unsafe volume pop-up. From poking around in the adb log on my samsung device, after triggering the message.

    Code:
    D/PopupuiReceiver(3524):  onReceive() getAction : android.intent.action.EAR_PROTECT_TOAST
    D/STATUSBAR-NotificationService(673):  enqueueToast()

    from the log I then decompiled the apk "PopuiReceiver" trying to find the string id "EAR_PROTECT_TOAST"

    under the decompiled apks "public.xml" ideally look for it under the folder "values"
    Code:
    <public type="string" name="ear_protect_toast" id="0x7f050007" />

    and under the decompiled apks "strings.xml"
    Code:
    <string name="ear_protect_toast">To lower your risk of hearing damage, do not listen at high volumes for long periods</string>

    By being able to remove the string id "ear_protect_toast", when the function is called, the pop-up message is never triggered because there is no coding link to it (ie a dead-end).

    Using the advice that stammler is mentioning, use an adb logging tool, ideally with your device connected to the computer. After that forcefully trigger the popup on device (helps to do this a handful of times so the lines of code in the adb log stands out). From the adb log, you should be able to determine what installed app (or line(s) of code) is triggering the popup message.

    Hope this helps in removing the nanny message
    Joe
    2
    Does this work on Android 4.4 Kitkat? Thx

    I´ll answer myself - Why, yes it does, kind sir! :)
    2
    Of course, my apologies. It's ro.config.hw.security_volume, takes an integer value. Was set to 11 on my device. Although I think it might be Huawei/region specific, for I found the message string in Huawei's framework-res extension APK.
    1
    will this stop your device from also stopping the media and turning the volume half way down???

    No. Technically, this mod doesn't do anything but setting the system parameter config_safe_media_volume_enabled to false, no other tweaks. It should be possible to write a mod, or extend this one, so that the system doesn't stop the current media from playing when something is plugged in to the earphone jack. Anybody knows how to do this?

    But there's an App in the Play store with which you can configure the volume levels that will be set when you (un)plug a cable: Hearing Saver