Can I know who is changing Android's media volume?


Question

Recently my phone's media volume will be changed to a fixed value in period automatically. I guess there's a bad app running in background or by alarm doing this, but I have no idea which one is the convict.



Is there a way to let me know who is changing system media volume? My device is an HTC Butterfly 3 running Android 5.0.2 official ROM – and power saving is not turned on (in case it matters). Thanks!


Answer

In my COS12 (Android 5.0.2), I noticed that whenever the volume was changed an intent was broadcasted with action android.media.VOLUME_CHANGED_ACTION and that was all I was able to see using dumpsys or . The extras in that intent did not contain anything useful to trace the app.



Anyhow. Following is what I can recommend as an approach and as of now:



Install aSpotCat1, uncheck Ignore system apps from its settings and under List apps by permission browse the section Audio Settings. This app missed some system apps which my answer here took care of2.



(Click image to enlarge)



IMG:



I suggest you check View app's full package name? and find out the package name of all the apps listed by aSpotCat. After that, uninstall all the user installed apps involved. Since removal may not be a preferable option for you, you can consider hiding/blocking them. Setup in PC and do:




adb shell pm block PACKAGE # for KitKat
adb shell pm hide PACKAGE # for Lollipop


PACKAGE should be replaced by package name of the app. In short, the effect observed from that command is akin to removing an app from your OS with major difference that the app's data and UID would remain preserved.



To reinstate the app, replace hide by unhide and block by unblock in aforesaid commands.



You would have to wait and observe if the volume is getting changed. If yes, hide/block/remove those user installed apps singularly or in bulk and then go into observation mode again. If all the user installed apps are removed yet the change in media volume can be observed then a system app is involved in the process. If you've a custom installed or you're ready to the device, only then you should consider hiding/blocking/disabling a system app listed by aSpotCat since the stability of the OS can be affected.



As you would have guessed by now, this is a messy solution, relies on trial and error and doesn't guarantee much that you would be able to pin-point the app. However, I don't think there is any way to easily pin-point the app affecting the media volume.






1 You may try any permission checker app. The helpful list maintained by user Izzy on his website may come handy.

2 Input the permission android.permission.MODIFY_AUDIO_SETTINGS.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes