Help to port MOD Touchwiz from AT&T to i9300 intl

cybdani

Senior Member
Feb 5, 2012
459
190
0
Barcelona
Hi all!
I'm trying to port a touchwiz mod from AT&T to i9300 intl. The goal is to center all apps icon in touchwiz. Hotseat.smali are very different from one version to other.
The problem is (I think) ".field private static final sAllAppsButtonRank:I" doesn't exists in hotseat international version.

Originally the how-to was made by magn2o in this post http://forum.xda-developers.com/showpost.php?p=30909479&postcount=70

And this is the code to modify:

Code:
@@ -24,7 +24,7 @@
 # static fields
 .field private static final TAG:Ljava/lang/String; = "Hotseat"
 
-.field private static final sAllAppsButtonRank:I = 0x4
+.field private static final sAllAppsButtonRank:I = 0x2
 
 
 # instance fields
@@ -306,7 +306,7 @@
 
     .prologue
     .line 116
-    const/4 v0, 0x4
+    const/4 v0, 0x2
 
     if-ne p0, v0, :cond_0
 
@@ -1915,7 +1915,7 @@
     .prologue
     const v12, 0x7f0e002a
 
-    const/4 v11, 0x4
+    const/4 v11, 0x2
 
     const/4 v3, 0x0
Greetings!
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,644
2,730
0
50
Pittsburgh, PA
I just want to make sure I'm interpreting your message correctly: The purpose of that mod is to cause the app drawer icon on the home screen to be in the center of the dock instead of the right side of the dock?

How familiar with smali are you?

You might have to get the proper apk from an AT&T firmware, decompile it, and study the smali, and then do the same with an international apk. Use the AT&T one just to provide "hints" on the general things to look for in the international one.

Take care
Gary
 
  • Like
Reactions: cybdani

cybdani

Senior Member
Feb 5, 2012
459
190
0
Barcelona
I just want to make sure I'm interpreting your message correctly: The purpose of that mod is to cause the app drawer icon on the home screen to be in the center of the dock instead of the right side of the dock?
Yes, that is.

garyd9 said:
How familiar with smali are you?
I started learning a month ago (totally noob). I've published a rom (based on stock) in my blog site with some modifications. Learned some mod tutorials and how-to from xda.

garyd9 said:
You might have to get the proper apk from an AT&T firmware, decompile it, and study the smali, and then do the same with an international apk. Use the AT&T one just to provide "hints" on the general things to look for in the international one.

Take care
Gary
I've decompiled SecLauncher2.apk modified (from AT&T MOD thread) compared some files and code and no luck with that.
For example, mod is based in this: private static final sAllAppsButtonRank:I = 0x2 (change 0x4 to 0x2). But intl version does not have sAllAppsButtonRank in code. Tried to add this code in hotseat.smali and modified LauncherModel$LoaderTask and LauncherProvider$DatabaseHelper. Of course (because I'm noob), it doesn't works. I've found some web sites to start learning smali code but not a "complete" guide.

Thanks a lot for your help!
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,644
2,730
0
50
Pittsburgh, PA
For example, mod is based in this: private static final sAllAppsButtonRank:I = 0x2 (change 0x4 to 0x2). But intl version does not have sAllAppsButtonRank in code. Tried to add this code in hotseat.smali and modified LauncherModel$LoaderTask and LauncherProvider$DatabaseHelper. Of course (because I'm noob), it doesn't works. I've found some web sites to start learning smali code but not a "complete" guide.
You cant just drop in a variable and expect code to suddenly use it just because it exists. Chances are that the international version does nearly the same thing, but without the constant variable. You'll have to figure out how the code works; it's not enough to just copy things. That's the difference between developing and just taking stuff from other people.

When I get to my PC later, I'll give you a link that explains what the smali commands do, and you can reverse engineer from that.

The expectation is that you'd rather learn HOW to do this type of thing... Not just have someone do it for you (or give you the exact steps for it.)



Sent from my Nexus 7 using Tapatalk 2
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone