[MODS][HOW-TO] Random SGS3 Mods

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
0
New Jersey
This thread started out as my attempt to give back to the community by sharing some of my mods. But I think it would be nice if we could turn this in to a community effort. Kind of a one stop shopping for simple mods. Mods that would generate tons of discussion, like loserskater's AOSP MMS or lockscreen music controls, would probably be best served with their own threads (of course they would be welcome here).

Anyway, the choice is yours. Feel free to post your mods here if you want.

Be sure to limit your contributions to editing smali or xml. Nothing to do with device settings.

_______

Devs and Cooks: Feel free to use the mods in your ROMs.

Be sure to click thanks give credit to the dev that posted the mod.
_______


These mods are geared toward devs, cooks, and advanced users.

It is assumed you already know how to compile/decompile apks and jars. If not, there is tons of info available elsewhere.

If you need help with any of these mods go here.

_______

Index (by post #):

2) Add more wallpapers to SecWallpaperChooser
3) Disable page looping in launcher
4) Rendering Colors Properly in Aroma
14) TouchWiz Group Messaging and Backup / Restore SMS
15) Easy CSC feature edits
23) Remove AT&T Subscriber popup when opening contacts
39) Status bar Transparency
45) Disable Browser EdgeZoom
46) Disable Browser EdgeZoom with Toggle
50) Adding Custom Boot Animation Support (ICS/JB)
53) Adding more languages

*****
 
Last edited:

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
0
New Jersey
Add More Wallpapers

First you need to gather the wallpapers you want to use.

You will need two copies of each wallpaper. Resize to the following dimensions (I use Paint) and save as .jpg.

Code:
1280x1280 pixels

213x189 pixels
Name the wallpapers as you see in res/drawable-xhdpi. If you keep the original stock wallpapers (you can replace them too), start naming the wallpapers as:

Code:
hd_06.jpg
hd_06_small.jpg
hd_07.jpg
hd_07_small.jpg
hd_08.jpg
hd_08_small.jpg
etc.

Decompile SecWallpaperChooser.apk

Place the wallpapers in res/drawable-xhdpi

Go to res/values-xhdpi/arrays.xml.

You will see this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="wallpapers">
        <item>hd_01</item>
        <item>hd_02</item>
        <item>hd_03</item>
        <item>hd_04</item>
        <item>hd_05</item>
    </string-array>
</resources>

Add an item for each wallpaper you added. This a recent example when I added 20 more wallpapers:

Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="wallpapers">
	<item>hd_01</item>
        <item>hd_02</item>
        <item>hd_03</item>
        <item>hd_04</item>
        <item>hd_05</item>
        <item>hd_06</item>
        <item>hd_07</item>
        <item>hd_08</item>
        <item>hd_09</item>
        <item>hd_10</item>
        <item>hd_11</item>
        <item>hd_12</item>
        <item>hd_13</item>
        <item>hd_14</item>
        <item>hd_15</item>
        <item>hd_16</item>
        <item>hd_17</item>
        <item>hd_18</item>
        <item>hd_19</item>
        <item>hd_20</item>
        <item>hd_21</item>
        <item>hd_22</item>
        <item>hd_23</item>
        <item>hd_24</item>
        <item>hd_25</item>
    </string-array>
</resources>
Recompile and push to your device.
 
Last edited:

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
0
New Jersey
Disable Page Looping in Launcher

Decompile SecLauncher2.apk

Go to smali/com/android/launcher2/PagedView.smali

Find this line of code:

Code:
.method protected isLoopingEnabled()Z
A few lines below it change this:

Code:
const/4 v0, [COLOR="Red"]0x1[/COLOR]
To this:

Code:
const/4 v0, [COLOR="red"]0x0[/COLOR]
Recompile and push to your device.


That's it!


"Really?"


I said that's it fool!
 
Last edited:

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
0
New Jersey
Rendering Colors Properly in Aroma

