[DEV][MODDING] CRT, Airview, 4-way reboot, ink effect, phone, sms..etc [9/Dec/2013]

ekache

Senior Member
Jan 30, 2009
343
15
0
41
Jakarta
I managed to make motion menu to display Smart Alert feature but how can I use it??
I made a miss call to my phone, and after a while I pick up the phone but no vibration!!
Are there any things to do to make it working or just enable the feature in motion menu and that is all!!!!
Wow...it's great to hear that you have succeeded to display Smart Alert feature in motion menu...:good:
And still we want the vibration...:eek:
Is it possible to look for vibration settings at the smali from SecSettings.apk of XXLS2 (that already has Smart Alert feature with Vibration)?:confused:
Thanks for your great efforts.
 

REVERSiN

Senior Member
Mar 4, 2012
834
395
0
Wow...it's great to hear that you have succeeded to display Smart Alert feature in motion menu...:good:
And still we want the vibration...:eek:
Is it possible to look for vibration settings at the smali from SecSettings.apk of XXLS2 (that already has Smart Alert feature with Vibration)?:confused:
Thanks for your great efforts.
Honestly LS2 had the best features but missed the MultiWindow.... it had motions like double tap, shake... somethings I can't recall. We need to enable those in XXLSC will be but needs 9nvestigating as vibrations don't work..

Sent from my GT-N7000 using Tapatalk 2
 

deaddrg

Senior Member
Oct 5, 2012
105
4
18
Thank god now atleast someone understands what i was talking about smart alert and quick glance

Sent from my GT-N7000 using xda app-developers app

---------- Post added at 08:59 AM ---------- Previous post was at 08:56 AM ----------

Will it work if you flash ls2 modem?

Sent from my GT-N7000 using xda app-developers app
 

majdinj

Senior Member
Nov 25, 2006
980
3,437
0
AlAhsa
Honestly LS2 had the best features but missed the MultiWindow.... it had motions like double tap, shake... somethings I can't recall. We need to enable those in XXLSC will be but needs 9nvestigating as vibrations don't work..

Sent from my GT-N7000 using Tapatalk 2
Hi dear REVERSiN,
if you like I can send you the smali to show Smart Alert and if you have time you can look with me for vibration thing..
 

Dryblow

Senior Member
Oct 31, 2011
268
35
0
Agrigento
I. Increase Contacts adding for the message:
In /res/xml/mms_config.xml change the following values:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">200</int>
II. Change the AutoConverting:
still in mms_config.xml file, change the following values:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">200</int>
Is it an error? Because mod of "no autoconverter on mms" not work on my phone...
 
Last edited:

REVERSiN

Senior Member
Mar 4, 2012
834
395
0
Is it an error? Because mod of "no autoconverter on mms" not work on my phone...
No actually its not disabling, it gives it a longer string (nore chars space) till it converts it... so this isnt disabling mate!





Hi dear REVERSiN,
if you like I can send you the smali to show Smart Alert and if you have time you can look with me for vibration thing..
I can enable it among with other features such as double tap the thing is these motions don't work a few things are. Missing so it seems and iam trying to find out...

Sent from my GT-N7000 using Tapatalk 2
 

Dryblow

Senior Member
Oct 31, 2011
268
35
0
Agrigento
No actually its not disabling, it gives it a longer string (nore chars space) till it converts it... so this isnt disabling mate!
Sent from my GT-N7000 using Tapatalk 2
Mod for contact work fine, but not it isn't convert to 200 sms.. it convert on 3 message.

This is string for no convert:

<int name="smsToMmsTextThreshold">4</int>

to:

<int name="smsToMmsTextThreshold">200</int>
 
Last edited:
  • Like
Reactions: btemtd

btemtd

Senior Member
Aug 8, 2012
2,052
1,002
0
I. Increase Contacts adding for the message:
In /res/xml/mms_config.xml change the following values:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">200</int>
II. Change the AutoConverting:
still in mms_config.xml file, change the following values:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">200</int>


what the heck i dont get this can someone explain why it says to change the same code twice and it does 2 different things?

why wouldnt you just say do it once and it changes this and that
 

REVERSiN

Senior Member
Mar 4, 2012
834
395
0
I. Increase Contacts adding for the message:
In /res/xml/mms_config.xml change the following values:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">200</int>
II. Change the AutoConverting:
still in mms_config.xml file, change the following values:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">200</int>


what the heck i dont get this can someone explain why it says to change the same code twice and it does 2 different things?

why wouldnt you just say do it once and it changes this and that
So fine, what's your steps for building apk, using unsigned one will force close you have to open original replace the classes.dex I changed and goto res/XML/ and replace this with the one from build apk..... Try this and see mate.

Sent from my GT-N7000 using Tapatalk 2
 

deaddrg

Senior Member
Oct 5, 2012
105
4
18
as long as we are trying for motion features can you guys add quick glance feature as well because we have front facing cam as well
 

majdinj

Senior Member
Nov 25, 2006
980
3,437
0
AlAhsa
I. Increase Contacts adding for the message:
In /res/xml/mms_config.xml change the following values:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">200</int>
II. Change the AutoConverting:
still in mms_config.xml file, change the following values:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">200</int>


what the heck i dont get this can someone explain why it says to change the same code twice and it does 2 different things?

why wouldnt you just say do it once and it changes this and that
Opps!!
No it is 2 lines but the 2nd line is repeated by mistake.. sorry guys it was my fault :(.. I will edit it now in OP

Also I will put how to permanent disabling of sms, mms & email logs history to be logged in call logs in post #71
 

8xfan

Senior Member
Oct 24, 2011
324
48
0
Kulim
can u mod my framework for CRT? mine not same with u :(
i search mod for my device and no luck..please :(
here is my services.jar
 
Last edited:

jwee

Senior Member
Oct 10, 2008
103
3
0
Scolling wallpaper

Hello Majdinj,

Thank you very much for your post, I'd like your help on scrolling wallpaper in the seclauncher2 decompiling, I can not find the file bools.xml, could you tell me in which folder it is, I said that I'm working on the 240 dpi. Thank you for your help.
 

mac231us

Senior Member
Oct 26, 2010
2,340
504
183
Opps!!
No it is 2 lines but the 2nd line is repeated by mistake.. sorry guys it was my fault :(.. I will edit it now in OP

Also I will put how to permanent disabling of sms, mms & email logs history to be logged in call logs in post #71
Hi majdinj...great many thanks for your thread...awesome work ! Could you show how to add screenshot to power menu if it is possible (think we had it on Galaxy s and s2 variants in GB i recall) THanks !
 

bhatia.mani

Senior Member
Aug 22, 2012
195
14
0
Hi cant find SecMMS.apk in system/ app folder.

Kindly help. i am on stock rooted 4.0.4 , phils kernel

Airview enabling

1. Just add this file to /system/etc/permissions in your phone.
2. Fix permission to rw-r--r-- and reboot


4-way Reboot Menu

1. We will need Backsmali/Smali program for this.
2. Download the following resources files (GlobalActions$99$1.smali, GlobalActions$99$2.smali, GlobalActions$99.smali)
3. Put the android.policy.jar in baksmali folder.
4. Follow its procedure to baksmali android.policy.jar, if done you will have classout folder.
5. Open classout folder and go to \com\android\internal\policy\impl and paste the three resource files; (GlobalActions$99$1.smali, GlobalActions$99$2.smali and GlobalActions$99) there.
6. With notepad++ open the GlobalActions.smali. (Note: Don't confuse it with GlobalAction$Action.smali)
7. In GlobalActions.smali, change GlobalActions$5 to GlobalActions$99 on both lines, and save it.
>>The Code should look like this:<<
Code:
new-instance v0, Lcom/android/internal/policy/impl/[B][COLOR="Blue"]GlobalActions$99[/COLOR][/B];

const v1, 0x108064b

const v2, 0x1040169

invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/[COLOR="Blue"][B]GlobalActions$99[/B][/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
8. Now Open GlobalActions$SinglePressAction.smali with Notepad++. Just between line ".end annotation" and "# instance fields" place your cursor and hit enter 2 times to make room (i.e leave 2 lines empty above "# instance fields" and 2 lines bellow ".end annotation") to paste THIS code (Blue one only)
Code:
.end annotation


[COLOR="Blue"][B]# static fields
.field protected static rebootMode:I

.field protected static final rebootOptions:[Ljava/lang/String;[/B][/COLOR]


# instance fields
9. Still in GlobalActions$SinglePressAction.smali look for the code "direct methods". Place your curser directly behind "direct methods" and hit enter to bring your curser down to the next line. Then paste THIS code (Blue one only):
Code:
# direct methods
[COLOR="Blue"][B].method static constructor <clinit>()V
    .registers 3

    const/4 v0, 0x4

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    const-string v2, "Reboot"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    const-string v2, "Hot Reboot"

    aput-object v2, v0, v1

    const/4 v1, 0x2

    const-string v2, "Download"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "Recovery"

    aput-object v2, v0, v1

    sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;

    return-void
.end method
[/B][/COLOR]
.method protected constructor <init>(II)V
10. Recompile (smali) your jar. You will get "classes.dex" and with 7zip, open the archive of the original Android Policy.jar. Then drag and drop the classes.dex you just compiled into the jar and push it to your phone.

Additional
If you want to change "Choose Reboot Method" text on top of that menu then:
- Open GlobalActions$99.smali.
- Go to following code and made your change (N.B: if you delete this entire code, you will disable head title of "Choose Reboot Method")
Code:
const-string v2, "[COLOR="Blue"][B]Choose Reboot Method[/B][/COLOR]"

    invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v1
Results example:



Call record enabling + Disabling ascending ringtone

Call record enabling:
1. Put the SecPhone.apk in baksmali folder.
2. Follow its procedure to baksmali SecPhone.apk, if done you will have classout folder.
3. Open classout folder and go to \com\android\phone\PhoneFeature.smali, open it by NotePad++ and search for line makeFeatureForUsa()V and put these lines (Blue color text only) before "return-void" line:
Code:
[B]    invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForUsa()V

    .line 899
[COLOR="Blue"]    sget-object v0, Lcom/android/phone/PhoneFeature;->mFeatureList:Ljava/util/HashMap;

    const-string v2, "voice_call_recording"

    const/4 v4, 0x1

    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v3

    invoke-virtual {v0, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
[/COLOR]
    return-void[/B]
4. Save changes.

Disabling ascending ringtone:
1. Open classout folder and go to \com\android\phone\Ringer$1.smali.
2. Search for setStreamVolume. There should be two results. Delete the first one (the whole line):
Code:
    .line 394
    iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;

    iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;

   [strike][B]invoke-virtual {v1, v3, v5, v4}, Landroid/media/AudioManager;->setStreamVolume(III)V[/B][/strike]
3. Now search for nop (usually at the bottom of the file!!), copy it and hit enter twice and paste again (see code bellow, the blue one). "leave one line space in between each line":
Code:
    goto/16 :goto_b

    .line 717
    nop

[B][COLOR="Blue"]    nop[/COLOR][/B]

    :pswitch_data_1ca
    .packed-switch 0x1
4. Save changes.

Recompile (smali) your SecPhone.apk. You will get a "classes.dex" file. With WinRAR, open the the original SecPhone.apk. Then drag and drop the classes.dex you just compiled into the SecPhone.apk. Push the SecPhone.apk to your phone.

Results example:



Smart Rotation enabling

1- Decompile SecSettings.apk and go to smali/com/android/settings/DisplaySettings.smali
2- Open this smali file with a NotePad++ and look for these lines and delete them all:
Code:
    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
    move-result-object v12
    
    iget-object v13, p0, Lcom/android/settings/DisplaySettings;->mSmartRotation:Landroid/preference/CheckBoxPreference;
    
    invoke-virtual {v12, v13}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
3. Recompile and push to your phone.

Results example:



SMS hacks: 200 contact recipients and MMS auto converting is increased to 200 SMS, displaying sent Time instead of the received time

Decompile SecMMS.apk file by APK-Multi tool

I. Increase Contacts adding for the message:
In /res/xml/mms_config.xml change the following values:
Code:
<int name="recipientLimit">[COLOR="Red"][B]10[/B][/COLOR]</int>
to:
Code:
<int name="recipientLimit">[B][COLOR="Blue"]200[/COLOR][/B]</int>
II. Change the AutoConverting:
still in mms_config.xml file, change the following values:
Code:
    <int name="smsToMmsTextThreshold">[B][COLOR="Red"]4[/COLOR][/B]</int>
to:
Code:
    <int name="smsToMmsTextThreshold">[B][COLOR="Blue"]200[/COLOR][/B]</int>
III. Display sent tme instead of the received time:
1. Go to /smali/com/android/mms/transaction/SMSReceiverService.smali, search for “currentTimeMillis" and change the following values:
Code:
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
to:
Code:
invoke-virtual {p1}, Landroid/telephony/SmsMessage;->getTimestampMillis()J
2. Search again for next “currentTimeMillis" and change the following values:
Code:
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
to:
Code:
invoke-virtual {v0}, Landroid/telephony/gsm/CbMessage;->getTimestampMillis()J
3. Save changes and compile.


Unlimited Multiwindow apps

For this one, we need to play with 2 files (flashbarservice.apk and services.jar)

A. Flashbarservice.apk:
1. Decompile the flashbarservice.apk with APK-Multi tool.
2. Go to \smali\com\sec\android\app\FlashBar Service\FlashBarInfo.smali.
3. Open the file FlashBarInfo.smali using notepad++.
4. search for .method public generateFlashBarList()V and change the following code from:
Code:
const-string v8, "android.intent.category[COLOR="Blue"].MULTIWINDOW[/COLOR]_LAUNCHER"
to:
Code:
const-string v8, "android.intent.category.LAUNCHER"
5. Save and recompile and push to your phone.

B. services.jar:
1. Decompile services.jar by Backsmali/smali program.
2. Go to classout\smali\com\android\server\am\Multi WindowManagerService.smali
3. Open the file using notepad++ and search for following .method public isSupportApp(Ljava/lang/String)Z. Change the code from:
Code:
.method public isSupportApp(Ljava/lang/String;)Z 
[B][COLOR="SeaGreen"]    .locals 1 

    iget-object v0, p0, Lcom/android/server/am/MultiWindowManagerService;->mSupportAppList:Ljava/util/ArrayList; 

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z[/COLOR][/B]
to (the green to blue lines):
Code:
.method public isSupportApp(Ljava/lang/String;)Z
[COLOR="Blue"][B]    .registers 2

    .prologue
    const/4 v0, 0x1

    return p0
.end method[/B][/COLOR]
4. Save file and recompile (Smali), You will get a "classes.dex" file. With WinRAR, open the the original service.jar. Then drag and drop the classes.dex you just compiled into the service.jar. Then push it to your phone.


Home screen wallpaper scrolling

1. Decompile SecLauncher2.apk by APK-Multi tool.
2. Go to \res\values folder and open bools.xml file with Notepad++.
3. Change the following line:
Code:
<bool name="config_fixedWallpaperOffset">[B][COLOR="Blue"]true[/COLOR][/B]</bool>
to:
Code:
<bool name="config_fixedWallpaperOffset">[B][COLOR="Blue"]false[/COLOR][/B]</bool>
4. Save the file, recompile and push the apk to your phone.


Changing number of icons in home screen and apps drawer (dpi modding)

1. Decompile SecLauncher2.apk by APK-Multi tool.
2. Go to \res\values-sw399dp folder
3. Here we will do our changes to integers.xml, dimens.xml and and styles.xml files.

I. integers.xml:
  • Here is where you change the number of icons displayed in X axes "i.e, horizontal" and Y axes "i.e, vertical".
  • You need to apply your changes on the following numbers on the following lines:
Code:
    <integer name="home_cellCountX">[B][COLOR="Blue"]5[/COLOR][/B]</integer>
    <integer name="home_cellCountY">[B][COLOR="Blue"]5[/COLOR][/B]</integer>

    <integer name="menuAppsGrid_cellCountX">[B][COLOR="Blue"]5[/COLOR][/B]</integer>
    <integer name="menuAppsGrid_cellCountY">[B][COLOR="Blue"]5[/COLOR][/B]</integer>
As you can figure, home_cellCountX is number of icons in home screen in X axes and home_cellCountY is number of icons in home screen in Y axes.
Whereas; menuAppsGrid_cellCountX is number of icons in apps drawer in X axes and menuAppsGrid_cellCountY is number of icons in apps drawer in Y axes.
  • Do your changes and save.

II. dimens.xml:
  • Here is where you change icons size displayed in X and Y axes.
  • You need to apply your changes on the following lines for home screen to any number you want (might need several testing):
Code:
    <dimen name="app_icon_size">[COLOR="Blue"][B]48.0[/B][/COLOR]dip</dimen>

    <dimen name="home_cellWidth_port">[B][COLOR="Blue"]80.0[/COLOR][/B]dip</dimen>
    <dimen name="home_cellHeight_port">[B][COLOR="Blue"]100.0[/COLOR][/B]dip</dimen>
    <dimen name="home_cellGapX_port">[B][COLOR="Blue"]0.0[/COLOR][/B]dip</dimen>
    <dimen name="home_cellGapY_port">[B][COLOR="Blue"]0.0[/COLOR][/B]dip</dimen>

    <dimen name="home_pageMarginPlusPaddingTop">[B][COLOR="Blue"]2.0[/COLOR][/B]dip</dimen>

    <dimen name="home_pageIndicatorTop">[B][COLOR="Blue"]508.0[/COLOR][/B]dip</dimen>
    <dimen name="home_pageIndicatorTopShrunken">[B][COLOR="Blue"]508.0[/COLOR][/B]dip</dimen>
  • Also you need to apply your changes on the following lines for apps drawer to any number you want (might need several testing):
Code:
    <dimen name="menuAppsGrid_pageMarginPlusPaddingTop">[B][COLOR="Blue"]27.0[/COLOR][/B]dip</dimen>
    <dimen name="menuAppsGrid_cellWidth">[B][COLOR="Blue"]78.0[/COLOR][/B]dip</dimen>
    <dimen name="menuAppsGrid_cellHeight">[B][COLOR="Blue"]94.0[/COLOR][/B]dip</dimen>
    <dimen name="menuAppsGrid_cellGapX">[B][COLOR="Blue"]2.0[/COLOR][/B]dip</dimen>
    <dimen name="menuAppsGrid_cellGapY">[B][COLOR="Blue"]2.0[/COLOR][/B]dip</dimen>
    <dimen name="menu_pageIndicatorGap">[B][COLOR="Blue"]12.0[/COLOR][/B]dip</dimen>
    <dimen name="menu_pageIndicatorTop">[B][COLOR="Blue"]520.0[/COLOR][/B]dip</dimen>
  • Do your changes and save.

III. styles.xml:
  • This is needed if the icon label text becomes truncated!!
  • You need to edit the following lines to any number you want (might need several testing):
For home screen, edit this number:
Code:
    <style name="HomeIcon" parent="@style/BaseHomeIcon">
        <item name="android:textSize">[COLOR="Blue"][B]13.0[/B][/COLOR]dip</item>
For apps drawer, edit this number:
Code:
    <style name="MenuIcon" parent="@style/BaseMenuIcon">
        <item name="android:textSize">[B][COLOR="Blue"]13.0[/COLOR][/B]dip</item>
  • Do your changes and save.

4. Recompile and push to your phone.
5. Now we have to change phone's menus dpi. With any root browser/explorer program, navigate to system folder and open build.prop file as a text file and go to this line:
Code:
ro.sf.lcd_density=[B][COLOR="Red"]320[/COLOR][/B]
just change the red value to which dpi you want; e.g 240, then save changes and reboot your phone.


Camera & Camcorder hacks: Adding "Shutter Sound On/Off" in menu, flash can be used in low battery, hard keys as shutter, increasing camcorder quality..etc


  • We need Backsmali/smali program to do this method.
  • Put SamsungCamera.apk in Backsmali folder and follow its guide to have classout folder in the end.
Adding "Shutter Sound On/Off" option in Camera Menu:
1. Go to classout\com\sec\android\app\camera\resourcedata\ folder and open CameraSettingsMenuResourceData.smali file.
2. To locate the lines that we will edit, search for"CscFeature_Camera_ShutterSoundMenu".
3. Now delete all these 6 lines:
Code:
invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;

move-result-object v2

const-string v3, "CscFeature_Camera_ShutterSoundMenu"

invoke-virtual {v2, v3}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z

move-result v2

if-eqz v2, :cond_f8
Camera can be used with flash in low battery state:
1. Go to classout\com\sec\android\app\camera\ folder and open AbstractCameraActivity.smali file.
2. Search for ".method protected handleLowBattery(Z)V" and add the following line (the blue line):
Code:
.method protected handleLowBattery(Z)V
    .registers 5
    .parameter "temp"

    .prologue
    .line 2072
    [COLOR="Blue"][B]return-void[/B][/COLOR]
    const-string v1, "AbstractCameraActivity"
3. Now save changes and go to classout\ com\sec\android\app\camera\ folder and open Camera.smali file.
4. Search for ".method private handleBatteryChanged(Landroid/content/Intent;)V" and look for the lines that have "handleLowBattery(Z)V" and "handlePluggedLowBattery(Z)V" after this method and delete the whole lines:
Code:
invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->handleLowBattery()V
invoke-direct {p0, v6}, Lcom/sec/android/app/camera/Camera;->handlePluggedLowBattery(Z)V

invoke-direct {p0, v6}, Lcom/sec/android/app/camera/Camera;->handlePluggedLowBattery(Z)V

5. Still in Camera.smali file, search for ".method private handlePluggedLowBattery(Z)V" and add the following line (the blue line):
Code:
.method private handlePluggedLowBattery(Z)V
    .registers 7
    .parameter "temp"

    .prologue
    const/4 v4, 0x3

    const/4 v3, 0x0

    .line 6238
    [B][COLOR="Blue"]return-void[/COLOR][/B]
    const-string v1, "Camera"
Camera focus sound disabled:
1. Go to classout\com\sec\android\app\camera\ folder and open Camera.smali file.
2. Search for ".method public playCameraSound(II)V" and add the following line (the blue line):
Code:
.method public playCameraSound(II)V
    .registers 12
    .parameter "Sound"
    .parameter "loop"

    .prologue
    const/4 v4, 0x0

    const/high16 v6, 0x3f80

    .line 4870
    [B][COLOR="Blue"]return-void[/COLOR][/B]
    iget-object v0, p0, Lcom/sec/android/app/camera/Camera;->mSoundPool:Landroid/media/SoundPool;
Camera Volume Up/Down and power buttons as a shutter:
1. Go to classout\com\sec\android\app\camera\ folder and open Camera.smali file.
2. Search for ". method public onKeyDown(ILandroid/view/KeyEvent;)Z" and look for ".sparse-switch" at the end of this method.
3. Here you will see several :sswitch definitions. See the one for 0x17, it is the touch shutter button and is defined as :sswitch_??. So simply we need to make :sswitch that are defined to volume up/down and power buttons to read the same as the one defined to the touch shutter button. Here 0x18 is for volume up; 0x19 is for volume down, and 0x1a is for power button.
4. So now change these :sswitch for these buttons to read as same as that for the touch shutter button. See example bellow:
Before:
Code:
    :sswitch_data_2a0
    .sparse-switch
        0x4 -> :sswitch_95
        [B][COLOR="Blue"]0x17 -> :sswitch_f7[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is the touch shutter button[/COLOR]
        [B][COLOR="Red"]0x18 -> :sswitch_238[/COLOR][/B]     [COLOR="DarkGreen"]<!-- this is volume up button[/COLOR]
        [B][COLOR="Red"]0x19 -> :sswitch_238[/COLOR][/B]     [COLOR="DarkGreen"]<!-- this is volume down button[/COLOR]
        [B][COLOR="Red"]0x1a -> :sswitch_95[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is power button[/COLOR]
        0x1b -> :sswitch_f7
        0x42 -> :sswitch_f7
        0x45 -> :sswitch_238
        0x46 -> :sswitch_238
        0x50 -> :sswitch_9b
        0x52 -> :sswitch_93
        0x55 -> :sswitch_98
        0x59 -> :sswitch_98
        0x5a -> :sswitch_98
        0x9c -> :sswitch_238
        0x9d -> :sswitch_238
    .end sparse-switch
.end method
After:
Code:
    :sswitch_data_2a0
    .sparse-switch
        0x4 -> :sswitch_95
        [COLOR="Blue"][B]0x17 -> :sswitch_f7[/B][/COLOR]     [COLOR="DarkGreen"]<!-- this is the touch shutter button[/COLOR]
        [B][COLOR="Red"]0x18 -> :sswitch_f7[/COLOR][/B]     [COLOR="DarkGreen"]<!-- this is volume up button[/COLOR]
        [B][COLOR="Red"]0x19 -> :sswitch_f7[/COLOR][/B]     [COLOR="DarkGreen"]<!-- this is volume down button[/COLOR]
        [B][COLOR="Red"]0x1a -> :sswitch_f7[/COLOR][/B]     [COLOR="DarkGreen"]<!-- this is power button[/COLOR]
        0x1b -> :sswitch_f7
        0x42 -> :sswitch_f7
        0x45 -> :sswitch_238
        0x46 -> :sswitch_238
        0x50 -> :sswitch_9b
        0x52 -> :sswitch_93
        0x55 -> :sswitch_98
        0x59 -> :sswitch_98
        0x5a -> :sswitch_98
        0x9c -> :sswitch_238
        0x9d -> :sswitch_238
    .end sparse-switch
.end method
5. Now search for ". method public onKeyUp(ILandroid/view/KeyEvent;)Z" and look for ".sparse-switch" at the end of this method.
6. Again you will see several :sswitch definitions. See the one for 0x17, it is the touch shutter button and is defined as :sswitch_??. And yes as you can figure out 0x18 is for volume up, 0x19 is for volume down and 0x1a is for power button.
7. So now change these :sswitch for these buttons to read as same as that for the touch shutter button. See example bellow:
Before:
Code:
    .line 2172        
    .sparse-switch
        0x3 -> :sswitch_25f
        0x4 -> :sswitch_60
        [B][COLOR="Blue"]0x17 -> :sswitch_11e[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is the touch shutter button[/COLOR]
        [B][COLOR="Red"]0x18 -> :sswitch_209[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is volume up button[/COLOR]
        [B][COLOR="Red"]0x19 -> :sswitch_209[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is volume down button[/COLOR]
        [B][COLOR="Red"]0x1a -> :sswitch_209[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is power button[/COLOR]
        0x1b -> :sswitch_11e
        0x42 -> :sswitch_11e
        0x50 -> :sswitch_20c
        0x52 -> :sswitch_e5
    .end sparse-switch
After:
Code:
    .line 2172    
    .sparse-switch
        0x3 -> :sswitch_25f
        0x4 -> :sswitch_60
        [B][COLOR="Blue"]0x17 -> :sswitch_11e[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is the touch shutter button[/COLOR]
        [B][COLOR="Red"]0x18 -> :sswitch_11e[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is volume up button[/COLOR]
        [B][COLOR="Red"]0x19 -> :sswitch_11e[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is volume down button[/COLOR]
        [B][COLOR="Red"]0x1a -> :sswitch_11e[/COLOR][/B]      [COLOR="DarkGreen"]<!-- this is power button[/COLOR]
        0x1b -> :sswitch_11e
        0x42 -> :sswitch_11e
        0x50 -> :sswitch_20c
        0x52 -> :sswitch_e5
    .end sparse-switch


Camcorder can be used with flash in low battery state:
1. Go to classout\com\sec\android\app\camera\ folder and open Camcorder.smali file.
2. Search for ".method protected handleLowBattery(Z)V" and add the following line (the blue one):
Code:
.method protected handleLowBattery(Z)V
    .registers 4
    .parameter "temp"

    .prologue
    .line 3267
    [B][COLOR="Blue"]return-void[/COLOR][/B]
    const-string v0, "Camcorder"
3. Still in Camcorder.smali file, search for ".method private handleBatteryChanged(Landroid/content/Intent;)V" and look for lines that have "handleLowBattery(Z)V" and "handlePluggedLowBattery(Z)V" after this method and delete the whole lines:
Code:
invoke-virtual {p0}, Lcom/sec/android/app/camera/Camcorder;->handleLowBattery(Z)V
invoke-direct {p0, v7}, Lcom/sec/android/app/camera/Camcorder;->handlePluggedLowBattery(Z)V

invoke-direct {p0, v7}, Lcom/sec/android/app/camera/Camcorder;->handlePluggedLowBattery(Z)V

4. Still in Camcorder.smali file, search for ".method private handlePluggedLowBattery(Z)V" and add the following line (the blue one):
Code:
.method private handlePluggedLowBattery(Z)V
    .registers 7
    .parameter "temp"

    .prologue
    const/16 v4, 0x67

    const/4 v3, 0x0

    .line 4351
    [B][COLOR="Blue"]return-void[/COLOR][/B]
    const-string v1, "Camcorder"
Camcorder Better audio quality and video bitrate:

1. Go to classout\com\sec\android\app\camera\ folder and open MediaRecorderProfile.smali file.
2. Modify the first 4 arrays to be exactly like the followings (the blue lines only):
Code:
    :array_11c
    .array-data 0x4
[B][COLOR="Blue"]        0x2t 0x0t 0x0t 0x0t
        0x80t 0xc3t 0xc9t 0x1t
        0x0t 0x36t 0x6et 0x1t
        0x40t 0x66t 0x3t 0x1t
        0x1et 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x0t 0xeet 0x2t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x80t 0xbbt 0x0t 0x0t[/COLOR][/B]
    .end array-data

    :array_134
    .array-data 0x4
[B][COLOR="Blue"]        0x2t 0x0t 0x0t 0x0t
        0x40t 0x66t 0x3t 0x1t
        0x40t 0x5dt 0xc6t 0x0t
        0x40t 0x54t 0x89t 0x0t
        0x1et 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x0t 0xeet 0x2t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x80t 0xbbt 0x0t 0x0t[/COLOR][/B]
    .end array-data

    :array_14c
    .array-data 0x4
[B][COLOR="Blue"]        0x2t 0x0t 0x0t 0x0t
        0xa8t 0xa0t 0x34t 0x0t
        0x50t 0x3et 0x2bt 0x0t
        0x90t 0x10t 0x23t 0x0t
        0x1et 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x0t 0xeet 0x2t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x80t 0xbbt 0x0t 0x0t[/COLOR][/B]
    .end array-data

    :array_164
    .array-data 0x4
[B][COLOR="Blue"]        0x2t 0x0t 0x0t 0x0t
        0x70t 0xf7t 0x2et 0x0t
        0xa8t 0xf4t 0x26t 0x0t
        0xb8t 0xcet 0x1et 0x0t
        0x1et 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x0t 0xeet 0x2t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x80t 0xbbt 0x0t 0x0t[/COLOR][/B]
    .end array-data
  • Save changes, recompile (smali) your apk. You will get "classes.dex" and with 7-zip, open the archive of the original SamsungCamera.apk. Then drag and drop the classes.dex into SamsungCamera.apk. and push it to your phone.

Oopps, we are out of space, please go ahead to post #71, #72, #73, #74 for continuing our modding tutorials :D
 
  • Like
Reactions: thejuspradeep

mylitoazia

Senior Member
Jan 1, 2011
87
8
0
ink effect
first question..i dont have a xdpi folder so a copy the images over to what i have is mdpi. will that effect anything?
second , in to androidpolicy folder, there are smali and a folder . do i put all and paste all of it in the same location?
result was everything compile fine
problem was pushing androidpolicy.jar back cause my rom to bootloop so i know its no good
i got SECsettings.apk to work but all a have is blue ripple when i search on lockscreen option to check color nothing shows up and i get setting failure crash...followed all steps...any advice??
 

brolee93

Senior Member
Jan 1, 2009
1,966
522
0
36
XDA city
Thnaks for this very good THREAD !)

It is possible to add tuto for add multiwindow please ?
Because in my tablet i dont have multiwindow and i want it looll have you tuto ?
i have samsung tab 2 official firmware deodexed etc by me (160dpi with mdpi files)
 

arocker

Senior Member
Feb 12, 2012
106
50
0
Jersey City, NJ
Help please....

thank you Majdinj,

Fantastic tuts! was able to mod ink effect for sg3 d2mtr variant. it was my first mod and im quite happy about it thanks to your post.
im experiencing an ink effect graphical issue im hoping you can help with. touching the lockscreen produces the effect as intended. however quickly swiping the lockscreen to unlock causes the entire screen to flash the color ink that was chosen. for example, choose black ink in settings and slowly touch the lockscreen [without unlocking] it shows the black ink as it should, however moving your finger quickly as if to unlock makes the screen turn [flash] totally black for a second or two before returning to normal lockscreen. this is repeatable with any color setting and as i stated, the entire screen flashes that color.

any ideas and help would be appreciated.
thank you again!