Slide # 1

1

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Slide # 2

2

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Slide # 3

3

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Slide # 4

4

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Slide # 5

5

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Monday, 23 June 2014

UC Modding Tutorials full



Tutorials written here are completely for UC9.4. So these tutorials may not work on History Versions.



Important Notes:


Number 0 to 5 is iconst_0 to iconst_5
Number 6 to 127 is bipush 6 to bipush 127
Number 128 to 32767 is sipush 128 to  sipush 32767
Number greater than 32767 is ldc ***** or ldc_w *****


Byte to kilobyte:

1024b= 1kb
4kb=1024x4=4096b
40kb=1024bx40=40960b
50kb=1024x50=51200b
100kb=1024x100=102400b



Modifying Download Limits and 4kb Download Refresh


<1> Download UC 9.4 Browser and add .zip extension. For example : uc.zip
<2> Now with Bytecode Editor Search For K/S. 1 class will extract in a folder. It is av.class in UC 9.4
<3> Open av.class with Bytecode editor/MT . Click on methods and you will see a lot of methods. Just go to <clinit> and open it. you will see the following codes:

<clinit>()V Method Codes are given below:

0  aconst_null
1  putstatic av/a Lav;
2  new java/util/Vector
3  dup
4  invokespecial java/util/Vector/<init>()V
5  putstatic av/a Ljava/util/Vector;
6  iconst_1
7  putstatic av/a B
8  iconst_0
9  putstatic av/b S
10  iconst_0
11  putstatic av/c S
12   iconst_2 you need to change this for download limit
13  putstatic av/a I
14  iconst_0
15  putstatic av/d I
16  ldc "/"
17  putstatic av/a Ljava/lang/String;
18  ldc "/"
19  putstatic av/b Ljava/lang/String;
20  return



Change   iconst_2 to   iconst_1 if you want 1 by 1 download


You can also change   iconst_2 to any other. For example if you want 4 downloads At a time then change it to   iconst_4. Take help from Notes:

<4> After modifying save the class.

<5> Now we will change 4kb download Refresh. Since by default UC 9.4 Download Refresh limit is 40kb [40960b]  ,so we will change  40kb to 4kb .  

<6> Open Again the av.class with byte code editor or mt. Go to constant pool in the 2nd line you will see 40960. Justdelete final 0 , then it will be 4096 which means 4kb.   

I am listing some part from constant pool.

0 null
1 integer info: 40960 this is what you need for changing download  refresh limit . Take help of notes
2 integer info: 65536
3 integer info: 131072
4 integer info: 1602765
5 integer info: 2359418
6 integer info: 10485760
7 string_info: string: 976
---and so on---



---C2hallofu Tutorial---


Modifying Tabs Limit:



<1> Rename your uc browser as uc.zip

<2> Select uc.zip with bytecode editor or MT and search for ext:close_window. 1 class j.classwill be extracted in a folder for uc9.4. Open it with  bytecode editor/mt and Search For tableswitch. Several Methods will Appear. Now As we know in UC9.4 window limit is 8. So we will search for bipush 8 on each method that you have searched with tableswitch. In the second method, you will see the following Codes.

