Android OS Forum banner
1 - 7 of 7 Posts

·
Developer
Joined
·
111 Posts
Discussion Starter · #1 ·
This is a brief tutorial on how to disable the paginated scrolling in the Sense launcher. The same concept can be applied to both Sense 2.1 and 3.0. It is a fairly simple mod, but requires knowledge of baksmali. This tutorial will not cover how to use baksmali.
  1. Decompile com.htc.framework.jar
  2. Open /com/htc/widget/PagedGridView.smali
  3. Find three instances of mEnableScrollByPage where the line begins with iput
  4. Change the local variable on each line to one declared as 0x0
    Code:
    <br />
    const/4 v0, 0x1<br />
    <br />
    const/4 v2, 0x0<br />
    <br />
    const/4 v1, 0x0<br />
    <br />
    Original:<br />
    iput-boolean [B][COLOR="Red"]v0[/COLOR][/B], p0, Lcom/htc/widget/PagedGridView;->mEnableScrollByPage:Z<br />
    <br />
    Changed:<br />
    iput-boolean [COLOR="Red"][B]v1[/B][/COLOR], p0, Lcom/htc/widget/PagedGridView;->mEnableScrollByPage:Z
  5. There should be three; one in each constructor
  6. Recompile and push to /system/framework
  7. Reboot
 

·
Developer
Joined
·
235 Posts
icanhazdroid said:
Is there a way to add it to roms that don't have it? I actually like the paginated scrolling
Last part of First post in reverse ...

Sent from the tip of my ThunderStick on a bolt of lightning...
 

·
Android Beginner
Joined
·
3 Posts
can anybody give me simple instructions line for line on how to decompile a jar, where to place and how to use smali etc. im new to this and never used these type of things before. thanks
 

·
Android Apprentice
Joined
·
66 Posts
can anybody give me simple instructions line for line on how to decompile a jar, where to place and how to use smali etc. im new to this and never used these type of things before. thanks
1. The instructions below are for a deodexed Rom. You need apk tool. (adb too obviously). Follow the installation instructions from here. http://code.google.c...ndroid-apktool/

2. connect your phone to the computer and extract the required files
Code:
adb pull /system/framework/com.htc.framework.jar<br />
		  adb pull /system/framework/framework-res.apk<br />
		  adb pull /system/framework/com.htc.resources.apk
2a. Extract the META-INF folder from the jar file using 7 zip or better zip (mac). This is the signature file and you'd need this to put it back into it after you make the edits. This way you are not bothering with re-signing the jar file.

3. Start using apk tool to first install the framework files.
Code:
 apktool if com.htc.resources.apk<br />
			apktool if framework-res.apk
4. Decompile the jar file using apk tool
Code:
 apktool d com.htc.framework.jar
5. This will create a folder in the current directory. This is the decompiled output of the jar file.

6. In that directory, navigate to /com/htc/widget/

7. Use any editor to edit the PageGridView.smali file. Open it up with notepad or any other.

8. Do a ctr+f to find mEnableScrollByPage

9. At every instance.. change the iput boolean v0 to v1. There are 3 instances where you'd have to change this.. which is where step number 8 above comes in handy. Save this file and close it.

10. Recompile all of this.

Code:
 apktool b [the output file directory name here]
11. When you navigate back in the directory.. you'll see the distro folder (or something like that).. which is where the recompiled file is.

12. Open this up using 7zip or better zip (in mac).. and put the META-INF folder from the original jar file into this.. and save it.

13. push the whole thing back into your phone after making a backup of the original com.htc.framework.jar
Code:
<br />
adb shell<br />
mount system<br />
cd /system/framework<br />
mv com.htc.framework.jar com.htc.framework.bak<br />
exit<br />
adb push com.htc.framework.jar /system/framework<br />
adb reboot<br />
14. That's it.
 
1 - 7 of 7 Posts
Top