Our device does not render colors properly in Aroma. Normally you would just force a colorspace at the very beginning of the aroma-config then the problem is solved. But on this device forcing a colorspace will often cause the Aroma installer to hang. This is how I solved the problem.

1) You have two choices for this step:
a) Deal with the (hideous) default color rendering until a theme has been chosen.
b) Create a theme that works with the default colorspace. Unfortunately, you don't have many color choices here. And figuring out which colors will work is just trial and error. None of the colors render properly. For example, green PNG images render as blue on the display. Orange (or maybe pink - can't remember) renders as neon yellow.

I created a theme called "start" which is my start up theme which works with the default colorspace.

2) Force the rgba colorspace before each theme in aroma-config. This gives true color rendering. Below are the relevant lines from my aroma-config.

Code:
### LICENSE:
#
# Copyright (C) 2011 Ahmad Amarullah ( http://amarullz.com/ )
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#CSROM SGS3
#upndwn4par
#
theme("start");
fontresload( "0", "ttf/Roboto-Regular.ttf;ttf/DroidSansArabic.ttf;ttf/DroidSansFallback.ttf;", "12" );
  loadlang("langs/en.lang");
  fontresload( "0", "ttf/Roboto-Regular.ttf", "12" );
  fontresload( "1", "ttf/Roboto-Regular.ttf", "18" );
ini_set("rom_name","CSROM SGS3");
ini_set("rom_version","v1.3");
ini_set("rom_author","upndwn4par");
ini_set("rom_device","Multi-Carrier");
ini_set("rom_date","21 Jan 2013");
#
selectbox(
    "Aroma Installer Setup",
    "Aroma Theme Options",
    "@theme",
    "theme.prop",
    "Please Select a Theme","",2,
		"<#selectbg_g>CSROM</#>",
			"",1,
		"<#selectbg_g>ICS</#>",
			"",0,
		"<#selectbg_g>MIUI</#>",
			"",0,
		"<#selectbg_g>Sense</#>",
			"",0
);
#
if
    file_getprop("/tmp/aroma-data/theme.prop","selected.1") == "1"
then
    ini_set("force_colorspace","rgba");
    theme("csrom");
endif;
if
    file_getprop("/tmp/aroma-data/theme.prop","selected.1") == "2"
then
    ini_set("force_colorspace","rgba");
    theme("ics");
endif;
if
    file_getprop("/tmp/aroma-data/theme.prop","selected.1") == "3"
then
    ini_set("force_colorspace","rgba");
    theme("miui");
endif;
if
    file_getprop("/tmp/aroma-data/theme.prop","selected.1") == "4"
then
    ini_set("force_colorspace","rgba");
    theme("sense");
endif;
#
 
Last edited:

enewman17

Senior Member
Sep 20, 2010
3,672
8,717
0
Fort Wayne, IN
TouchWiz Group Messaging and Backup / Restore SMS

This is how to enable the Group Messaging and Backup / Restore SMS features found in the stock TouchWiz Messaging app

First decompile SecMms.apk

Now navigate to smali/com/android/mms/MmsConfig.smali

To enable the Group Messaging feature

Fnd:

Code:
.method public static getEnableGroupMessage()Z
    .locals 1

    .prologue
    .line 766
    const/4 v0, 0x0
Change to:

.
Code:
method public static getEnableGroupMessage()Z
    .locals 1

    .prologue
    .line 766
    const/4 v0, 0x1

To enable backup / restore SMS messages

Find:

Code:
.method public static getEnableSaveRestoreSDCardMessage()Z
    .locals 1

    .prologue
    .line 774
    const/4 v0, 0x0
Change to:
Code:
.method public static getEnableSaveRestoreSDCardMessage()Z
    .locals 1

    .prologue
    .line 774
    const/4 v0, 0x1
Now compile with changes.... Easy Pezy

Enjoy Group Messaging...

enewman17
 

enewman17

