Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,416 Members 38,930 Now Online
XDA Developers Android and Mobile Development Forum

[HOWTO]More smooth scroll & volume step increase for MOST android phones[Poweramp OK]

Tip us?
 
AndroidON
Old
(Last edited by AndroidON; 6th February 2012 at 03:36 AM.)
#1  
Senior Member - OP
Thanks Meter 500
Posts: 154
Join Date: May 2011
Location: Cheongju-si
Default [HOWTO]More smooth scroll & volume step increase for MOST android phones[Poweramp OK]

※Do this when you completely understand this.
This is not for people who are noob to phone and computer things.



This is a framework.jar mod which will affect on overall scrolling and volume steps.

I've searched through several references and found some modification.

By following steps below, you will modify your rom's framework.jar.

And it will make your phone's volume control more precise and scroll to be more smooth.

Some phones may have different structure in framework.jar so I'm not sure.

(I've tested this on HTC desire and Motorola Atrix. I'm an Atrix user.)



Ok, so here's everything you need before start.

1. framework.jar of your phone. (Deodexed ROM needed)

2. Java software Development Kit
http://www.oracle.com/technetwork/ja...d-1377129.html

3. smali/baksmali tool (Thanks to the Korean guy, 'vorcot')
http://api2.ge.tt/0/9LvgHdB/0/blob/download


4. Text editor - Window basic text editor can be used..but I recommend Notepad++
http://notepad-plus-plus.org/

5. Program which can extract .jar file. (I prefer 7zip)

6. File manager which can access to phone's internal system.
(Like root explorer)

7. Your rom's original zip under SDcard for in case of bootloop.




A. Basic steps.

1. Unzip the smali/baksmali tool to certain folder and put the framework.jar in same folder.

2. Run baksmali manager.bat.

3. Select framework.jar by pressing 4 -> 2 in main menu.

4. Press 1 to Baksmali the framework.jar.

5. Wait.

