Enable Native Call Recording [OOS] [ROOT/NON-ROOT] [APP/MAGISK MODULE/ADB/TASKER]

Search This thread

shadowstep

Forum Moderator
Staff member
  • Jun 6, 2014
    5,215
    10,592
    30
    Ambala
    OnePlus 5
    Introduction

    Hello everyone! You might/might not know that OxygenOS (and ROMs based on it) have an in-built/native call recording feature. However, it is not enabled for everyone as it is region-locked and it might/might not be illegal to record calls where you are, with/without notifying the other party that the call is being recorded.

    This thread has been created with the intent of enabling this call recording feature on OxygenOS (and ROMs based on it). There are several ways to achieve this, which have been listed below. You can use any method, as per your preference, and it should work. Let's get straight to it then!

    Ways to Enable

    Non-Root Method(s)
    • ADB command via a computer
    Root Method(s) (in order of recommendation)
    • Magisk module
    • Flashable zip
    • Tasker profile
    • App which runs on boot

    Detailed Information and Usage

    Non-Root Method(s)
      • Requirements: A working ADB interface on a computer, USB debugging enabled on the device
      • Usage: Run the following command to enable native call recording:
        Code:
        adb shell settings put global op_voice_recording_supported_by_mcc 1
      • Reboot Survival: No
    Root Method(s) (in order of recommendation)
      • Requirements: Magisk
      • Usage: Download and copy the EnableOOSNativeCallRecording-Magisk v9.1.zip to your device. Once done, install it in Magisk Manager as a module.
      • Reboot Survival: Yes
      • Requirements: TWRP
      • Usage: Download and copy the EnableOOSNativeCallRecording-Flashable v8.0.zip to your device. Once done, reboot to recovery (TWRP) and just flash the zip.
      • Reboot Survival: Yes
      • Note: This method should work for rootless users too, but it needs TWRP and hence an unlocked bootloader.
      • Requirements: A rooted device, Tasker
      • Usage: Download and copy the EnableOOSNativeCallRecordingv2.prf.xml to your device. Once done, import it in Tasker as a profile.
      • Reboot Survival: Yes
      • Requirements: A rooted device
      • Usage: Download and install the EnableOOSNativeCallRecording v2.0.apk and run it. At the first launch, grant root access to the app.
      • Reboot Survival: Yes

    Downloads

    Compatibility

    Device(s)
    • All OnePlus Devices
    ROM(s)
    • OxygenOS

    Important Read-Me Points
    • [Magisk module only] The module installation has been designed to use the existing TeleService.apk from your device and modify it. Hence, if you update your ROM, there is a chance that the original apk that was modified is updated with the ROM update, which might lead to bootloops/other issues after installing the update, with this module installed. To avoid this from happening, always update your ROM by following these steps: Uninstall the existing module -> Reboot -> Download and apply the system update -> Reboot -> Download and install the latest module -> Reboot your phone again once the installation is complete.
    • [App method only] After your device fully boots up, a notification message will appear in the status bar/pull down notification panel to let you know that call recording has been enabled (which will go after 10 seconds if you don't swipe it away).
    • [App method only] There is also a "Read Me" link in the notification message if you want to read a short information regarding the app.
    • [All methods] Please make sure that you wait for at least 30 seconds after boot before checking if the call recording menu option is visible for you under the stock dialer's settings.
    • [All methods] All your recordings will be stored either at /storage/emulated/0/Record/PhoneRecord OR /storage/emulated/0/Android/data/com.oneplus.communication.data/files/Record in the aac format.
    • [All methods] The mod works only works when using the stock OxygenOS dialer, and it will not enable call recording in any other app, like Google Dialer, etc.
    • [All methods] If something that is supposed to run on boot is not executing on boot, you need to turn off advanced optimisation: Settings -> Battery -> Battery optimisation -> Three dot menu (⋮) -> Advanced optimisation -> Turn off.
    • [All methods] The mod enables native call recording option, but may not turn on auto-recording of the calls. If you wish to do that, after using one of the methods listed above, open the Stock Dialer App -> Three dot menu (⋮) -> Settings -> Auto-record calls -> Turn on.
    • [All methods] If you have hidden root from the stock dialer app via Magisk Hide, the call recording option might disappear after sometime. Make sure that the stock dialer is not checked in the Magisk Hide selection list.

    Disclaimers
    • I am not the developer of the Enable OOS Native Call Recording app. I merely stumbled upon it in OnePlus 3T's Themes, Apps and Mods forum and I take no credit for it. Please direct all your thanks and/or donations towards @padlad, the original developer of the app. Link to the original thread is here.
    • I am not the developer of the flashable zip. The zip was posted later in this thread and I take no credit for it. Please direct all your thanks and/or donations towards @Zackptg5, the original developer of the flashable zip.
    • I am not the developer of the Tasker profile. The profile was posted later in this thread and I take no credit for it. Please direct all your thanks and/or donations towards @strongst, the original creator of the Tasker profile (original idea by @Fif_).
    • You are doing this at your own risk. I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you are unsure of how to go about something.
    • It might be illegal in your country to record calls with/without notifying the other party that the call is being recorded. Either ways, you are responsible for using this mod.

    Thanks To
    • @padlad, for creating the Enable Call Recording app and the Tasker profile
    • @Zackptg5, for creating the flashable zip
    • @strongst, for creating the Tasker profile and for being super helpful to everyone
    • @My Name is ShaoXIa, for doing excellent research work and making great recommendations for improving the stability and effectiveness of the Magisk module
    • @Taknok, for improving race condition handling at boot
    • @topjohnwu, for Magisk and all the work he's ever done for the community
    • @osm0sis, for the AnyKernel3 template and all the work he's ever done for the community
    • @joaomgcd, for Tasker
    • @Tomek Kondrat, for the mention in this XDA article
    • All of you guys for viewing this thread

    Changelog
    • v1.0 - Initial release
    • v2.0 - Enable run-on-boot
    • v1.0 - Initial release for Magisk v13.1, v13.2, v13.3
    • v2.0 - Update for Magisk v14.0
    • v3.0 - Update for Magisk v15.0
    • v3.1 - Reduced the script execution delay from 2 minutes post boot to 10 seconds post boot
    • v3.2 - Slightly increased the script execution delay from 10 seconds post boot to 30 seconds post boot
    • v4.0 - Update for Magisk v16.0
    • v5.0 - Update for Magisk v17.0
    • v5.1 - Made the script execute the command 5 times at an interval of 30 seconds after boot
    • v5.2 - Made the script execute the command every minute infinitely post the initial run
    • v5.3 - Adjusted the script to make the infinite loop run asynchronously
    • v5.4 - Reverted changes made in v5.2 and v5.3 as most of the users preferred and had no issues with v5.1
    • v6.0 - Fixed call recording automatically getting disabled after a while
    • v6.1 - Reverted the last change which caused SIM settings force closes
    • v7.0 - Permanently fixed call recording automatically getting disabled after a while and fixed the SIM settings force close issue that was caused by the release of v6.0
    • v8.0 - Update for Magisk v19.0
    • v9.0 - Updated template and added manufacturer check
    • v9.1 - Base template update and manufacturer check bug fix
    • v9.2 - Improve race condition handling at boot and fixed installation failures with Magisk Canary
    • v1.0 - Initial release
    • v2.0 - Updated to remove the separate init file and run the command from existing the init.rc file
    • v3.0 - Updated to include device codenames in addition to the official device names
    • v4.0 - Synced with the latest AnyKernel template and new BusyBox
    • v5.0 - Synced with the latest AnyKernel template and changed backup/restore method
    • v6.0 - Completely re-wrote flashable zip; now works for rootless users too who have an unlocked bootloader and TWRP installed
    • v7.0 - Added a slight delay in command execution to support Treble OOS; shifted the script to /system/etc/init
    • v8.0 - Permanently fixed call recording automatically getting disabled after a while
    • v1.0 - Initial release
    • v2.0 - Updated parameters for stability and effectiveness

    OP Update Information

    Created: July 10, 2017
    Last Updated: January 17, 2021
     
    Last edited:

    Squabl

    Senior Member
    Jun 21, 2014
    297
    125
    You know you're supposed to tell the other party that the call is being recorded? That's why every support line you ever call will warn you that "Calls may be recorded". It's a legal requirement.
    It's probably true in UK that you need to warn if the phone call is recorded. In some other countries it might be completely illegal to record phone calls. But at least in Finland you may record every phone call if you are a participant in that conversation without warnings or notifications.
     

    shadowstep

    Forum Moderator
    Staff member
  • Jun 6, 2014
    5,215
    10,592
    30
    Ambala
    OnePlus 5
    Thanks, I had to disable battery optimization for the app option 1 in order to be runned at boot.

    Instead of doing that, go to Settings -> Battery -> Battery optimisation -> Three dot menu (⋮) -> Advanced optimisation -> Turn off. That should help. Try it after adding the app back to the battery optimized list. :)
     

    shadowstep

    Forum Moderator
    Staff member
  • Jun 6, 2014
    5,215
    10,592
    30
    Ambala
    OnePlus 5
    What is the battery consumption like?
    Increases or not?

    I don't think it should impact the battery consumption at all. The app doesn't run in the background, and the only thing it does (on boot/when run manually) is change a toggle in secure settings. Everything else is baked into OOS. Also, I personally haven't observed any increase in battery consumption at all after using the app than the standard consumption.
     

    Marucins

    Senior Member
    Oct 27, 2011
    91
    13
    Why did the command disappear after restart?
    "settings put global op_voice_recording_supported_by_mcc 1"

    Where to add it to be permanent? -> build.prop ??

    //edit
    I created a script that runs 3C Toolbox on system startup.
     
    Last edited:

    maneklal

    New member
    Jun 25, 2013
    2
    0
    not working on my oos 4.5.5

    Tried installing the app. It didnt ask for any root approval or didnt boot up. It didnt wok for me at all. Any suggestions ??

    rgds
    Lal

    Disclaimer: I am not the developer of this app. I merely stumbled upon it in OnePlus 3T's Themes, Apps and Mods forum, and decided to give it a shot on my OnePlus 5. It worked like a charm, so I decided to post here for everyone's benefit. I take no credit for this work. Please direct all your thanks and/or donations towards @padlad, the original developer of this app. Link to the original thread is here.

    Hi all!

    Want to utilize OOS's native call recording feature without any hassles? Look no further! The app works with OOS 4.5.x flawlessly, with the OnePlus 5. There are two variants of the app, one that runs on boot (which will automatically enable the native call recording feature at every boot) and the second one that doesn't run on boot, and hence the feature will be disabled after every reboot and you will have to manually enable it (by clicking on the app icon) after the reboot.

    For those curious, all that this app does is execute a root command line which enables the native call recording feature present in OOS's stock dialer. The command line is -
    Code:
    su
    settings put global op_voice_recording_supported_by_mcc 1
    Please note that this app requires root, so it will request for the root permission at it's first run. After your device fully boots up, a notification message will appear in the status bar/pull down notification panel to let you know that call recording has been enabled (which will go after 10 seconds if you don't swipe it away). There is also a "Read Me" link in the notification message if you want to read a short information regarding the app.

    All your recordings will be stored at /storage/emulated/0/Record/PhoneRecord in the aac format.

    Download Links:
    Click here to download variant 1 (Auto-enabled at boot, call recording will be turned on automatically at every boot)
    Click here to download variant 2 (Not enabled at boot, call recording will not be turned on automatically at every boot)

    Have fun! :)
     
    Last edited:

    asc366

    Senior Member
    Oct 2, 2012
    363
    70
    "adb shell settings put global op_voice_recording_supported_by_mcc 1" seems to work for non-root too, however, might not survive restart. Lets see if I can fix that.
     
    • Like
    Reactions: shravana

    shadowstep

    Forum Moderator
    Staff member
  • Jun 6, 2014
    5,215
    10,592
    30
    Ambala
    OnePlus 5
    Why did the command disappear after restart?
    "settings put global op_voice_recording_supported_by_mcc 1"

    Where to add it to be permanent? -> build.prop ??

    //edit
    I created a script that runs 3C Toolbox on system startup.

    If you run the command manually via a terminal, it would work for the current session but as soon as you restart the phone, it would get reset to it's default value for OOS, i.e. 0. It's a hidden, secure setting and different from the stuff build.prop contains. If you want to use build.prop to enable call recording on boot, find the value below in build.prop & change it:
    Code:
    persist.sys.oem.region=OverSeas 
    [I]TO[/I]
    persist.sys.oem.region=CN
    This will change your phone's OEM region to China, where call recording is enabled by default by OnePlus and therefore call recording will be enabled for you too. Also, it will survive a reboot, since it's a build.prop change. :)

    Tried installing the app. It didnt ask for any root approval or didnt boot up. It didnt wok for me at all. Any suggestions ??

    rgds
    Lal

    Which variant did you try? The one that auto-starts at every boot or the normal one? Also, what root system are you using - Magisk or SuperSU? All the people I know who've tried this have reported success, so I'm sure something is up at your end only.

    "adb shell settings put global op_voice_recording_supported_by_mcc 1" seems to work for non-root too, however, might not survive restart. Lets see if I can fix that.

    Yeah? Interesting. My guess is that if you run the command via ADB, it doesn't need root and will work on unrooted OOS, but won't survive a reboot. However, if you run the command via a terminal emulator on the phone itself (the commands that I've mentioned in the first post), then you will need root or else the setting won't be changed. I hope this answers your question! :)
     
    Last edited:

    asc366

    Senior Member
    Oct 2, 2012
    363
    70
    Yep, read my first response above. You don't need root to enable call recording, it can be done via the adb command, but it won't survive a reboot. This is where the app helps!

    So let me get this straight; I can do the adb shell command while unrooted and running this with a terminal emulator, I need "su" (thus, root) ?
     

    shadowstep

    Forum Moderator
    Staff member
  • Jun 6, 2014
    5,215
    10,592
    30
    Ambala
    OnePlus 5
    So let me get this straight; I can do the adb shell command while unrooted and running this with a terminal emulator, I need "su" (thus, root) ?

    Yes, I edited my reply in my last post for clarity. Apologies for the confusion. Don't have root? Run the command via an adb shell from a computer/laptop. Have root? Run the command via a terminal emulator on the phone itself.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 1
      OP7T user here
      Worked fine for over a year (with removing and reinstalling between updates), a few days a go I did a reset for network settings (I just felt my internet is a bit slow) and then I started getting 'com.android.phone keeps stopping' error and no mobile network (as if the SIM is disabled). And trying to open 'SIM & Network' in settings crashed the settings app.
      Removing this module solved the issue.

      BTW, this is what the logcat said:
      05-29 11:58:14.593 11355 11355 W m.android.phon: Failure to verify dex file '/system/priv-app/TeleService/TeleService.apk': Bad checksum (5ee6c5b6, expected a756c5a6)
      05-29 11:58:14.596 11355 11355 E LoadedApk: Unable to instantiate appComponentFactory
      05-29 11:58:14.596 11355 11355 E LoadedApk: java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[zip file "/system/priv-app/TeleService/TeleService.apk"],nativeLibraryDirectories=[/system/priv-app/TeleService/lib/arm64, /system/lib64, /system/system_ext/lib64, /system/lib64, /system/system_ext/lib64]]
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.LoadedApk.createAppFactory(LoadedApk.java:260)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:905)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.LoadedApk.getClassLoader(LoadedApk.java:958)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.LoadedApk.getResources(LoadedApk.java:1190)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.ContextImpl.createAppContext(ContextImpl.java:2683)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.ContextImpl.createAppContext(ContextImpl.java:2675)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6853)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.ActivityThread.access$1700(ActivityThread.java:274)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2093)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.os.Handler.dispatchMessage(Handler.java:106)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.os.Looper.loop(Looper.java:233)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.ActivityThread.main(ActivityThread.java:8010)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at java.lang.reflect.Method.invoke(Native Method)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
      05-29 11:58:14.596 11355 11355 E LoadedApk: Suppressed: java.io.IOException: Failed to open dex files from /system/priv-app/TeleService/TeleService.apk because: Failure to verify dex file '/system/priv-app/TeleService/TeleService.apk': Bad checksum (5ee6c5b6, expected a756c5a6)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.DexFile.openDexFileNative(Native Method)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.DexFile.openDexFile(DexFile.java:367)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.DexFile.<init>(DexFile.java:109)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.DexFile.<init>(DexFile.java:82)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.DexPathList.loadDexFile(DexPathList.java:439)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.DexPathList.makeDexElements(DexPathList.java:398)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.DexPathList.<init>(DexPathList.java:166)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:129)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:104)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:74)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
      05-29 11:58:14.596 11355 11355 E LoadedApk: at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:901)
      05-29 11:58:14.596 11355 11355 E LoadedApk: ... 13 more
      05-29 11:58:14.598 11355 11355 I m.android.phon: failed to find target package for overlay /system/product/overlay/ProductOverlay-oneplus-framework-res.apk
      05-29 11:58:14.598 11355 11355 I m.android.phon: failed to find target package for overlay /system/system_ext/overlay/CommonOverlay-oneplus-framework-res.apk
      05-29 11:58:14.598 11355 11355 I m.android.phon: failed to find target package for overlay /odm/overlay/OdmOverlay-oneplus-framework-res.apk
      05-29 11:58:14.601 11355 11355 I Perf : Connecting to perf service.
      05-29 11:58:14.601 2477 2477 E ndroid.setting: Invalid ID 0x00000000.
      05-29 11:58:14.603 2477 2477 I chatty : uid=1000(system) com.android.settings identical 16 lines
      05-29 11:58:14.603 2477 2477 E ndroid.setting: Invalid ID 0x00000000.
      05-29 11:58:14.604 2477 2477 E ndroid.setting: Invalid ID 0x0000000b.
      05-29 11:58:14.604 2477 2477 E ndroid.setting: Invalid ID 0x0000000b.
      05-29 11:58:14.606 11355 11355 I m.android.phon: [GL_OOM] ClampGrowthLimit 536870912
      05-29 11:58:14.607 11355 11355 D NetworkSecurityConfig: No Network Security Config specified, using platform default
      05-29 11:58:14.607 11355 11355 D NetworkSecurityConfig: No Network Security Config specified, using platform default
      05-29 11:58:14.607 11355 11355 D AndroidRuntime: Shutting down VM
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: FATAL EXCEPTION: main
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: Process: com.android.phone, PID: 11355
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate application com.android.phone.PhoneApp: java.lang.ClassNotFoundException: Didn't find class "com.android.phone.PhoneApp" on path: DexPathList[[zip file "/system/priv-app/TeleService/TeleService.apk"],nativeLibraryDirectories=[/system/priv-app/TeleService/lib/arm64, /system/lib64, /system/system_ext/lib64, /system/lib64, /system/system_ext/lib64]]
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:1244)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6957)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ActivityThread.access$1700(ActivityThread.java:274)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2093)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.os.Looper.loop(Looper.java:233)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8010)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.phone.PhoneApp" on path: DexPathList[[zip file "/system/priv-app/TeleService/TeleService.apk"],nativeLibraryDirectories=[/system/priv-app/TeleService/lib/arm64, /system/lib64, /system/system_ext/lib64, /system/lib64, /system/system_ext/lib64]]
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.Instrumentation.newApplication(Instrumentation.java:1164)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:1236)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: ... 9 more
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: Suppressed: java.io.IOException: Failed to open dex files from /system/priv-app/TeleService/TeleService.apk because: Failure to verify dex file '/system/priv-app/TeleService/TeleService.apk': Bad checksum (5ee6c5b6, expected a756c5a6)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.DexFile.openDexFileNative(Native Method)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.DexFile.openDexFile(DexFile.java:367)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.DexFile.<init>(DexFile.java:109)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.DexFile.<init>(DexFile.java:82)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.DexPathList.loadDexFile(DexPathList.java:439)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.DexPathList.makeDexElements(DexPathList.java:398)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.DexPathList.<init>(DexPathList.java:166)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:129)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:104)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:74)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:901)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.LoadedApk.getClassLoader(LoadedApk.java:958)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.LoadedApk.getResources(LoadedApk.java:1190)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ContextImpl.createAppContext(ContextImpl.java:2683)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ContextImpl.createAppContext(ContextImpl.java:2675)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6853)
      05-29 11:58:14.608 11355 11355 E AndroidRuntime: ... 8 more
      05-29 11:58:14.609 1517 3520 W ActivityTaskManager: Force finishing activity com.android.phone/.oneplus.OPMSimActivity
      05-29 11:58:14.609 1517 29125 I DropBoxManagerService: add tag=system_app_crash isTagEnabled=true flags=0x2

      Tried resetting the network again, removing and reinstalling the module etc. but every time I installed the module the same problem returned with no mobile network.


      So I opened the module code and commented these lines from 'common/install.sh' file:

      Bash:
       # ui_print "- Modifying APK to prevent automatic deactivation of call recording"
      # sed -i "s/op_voice_recording_supported_by_mcc/op_voice_recording_suppt_by_shaoxia/g" $MODPATH/system/priv-app/TeleService/TeleService.apk

      And added this instead at the end of service.sh

      Bash:
      sleep 60
      settings put global op_voice_recording_supported_by_mcc 1


      This way, instead of preventing automatic deactivation at boot, the module enables recording +60 seconds into boot.
      It's a bit annoying because there's that notification on each boot saying that call recording has been disabled (before it's being enabled again) but at least it works.
      If anybody's get a better solution for me let me know :)
      1
      I completely forgot about this module and after flashing it on OnePlus 7T Pro with the latest stable firmware and Magisk - I can confirm it works. Thanks you @shadowstep , you've always made my life easier on OnePlus devices through the years with many, many modules you've made and/or contributed. :)
      1
      Mmm... I still don't have 11.2.7.7 available...

      I've found a solution to our (9 Pro and probably 9 users') problem ...

      9 Pro uses Google dialer! We install oneplus' dialer, set it as default , patch it using the module provided here and... voila!

      Found here.
      you just saved my life! thank you for sharing the solution.
    • 113
      Introduction

      Hello everyone! You might/might not know that OxygenOS (and ROMs based on it) have an in-built/native call recording feature. However, it is not enabled for everyone as it is region-locked and it might/might not be illegal to record calls where you are, with/without notifying the other party that the call is being recorded.

      This thread has been created with the intent of enabling this call recording feature on OxygenOS (and ROMs based on it). There are several ways to achieve this, which have been listed below. You can use any method, as per your preference, and it should work. Let's get straight to it then!

      Ways to Enable

      Non-Root Method(s)
      • ADB command via a computer
      Root Method(s) (in order of recommendation)
      • Magisk module
      • Flashable zip
      • Tasker profile
      • App which runs on boot

      Detailed Information and Usage

      Non-Root Method(s)
        • Requirements: A working ADB interface on a computer, USB debugging enabled on the device
        • Usage: Run the following command to enable native call recording:
          Code:
          adb shell settings put global op_voice_recording_supported_by_mcc 1
        • Reboot Survival: No
      Root Method(s) (in order of recommendation)
        • Requirements: Magisk
        • Usage: Download and copy the EnableOOSNativeCallRecording-Magisk v9.1.zip to your device. Once done, install it in Magisk Manager as a module.
        • Reboot Survival: Yes
        • Requirements: TWRP
        • Usage: Download and copy the EnableOOSNativeCallRecording-Flashable v8.0.zip to your device. Once done, reboot to recovery (TWRP) and just flash the zip.
        • Reboot Survival: Yes
        • Note: This method should work for rootless users too, but it needs TWRP and hence an unlocked bootloader.
        • Requirements: A rooted device, Tasker
        • Usage: Download and copy the EnableOOSNativeCallRecordingv2.prf.xml to your device. Once done, import it in Tasker as a profile.
        • Reboot Survival: Yes
        • Requirements: A rooted device
        • Usage: Download and install the EnableOOSNativeCallRecording v2.0.apk and run it. At the first launch, grant root access to the app.
        • Reboot Survival: Yes

      Downloads

      Compatibility

      Device(s)
      • All OnePlus Devices
      ROM(s)
      • OxygenOS

      Important Read-Me Points
      • [Magisk module only] The module installation has been designed to use the existing TeleService.apk from your device and modify it. Hence, if you update your ROM, there is a chance that the original apk that was modified is updated with the ROM update, which might lead to bootloops/other issues after installing the update, with this module installed. To avoid this from happening, always update your ROM by following these steps: Uninstall the existing module -> Reboot -> Download and apply the system update -> Reboot -> Download and install the latest module -> Reboot your phone again once the installation is complete.
      • [App method only] After your device fully boots up, a notification message will appear in the status bar/pull down notification panel to let you know that call recording has been enabled (which will go after 10 seconds if you don't swipe it away).
      • [App method only] There is also a "Read Me" link in the notification message if you want to read a short information regarding the app.
      • [All methods] Please make sure that you wait for at least 30 seconds after boot before checking if the call recording menu option is visible for you under the stock dialer's settings.
      • [All methods] All your recordings will be stored either at /storage/emulated/0/Record/PhoneRecord OR /storage/emulated/0/Android/data/com.oneplus.communication.data/files/Record in the aac format.
      • [All methods] The mod works only works when using the stock OxygenOS dialer, and it will not enable call recording in any other app, like Google Dialer, etc.
      • [All methods] If something that is supposed to run on boot is not executing on boot, you need to turn off advanced optimisation: Settings -> Battery -> Battery optimisation -> Three dot menu (⋮) -> Advanced optimisation -> Turn off.
      • [All methods] The mod enables native call recording option, but may not turn on auto-recording of the calls. If you wish to do that, after using one of the methods listed above, open the Stock Dialer App -> Three dot menu (⋮) -> Settings -> Auto-record calls -> Turn on.
      • [All methods] If you have hidden root from the stock dialer app via Magisk Hide, the call recording option might disappear after sometime. Make sure that the stock dialer is not checked in the Magisk Hide selection list.

      Disclaimers
      • I am not the developer of the Enable OOS Native Call Recording app. I merely stumbled upon it in OnePlus 3T's Themes, Apps and Mods forum and I take no credit for it. Please direct all your thanks and/or donations towards @padlad, the original developer of the app. Link to the original thread is here.
      • I am not the developer of the flashable zip. The zip was posted later in this thread and I take no credit for it. Please direct all your thanks and/or donations towards @Zackptg5, the original developer of the flashable zip.
      • I am not the developer of the Tasker profile. The profile was posted later in this thread and I take no credit for it. Please direct all your thanks and/or donations towards @strongst, the original creator of the Tasker profile (original idea by @Fif_).
      • You are doing this at your own risk. I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you are unsure of how to go about something.
      • It might be illegal in your country to record calls with/without notifying the other party that the call is being recorded. Either ways, you are responsible for using this mod.

      Thanks To
      • @padlad, for creating the Enable Call Recording app and the Tasker profile
      • @Zackptg5, for creating the flashable zip
      • @strongst, for creating the Tasker profile and for being super helpful to everyone
      • @My Name is ShaoXIa, for doing excellent research work and making great recommendations for improving the stability and effectiveness of the Magisk module
      • @Taknok, for improving race condition handling at boot
      • @topjohnwu, for Magisk and all the work he's ever done for the community
      • @osm0sis, for the AnyKernel3 template and all the work he's ever done for the community
      • @joaomgcd, for Tasker
      • @Tomek Kondrat, for the mention in this XDA article
      • All of you guys for viewing this thread

      Changelog
      • v1.0 - Initial release
      • v2.0 - Enable run-on-boot
      • v1.0 - Initial release for Magisk v13.1, v13.2, v13.3
      • v2.0 - Update for Magisk v14.0
      • v3.0 - Update for Magisk v15.0
      • v3.1 - Reduced the script execution delay from 2 minutes post boot to 10 seconds post boot
      • v3.2 - Slightly increased the script execution delay from 10 seconds post boot to 30 seconds post boot
      • v4.0 - Update for Magisk v16.0
      • v5.0 - Update for Magisk v17.0
      • v5.1 - Made the script execute the command 5 times at an interval of 30 seconds after boot
      • v5.2 - Made the script execute the command every minute infinitely post the initial run
      • v5.3 - Adjusted the script to make the infinite loop run asynchronously
      • v5.4 - Reverted changes made in v5.2 and v5.3 as most of the users preferred and had no issues with v5.1
      • v6.0 - Fixed call recording automatically getting disabled after a while
      • v6.1 - Reverted the last change which caused SIM settings force closes
      • v7.0 - Permanently fixed call recording automatically getting disabled after a while and fixed the SIM settings force close issue that was caused by the release of v6.0
      • v8.0 - Update for Magisk v19.0
      • v9.0 - Updated template and added manufacturer check
      • v9.1 - Base template update and manufacturer check bug fix
      • v9.2 - Improve race condition handling at boot and fixed installation failures with Magisk Canary
      • v1.0 - Initial release
      • v2.0 - Updated to remove the separate init file and run the command from existing the init.rc file
      • v3.0 - Updated to include device codenames in addition to the official device names
      • v4.0 - Synced with the latest AnyKernel template and new BusyBox
      • v5.0 - Synced with the latest AnyKernel template and changed backup/restore method
      • v6.0 - Completely re-wrote flashable zip; now works for rootless users too who have an unlocked bootloader and TWRP installed
      • v7.0 - Added a slight delay in command execution to support Treble OOS; shifted the script to /system/etc/init
      • v8.0 - Permanently fixed call recording automatically getting disabled after a while
      • v1.0 - Initial release
      • v2.0 - Updated parameters for stability and effectiveness

      OP Update Information

      Created: July 10, 2017
      Last Updated: January 17, 2021
      13
      Guys, sorry to inform, but the module has been removed from Magisk Repo. John decided that the repo should not have any device/manufacturer specific modules, and he cleaned up the repo. I will still update the module, and post about the same here, but the update won't be available in the repo anymore, so you'll have to manually download the module from the first post and install. I recommend bookmarking this thread. :good:
      9
      Hi all - OP updated with a new Magisk module. Thanks to the research done by @My Name is ShaoXIa, the module (in addition to executing the command that enables native call recording) also disables the activity that is responsible for turning off native call recording automatically after some time, so it should hopefully persist now. :)
      9
      If you aren't rooted, you'll have to manually run the command every time you reboot. There is no known workaround for that, unfortunately.

      Thanks for your reply. I found a way to change the setting value without root and without having to use adb on a computer after each reboot. You still need to do it manually, but at least you can do it easily using the phone. I'm sharing below how I did in case you may want to add it to the existing methods:

      1. Install Settings Database Editor app.
      2. Allow the app to change system setting by running the following adb command on a computer:
      Code:
      adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
      Fortunatelly this is a persistent change, so you only need to run this comman once, the permission granted to the app will be there even after reboots.

      Once the above is done, you don't need a computer anymore to enable call recording, you can do it with the app following these simple steps:

      1. Open the app, change the top right drop down to "Global Table".
      2. Look for op_voice_recording_supported_by_mcc setting and tap on it.
      3. Then tap on "EDIT VALUE", change it to 1, and tap on "SAVE CHANGES".

      Done! :D

      It's not as good as having the change applied automatically on each boot, but at least you don't need to have a computer at hand to enable call recording.
      7
      Hi everyone - OP updated! :)

      New stable Magisk module (v7.0) is now available for download from the OP as well as from Magisk Repo. To avoid any issues, I recommend the following upgrade path -
      • Uninstall the existing module (test/old stable) from Magisk Manager
      • Reboot your phone
      • Download and install the latest module (v7.0) from Magisk Manager's Download section
      • Reboot your phone again once the installation is complete
      Enjoy the weekend!