Senior Member
Sep 20, 2010
3,672
8,717
0
Fort Wayne, IN
CSC / Feature.xml edits

Easy CSC freature edits.
Editing the csc/feature.xml can unlock certain features



Enter as new line in Messaging
Code:
<CscFeature_Message_ReplaceCRToNewLine>true</CscFeature_Message_ReplaceCRToNewLine>

Increase Image Sizes... This is pushing the limits of the network as is...
Code:
<CscFeature_Message_MaxMessageSize>5242880</CscFeature_Message_MaxMessageSize>
<CscFeature_Message_MaxImageWidth>1280</CscFeature_Message_MaxImageWidth>             
<CscFeature_Message_MaxImageHeight>720</CscFeature_Message_MaxImageHeight>

Increase Recipients limit
Code:
<CscFeature_Message_RecipientLimit>50</CscFeature_Message_RecipientLimit> Increase Recipients limit

Increas MMS video recording size and quality.... This is pushing the limits of the network as is...
Code:
<CscFeature_Message_MaxMmsSize>5242880</CscFeature_Message_MaxMmsSize>                                          <!-- 5242880 for 5.0MB -->
<CscFeature_Message_MmsModeCaptureVideoMaxSize>5033164</CscFeature_Message_MmsModeCaptureVideoMaxSize>            <!-- 5033164 for 4.8MB -->
<CscFeature_Message_MmsModeCaptureVideoBitRate>128000</CscFeature_Message_MmsModeCaptureVideoBitRate>           <!-- 256000 for 256Kbps -->
<CscFeature_Message_MmsModeCaptureVideoMaxDuration>60</CscFeature_Message_MmsModeCaptureVideoMaxDuration>       <!-- 60sec -->
<CscFeature_Message_MmsModeCaptureVideoResolution>320x240</CscFeature_Message_MmsModeCaptureVideoResolution>    <!-- "" = use camcorder default value-->
Other MMS tweaks, Single view MMS (no slideshow) blocking, alias, Call back#, Text Template Button, MultiLock, Re-combine SMS
Code:
<CscFeature_Message_EnableSegmentedSMS>true</CscFeature_Message_EnableSegmentedSMS>
<CscFeature_Message_DisableMenuSMSC>false</CscFeature_Message_DisableMenuSMSC>
<CscFeature_Message_EnableBlackList>true</CscFeature_Message_EnableBlackList>
<CscFeature_Message_EnableAlias>true</CscFeature_Message_EnableAlias>
<CscFeature_Message_EnableSmsCallbackNumber>true</CscFeature_Message_EnableSmsCallbackNumber>
<CscFeature_Message_ImageResizeQualityFactorWhenAttach>high</CscFeature_Message_ImageResizeQualityFactorWhenAttach>
<CscFeature_Message_EnableTextTemplateButton>true</CscFeature_Message_EnableTextTemplateButton>
<CscFeature_Message_EnableMmsOnePageViewer>true</CscFeature_Message_EnableMmsOnePageViewer>
<CscFeature_Message_DisableSaveRingtoneMenu>false</CscFeature_Message_DisableSaveRingtoneMenu>
<CscFeature_Message_EnableMultiLockMenu>true</CscFeature_Message_EnableMultiLockMenu>
<CscFeature_Message_UseAddrWithinMMSWhenSendACK>true</CscFeature_Message_UseAddrWithinMMSWhenSendACK>
Disable the FOTA / Carrier Updates setting under about phone.
Code:
<CscFeature_Settings_FOTA>false</CscFeature_Settings_FOTA>

Enable Find My Mobile in security settings
Code:
<CscFeature_Settings_FindMyMobile>true</CscFeature_Settings_FindMyMobile>
<CscFeature_Setting_DisableMenuFindMyMobile>false</CscFeature_Setting_DisableMenuFindMyMobile>

Set the Default Homepage to anything you want
Code:
<CscFeature_Web_SetHomepageURL>http://www.google.com</CscFeature_Web_SetHomepageURL>