6. Make it sure that new 'framework' folder is created and files inside it. (Don't close the baksmali manager window yet!)




B. Modification Steps


Volume steps mod
- Since I saw some people are complaining about android's volume control is jumping to large amount, I made some mod.

This will adjust your phone volume steps.



Sorry for not showing you by English, but you can recognize the media volume counts increased from 15 to 30.


Here's what you have to modify:

1. Open the framework/android/media/AudioService.smali with text editor.

2. Press Ctrl + F to open the search window and serch for 'max_'

3. Continue search until you find the line below.


4. You can see the 'array_1ba' in screenshot. This may vary for roms. (But usually only '1ba' changes.)
This will lead you to data of max volume.
Search for 'array_1ba' again.

5. You will see like this:


This data's meaning is same with this. (From CM7 source)


6. So if you want modify your music or movie volume, you have to modify 4th line's 'f'.
(This 'f' means 15 by hexadecimal number)
If you use bluetooth, modify 7th line too.
I changed 'f' to '1e', which means 30 in hexadecimal number.

7. Press the text editor's save button if you finished.



Smooth scroll mod


Add - This tweak will be included in CM7 officially. Editing smali manually will not needed.
So you can find the option in performance setting. Thanks cyanogenmod team!
(But other stock based roms still can do this like 'Sense','Blur','Touchwiz',etc)


- Some android applications have some lag when they scroll.

I found in logcat that garbage collector is working to much when I do some scroll in application.

I googled about it and found the 'scrollingcache' function inside android making problem.

Some application developers recommend disable 'scrollingcache' in app's internal config.

But not all applications have disabled scrollingcache.

So the mod I'll do will disable the scrollingcache throughout the Android OS.

All apps will have no problem with scrollingcache.

I've had scrolling improvements with facebook,playerpro,poweramp,gallery apps , etc.

It is simillar with volume step mod but different value to change.


Here's what you have to modify:

1. Open the framework/android/widget/AbsListView.smali with text editor.

2. Search through 'ScrollingCache' and change it like below screenshot.


-----------------------------------------------------------------------------------------------



-------------------------------------------------------------------------------------------------



3. Press the text editor's save button if you finished.



C. Finishing steps.


1. Come back to baksmali manager window.

2. Press 2 to smali.

3. Wait. (It will create classes.dex file after finish)

4. Open the framework.jar file with 7zip.

5. Overwrite the classes.dex file inside the framework.jar.
(You can just drag&drop the classes.dex file to 7zip window.)



D. Installing steps.


1. Put modified framework.jar to your phone's sdcard.

2. Open the phone's file manager which have root access and copy the modified framework.jar to /system.

3. Set permission to rw-r--r-- or like this:


4. Move it to /system/framework. (Select yes for overwrite.)

5. Reboot.




I've used a lot of time for searching this.

You can use this for your own rom but please tell me before you use it.

And any bug reports or impressions will be appriciated.

Enjoy


EDIT - Some people are complaining about volume mod that it is not working with poweramp.

You can use it by changing your setting.

Power Amp settings - Audio Engine - Advanced Tweaks - Uncheck 'Direct Volume Control'

This will solve the problem.

This info is by 'wd2347' from Korean Atrix forum.
The Following 317 Users Say Thank You to AndroidON For This Useful Post: [ Click to Expand ]
 
cdesai
Old
#2  
cdesai's Avatar
Recognized Developer
Thanks Meter 3,993
Posts: 2,277
Join Date: Jan 2011
Location: IN YOUR HEAD

 
DONATE TO ME
Nice work! :D

Also, in case of a boot loop, just a backup of the modded file should be OK.

From my fingers to your eyez
CyanogenMod Maintainer | SGT7 | TeamBBQ

 
BBQLinux - An Arch based Linux distribution for Android developers
Website: http://www.bbqlinux.org | Downloads: [url]http://sourceforge.net/projects/bbqlinux/files//url]
IRC: #bbqlinux on freenode
The Following 2 Users Say Thank You to cdesai For This Useful Post: [ Click to Expand ]
 
le_manhpro
Old
#3  
Senior Member
Thanks Meter 92
Posts: 296
Join Date: Aug 2011
Location: Buôn Mê Thuột
I have tried installing on my xperia arc s, steps by steps, and line of arc is 164 (.line165)
When I rebooted the machine and adjust volume from only min-> max, or max-> min, and no custom sorry my english is not good
 
AndroidON
Old
#4  
Senior Member - OP
Thanks Meter 500
Posts: 154
Join Date: May 2011
Location: Cheongju-si
Quote:
Originally Posted by le_manhpro View Post
I have tried installing on my xperia arc s, steps by steps, and line of arc is 164 (.line165)
When I rebooted the machine and adjust volume from only min-> max, or max-> min, and no custom sorry my english is not good
Did you changed 'f' to '1e' ?

I think you have changed it to '1' instead of '1e'.
The Following 3 Users Say Thank You to AndroidON For This Useful Post: [ Click to Expand ]
 
drsood
Old
#5  
Senior Member
Thanks Meter 29
Posts: 245
Join Date: Oct 2010
works great...thnx
 
manosv
Old
#6  
Senior Member
Thanks Meter 9
Posts: 110
Join Date: Apr 2007
Location: Heraklion,Crete

 
DONATE TO ME
Works great on my tablet novo 7 advanced.
Press The Thanks button if i helped
 
Notorious544d
Old
#7  
Notorious544d's Avatar
Senior Member
Thanks Meter 2,381
Posts: 1,940
Join Date: Aug 2011
Location: London

 
DONATE TO ME
Thanks A LOT!! VERY clear instructions, can't thank you enough. You must have put in a lot of time finding these stuff, so hats up from me.

-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--
If you like my work, kindly hit the 'thanks' button.
And if you're really kind, consider a small donation by hitting the smiley below.

 
tehgyb
Old
#8  
tehgyb's Avatar
Senior Member
Thanks Meter 171
Posts: 722
Join Date: Mar 2011
Location: Easton, PA
Thanks for the write up! I'll have to try this out tonight!!

Sent from my SGH-T959V using XDA App
Galaxy S4g//Galaxy Nexus//Galaxy SII//Galaxy SIII//Galaxy SV

Retired Themer and Developer

If you like it, Hit thanks!
 
Orilin
Old
#9  
Orilin's Avatar
Senior Member
Thanks Meter 53
Posts: 220
Join Date: Mar 2011
Location: Napoli
Thank you!! It works on Samsung Galaxy 3 (Apollo)! The first boot is been very long, like a bootloop, so I reboot two time after about 10 minutes of bootanimation, then the phone boot normally. It work like a charm!
GNexus: ParanoidAndroid 4.4 FINAL
G3: PuruKisadHYBRID v2.5.7
 
le_manhpro
Old
#10  
Senior Member
Thanks Meter 92
Posts: 296
Join Date: Aug 2011
Location: Buôn Mê Thuột
Quote:
Originally Posted by AndroidON View Post
Did you changed 'f' to '1e' ?

I think you have changed it to '1' instead of '1e'.
yes, I've changed as you said, so no need to change as directed, I will do anything to be so, sr my english is not good

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes