[Nexus 7 General] prestige777:
Adding Volume Steps

This is a guide to show you how to add volume steps.

(Always back up your device)

The Nexus 7 has 15 steps on its volume range by default, which is a just a fraction of what most device have, which means when you listen to music the volume is quite on one step and way to loud on the next, this is a guide to help you set the volume range to something more manageable.

​

First download these files baksmali and smali and place them in your C drive.

Next navigate to system/framework on your device and find framework.jar, copy and paste it into your C drive.

Open framework.jar with a zip utility and extract the contents into a folder on your C drive. I titled the folder Volume Control myself.

Hold down "Shift" and right click on an open space in the folder you created and click on "open command window here"

and type: java -Xmx512m -jar c:\baksmali.jar classes.dex Hit enter (copy java -Xmx512m -jar and paste on a document for easy access later)

A folder titled "out" will appear in the folder you created, open the out folder and then open a folder titled "Android" and finally open a folder titled "Media" Look for a file titled "AudioService" open it with a text editing program, (note pad, notepad ++) Click on search on the program menu and type in "array-data 0x4" look for a column of data starting with 0x5t it will be the only column of data starting with 0x5t, the column will look similar to this:

1. 0x5t 0x0t 0x0t 0x0t this is equal to this:STREAM_VOICE_CALL the 5 in 0x5t=5 steps

2. 0x7t 0x0t 0x0t 0x0t this is equal to this:STREAM_SYSTEM the 7 in 0x7t=7 steps

3. 0x7t 0x0t 0x0t 0x0t this is equal to this: STREAM_RING the 7 in 0x7t=7 steps

4. 0xft 0x0t 0x0t 0x0t this is equal to this:STREAM_MUSIC the f in 0xft=15 steps

5. 0x7t 0x0t 0x0t 0x0t this is equal to this:STREAM_ALARM the 7 in 0x7t=7 steps

6. 0x7t 0x0t 0x0t 0x0t this is equal to this: STREAM_NOTIFICATION the 7 in 0x7t=7 steps

7. 0xft 0x0t 0x0t 0x0t this is equal to this: STREAM_BLUETOOTH_SCO the f in 0xft=15 steps

8. 0x7t 0x0t 0x0t 0x0t this is equal to this:STREAM_SYSTEM_ENFORCED the 7 in 0x7t=7 steps

9. 0xft 0x0t 0x0t 0x0t this is equal to this: STREAM_DTMF the f in 0xft=15 steps

10. 0xft 0x0t 0x0t 0x0t this is equal to this:STREAM_TTS the f in 0xft=15 steps

Change the f's on lines 4,7,9 and 10 to whatever you like, you can change the other steps as well.

Here are some values to help you out: 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9, a=10, b=11, c=12, d=13, e=14, f=15, 10=16, 11=17, 12=18, 13=19, 14=20, 15=21, 16=22, 17=23, 18=24, 19=25, 1a=26, 1b=27, 1c=28, 1d=29, 1e=30, 1f=31, 20=32, 21=33, 22=34, 23=35, 24=36, 25=37, 26=38, 27=39, 28=40, 29=41, 2a=42, 2b=43, 2c=44, 2d=45

Be sure to save your entries when you are done.

Now look for a file titled "AudioManager" open it with a text editing program, (note pad, notepad ++) Click on search on the program menu and type in "array-data 0x4" You should find only one column of data, it should look similar to this:

1. 0x4t 0x0t 0x0t 0x0t this is equal to this:STREAM_VOICE_CALL the 4 in 0x4t=4 steps

2. 0x7t 0x0t 0x0t 0x0t this is equal to this:STREAM_SYSTEM the 7 in 0x7t=7 steps

3. 0x5t 0x0t 0x0t 0x0t this is equal to this: STREAM_RING the 5 in 0x5t=5 steps

4. 0xbt 0x0t 0x0t 0x0t this is equal to this:STREAM_MUSIC the b in 0xbt=11 steps

5. 0x6t 0x0t 0x0t 0x0t this is equal to this: STREAM_ALARM the 6 in 0x6t=6 steps

6. 0x5t 0x0t 0x0t 0x0t this is equal to this: STREAM_NOTIFICATION the 5 in 0x5t=5 steps

7. 0x7t 0x0t 0x0t 0x0t this is equal to this: STREAM_BLUETOOTH_SCO the 7 in 0x7t=7 steps

8. 0x7t 0x0t 0x0t 0x0t this is equal to this:STREAM_SYSTEM_ENFORCED the 7 in 0x7t=7 steps

9. 0xbt 0x0t 0x0t 0x0t this is equal to this: STREAM_DTMF the b in 0xbt=11 steps

10. 0xbt 0x0t 0x0t 0x0t this is equal to this:STREAM_TTS the b in 0xbt=11 steps

Change the b's on lines 4, 9, and 10 to something similar to your AudioService entries. you can change the other steps as well. Save when you are done.

Now you want to open Command Prompt in the folder the same way as before and type:

java -Xmx512m -jar c:\smali.jar out and hit enter.

This will create a file titled "out.dex" rename this to "classes.dex" and then open the framework.jar file with a zip utility and replace the old "classes.dex" file with the new "classes.dex" file, finally delete the old framework.jar file(make a copy of the old) on your device and paste the new one, make sure the permissions are set correctly and restart your device, you should have more volume steps.

I haven't had any problems doing this, all my apps work as does all my audio. I set the volume steps in AudioService to 40 to match my mp3 player and the volume steps in AudioManager to 24.​