Add exit button to stock web browser
Code:
<CscFeature_Web_AddOptionToTerminate>true</CscFeature_Web_AddOptionToTerminate>

TW E-mail -Dark-
Code:
<CscFeature_Email_UseFixedBgColorAsWhite>false</CscFeature_Email_UseFixedBgColorAsWhite>
Enable Call/Message block in settings menu
Code:
<CscFeature_Setting_EnableMenuBlockCallMsg>true</CscFeature_Setting_EnableMenuBlockCallMsg>
There are more that could be edited...
 
Last edited:

Swiftks

Retired Forum Moderator
Mar 16, 2011
3,741
1,910
0
The Woodlands, TX
How about disabling the TW Downloads app without having the "download complete" notification re-apparing after every reboot. Only way to get rid of the notification is to open Downloads app and manually clear the list. I've tried every thing to disable this, removing app, disabling downloads notification under app manager, etc.

Even possible on TouchWiz, or is it to intergreated in the framework???

Sent from my SGS III
 

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
0
New Jersey
How about disabling the TW Downloads app without having the "download complete" notification re-apparing after every reboot. Only way to get rid of the notification is to open Downloads app and manually clear the list. I've tried every thing to disable this, removing app, disabling downloads notification under app manager, etc.

Even possible on TouchWiz, or is it to intergreated in the framework???

Sent from my SGS III
Should be doable. Do you mean the notification drawer or status bar notification?

What ROM are you running? My notification goes away after I clear it once.
 
  • Like
Reactions: oldbbman

Swiftks

Retired Forum Moderator
Mar 16, 2011
3,741
1,910
0
The Woodlands, TX
Should be doable. Do you mean the notification drawer or status bar notification?

What ROM are you running? My notification goes away after I clear it once.
Notification drawer.
Yeah, the message will disappear after I hit clear, but on a reboot, its back... Until I clear it in Downloads. This is only downloads from Chrome.

Ruining a modded version of 4.1.1 at the moment with custom theme & lean kernel.

Sent from my SGS III
 

stratatak7

Swappa Representative
Jun 6, 2011
1,574
2,574
0
Fredericksburg, VA
Is there any chance you guys want to work with me to get CRT-off working on our device? I've been trying to crack at it for 2 days now. I have decompiled, made changes, recompiled, and flashed more times than I want to share but I can't get it. I've been following the i9300 thread here because the smali files are quite similar to ours, but something (I believe changes in SystemUI.apk) is causing a ruckus where the boot animation keeps looping (properly albeit) and won't boot into the OS further than that. Take a look at this thread. Maybe it's a lost cause for now, but I was pulling my hair out. And yes I manually made the changes in the smali files. http://forum.xda-developers.com/showthread.php?t=1935588
 
Last edited:
  • Like
Reactions: oldbbman

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
0
New Jersey
Notification drawer.
Yeah, the message will disappear after I hit clear, but on a reboot, its back... Until I clear it in Downloads. This is only downloads from Chrome.

Ruining a modded version of 4.1.1 at the moment with custom theme & lean kernel.

Sent from my SGS III
I just tried it with chrome and mine still cleared fine even after reboot. Do you have Chrome synched to your Google account (I don't)? I wonder if that could be part of the problem.

Still shouldn't be a tough mod.

Is there any chance you guys want to work with me to get CRT-off working on our device? I've been trying to crack at it for 2 days now. I have made changes, decompiled, recompiled and flashed more times than I want to share but I can't get it. I've been following the i9300 thread here because the smali files are quite similar to ours, but something (I believe changes in SystemUI.apk) is causing a ruckus where the boot animation keeps looping (properly albeit) and won't boot into the OS further than that. Take a look at this thread. Maybe it's a lost cause for now, but I was pulling my hair out. And yes I manually made the changes in the smali files. http://forum.xda-developers.com/showthread.php?t=1935588
Sure. I've had that on my list of things to do.