So then I thought, how about an app for that. Listen for keypresses, set the volume to max, easy peasy. Ha. Services can't listen for keypresses. Apps only listen when they are in focus. All apps are run as their own user and group and the /dev/input devices are not readable by anybody but root or those in the input group. 3 ideas on a simple app, no way to do it without rooting the phone.
Ie, something like: // Get the AudioManager AudioManager audioManager = (AudioManager)this.getSystemService(Context.AUDIO_SERVICE); // Set the volume of played media to maximum. audioManager.setStreamVolume ( AudioManager.STREAM_MUSIC, audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);
Unless there are more requirements here that I am missing, this sounds achievable without root.