[MOD/PORT] [XPOSED/MAGISK] [MM/N/O] Sony Stock Call Recording + Settings - v3.0.0

Status
Not open for further replies.
Search This thread

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,071
18,700
São Paulo - SP
Mod/Port - Call Recording
Features:
- Call Recording for Sony Stock MM and N
- Call Files App


Permissions:
Feel free to use it in your rom. Credits and Thanks will always be welcome!!


Requeriments:
- Recovery
- Super User Mode (patched services.jar - 2nd post - or Super User Mode X xposed module installed and activated) << YOU HAVE BEEN WARNED!!!


Install:
1. Download and flash always the latest version (System-Mode or Magisk-Module) attached below
2. Done!


Enabling/Disabling features:
1. Run commands below in a shell terminal:

Recording (change ** to 1 to enable or 0 to disable)
Code:
settings put system somc.call_recording [B][COLOR="Blue"]**[/COLOR][/B]

Recording beep tone (change ** to 1 to enable or 0 to disable)
Code:
settings put system somc.call_recording_beeptones [B][COLOR="Blue"]**[/COLOR][/B]


Recordings:
They will be found in the internal storage at /CallRecorder folder


Info:
Stock KitKat apks ripped from L55U 23.0.1.F.0.98 R21B CN 1288-4065 firmware


Xposed Module - Xperia Call Recording X (MM / N) - Settings
Features:
- Call Recording master switch (on | off)
- Auto record incoming calls (on | off)
- Auto record outgoing calls (on | off)
- Recordings file format (*.amr | *.mp3)
- Display recording notification (on | off) << Android N only (NEW)
- Play beep when recording (on | off)
- Stop recording automatically at the end the call
- Beep at the beginning of a call (if enabled)
- New file format = PhoneNumber_Date_Time.*** (for easy identification of recording files)
- All features injected directly in the stock Call Settings
- Source code


Permissions:
Do whatever you want, but ... DO NOT PUBLISH MY SOURCE CODE ANYWHERE!!


Requeriments:
MM >> Xposed Framework for Marshmallow
N >> Xposed Framework for Nougat


Install:
1. Download and install always the latest apk compatible with your android version (attached below)
2. Activate it (Xposed Installer modules) and reboot
3. Done!


Warning:
TRY IT OUT AT YOUR OWN RISK!!!


Special thanks:
- Sony
- @rovo89


Enjoy it!
 

Attachments

  • v1.0.0_Xperia_Call_Recording_X_MM_By_Serajr.apk
    50.2 KB · Views: 3,617
  • v1.0.0_Xperia_Call_Recording_X_MM_Source_Code_By_Serajr.rar
    1.3 MB · Views: 1,504
  • v2.0.0_Native_Sony_Call_Recording_MM_N_By_Serajr_Flashable.zip
    337.4 KB · Views: 2,387
  • v2.0.0_Xperia_Call_Recording_X_N_By_Serajr.apk
    473.8 KB · Views: 685
  • v2.0.0_Xperia_Call_Recording_X_N_Source_Code_By_Serajr.7z
    54 KB · Views: 264
  • Magisk_v3.0.0_Native_Sony_Call_Recording_MM_N_O_By_Serajr.zip
    202.6 KB · Views: 1,240
Last edited:

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,071
18,700
São Paulo - SP
How to patch your own services.jar

First of all, DO NOT COPY CODE FROM ANY GUIDE/TUTORIAL, NOT EVEN FROM THIS ONE! Firmwares do change all the time, DO THE PROCEDURE BELOW ALWAYS BY YOURSELF!
Keep in mind that all code below is just for your undertanding, so again, DO NOT COPY CODE FROM ANY GUIDE/TUTORIAL, NOT EVEN FROM THIS ONE!


1. Decompile your ALREADY DEODEXED and stock/untouched services.jar
2. Edit ...\smali\com\android\server\pm\PackageManagerService.smali file with notepad++
3. Look for compareSignatures method:
Note: NEVER TOUCH RED LINES
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
    [B][COLOR="Red"].locals 8
    .param p0, "s1"    # [Landroid/content/pm/Signature;
    .param p1, "s2"    # [Landroid/content/pm/Signature;[/COLOR][/B]

    .prologue
    const/4 v3, 0x1

    const/4 v5, -0x3

    [B][COLOR="Blue"]const/4 [COLOR="DarkOrange"]v4[/COLOR], 0x0[/COLOR][/B]

    .line 4832
    if-nez p0, :cond_1

    .line 4833
    if-nez p1, :cond_0

    :goto_0
    return v3

    .line 4835
    :cond_0
    const/4 v3, -0x1

    goto :goto_0

    .line 4838
    :cond_1
    if-nez p1, :cond_2

    .line 4839
    const/4 v3, -0x2

    return v3

    .line 4842
    :cond_2
    array-length v6, p0

    array-length v7, p1

    if-eq v6, v7, :cond_3

    .line 4843
    return v5

    .line 4847
    :cond_3
    array-length v6, p0

    if-ne v6, v3, :cond_5

    .line 4848
    aget-object v3, p0, v4

    aget-object v6, p1, v4

    invoke-virtual {v3, v6}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_4

    move v3, v4

    :goto_1
    return v3

    :cond_4
    move v3, v5

    .line 4850
    goto :goto_1

    .line 4853
    :cond_5
    new-instance v0, Landroid/util/ArraySet;

    invoke-direct {v0}, Landroid/util/ArraySet;-><init>()V

    .line 4854
    .local v0, "set1":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
    array-length v6, p0

    move v3, v4

    :goto_2
    if-ge v3, v6, :cond_6

    aget-object v2, p0, v3

    .line 4855
    .local v2, "sig":Landroid/content/pm/Signature;
    invoke-virtual {v0, v2}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z

    .line 4854
    add-int/lit8 v3, v3, 0x1

    goto :goto_2

    .line 4857
    .end local v2    # "sig":Landroid/content/pm/Signature;
    :cond_6
    new-instance v1, Landroid/util/ArraySet;

    invoke-direct {v1}, Landroid/util/ArraySet;-><init>()V

    .line 4858
    .local v1, "set2":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
    array-length v6, p1

    move v3, v4

    :goto_3
    if-ge v3, v6, :cond_7

    aget-object v2, p1, v3

    .line 4859
    .restart local v2    # "sig":Landroid/content/pm/Signature;
    invoke-virtual {v1, v2}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z

    .line 4858
    add-int/lit8 v3, v3, 0x1

    goto :goto_3

    .line 4862
    .end local v2    # "sig":Landroid/content/pm/Signature;
    :cond_7
    invoke-virtual {v0, v1}, Landroid/util/ArraySet;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_8

    .line 4863
    return v4

    .line 4865
    :cond_8
    return v5
.end method
4. Shrink it:
Note: There will always be a line with value 0x0, and this is the line you will use for the return of the method (orange v? below), in my case it is: const/4 v4, 0x0 (yours may differs)
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
    [B][COLOR="Red"].locals 8
    .param p0, "s1"    # [Landroid/content/pm/Signature;
    .param p1, "s2"    # [Landroid/content/pm/Signature;[/COLOR][/B]

    .prologue
    [B][COLOR="Blue"]const/4 [COLOR="DarkOrange"]v4[/COLOR], 0x0[/COLOR][/B]

    return [B][COLOR="DarkOrange"]v4[/COLOR][/B]
.end method
REMEMBER, THE METHOD ABOVE IS JUST FOR YOUR UNDERSTANDING, DO NOT USE IT, UNLESS IT'S IDENTICAL TO YOURS!

That's it!
 

Attachments

  • 00.jpg
    00.jpg
    78.6 KB · Views: 5,783
  • 01.jpg
    01.jpg
    93.2 KB · Views: 5,765
  • 02.jpg
    02.jpg
    109.8 KB · Views: 5,785
  • 03.jpg
    03.jpg
    76.8 KB · Views: 5,410
  • 04.jpg
    04.jpg
    73.8 KB · Views: 5,657
  • 05.jpg
    05.jpg
    75.1 KB · Views: 5,344
  • 06.jpg
    06.jpg
    152.9 KB · Views: 5,273
  • 07.jpg
    07.jpg
    169.2 KB · Views: 5,025
  • 08.jpg
    08.jpg
    35.3 KB · Views: 4,830
  • 09.jpg
    09.jpg
    38.1 KB · Views: 4,620
Last edited:

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,071
18,700
São Paulo - SP
Changelog

Mod/Port:
v3.0.0 - 09/Dec/2017
- Android O compatibility (41.3.A.0.401 firmware)
- Magisk module (still requires super user mode/mod)



Xperia Call Recording X (N) << Call Recording Settings (Xposed module for Android N only):
v2.0.0 - 21/Nov/2017
- Call Recording master switch (on | off)
- Auto record incoming calls (on | off)
- Auto record outgoing calls (on | off)
- Recordings file format (*.amr | *.mp3)
- Display recording notification (on | off) << Android N only (NEW)
- Play beep when recording (on | off)
- Stop recording automatically at the end of the call
- Beep at the beginning of a call (if enabled)
- New file format = PhoneNumber_Date_Time.*** (for easy identification of recording files)
- All features injected directly in the stock Call Settings
- Source code



Mod/Port:
v2.0.0 - 06/Mar/2017
- Android N compatibility



Xperia Call Recording X (MM) << Call Recording Settings (Xposed module for Android M):
v1.0.0 - 18/Aug/2016
- Call Recording master switch (on | off)
- Auto record incoming calls (on | off)
- Auto record outgoing calls (on | off)
- Recordings file format (*.amr | *.mp3)
- Play beep when recording (on | off)
- Stop recording automatically at the end of the call
- Beep at the beginning of a call (if enabled)
- New file format = PhoneNumber_Date_Time.*** (for easy identification of recording files)
- All features injected directly in the stock Call Settings
- Source code



Mod/Port:
v1.0.0 - 01/Aug/2016
- Initial release
 
Last edited:

Mohitash

Senior Member
Aug 8, 2012
2,822
5,289
Panchkula, Chandigarh
OnePlus 7 Pro
@serajr Great Work as always.

Wow!!!! Was waiting for this from long. I tried myself making call recording on MM 2 times but failed may be i was not having much sources.
I will try this on my Z3

Thanks a lot.

Regards
Mohitash

UPDATE: Just tried on my Z3 with full screen caller screen. And its overlapping the buttons as Record button is coming at the bottom where buttons are. So may be this can be resolved by adjusting Record Button layout gravity-or-margin-or-padding or may be some smali edit needed?
(I am looking forward to edit it for my device)
 
Last edited:
  • Like
Reactions: milocj

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,071
18,700
São Paulo - SP
@serajr Great Work as always.

Wow!!!! Was waiting for this from long. I tried myself making call recording on MM 2 times but failed may be i was not having much sources.
I will try this on my Z3

Thanks a lot.

Regards
Mohitash

UPDATE: Just tried on my Z3 with full screen caller screen. And its overlapping the buttons as Record button is coming at the bottom where buttons are. So may be this can be resolved by adjusting Record Button layout gravity-or-margin-or-padding or may be some smali edit needed?
(I am looking forward to edit it for my device)
Thank you! This is for stock InCallUI.apk. I don't know the mod you talked about.

Working on my z5 .253 BUT continues to record after the call has ended.

Thanks for the excellent work.

Sent from my E6653 using Tapatalk
Thanks... stock behavior buddy, but ofc it must be improved!
I don't have time to do it right now... on next weekend maybe!!
 

Bloodlvst

Senior Member
Apr 3, 2011
418
385
Hey serajr, thanks so much for this, I've tried to port the LP version myself but never got far.

Everything seems to work as advertised. One question though, would I need to add the "enable call recording" and "disable beep" switches back into call settings (settings.apk) manually?
 

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,071
18,700
São Paulo - SP
Hey serajr, thanks so much for this, I've tried to port the LP version myself but never got far.

Everything seems to work as advertised. One question though, would I need to add the "enable call recording" and "disable beep" switches back into call settings (settings.apk) manually?
Thank you! No, you don't need to play with any apk!
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 100
    Mod/Port - Call Recording
    Features:
    - Call Recording for Sony Stock MM and N
    - Call Files App


    Permissions:
    Feel free to use it in your rom. Credits and Thanks will always be welcome!!


    Requeriments:
    - Recovery
    - Super User Mode (patched services.jar - 2nd post - or Super User Mode X xposed module installed and activated) << YOU HAVE BEEN WARNED!!!


    Install:
    1. Download and flash always the latest version (System-Mode or Magisk-Module) attached below
    2. Done!


    Enabling/Disabling features:
    1. Run commands below in a shell terminal:

    Recording (change ** to 1 to enable or 0 to disable)
    Code:
    settings put system somc.call_recording [B][COLOR="Blue"]**[/COLOR][/B]

    Recording beep tone (change ** to 1 to enable or 0 to disable)
    Code:
    settings put system somc.call_recording_beeptones [B][COLOR="Blue"]**[/COLOR][/B]


    Recordings:
    They will be found in the internal storage at /CallRecorder folder


    Info:
    Stock KitKat apks ripped from L55U 23.0.1.F.0.98 R21B CN 1288-4065 firmware


    Xposed Module - Xperia Call Recording X (MM / N) - Settings
    Features:
    - Call Recording master switch (on | off)
    - Auto record incoming calls (on | off)
    - Auto record outgoing calls (on | off)
    - Recordings file format (*.amr | *.mp3)
    - Display recording notification (on | off) << Android N only (NEW)
    - Play beep when recording (on | off)
    - Stop recording automatically at the end the call
    - Beep at the beginning of a call (if enabled)
    - New file format = PhoneNumber_Date_Time.*** (for easy identification of recording files)
    - All features injected directly in the stock Call Settings
    - Source code


    Permissions:
    Do whatever you want, but ... DO NOT PUBLISH MY SOURCE CODE ANYWHERE!!


    Requeriments:
    MM >> Xposed Framework for Marshmallow
    N >> Xposed Framework for Nougat


    Install:
    1. Download and install always the latest apk compatible with your android version (attached below)
    2. Activate it (Xposed Installer modules) and reboot
    3. Done!


    Warning:
    TRY IT OUT AT YOUR OWN RISK!!!


    Special thanks:
    - Sony
    - @rovo89


    Enjoy it!
    39
    How to patch your own services.jar

    First of all, DO NOT COPY CODE FROM ANY GUIDE/TUTORIAL, NOT EVEN FROM THIS ONE! Firmwares do change all the time, DO THE PROCEDURE BELOW ALWAYS BY YOURSELF!
    Keep in mind that all code below is just for your undertanding, so again, DO NOT COPY CODE FROM ANY GUIDE/TUTORIAL, NOT EVEN FROM THIS ONE!


    1. Decompile your ALREADY DEODEXED and stock/untouched services.jar
    2. Edit ...\smali\com\android\server\pm\PackageManagerService.smali file with notepad++
    3. Look for compareSignatures method:
    Note: NEVER TOUCH RED LINES
    Code:
    .method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
        [B][COLOR="Red"].locals 8
        .param p0, "s1"    # [Landroid/content/pm/Signature;
        .param p1, "s2"    # [Landroid/content/pm/Signature;[/COLOR][/B]
    
        .prologue
        const/4 v3, 0x1
    
        const/4 v5, -0x3
    
        [B][COLOR="Blue"]const/4 [COLOR="DarkOrange"]v4[/COLOR], 0x0[/COLOR][/B]
    
        .line 4832
        if-nez p0, :cond_1
    
        .line 4833
        if-nez p1, :cond_0
    
        :goto_0
        return v3
    
        .line 4835
        :cond_0
        const/4 v3, -0x1
    
        goto :goto_0
    
        .line 4838
        :cond_1
        if-nez p1, :cond_2
    
        .line 4839
        const/4 v3, -0x2
    
        return v3
    
        .line 4842
        :cond_2
        array-length v6, p0
    
        array-length v7, p1
    
        if-eq v6, v7, :cond_3
    
        .line 4843
        return v5
    
        .line 4847
        :cond_3
        array-length v6, p0
    
        if-ne v6, v3, :cond_5
    
        .line 4848
        aget-object v3, p0, v4
    
        aget-object v6, p1, v4
    
        invoke-virtual {v3, v6}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
    
        move-result v3
    
        if-eqz v3, :cond_4
    
        move v3, v4
    
        :goto_1
        return v3
    
        :cond_4
        move v3, v5
    
        .line 4850
        goto :goto_1
    
        .line 4853
        :cond_5
        new-instance v0, Landroid/util/ArraySet;
    
        invoke-direct {v0}, Landroid/util/ArraySet;-><init>()V
    
        .line 4854
        .local v0, "set1":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
        array-length v6, p0
    
        move v3, v4
    
        :goto_2
        if-ge v3, v6, :cond_6
    
        aget-object v2, p0, v3
    
        .line 4855
        .local v2, "sig":Landroid/content/pm/Signature;
        invoke-virtual {v0, v2}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
    
        .line 4854
        add-int/lit8 v3, v3, 0x1
    
        goto :goto_2
    
        .line 4857
        .end local v2    # "sig":Landroid/content/pm/Signature;
        :cond_6
        new-instance v1, Landroid/util/ArraySet;
    
        invoke-direct {v1}, Landroid/util/ArraySet;-><init>()V
    
        .line 4858
        .local v1, "set2":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
        array-length v6, p1
    
        move v3, v4
    
        :goto_3
        if-ge v3, v6, :cond_7
    
        aget-object v2, p1, v3
    
        .line 4859
        .restart local v2    # "sig":Landroid/content/pm/Signature;
        invoke-virtual {v1, v2}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
    
        .line 4858
        add-int/lit8 v3, v3, 0x1
    
        goto :goto_3
    
        .line 4862
        .end local v2    # "sig":Landroid/content/pm/Signature;
        :cond_7
        invoke-virtual {v0, v1}, Landroid/util/ArraySet;->equals(Ljava/lang/Object;)Z
    
        move-result v3
    
        if-eqz v3, :cond_8
    
        .line 4863
        return v4
    
        .line 4865
        :cond_8
        return v5
    .end method
    4. Shrink it:
    Note: There will always be a line with value 0x0, and this is the line you will use for the return of the method (orange v? below), in my case it is: const/4 v4, 0x0 (yours may differs)
    Code:
    .method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
        [B][COLOR="Red"].locals 8
        .param p0, "s1"    # [Landroid/content/pm/Signature;
        .param p1, "s2"    # [Landroid/content/pm/Signature;[/COLOR][/B]
    
        .prologue
        [B][COLOR="Blue"]const/4 [COLOR="DarkOrange"]v4[/COLOR], 0x0[/COLOR][/B]
    
        return [B][COLOR="DarkOrange"]v4[/COLOR][/B]
    .end method
    REMEMBER, THE METHOD ABOVE IS JUST FOR YOUR UNDERSTANDING, DO NOT USE IT, UNLESS IT'S IDENTICAL TO YOURS!

    That's it!
    26
    Changelog

    Mod/Port:
    v3.0.0 - 09/Dec/2017
    - Android O compatibility (41.3.A.0.401 firmware)
    - Magisk module (still requires super user mode/mod)



    Xperia Call Recording X (N) << Call Recording Settings (Xposed module for Android N only):
    v2.0.0 - 21/Nov/2017
    - Call Recording master switch (on | off)
    - Auto record incoming calls (on | off)
    - Auto record outgoing calls (on | off)
    - Recordings file format (*.amr | *.mp3)
    - Display recording notification (on | off) << Android N only (NEW)
    - Play beep when recording (on | off)
    - Stop recording automatically at the end of the call
    - Beep at the beginning of a call (if enabled)
    - New file format = PhoneNumber_Date_Time.*** (for easy identification of recording files)
    - All features injected directly in the stock Call Settings
    - Source code



    Mod/Port:
    v2.0.0 - 06/Mar/2017
    - Android N compatibility



    Xperia Call Recording X (MM) << Call Recording Settings (Xposed module for Android M):
    v1.0.0 - 18/Aug/2016
    - Call Recording master switch (on | off)
    - Auto record incoming calls (on | off)
    - Auto record outgoing calls (on | off)
    - Recordings file format (*.amr | *.mp3)
    - Play beep when recording (on | off)
    - Stop recording automatically at the end of the call
    - Beep at the beginning of a call (if enabled)
    - New file format = PhoneNumber_Date_Time.*** (for easy identification of recording files)
    - All features injected directly in the stock Call Settings
    - Source code



    Mod/Port:
    v1.0.0 - 01/Aug/2016
    - Initial release
    11
    Call Recording Settings - Xposed Module Released

    Changelog:
    Xperia Call Recording X (MM):
    v1.0.0 - 18/Aug/2016
    - Call Recording master switch (on | off)
    - Auto record incoming calls (on | off)
    - Auto record outgoing calls (on | off)
    - Recordings file format (*.amr | *.mp3)
    - Play beep when recording (on | off)
    - Stop recording automatically at end call
    - Beep at the beginning of a call (if enabled)
    - New file format = PhoneNumber_Date_Time.*** (for easy identification of recording files)
    - All features injected directly in the stock Call Settings
    - Source code

    Please, read 1st post's permission section, due the source code availability!

    Enjoy it!
    9
    Oreo

    ... and still working on android O (firmware 41.3.A.0.401... maybe on others, too - you tell me)

    Changelog:
    Mod/Port:
    v3.0.0 - 09/Dec/2017
    - Android O compatibility (41.3.A.0.401 firmware)
    - Magisk module (still requires super user mode/mod)