new browser mod - set font size

UPDATE2: Galaxy S3 browser default storage not saved bug fix
UPDATE: increase browser font size mod RC1 (change text size)


this is an important function i need for the browser. now, with this mod, i don need to double tap the web pages everytime a page is loaded to make the contents readable, and no more scrolls needed to center the page and columns

here are some samples:



normal medium large




i will upload it after i have cleaned up the smali files later

remove battery fully charged notification icon and sound

perhaps this is one of the most annoying issues, i cannot understand why we need two icons on the status bar if the battery is fully charged

although there are some how-to already, i wanna show you an alternative way to do it
here is an simplier way to remove the icon (plus the notification sound and screen on when the battery is fully charged if you want to). you can opt to disable all of them, or with any one of them enabled only

*this is for DEODEXED files ONLY!! tested on Android 2.3 KI8 and should work with other versions also


- decompile SystemUI.apk
- open StatusBarPolicy.smali under smali/com/android/systemui/statusbar/policy directory with your favorite text editor
- search for ".method private addFullChargeNotification()V" without quotes
- scroll down a bit and you will find something like:

.line 2300
new-instance v2, Landroid/app/Notification;

const v3, 0x7f02002a

const-wide/16 v4, 0x0

invoke-direct {v2, v3, v1, v4, v5}, Landroid/app/Notification;->(ILjava/lang/CharSequence;J)V

.line 2301
iget v3, v2, Landroid/app/Notification;->flags:I

or-int/lit8 v3, v3, 0x2

iput v3, v2, Landroid/app/Notification;->flags:I

those ".line xxxx" above should be different with yours, and
0x7f02002a is the ID of the battery full icon, you may find it differs and that's fine


for the tweak:

option 1 - replace 0x7f02002a with 0x0

for example, before change:
const v3, 0x7f02002a

after change:
const v3, 0x0


option 2 - add a hash sign (#) before the line const v3, 0x7f02002a and write a new line below it, just in case you want to roll it back

for example, before change:
const v3, 0x7f02002a

after change:
#const v3, 0x7f02002a
const v3, 0x0


also note that the number of hash signs or empty spaces before the line are NOT important!! so all of the lines below are valid:

# const v3, 0x7f02002a
# # const v3, 0x7f02002a
##### const v3, 0x7f02002a




how does this work?

after reading the souce code of Notification.smali, i found that it accepts notification without an icon by calling it with the icon parameter with a zero (which is the 0x0 above)



remove notification sound and screen on
in case you want to remove the notification sound as well, scroll down a bit more and put a # in front of the line as below:

# invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->playTone(Landroid/net/Uri;)V



and for the screen on after fully charged, make these changes below the playTone found in above:

# .line 2308
# invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->turnOnScreenWithForce()V



to see the result, upload the recompiled SystemUI.apk to /system/app/, and type in adb (no need to reboot/wipe, etc):

kill -HUP `pidof system_server`


and you should notice the changes immediately



switch to another modem version without recovery

This is actually part of my freeNANDmod for the Samsung Galaxy S I9000. However, I would like to introduce this trick to all Samsung Galaxy SII I9100 users too.

The only difference is, for I9000, /dev/block/bml12 is used for holding the modem.bin file, while for I9100, it's /dev/block/mmcblk0p8.

In order to do the trick, put a modem file somewhere, say /data/modem/modem.bin, and create a symlink to it like the example below:

for I9000
ln -s /data/modem/modem.bin /dev/block/bml12

for I9100
ln -s /data/modem/modem.bin /dev/block/mmcblk0p8


Put it in a script file and place it under your init.d, usually /etc/init.d (or /system/etc/init.d), and it is suggested to name it with prefix 00 (zero zero) like 00-load-modem so that it can be executed first since scripts in init.d are executed in sequential order.

A sample init script should look like:

for I9000
rm /dev/block/bml12; ln -s /data/modem/modem.bin /dev/block/bml12

for I9100
rm /dev/block/mmcblk0p8; ln -s /data/modem/modem.bin /dev/block/mmcblk0p8


The "rm /dev/block/bml12" or "rm /dev/block/mmcblk0p8" command is used to remove the block device bml12 or mmcblk0p8 created by the system during init. You have to remove it first before you can create a symlink with the same name.

To see if it run correctly, put another version of modem instead of the one already on your phone to /data/modem/modem.bin after the init script is created. Reboot your phone and type *#1234# in the dialpad, you should see the new modem version is in use now. Note that after you have replaced the /data/modem/modem.bin with another modem, you'll need to reboot the phone.


So if you want to, you can place different versions of modem.bin file in /data/modem/ and symlink to modem.bin or overwritting it by copy and paste.


reference to my post: freeNANDmod - get more space from NAND - PART IV

my Samsung Galaxy SII I9100 mod - 1st attempt

UPDATE: my 2nd attempt with greater than 15000 IO


no OC, no 2D/3D, total: 3975




OC to 1.4, no 2D/3D, total: 4578




looks good!

goodbye, my I9000...

I will not forget you!!

with self-modded kernel and rom
total: 4189, IO: 11359


total: 4238, IO: 10024



and welcome, my new white Galaxy SII

freeNANDmod - get more space from NAND - PART IV

Modifying the partitions


I have attached a modified s1_odin_20100512.c souce file provided by coolya and the corresponding compiled pit file below.


WARNING: to flash a new/modded PIT is extremely dangerous!! The files attached are provided as is and for demo only. They are only for advanced users. I am not responsible for any damages, in all kinds and/or by any means, caused by using these files. So, DO IT AT YOUR OWN RISKS!! More, make sure you have read the whole post before flashing your device.


demo_pit_1.pit (modified version of s1_odin_20100512):
This pit file serves as a demonstration of how to get 12MB more disk space from the NAND by moving the modem elsewhere. The only changes are highlighted below:

original s1_odin_20100512.c:
{ 0, 0, 0x18, 0x02, 0, 256, 140, "", "CACHE", "cache.rfs"},
{ 0, 0, 0x0b, 0x00, 0, 256, 50, "", "MODEM", "modem.bin"},

demo_pit_1.c:
{ 0, 0, 0x18, 0x02, 0, 256, 189, "", "CACHE", "cache.rfs"},
{ 0, 0, 0x0b, 0x00, 0, 256, 1, "", "", ""},

As shown in above, the 7th column (size in units) of CACHE in original s1_odin_20100512.c has 140 units, and 50 units are assigned to modem.bin. While in demo_pit_1.c, the modem has been removed from the partition table and the units assigned are freed. The 50 units freed are assigned to the CACHE partition. Note that:
- only 49 units are assigned to CACHE with 1 unit left for MODEM (removed) since I found that assigning zero caused problems
- the new CACHE partition is now assigned with 189 units, that is, 49 more then the original s1_odin_20100512 pit file
- the partiton name (9th column) and filename (10 column) for the MODEM partition (removed) in demo_pit_1 are emptied, meaning that this partition contains no partition name, should be filled with no file, and only 1 unit in size
- although we have added an extra 49 units to the CACHE, it will not necessarily 49 units or 12MB larger (1 unit = 0.25MB) since there will be some rounding or alignment problems which reduce the actual available size to the system

If you have read the previous parts of this mod, you may noticed that in the 1st and 2nd column, which are the indicators for whether the partition is enabled, it is set to 0 (enabled or used) instead of 1 (disabled or unused). So why not set it to disabled? It is because setting it to disabled will produce problems for the system to recoginze the partition table.


to flashing with this pit:
- pick a rom of your choice to flash
- choose demo_pit_1.pit as PIT in Odin or other flashing tools
- DO NOT include any modem and leave the PHONE/MODEM empty, we don't need the modem here (in case you included the modem and see an error, reboot into download mode and reflash again without the modem file)

Note that your device will be wiped (except those resides on the internal sdcard - /sdcard and /data), so backup your files first.


possible problems encountered:
- completely blank screen
- unable to boot into recovery mode, nor normal mode
- shown with this icon



solution:
- boot into the download mode (keep the buttons pressed for a bit longer)
- reflash with a stock pit file with re-partition enabled, together with a full stock rom (PDA + PHONE + CSC) or custom rom



Setting up the modem


In order to let the system to read the modem file, we need to tell the system where the modem file (modem.bin) is. It is by default set to /dev/block/bml12 (/dev/block/stl12) but that partition has been removed (trimmed to 1 unit in size actually).

First, you have to put the modem file (modem.bin) somewhere like /data/modem.bin or /system/modem/modem.bin or wherever you want to (/data/modem.bin will be used in this example). Then, we are going to fool the system by telling it the modem is there by issuing commands to create a symbolic link (symlink) as follow:

*you need root access and busybox installed

su (do a su first)
rm /dev/block/bml12 (delete the block device created by the system during boot)
ln -s /data/modem.bin /dev/block/bml12 (creating a new symlink to modem.bin)

If you see "ln: command not found", (that means you have not set the path/symlink for ln or busybox), try:
/sbin/busybox ln -s /data/modem.bin /dev/block/bml12

*by assuming your busybox is located in /sbin


After you have set up the symlink for the modem probably, you should get the modem back. However, this symlink has to be created during the init process since so far I have no ideas to unload and reload the modem after the phone is up. As to do this in the init process, create the symlink with the help of a script or do it in the init.rc file. For me, I put it in my init script (similar to init.d) since:
- I can have total control over when to load the modem
- as I mentioned before, I have my own mount process which does not rely on the init.rc


As a result, you will benefit from:
1./ getting 12MB more from the NAND
2./ no need to flash modem file in Odin anymore, just save it to the disk!!
3/. easily switch to another modem anytime you wanted to by overwriting the file or change the symlink to point to another file location (need a reboot)


demo_pit_1 files:
demo_pit_1.pit
demo_pit_1.c


read more:
Free more available disk space from NAND - PART I
Free more available disk space from NAND - PART II
freeNANDmod - get more space from NAND - PART III

2.3.4 I9000JV and I9100 browser lag problems fixed finally

the lag problems, together with animations, etc, have been fixed for deodexed JVO/JVP/JVQ/JVR browser, credits to brightidea for correcting the problems, and lirik0 for letting us know in I9000 section


read more