[MOD]/[HOWTO] Mod HTC Browser to allow 16 windows instead of 4

Search This thread

kcbedo

Member
Nov 30, 2009
44
34
TomLeeDesire helped me figure out how to tweak an HTC Browser.apk to allow 16 windows instead of 4.

If you're interested in increasing the maximum number of windows, there are four lines in two files within Browser.apk that need to be modified.

I made these changes to the HTC Browser.apk from VaelPak 3.2 RC 1, but it should work on any HTC Browser. 0x10 is 16 in hex, so you can make this value whatever you want. If you get above 25 or so open windows, the browser tends to crash.

com.android.browser.TabControl
.constructor()
Line 52: Change "const/4 v2, 0x4" to "const v2, 0x10"

.canCreateNewTab()
Line 565: Change "const/4 v0, 0x4" to "const v0, 0x10"

.createNewTab()
Line 618: Change "const/4 v1, 0x4" to "const v1, 0x10"

com.android.browser.htc.ui.ImageSlider

.add()
Line 658: Change "const/4 v3, 0x4" to "const v3, 0x10"

Once you know where to look, the changes are pretty easy with APKTool (just use version 1.3.1, since 1.3.2 has a bug and doesn't seem to work correctly).

Here is an HTC Browser.apk with these changes, along with some LowRider menu icons thrown in.

EDIT: This is not an installable apk, because the certificates won't match. You need to have a rooted phone and use ADB to overwrite /system/app/Browser.apk (Make a backup first, of course.)
 

Attachments

  • Browser.apk
    837.9 KB · Views: 1,386
Last edited:

ceck_01

Member
Feb 15, 2010
14
1
Hey, I have tried to install the APK file on my phone but keep getting an error saying "Application not installed". I'm a noob, so sorry if this is a dumb question. I'm using the HTC Desire HD
 

mdbde

Senior Member
Mar 11, 2009
188
25
thank you I was searching for this mod a long time.
I have a htc desire hd. when I try to install with estrongs it says not installed.
when I open your apk file in astro it says version 2.2.1 is installed and the version of your apk is 2.2 . its logic that it does not install. is your apk compatible with desire hd?
 

kcbedo

Member
Nov 30, 2009
44
34
Hey, I have tried to install the APK file on my phone but keep getting an error saying "Application not installed". I'm a noob, so sorry if this is a dumb question. I'm using the HTC Desire HD

I just used ADB to overwrite the Browser.apk in my /system/app

I don't know if this will work on a non-rooted phone.

I'll see if I can figure out how to make this an installable app.
 

ceck_01

Member
Feb 15, 2010
14
1
I just used ADB to overwrite the Browser.apk in my /system/app

I don't know if this will work on a non-rooted phone.

I'll see if I can figure out how to make this an installable app.

Cool, thanks you very much for the help as I'm sure there are alot of people out there who will want this
 

kcbedo

Member
Nov 30, 2009
44
34
Cool, thanks you very much for the help as I'm sure there are alot of people out there who will want this

It looks like this will only work if you have a rooted phone.

Android won't let you update your current browser with this one, because the certificates won't match once it's modified. HTC would have to resign the app with these changes in order for it to work.

I believe the only way to replace your Browser.apk app is to have a rooted phone and then overwrite the Browser.apk in /system/app.
 

kcbedo

Member
Nov 30, 2009
44
34
I'm getting the same message on my DHD.

You need to use ADB to push the file to /system/app/Browser.apk (after making a backup first).

Installing this as a regular apk won't work, since I can't sign it with the HTC certificate. Android will only upgrade an app if the certificates match.
 

ZedeN

Senior Member
Dec 20, 2009
119
13
Bristol
i tried editing browser.apk like how you suggested, and i can successfully overwrite it. But i dont see the internet browser on my device, i mean it's as if i never installed it..
 

acme64

Senior Member
Mar 4, 2009
598
76
honestly i have too many tabs already. Is there a way to make them all close when i exit the browser? I don't like opening my browser and seeing maybe 5 tabs from some**** i was looking at 3 days ago.
 

josh030181

Senior Member
Dec 29, 2010
634
128
Baltimoe,Md
TomLeeDesire helped me figure out how to tweak an HTC Browser.apk to allow 16 windows instead of 4.

If you're interested in increasing the maximum number of windows, there are four lines in two files within Browser.apk that need to be modified.

I made these changes to the HTC Browser.apk from VaelPak 3.2 RC 1, but it should work on any HTC Browser. 0x10 is 16 in hex, so you can make this value whatever you want. If you get above 25 or so open windows, the browser tends to crash.

com.android.browser.TabControl
.constructor()
Line 52: Change "const/4 v2, 0x4" to "const v2, 0x10"

.canCreateNewTab()
Line 565: Change "const/4 v0, 0x4" to "const v0, 0x10"

.createNewTab()
Line 618: Change "const/4 v1, 0x4" to "const v1, 0x10"

com.android.browser.htc.ui.ImageSlider

.add()
Line 658: Change "const/4 v3, 0x4" to "const v3, 0x10"

Once you know where to look, the changes are pretty easy with APKTool (just use version 1.3.1, since 1.3.2 has a bug and doesn't seem to work correctly).

Here is an HTC Browser.apk with these changes, along with some LowRider menu icons thrown in.

EDIT: This is not an installable apk, because the certificates won't match. You need to have a rooted phone and use ADB to overwrite /system/app/Browser.apk (Make a backup first, of course.)

im trying to push this but it keeps saying no found, am i doing this right,

this is whats in the command window:

/ # -- adb push c:\Browser.apk /system/app/Browser.apk
-- adb push c:\Browser.apk /system/app/Browser.apk
/sbin/sh:n--: not found
/ #
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    TomLeeDesire helped me figure out how to tweak an HTC Browser.apk to allow 16 windows instead of 4.

    If you're interested in increasing the maximum number of windows, there are four lines in two files within Browser.apk that need to be modified.

    I made these changes to the HTC Browser.apk from VaelPak 3.2 RC 1, but it should work on any HTC Browser. 0x10 is 16 in hex, so you can make this value whatever you want. If you get above 25 or so open windows, the browser tends to crash.

    com.android.browser.TabControl
    .constructor()
    Line 52: Change "const/4 v2, 0x4" to "const v2, 0x10"

    .canCreateNewTab()
    Line 565: Change "const/4 v0, 0x4" to "const v0, 0x10"

    .createNewTab()
    Line 618: Change "const/4 v1, 0x4" to "const v1, 0x10"

    com.android.browser.htc.ui.ImageSlider

    .add()
    Line 658: Change "const/4 v3, 0x4" to "const v3, 0x10"

    Once you know where to look, the changes are pretty easy with APKTool (just use version 1.3.1, since 1.3.2 has a bug and doesn't seem to work correctly).

    Here is an HTC Browser.apk with these changes, along with some LowRider menu icons thrown in.

    EDIT: This is not an installable apk, because the certificates won't match. You need to have a rooted phone and use ADB to overwrite /system/app/Browser.apk (Make a backup first, of course.)