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

[FIX] Updated: How to fix deodexed System Framework (slow Browser)

OP brightidea

8th August 2011, 11:16 AM   |  #1  
brightidea's Avatar
OP Senior Member
Flag Heart of Arabian Peninsula
Thanks Meter: 227
 
225 posts
Join Date:Joined: May 2011
Donate to Me
More
Update 14th Aug 2011: JesusFreke has released a new version of baksmali (v1.2.7) which seems to have fixed the bug above
You may download it from here http://blog.jesusfreke.com/2011/08/s...smali-127.html - Thank you JesusFreke for a great tool and support


Please feel free to report any bugs or issues with this tool here or on his blog.

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

Good news to all modders out there - I finally found the bug for real this time - unfortunately, it's in baksmali.jar" .. The fault occurs when it attempts to build deodex framework.jarodex from into smali files
specifically this file "android/view/SurfaceView.smali"


I believe baksmali (v1.2.6) just fails to realize that the class variable it wants to access belongs to the super (parent) class .. instead it simply accesses the local class variable.

But I have a work-around fix to the bug (guranteed to work as long as the order of class fields mLeft and mTop are the same in android/view/SurfaceView.smali as android/webkit/WebViewCore$ShowRectData.smali)

The solution:
1. replace
Code:
.method private super_mLeft()I
    .registers 2

    .prologue
    .line 911
    iget v0, p0, Landroid/view/SurfaceView;->mLeft:I

    return v0
.end method
with
Code:
.method private super_mLeft()I
    .registers 2

    .prologue
    .line 911
    iget v0, p0, Landroid/webkit/WebView;Landroid/view/View;->mLeft:I

    return v0
.end method
2. and this
Code:
.method private super_mTop()I
    .registers 2

    .prologue
    .line 914
    iget v0, p0, Landroid/view/SurfaceView;->mTop:I

    return v0
.end method
with
Code:
.method private super_mTop()I
    .registers 2

    .prologue
    .line 914
    iget v0, p0, Landroid/webkit/WebView;Landroid/view/View;->mTop:I

    return v0
.end method
3. and
Code:
   iget-object v0, v0, Landroid/view/SurfaceView;->mLocation:[I

    move-object v5, v0

    const/4 v6, 0x0

    move-object/from16 v0, p0

    iget v0, v0, Landroid/view/SurfaceView;->mLeft:I

    move v7, v0

    add-int v7, v7, p4

    aput v7, v5, v6
with
Code:
   iget-object v0, v0, Landroid/view/SurfaceView;->mLocation:[I

    move-object v5, v0

    const/4 v6, 0x0

    move-object/from16 v0, p0

    iget v0, v0, Landroid/webkit/WebView;Landroid/view/View;->mLeft:I

    move v7, v0

    add-int v7, v7, p4

    aput v7, v5, v6
4. and last peice
Code:
    iget-object v0, v0, Landroid/view/SurfaceView;->mLocation:[I

    move-object v5, v0

    const/4 v6, 0x1

    move-object/from16 v0, p0

    iget v0, v0, Landroid/view/SurfaceView;->mTop:I

    move v7, v0

    add-int v7, v7, p5

    aput v7, v5, v6

    .line 439
with
Code:
    iget-object v0, v0, Landroid/view/SurfaceView;->mLocation:[I

    move-object v5, v0

    const/4 v6, 0x1

    move-object/from16 v0, p0

    iget v0, v0, Landroid/webkit/WebView;Landroid/view/View;->mTop:I

    move v7, v0

    add-int v7, v7, p5

    aput v7, v5, v6

    .line 439
*NOTE* please keep my nickname in references for this solution.


Happy Modding,

- Brightidea
Last edited by brightidea; 14th August 2011 at 10:14 AM. Reason: new tool released - issue closed
The Following 43 Users Say Thank You to brightidea For This Useful Post: [ View ]
8th August 2011, 11:33 AM   |  #2  
ringrover's Avatar
Senior Member
Flag Dubai
Thanks Meter: 48
 
958 posts
Join Date:Joined: Dec 2010
More
Thanks

But how we change the code
8th August 2011, 12:42 PM   |  #3  
Senior Member
Flag Augusta, Ga
Thanks Meter: 165
 
380 posts
Join Date:Joined: Nov 2006
More
Assuming you have a deodex'd rom, baksmali browser.apk make the listed change and re-smali the code.

If you asking how to bakssmali etc, thats more drawn out..
8th August 2011, 12:46 PM   |  #4  
BMWpokerAce's Avatar
Senior Member
Thanks Meter: 580
 
333 posts
Join Date:Joined: Sep 2010
More
I cant wait to try this, later this evening

I m just wondering how, just this one line can fix the laggy browser?
But anyway if this realy works, i m happy.

Thank you for sharing your work.
8th August 2011, 02:43 PM   |  #5  
criskelo's Avatar
Recognized Developer
Flag Rosario
Thanks Meter: 4,935
 
1,076 posts
Join Date:Joined: Feb 2010
Donate to Me
More
I think these misguided
the problem is in the framework.jar
example:
if you use a rom with the folder system / framework ODEX
and system / app deodex
The browser deodex not lose acceleration
but if you, deodex framework.jar, lose acceleration
8th August 2011, 06:11 PM   |  #6  
BMWpokerAce's Avatar
Senior Member
Thanks Meter: 580
 
333 posts
Join Date:Joined: Sep 2010
More
Quote:
Originally Posted by criskelo

I think these misguided
the problem is in the framework.jar
example:
if you use a rom with the folder system / framework ODEX
and system / app deodex
The browser deodex not lose acceleration
but if you, deodex framework.jar, lose acceleration

So if i understand u right, this mod makes no sense with deodexed ROM?
8th August 2011, 06:36 PM   |  #7  
Senior Member
Flag Augusta, Ga
Thanks Meter: 165
 
380 posts
Join Date:Joined: Nov 2006
More
He's saying that the fix wont work. It isn't an issue in the smali code of the Browser but rather an issue in the deodexed framework.

Also, the OP edited the original post:

Quote:

I have found out that this approach is not the "real" solution to the bug. So, I am back in the lab trying to figure it out. Meanwhile, you may still use it as to my knowledge it doesn't do any harm.

8th August 2011, 11:58 PM   |  #8  
GanGs_KiD's Avatar
Senior Member
Flag Riyadh
Thanks Meter: 267
 
120 posts
Join Date:Joined: Sep 2010
Thumbs up
OMG

You are the MAN

It works ....works .....works


Thank you


Edit: it worked for 5 min's and now keep FC
Last edited by GanGs_KiD; 9th August 2011 at 12:04 AM.
9th August 2011, 12:35 PM   |  #9  
brightidea's Avatar
OP Senior Member
Flag Heart of Arabian Peninsula
Thanks Meter: 227
 
225 posts
Join Date:Joined: May 2011
Donate to Me
More
Quote:
Originally Posted by criskelo

I think these misguided
the problem is in the framework.jar
example:
if you use a rom with the folder system / framework ODEX
and system / app deodex
The browser deodex not lose acceleration
but if you, deodex framework.jar, lose acceleration

You're partly right - I found problems in the deodexed Browser that I am going to share after I fix the bugs in framework.

I am currently digging it up - hope to find the glitch soon.
9th August 2011, 12:50 PM   |  #10  
brightidea's Avatar
OP Senior Member
Flag Heart of Arabian Peninsula
Thanks Meter: 227
 
225 posts
Join Date:Joined: May 2011
Donate to Me
More
Quote:
Originally Posted by GanGs_KiD

OMG

You are the MAN

It works ....works .....works


Thank you


Edit: it worked for 5 min's and now keep FC

Sorry to disappoint - but I am still working on the fix.

- Brightidea.

Post Reply Subscribe to Thread

Tags
baksmali, browser, bug, lag, slow
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes