• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD][HOW-TO][GT_19500]Enable Call Recording + no inc ring + EPM + MMS Android 4.2.2

Search This thread

grgsiocl

Senior Member
Nov 9, 2009
2,891
4,546
Kurnool, Andhra Pradesh
This is how to enable Call recording on the Galaxy S4 -I9500 (tested on this) on Based Samsung Android 4.2.2 Roms

1. Decompile SecPhone.apk

2. Open smali\com\android\phone\PhoneFeature.smali, go to "makeFeatureForCommon()V" method, and make the changes:

PHP:
.line 1002
    sget-object v0, Lcom/android/phone/PhoneFeature;->mFeatureList:Ljava/util/HashMap;

    const-string v5, "support_merge_call"

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

    move-result-object v6

    invoke-virtual {v0, v5, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
	
++	.line 1003
	
++	sget-object v0, Lcom/android/phone/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
	
++	const-string v5, "voice_call_recording"
	
++	const/4 v2, 0x1
	
++	invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
	
++	move-result-object v6
	
++	invoke-virtual {v0, v5, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

   ++ .line 1004

3. This mod is tested & working on latest I9500 FW - I9500UBUAMDK

4. All the recorded calls will be stored on sdcard under sounds folder

5. Flash at your own risk

No Increasing ringtone


TARGET FILE: secphone/smali/com/android/phone/Ringer$1.smali and following changes:

PHP:
iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;
 
-    invoke-virtual {v1, v6, v4, v5}, Landroid/media/AudioManager;->setStreamVolume(III)V
-
     .line 804
     const/4 v1, 0x7

and

PHP:
goto/16 :goto_0
 
     .line 756
+    nop
+
     nop
 
     :pswitch_data_0

EXTENDED POWER MENU MOD

TARGET FILE: android.policy.jar

  1. First Copy attached GlobalActions$99$1.smali, GlobalActions$99$2.smali, GlobalActions$99.smali from the atatchments to android.policy_ori.jar.out\smali\com\android\internal\policy\impl

2. Open the GlobalActions$99.smali using any notepad editor and change the following to whatever name you want :

PHP:
const-string v2, "Rebooot Menu"

3. Open the following file : /smali/com/android/internal/policy/impl/GlobalActions$SinglePressAction.smali and make the following changes:

PHP:
.end annotation
 
 
+# static fields
+.field protected static rebootMode:I
+
+.field protected static final rebootOptions:[Ljava/lang/String;
+
+

PHP:
 # direct methods
+.method static constructor <clinit>()V
+    .locals 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 Boot"
+
+    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
+
 .method protected constructor <init>(II)V
     .locals 1
     .parameter "iconResId"

4. Open the following file : smali/com/android/internal/policy/impl/GlobalActions.smali and male following changes:

PHP:
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
 
     .line 566
-    new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
+    new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
 
     const v1, 0x108097f


PHP:
const v2, 0x1040199
 
-    invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
+    invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$99;-><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;

5. Compile and then flash


No MMS Conversion & Increase Recipient Limit

Target File: Secmms.apk

1. Open the following file: /res/xml/mms_config.xml and make following changes:

PHP:
<int name="mMaxTextViewSize">5000</int>
-    <int name="recipientLimit">10</int>
-    <int name="smsToMmsTextThreshold">4</int>
+    <int name="recipientLimit">999</int>
+    <int name="smsToMmsTextThreshold">999</int>
     <bool name="disableEndterKey">false</bool>
     <bool name="composeMaxLengthLimit">false</bool>
-    <bool name="inputModeAuto">false</bool>
+    <bool name="inputModeAuto">true</bool>
     <bool name="smsExpiryDate">false</bool>
     <bool name="sendAnimationJpn">false</bool>
     <bool name="wapPush">true</bool>

2. Open the following file: smali/com/android/mms/MmsConfig.smali and make following changes:

PHP:
   sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidthRestrictedMode:I
 
     .line 163
-    sput v7, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
+    const/16 v0, 0x3e7
 
-    .line 164
-    const/16 v0, 0xc8
+    sput v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
 
+    .line 164
     sput v0, Lcom/android/mms/MmsConfig;->mDefaultSMSMessagesPerThread:I
 
     .line 165

PHP:
     .prologue
     .line 2510
-    sget v0, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
+    const/16 v0, 0x3e7
 
     return v0
 .end method

PHP:
  .prologue
     .line 2751
-    sget v0, Lcom/android/mms/MmsConfig;->mMmsRecipientLimit:I
+    const/16 v0, 0x3e7
 
     return v0
 .end method

PHP:
 .prologue
     .line 759
-    sget v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
+    const/16 v0, 0x3e7
 
     return v0
 .end method

PHP:
   .prologue
     .line 688
-    sget v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
+    const/16 v0, 0x3e7
 
     return v0
 .end method

PHP:
     move-result v11
 
+    const/16 v11, 0x3e7
+
     sput v11, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
 
     .line 1768

PHP:
    move-result v1
 
+    const/16 v1, 0x3e7
+
     sput v1, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
 
     .line 2045

PHP:
   invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
 
     move-result v1
+
+    const/16 v1, 0x3e7
 
     sput v1, Lcom/android/mms/MmsConfig;->mRecipientLimit:I

Increasing SMS hour limit

Navigate and open \com\android\mms\util\RateController.smali

Search for

PHP:
.field private static final RATE_LIMIT:I = 0x64

This value is in hexadecimal format, so we see that 0x64 = 100. So, to increase this to 1000 simply change 0x64 to 0x3e8

I am including the mod here. If you are on deodexed rom, then delete the secphone.odex and then flash the zip from recovery. I will release the odex one in few hours as i am in hurry now.

Download - I9500UBUAMDK- DEODEXED

I completed with almost all the mods and i will release it later i a day as i am on business trip!

Credits
-------------


Wanam
mythtrandyr
 

Attachments

  • Globalactions.zip
    2.9 KB · Views: 1,017
Last edited:

a0007

Senior Member
May 7, 2012
278
147
Thanks


Sent from my GT-I9500 using Tapatalk 2
 
Last edited:

cybdani

Senior Member
Feb 5, 2012
459
190
Barcelona
will this work on my stock mdc I9505 i gave you?

It's from mdn deodexed, not tested with mdc, but you can test it:
Backup secphone.apk and secphone.odex to sd card.
Copy my secphone.apk into /system/app, give permissions to this file, delete secphone.odex and reboot.
If it doesn't works, you can restore your backup files.
 

tvhak

Senior Member
Sep 25, 2007
1,058
202
tilburg
It's from mdn deodexed, not tested with mdc, but you can test it:
Backup secphone.apk and secphone.odex to sd card.
Copy my secphone.apk into /system/app, give permissions to this file, delete secphone.odex and reboot.
If it doesn't works, you can restore your backup files.

thanks going to try that now

---------- Post added at 10:05 AM ---------- Previous post was at 09:53 AM ----------

It's from mdn deodexed, not tested with mdc, but you can test it:
Backup secphone.apk and secphone.odex to sd card.
Copy my secphone.apk into /system/app, give permissions to this file, delete secphone.odex and reboot.
If it doesn't works, you can restore your backup files.

okay have a problem...
i see the record button when i make a call. but it does nothing
also wanted to ask if there is an option to have it enabled that it records all calls.
there is no settings menu like i had in my s3.

thanks
 

cybdani

Senior Member
Feb 5, 2012
459
190
Barcelona
Until the person you're calling does not pick up the phone you can not record. Button is disabled.
If it doesn't works fine, then maybe the problem is that you have mdc rom and not mdn.
Sorry.

thanks going to try that now

---------- Post added at 10:05 AM ---------- Previous post was at 09:53 AM ----------



okay have a problem...
i see the record button when i make a call. but it does nothing
also wanted to ask if there is an option to have it enabled that it records all calls.
there is no settings menu like i had in my s3.

thanks
 

tvhak

Senior Member
Sep 25, 2007
1,058
202
tilburg
Yes i know. But when i am calling the button lights up. But thats all it does

Can you make one for my phone with the apk i gave you ???

Sent from my GT-I9505 using xda premium
 

cybdani

Senior Member
Feb 5, 2012
459
190
Barcelona
Yes i know. But when i am calling the button lights up. But thats all it does

Can you make one for my phone with the apk i gave you ???

Sent from my GT-I9505 using xda premium

And doesn't shows "recording"?
Check sd-->sound folder. Any file there?

I can't make changes in your file because you upload only apk file and you have stock odex rom. Odex file is needed to baksmali.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 36
    This is how to enable Call recording on the Galaxy S4 -I9500 (tested on this) on Based Samsung Android 4.2.2 Roms

    1. Decompile SecPhone.apk

    2. Open smali\com\android\phone\PhoneFeature.smali, go to "makeFeatureForCommon()V" method, and make the changes:

    PHP:
    .line 1002
        sget-object v0, Lcom/android/phone/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
    
        const-string v5, "support_merge_call"
    
        invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
    
        move-result-object v6
    
        invoke-virtual {v0, v5, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    	
    ++	.line 1003
    	
    ++	sget-object v0, Lcom/android/phone/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
    	
    ++	const-string v5, "voice_call_recording"
    	
    ++	const/4 v2, 0x1
    	
    ++	invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
    	
    ++	move-result-object v6
    	
    ++	invoke-virtual {v0, v5, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    
       ++ .line 1004

    3. This mod is tested & working on latest I9500 FW - I9500UBUAMDK

    4. All the recorded calls will be stored on sdcard under sounds folder

    5. Flash at your own risk

    No Increasing ringtone


    TARGET FILE: secphone/smali/com/android/phone/Ringer$1.smali and following changes:

    PHP:
    iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;
     
    -    invoke-virtual {v1, v6, v4, v5}, Landroid/media/AudioManager;->setStreamVolume(III)V
    -
         .line 804
         const/4 v1, 0x7

    and

    PHP:
    goto/16 :goto_0
     
         .line 756
    +    nop
    +
         nop
     
         :pswitch_data_0

    EXTENDED POWER MENU MOD

    TARGET FILE: android.policy.jar

    1. First Copy attached GlobalActions$99$1.smali, GlobalActions$99$2.smali, GlobalActions$99.smali from the atatchments to android.policy_ori.jar.out\smali\com\android\internal\policy\impl

    2. Open the GlobalActions$99.smali using any notepad editor and change the following to whatever name you want :

    PHP:
    const-string v2, "Rebooot Menu"

    3. Open the following file : /smali/com/android/internal/policy/impl/GlobalActions$SinglePressAction.smali and make the following changes:

    PHP:
    .end annotation
     
     
    +# static fields
    +.field protected static rebootMode:I
    +
    +.field protected static final rebootOptions:[Ljava/lang/String;
    +
    +

    PHP:
     # direct methods
    +.method static constructor <clinit>()V
    +    .locals 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 Boot"
    +
    +    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
    +
     .method protected constructor <init>(II)V
         .locals 1
         .parameter "iconResId"

    4. Open the following file : smali/com/android/internal/policy/impl/GlobalActions.smali and male following changes:

    PHP:
    iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
     
         .line 566
    -    new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
    +    new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
     
         const v1, 0x108097f


    PHP:
    const v2, 0x1040199
     
    -    invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
    +    invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$99;-><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;

    5. Compile and then flash


    No MMS Conversion & Increase Recipient Limit

    Target File: Secmms.apk

    1. Open the following file: /res/xml/mms_config.xml and make following changes:

    PHP:
    <int name="mMaxTextViewSize">5000</int>
    -    <int name="recipientLimit">10</int>
    -    <int name="smsToMmsTextThreshold">4</int>
    +    <int name="recipientLimit">999</int>
    +    <int name="smsToMmsTextThreshold">999</int>
         <bool name="disableEndterKey">false</bool>
         <bool name="composeMaxLengthLimit">false</bool>
    -    <bool name="inputModeAuto">false</bool>
    +    <bool name="inputModeAuto">true</bool>
         <bool name="smsExpiryDate">false</bool>
         <bool name="sendAnimationJpn">false</bool>
         <bool name="wapPush">true</bool>

    2. Open the following file: smali/com/android/mms/MmsConfig.smali and make following changes:

    PHP:
       sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidthRestrictedMode:I
     
         .line 163
    -    sput v7, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
    +    const/16 v0, 0x3e7
     
    -    .line 164
    -    const/16 v0, 0xc8
    +    sput v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
     
    +    .line 164
         sput v0, Lcom/android/mms/MmsConfig;->mDefaultSMSMessagesPerThread:I
     
         .line 165

    PHP:
         .prologue
         .line 2510
    -    sget v0, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
    +    const/16 v0, 0x3e7
     
         return v0
     .end method

    PHP:
      .prologue
         .line 2751
    -    sget v0, Lcom/android/mms/MmsConfig;->mMmsRecipientLimit:I
    +    const/16 v0, 0x3e7
     
         return v0
     .end method

    PHP:
     .prologue
         .line 759
    -    sget v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
    +    const/16 v0, 0x3e7
     
         return v0
     .end method

    PHP:
       .prologue
         .line 688
    -    sget v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
    +    const/16 v0, 0x3e7
     
         return v0
     .end method

    PHP:
         move-result v11
     
    +    const/16 v11, 0x3e7
    +
         sput v11, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
     
         .line 1768

    PHP:
        move-result v1
     
    +    const/16 v1, 0x3e7
    +
         sput v1, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
     
         .line 2045

    PHP:
       invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
     
         move-result v1
    +
    +    const/16 v1, 0x3e7
     
         sput v1, Lcom/android/mms/MmsConfig;->mRecipientLimit:I

    Increasing SMS hour limit

    Navigate and open \com\android\mms\util\RateController.smali

    Search for

    PHP:
    .field private static final RATE_LIMIT:I = 0x64

    This value is in hexadecimal format, so we see that 0x64 = 100. So, to increase this to 1000 simply change 0x64 to 0x3e8

    I am including the mod here. If you are on deodexed rom, then delete the secphone.odex and then flash the zip from recovery. I will release the odex one in few hours as i am in hurry now.

    Download - I9500UBUAMDK- DEODEXED

    I completed with almost all the mods and i will release it later i a day as i am on business trip!

    Credits
    -------------


    Wanam
    mythtrandyr
    3
    @grgsiocl,

    first of all thanx for the superb work...

    But i have a question... I have already incorporated 4-way restart menu by VTS to android.policy.jar, but for some reason I can not even decompile phone or mms apk tough i have succesffuly set "framework-res.apk" and "twframework-res.apk" to VTS...

    anything that come to your mind?
    @Xphoid Update your apktool to the lastest and for secphone.apk - use smali and backsmali to make a mod otherwise it throws all kind of errors!

    for smali and backsmali commands:
    ------------------------------------------------------

    for decompile

    java -jar baksmali.jar -x Secphone.apk -o classout

    for compiling

    java -Xmx512M -jar smali.jar classout -o classes.dex

    use 7zip and pull the classes.dex and overwrite in secphone.apk
    2
    okay thank you very much

    Here's the SecPhone you uploaded with call recording and deodexed. Remember to delete odex file en /system/app.
    I think it's the same version than MDN.....
    If it doesn't works for you, maybe you must use a deodexed rom.

    https://www.box.com/s/vhat3stwlw3mum2mt9kr

    Hi

    Would it be possible to get this working for i9505 version? or is it only for i9500?

    Thanks

    It's here http://forum.xda-developers.com/showpost.php?p=41165686&postcount=12
    2
    Coding king.....
    When Android comes to picture :thumbup::thumbup:

    Welldone bro
    2
    I would change the SecPhone, like this:

    6zx8.jpg


    Thank you (anyway).

    I didn't understand what you said. Do you want the secphone.apk to be like shown in picture or you already done it?