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

Search This thread

josh030181

Senior Member
Dec 29, 2010
634
128
Baltimoe,Md
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
/ #

i just replaced the apk with root explorer and it worked, but still like to know what i was doing wrong with pushing it
 

Tiffany84

Inactive Recognized Themer
Jul 27, 2010
6,280
3,323
Hey, thanks for this. One question though. I installed via root explorer and was curious if I just leave the permissions the way they are or if I need to change them and if so to what? Thanks again.

Sent from my PC36100 using XDA Premium App
 

josh030181

Senior Member
Dec 29, 2010
634
128
Baltimoe,Md
Hey, thanks for this. One question though. I installed via root explorer and was curious if I just leave the permissions the way they are or if I need to change them and if so to what? Thanks again.



Sent from my PC36100 using XDA Premium App

I didn't need to change anything, just reboot after you past it

Sent from my PC36100 using XDA App
 
Last edited:

Taurus30

Member
Oct 16, 2010
23
2
Sweden
If you post your original Browser.apk, I could make these changes to it, and you could try that.

Thanks for the offer, I'll take a raincheck on that if I could :) I'd like to try to get this on my own, just gotta figure out this APKTool.

Did you install it or move it to the app file and paste

I pasted it then installed it then rebooted. I also tried pasting, rebooting then installing but that didn't work either.
 

josh030181

Senior Member
Dec 29, 2010
634
128
Baltimoe,Md
Thanks for the offer, I'll take a raincheck on that if I could :) I'd like to try to get this on my own, just gotta figure out this APKTool.



I pasted it then installed it then rebooted. I also tried pasting, rebooting then installing but that didn't work either.

That might have been the problem, installing it, I didn't have to install it, I just pasted it over the other one, rebooted and it worked, you can try to take the browser.apk from the rom you have past that back in reboot see if that works, but dont install this time.

If you did a nand backup do a restore then try again without installing it

Sent from my PC36100 using XDA App
 

Taurus30

Member
Oct 16, 2010
23
2
Sweden
You didn't use apktool version 1.3.2 did you? Apparently there is some kind of bug, and it didn't work for me. I had to use version 1.3.1.

For signing, I used autosign:

http://xdaforums.com/showthread.php?t=473580

I haven't tried with apktool yet, still reading up on it. But yeah, I did read that 1.3.2 has a bug. I found 1.3.1 to use. I'll get autosign too. Thanks.

That might have been the problem, installing it, I didn't have to install it, I just pasted it over the other one, rebooted and it worked, you can try to take the browser.apk from the rom you have past that back in reboot see if that works, but dont install this time.

If you did a nand backup do a restore then try again without installing it

I did try pasting over without installing then rebooting but it wasn't there after reboot. It was in system/app but it hadn't been installed.

I did do a nand backup before I started and I've been restoring after every failed attempt so I'm starting fresh every time. Thanks mm.
 

Tiffany84

Inactive Recognized Themer
Jul 27, 2010
6,280
3,323
Got one problem. The internet has worked fine so far except for when I try to download something from a link on the xda app the browser fc's. I've tried it several times and it's the same thing every time. I tried clearing the data and cache but got the same result. I ended up downloading dolphin and using it to download?

Sent from my PC36100 using XDA Premium App
 

kaufmanj67

Senior Member
Jan 4, 2011
186
13
Portland OR
Great mod going to try on mt4g when I get home tnte! I love just surfing around on my breaks amazing what you find ......thanks again

Sent from my glacier using XDA Premium App
 

hebl

Senior Member
May 17, 2008
50
23
Got a problem with my browser.apk I use on my phone ( running Android Revolution 5.1.9 ) :

I used apktool 1.3.1 to decompile the browser.apk with the actual framework file ( com.htc.resources.apk ) from /system/framework/ without any errors.

Strange thing is that I got other values in the locations then mentioned in the first post :

In "Tabcontrol.smali" I got "const/4 v*, 0x0" instead of "const/4 v*, 0x4" in all three positions ( .constructor(), .canCreateNewTab(), .createNewTab() ), which makes no sense for me because this would mean I have zero available tabs right now instead of four.

In "ImageSlider.smali" I got an entry "Line 658" but no "const" anywhere near.

Someone got an idea what's going wrong ? Don't think this has anything to do with the apktool - extraction, I would also have tried changing the values in "Tabcontrol.smali" to the x16 - values, but since the entry in "ImageSlider.smali" is completely missing I was pretty sure this will not work at all.

I attached my browser.apk, any help would be much appriciated !
 

Attachments

  • Browser.apk
    1.6 MB · Views: 9

lukogriffioen

Senior Member
Dec 3, 2010
640
179
Gemert
In case anyone is interested, i modded the browser of Android Revolution HD 5.2.3 for DHD. I also couldnt find the suggested entrys so started searching.

It was actually one entry in BrowserSettings.smali on line 398:

Change "const/4 v0, 0x4" into "const v0, 0x10"

I also attached the apk i ended up with. I just tested it and it works.
 

Attachments

  • Browser.apk
    1 MB · Views: 16

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.)