1  aload_0
2  invokevirtual j/c()Lh;
3  pop
4  aload_0
5  getfield j/b Ljava/util/Vector;
6  invokevirtual java/util/Vector/size()I
7  dup
8  istore 5
9  bipush 8 This is window limit [ Change it to bipush 50 if u want 50 tabs.]
10  if_icmplt Label75
11  iload_3
12  iconst_4
13  invokestatic ab/a(II)Z
14  ifne Label75
15  iload_1
16  iconst_2
17  if_icmpeq Label73
18  new java/lang/StringBuffer
19  dup
20  invokespecial java/lang/StringBuffer/<init>()V
21  bipush 87
22  invokestatic ak/a(I)Ljava/lang/String;
23  invokevirtual java/lang/StringBuffer/append(Ljava/lang/String;)Ljava/lang/StringBuffer;
24  bipush 8 This is pop-up window limit that alerts you . [ change it to bipush 50 if you have changed previous bipush 8 to bipush 50]
25  invokevirtual java/lang/StringBuffer/append(I)Ljava/lang/StringBuffer;
26  invokevirtual java/lang/StringBuffer/toString()Ljava/lang/String;
27  astore 6
28  aload_0
29  aconst_null
30  iconst_1
31  anewarray java/lang/String
32  dup
33  iconst_0
34  aload 6
35  aastore
36  invokevirtual j/a(Ljava/lang/String;[Ljava/lang/String;)Z
37  pop
38 Label73:
39  aconst_null
40  areturn
41 Label75:
42  iload 5
43  istore 6
44  iload 5
45  bipush 8
46  if_icmplt Label124
47  iload_3
48  iconst_4
49  invokestatic ab/a(II)Z
50  ifeq Label124
51  aload_0
52  getfield j/b Ljava/util/Vector;
53  iload 5
54  iconst_1
55  isub
56  invokevirtual java/util/Vector/elementAt(I)Ljava/lang/Object;
57  checkcast h
58  astore 4
59  aload_0
60  iload 5
61  iconst_1
62  isub
63  dup
64  istore 6
65  invokevirtual j/d(I)V
66  goto Label198
67 Label124:
68  new h
69  dup
70  aload_0
71  invokespecial h/<init>(Lj;)V
72  astore 4
73  iload_1
74  tableswitch Label187 0 : Label164 , 1 : Label172 , 2 : Label181 , 3 : Label164
75 Label164 :
76  aload 4
77  getstatic j/a Laj;
78  goto Label184
79 Label172:
80  aload 4
81  aload_0
82  invokevirtual j/a()Laj;
83  goto Label184
84 Label181:
85  aload 4
86  aload_2
87 Label184:
88  invokevirtual h/d(Laj;)V
89 Label187:
90  aload_0
91  getfield j/b Ljava/util/Vector;
92  aload 4
93  iload 5
94  invokevirtual java/util/Vector/insertElementAt(Ljava/lang/Object;I)V
95 Label198:
96  iload_3
97  iconst_1
98  invokestatic ab/a(II)Z
99  ifne Label212
100  aload_0
101  iload 6
102  invokevirtual j/d(I)V
103 Label212:
104  aload 4
105  areturn

<3>After Modifying the  class , put back to original file and test your work.


---C2hallofu Tutorial---:
Modifying Free Copy Restrictions:



<1> Rename your uc browser as uc.zip

<2> Extract the largest Class. It is j.class. You can easily find which is the largest class using MT. Just Set Sort Files By Size you will see j.class at the bottom inside of zip file which means j.class is the largest class. Just extract it. Now, Openj.class with MT And  search for 2048. Methods will appear. Open each method and search for 5000 . You will find 5000 in one method. Open it. You will see this.

You will see the following codes :




0  aload_1
1  invokestatic ab/c(Ljava/lang/String;)Z
2  ifeq Label18
3  aload_0
4  bipush 56
5  invokestatic ak/a(I)Ljava/lang/String;
6  aload_2
7  invokevirtual j/a(Ljava/lang/String;Ljavax/microedition/lcdui/Displayable;)V
8  return
9 Label18:
10  aload_1
11  invokevirtual java/lang/String/length()I
12  invokestatic y/a()Ly;
13  getfield y/c I
14  isub
15  istore_3
16  invokestatic a/s()Z
17  ifeq Label54
18  iload_3
19  sipush 2048
20  if_icmple Label54
21  aload_0
22  bipush 108
23  invokestatic ak/a(I)Ljava/lang/String;
24  aload_2
25  invokevirtual j/a(Ljava/lang/String;Ljavax/microedition/lcdui/Displayable;)V
26  return
27 Label54:
28  getstatic bi/b Ljava/util/Vector; Copy This line 
29  invokestatic j/a(Ljava/util/Vector;)I
30  iload_3
31  iadd
32  sipush 5000 [ Change it to ldc_w 999999
33  if_icmple Label80
34  aload_0
35  sipush 337
36  invokestatic ak/a(I)Ljava/lang/String;
37  aload_2
38  invokevirtual j/a(Ljava/lang/String;Ljavax/microedition/lcdui/Displayable;)V
39  return
40 Label80:
41  getstatic bi/b Ljava/util/Vector;
42  aload_1
43  iconst_0
44  invokevirtual java/util/Vector/insertElementAt(Ljava/lang/Object;I)V
45  aload_0
46  bipush 107
47  invokestatic ak/a(I)Ljava/lang/String;
48  aload_2
49  invokevirtual j/a(Ljava/lang/String;Ljavax/microedition/lcdui/Displayable;)V
50  return


Now save the class and open it again. Then search again with  getstatic bi/b Ljava/util/Vector; that i had said to copy before. Several methods will appear. Now again search for 5000 you will see in 1 method. Open it. Code are following.

0  sipush 5000 [ change it to ldc_w 999999 ]
1  getstatic bi/b Ljava/util/Vector;
2  invokestatic j/a(Ljava/util/Vector;)I
3  isub
4  ireturn

Now save the class and put back to original file and test ur work.


C2hallofu Tutorial:



Disabling Pop-up update Notifications for any versions:




<1> Rename your uc browser as uc.zip

<2> Select uc.zip with bytecode editor or MT and search for ext:close_window or directly extract the largest class. For UC 9.4 one classe j.class will be extracted in a folder. Open the j.class with  bytecode editor/mt and search for t:acp . One method will pop-up.  Open the method and press 8 and Search for t:acp . Then Delete directly t:acp




For better understanding here is UC9.4's bytecode that need to change





  iconst_0
  istore_2
  iload_1
  ifne Label21
  aload_0
  ldc "t:cp:"
  iconst_0
  bipush 12
  aload_0
  invokevirtual j/c()Lh;
  invokevirtual j/a(Ljava/lang/String;IILh;)V
  iconst_1
  ireturn
Label21:
  getstatic j/j Z
  ifne Label96
  invokestatic java/lang/System/currentTimeMillis()J
  getstatic bi/a J
  lsub
  lstore_3
  getstatic bi/h Z
  ifne Label57
  lload_3
  getstatic bi/b J
  lcmp
  ifle Label57
  getstatic bi/b J
  lconst_0
  lcmp
  ifne Label71
Label57:
  getstatic bi/h Z
  ifeq Label96
  lload_3
  getstatic bi/c J
  lcmp
  ifle Label96
Label71:
  invokestatic java/lang/System/currentTimeMillis()J
  putstatic bi/a J
  iconst_1
  dup
  putstatic j/j Z
  istore_2
  aload_0
  ldc "t:acp:" change it to   ldc "".
  iconst_0
  bipush 12
  aload_0
  invokevirtual j/c()Lh;
  invokevirtual j/a(Ljava/lang/String;IILh;)V
Label96:
  iload_2
  ireturn





<3>After modification save the class and put back to original app.





C2hallofu Tutorial:


Removing History Limit:



<1> Rename your uc browser as uc.zip

<2> Select uc.zip with bytecode editor or MT and search for ext:close_window. 1 class j.classwill be extracted in a folder for uc9.4. Open it with  bytecode editor/mt and go to Methods. Now Go to <clinit>

You will see the following codes :

The byte codes are too long . Here i am giving partial codes that need to change

162  putstatic j/s Ljava/lang/String;
163  ldc "UCBrowser"
164  putstatic j/t Ljava/lang/String;
165  ldc "3.1"
166  putstatic j/u Ljava/lang/String;
167  ldc "en-us"
168  putstatic j/v Ljava/lang/String;
169  ldc "release"
170  putstatic j/w Ljava/lang/String;
171  aconst_null
172  putstatic j/x Ljava/lang/String;
173  ldc "GJ"
174  dup
175  putstatic j/C Ljava/lang/String;
176  putstatic j/y Ljava/lang/String;
177  ldc "WWW"
178  putstatic j/z Ljava/lang/String;
179  ldc "obua"
180  putstatic j/D Ljava/lang/String;
181  ldc "9.4.0.343"
182  putstatic j/A Ljava/lang/String;
183  sipush 1033
184  putstatic j/d S
185  bipush 20 this is history limit  [ change it to bipush 50 if u want 50 history]
186  putstatic j/s B
187  iconst_1
188  putstatic j/g Z
189  ldc "startpage"
190  putstatic j/E Ljava/lang/String;
191  ldc "startpage_search"
192  putstatic j/F Ljava/lang/String;
193  ldc "null"
194  putstatic j/G Ljava/lang/String;
195  new java/lang/StringBuffer
196  dup
197  ldc "http://command/command="
198  invokespecial java/lang/StringBuffer/<init>(Ljava/lang/String;)V
199  getstatic j/E Ljava/lang/String;
200  invokevirtual java/lang/StringBuffer/append(Ljava/lang/String;)Ljava/lang/StringBuffer;
201  invokevirtual java/lang/StringBuffer/toString()Ljava/lang/String;
202  putstatic j/E Ljava/lang/String;
203  new java/lang/StringBuffer
204  dup
205  ldc "http://command/command="
206  invokespecial java/lang/StringBuffer/<init>(Ljava/lang/String;)V
207  getstatic j/F Ljava/lang/String;
208  invokevirtual java/lang/StringBuffer/append(Ljava/lang/String;)Ljava/lang/StringBuffer;
209  invokevirtual java/lang/StringBuffer/toString()Ljava/lang/String;
210  putstatic j/F Ljava/lang/String;
211  new java/lang/StringBuffer
212  dup
213  ldc "http://command/command="
214  invokespecial java/lang/StringBuffer/<init>(Ljava/lang/String;)V
215  getstatic j/G Ljava/lang/String;
216  invokevirtual java/lang/StringBuffer/append(Ljava/lang/String;)Ljava/lang/StringBuffer;
217  invokevirtual java/lang/StringBuffer/toString()Ljava/lang/String;
218  putstatic j/G Ljava/lang/String;
219  iconst_0
220  putstatic j/h Z
221  bipush 100
222  putstatic j/t I
223  return
Now save the class and put back to original file.



----Complete Tutorial--


Saving Handler settings in UCbrowser.



Description:


Today i am going to share another Dzebb's secret   you might be thinking How Dzebb's Ucweb handler apps save settings. Btw, i am not giving this tutorial for free. I need your money to rate our excellent forum members thread. If you share this tutorial please give credit to original author of the tutorial. Well lets start.




Tutorial:


<1> Rename your target UC browser as UC.zip

<2> With Bytecode Editor/MT Search For listRecordStore1 class file will be extracted.

<3> Open the class with Bytecode Editor/MT and Search Again listRecordStore1 Method will appear. Open the method and search for ifnull. Change all ifnull to ifnonnull. For ucbrowser 9.4 just 1 ifnull need to change. Here is the full bytecode of uc 9.4  for better understanding  



invokestatic javax/microedition/rms/RecordStore/listRecordStores()[Ljava/lang/String;
  dup
  astore_0
ifnull Label59 change it to ifnonnull
  iconst_0
  istore_1
Label10:
  iload_1
  aload_0
  arraylength
  if_icmpge Label59
  iconst_0
  istore_2
Label18:
  iload_2
  getstatic bi/a [Ljava/lang/String;
  arraylength
  if_icmpge Label46
  aload_0
  iload_1
  aaload
  getstatic bi/a [Ljava/lang/String;
  iload_2
  aaload
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifne Label53
  iinc 2 1
  goto Label18
Label46:
  aload_0
  iload_1
  aaload
  invokestatic bi/a(Ljava/lang/String;)Z
  pop
Label53:
  iinc 1 1
  goto Label10
Label59:
  return
  pop
  return

<4> After modifying save the class. Now replace it to original app.

<5> Now If you embed your modified ucbrowser with handler embedder,all handler settings will save properly. 


C2hallofu's tutorial Complete

1 comments: