FORUMS
Remove All Ads from XDA

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

123 posts
Thanks Meter: 224
 
By stammler, Senior Member on 25th June 2013, 06:38 PM
Post Reply Email Thread
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!
The Following 56 Users Say Thank You to stammler For This Useful Post: [ View ] Gift stammler Ad-Free
 
 
28th June 2013, 04:53 PM |#2  
Senior Member
Thanks Meter: 145
 
More
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.

Quote:
Originally Posted by stammler

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!

29th June 2013, 01:48 AM |#3  
OP Senior Member
Flag Frankfurt
Thanks Meter: 224
 
Donate to Me
More
Quote:
Originally Posted by omniphil

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
Quote:

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.
4th July 2013, 11:29 AM |#4  
DaMyth's Avatar
Senior Member
Flag Dub-K
Thanks Meter: 55
 
More
will this stop your device from also stopping the media and turning the volume half way down???
4th July 2013, 06:15 PM |#5  
OP Senior Member
Flag Frankfurt
Thanks Meter: 224
 
Donate to Me
More
Quote:
Originally Posted by DaMyth

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
The Following User Says Thank You to stammler For This Useful Post: [ View ] Gift stammler Ad-Free
5th July 2013, 06:30 PM |#6  
Senior Member
Thanks Meter: 36
 
More
Thanks for releasing this mod 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.
7th July 2013, 10:55 PM |#7  
OP Senior Member
Flag Frankfurt
Thanks Meter: 224
 
Donate to Me
More
Quote:
Originally Posted by shadeMe

Thanks for releasing this mod 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!
The Following User Says Thank You to stammler For This Useful Post: [ View ] Gift stammler Ad-Free
9th July 2013, 12:16 PM |#8  
Senior Member
Thanks Meter: 36
 
More
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.
Attached Files
File Type: txt AndroidManifest.txt - [Click for QR Code] (55.4 KB, 117 views)
9th July 2013, 02:05 PM |#9  
OP Senior Member
Flag Frankfurt
Thanks Meter: 224
 
Donate to Me
More
Lightbulb
The log says
Quote:
Originally Posted by shadeMe

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

so indeed there isn't a config_safe_media_volume_enabled parameter in ICS, as I expected.

Quote:
Originally Posted by shadeMe

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
9th July 2013, 02:50 PM |#10  
Senior Member
Thanks Meter: 36
 
More
Of course! Bitte schoen - Dropbox
11th July 2013, 11:38 PM |#11  
OP Senior Member
Flag Frankfurt
Thanks Meter: 224
 
Donate to Me
More
Quote:
Originally Posted by shadeMe

Of course! Bitte schoen - Dropbox

Hmm, didn't contain anything helpful to me either... For a start, please post a screenshot of the pop up And maybe you could search for the sources of your rom, Huawei is obliged to release them somewhere.
Post Reply Subscribe to Thread

Tags
media, volume, xposed, xposed module

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes