Android 5.1 Possibly Coming February 2015

Google released Android 5.0 just over a month ago, and since then Lollipop has been trying to … more

Double Tap to Wake on the Nexus 6 Without Root

A few weeks ago, we featured an app which allowed the Nexus 6 to regain the double tap to wake … more

Make Your Own Heat Sink for the LG Optimus 4X HD

Its not a rare occurrence that performing a resource heavy task on your Android device (e.g. … more

Learn How to Create an Old School Dialer

XDA is not only a great source for custom ROMs, kernels, and various modifications for numerous … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[how to] More volume steps & Smooth scroll for stock 4.4.2

OP EnricoD

19th January 2014, 06:56 PM   |  #1  
EnricoD's Avatar
OP Recognized Contributor / Themer
Thanks Meter: 4,009
 
2,229 posts
Join Date:Joined: May 2013
Donate to Me
HOW-TO:


Volume Steps:

1) Open framework.jar.out\smali\android\media\AudioService.smali

2) Search for

Code:
array_0
It will looks like this:

Code:
    .line 205
    :array_0
    .array-data 0x4
        0x5t 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0xft 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0xft 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0xft 0x0t 0x0t 0x0t
        0xft 0x0t 0x0t 0x0t
    .end array-data
3) Change f (15) to

1e (30 steps)

or

2d (45 steps)

It should looks like it:

Code:
    .line 205
    :array_0
    .array-data 0x4
        0x5t 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0x1et 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0xft 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0xft 0x0t 0x0t 0x0t
        0xft 0x0t 0x0t 0x0t
    .end array-data
4) Recompile back



Smooth Scroll:

1) Open framework.jar.out/android/widget/AbsListView.smali

2) Search for

Code:
.method private createScrollingCache()V
Code:
.method private createScrollingCache()V
    .locals 2

    .prologue
    const/4 v1, 0x1
3) Change 0x1 to 0x0

Code:
.method private createScrollingCache()V
    .locals 2

    .prologue
    const/4 v1, 0x0
4) Search for

Code:
.method private initAbsListView()V
Code:
.method private initAbsListView()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x1

    .line 824
    invoke-virtual {p0, v1}, Landroid/widget/AbsListView;->setClickable(Z)V

    .line 825
    invoke-virtual {p0, v1}, Landroid/widget/AbsListView;->setFocusableInTouchMode(Z)V

    .line 826
    invoke-virtual {p0, v2}, Landroid/widget/AbsListView;->setWillNotDraw(Z)V

    .line 827
    invoke-virtual {p0, v2}, Landroid/widget/AbsListView;->setAlwaysDrawnWithCacheEnabled(Z)V

    .line 828
    invoke-virtual {p0, v1}, Landroid/widget/AbsListView;->setScrollingCacheEnabled(Z)V
4) Change v1 to v2 in line828 like this:

Code:
.method private initAbsListView()V
Code:
.method private initAbsListView()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x1

    .line 824
    invoke-virtual {p0, v1}, Landroid/widget/AbsListView;->setClickable(Z)V

    .line 825
    invoke-virtual {p0, v1}, Landroid/widget/AbsListView;->setFocusableInTouchMode(Z)V

    .line 826
    invoke-virtual {p0, v2}, Landroid/widget/AbsListView;->setWillNotDraw(Z)V

    .line 827
    invoke-virtual {p0, v2}, Landroid/widget/AbsListView;->setAlwaysDrawnWithCacheEnabled(Z)V

    .line 828
    invoke-virtual {p0, v2}, Landroid/widget/AbsListView;->setScrollingCacheEnabled(Z)V
5) Search for

Code:
.method public setScrollingCacheEnabled(Z)V
Code:
.method public setScrollingCacheEnabled(Z)V
    .locals 1
    .parameter "enabled"
6) Change enabled to disabled

Code:
.method public setScrollingCacheEnabled(Z)V
    .locals 1
    .parameter "disabled"


More info and original guide, adapted for N5, here: http://forum.xda-developers.com/show....php?t=1411317



Credits: @AndroidON
Last edited by EnricoD; 7th June 2014 at 10:11 PM.
The Following 6 Users Say Thank You to EnricoD For This Useful Post: [ View ]
19th January 2014, 06:56 PM   |  #2  
EnricoD's Avatar
OP Recognized Contributor / Themer
Thanks Meter: 4,009
 
2,229 posts
Join Date:Joined: May 2013
Donate to Me
... reserved ...
Last edited by EnricoD; 21st January 2014 at 09:41 PM.
The Following 3 Users Say Thank You to EnricoD For This Useful Post: [ View ]
19th January 2014, 07:52 PM   |  #3  
fcisco13's Avatar
Senior Member
Flag houston
Thanks Meter: 415
 
1,947 posts
Join Date:Joined: Jul 2010
More
Will try these than you.

Whatchu talking bout willis!
4th September 2014, 09:11 PM   |  #4  
granets's Avatar
Senior Member
Flag Vratsa
Thanks Meter: 184
 
578 posts
Join Date:Joined: Oct 2011
More
Guys, this appears to work very well on my Nexus 5 running SlimKat 7.8. I had some trouble, but when I finally managed to edit the files and swap out the framework.jar file, scrolling is out of this world!!! No more slow facebook scrolling, or laggy gallery scrolling. It is so good, that I am wondering - are there any drawbacks??? If not, why aren't all ROMs doing this by default. It's just great!!!
p.s. to the OP - Don't reference lines in the code!!! Lines in my file were different (for example your line828 to edit, on my framework was line850). Watch out for this guys! Just look at what you change, don't look at the line number! (e.g. not line828, but rather look for "setScrollingCacheEnabled(Z)V")
Last edited by granets; 4th September 2014 at 09:14 PM.
5th September 2014, 10:19 AM   |  #5  
Lethargy's Avatar
Senior Member
Flag Somewhere quiet.
Thanks Meter: 2,470
 
4,067 posts
Join Date:Joined: Jan 2014
More
Quote:
Originally Posted by granets

Guys, this appears to work very well on my Nexus 5 running SlimKat 7.8. I had some trouble, but when I finally managed to edit the files and swap out the framework.jar file, scrolling is out of this world!!! No more slow facebook scrolling, or laggy gallery scrolling. It is so good, that I am wondering - are there any drawbacks??? If not, why aren't all ROMs doing this by default. It's just great!!!
p.s. to the OP - Don't reference lines in the code!!! Lines in my file were different (for example your line828 to edit, on my framework was line850). Watch out for this guys! Just look at what you change, don't look at the line number! (e.g. not line828, but rather look for "setScrollingCacheEnabled(Z)V")

Lines are referenced because the thread is named "stock".

You might feel its a little worse if you scroll one line at a time but flings should be smoother. Personally I feel no difference.

ふかつどう
13th September 2014, 03:13 AM   |  #6  
Senior Member
Thanks Meter: 9
 
112 posts
Join Date:Joined: Jan 2012
I did everything as instructed for scroll mod. Apps didn't load. Nexus 5 SlimKat 7.9
any ideas?
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes