[Paid Software Announcement and Discussion] black.kahder:
Hello

I recently updated my phone's ROM and the skvalex's Call Manager app. It was a very painful experience and I wasted a lot of time doing it.

I read a lot of the thread here on XDA, but it left me very confused because things have changed over time, some information was wrong, and there is a lack of documentation on exactly what I should do to use the 3.0-beta Call Recorder app with Magisk.

So I wrote this long post to maybe help others in the future. Obviously, this post is only valid as of the time I write this, and things may change in the future, but hopefully this will help someone.

It would be best if better instructions were posted on the main forum page, but I understand that the new 3.0 app is still in beta, and skvalex is not a native english speaker (like myself).

I have an old Samsung S4 (Qualcom SoC) phone and am using the [JDCTeam][7.1.2] Optimized LineageOS 14.1 ROM, Version 10(3 Jan). The Samsung S4 phone will not record with the standard API and needs to use the root/CAF method for recording. Also, I was previously using SuperSU, but wanted to switch to Magisk.

I found that the old Call Recorder version 2.4 would not work with Magisk at all, so I needed to update to the 3.0-beta.

So, here is what I needed to do in order to upgrade to Call Recorder 3.0-beta and start using Magisk.

First, it is important to understand that the old versions of Call Recoder 2.4 and prior were removed from the google Play Store:

https://xdaforums.com/showpost.php?p=72082928&postcount=5697

https://xdaforums.com/showpost.php?p=73033955&postcount=5864

The result is that skvalex has a new app in the google Play Store, currently at version 3.0_beta03.1 as I write this. Your old versions of the app installed from the Play Store will never get updated automatically again because of this.

Back up your old Call Recorder app, save the recordings and configuration you want, note your working Recording method, and then uninstall it.

Now install the new 3.0-beta app from the google Play Store. The advantage of installing through the Play Store is that app can update this way. Optionally, you could install the CallRecorder_v.3.0_beta03.1.apk file manually.

If you are like me and paid for the app, you probably won't want to pay again. To get access to the paid-version of the app, you need to go view your google Account History and get the "Transaction ID" number and give it to skvalex's website. Then it will let you download an unlocker apk file (CallRecorderUnlockOld_v.1.0.2.apk), which you can install locally without using the Play Store:

https://callrecorder.skvalex.com/login

"Register" a new account at the skvalex.com website listed above using any email address. Then use it to provide you transaction ID/receipt and it will let you download the Unlocker apk file. Then, install the Unlocker apk file using a local file browser, or "adb install" command, or maybe "pm install" command from shell. Or, if you must, download an apk installer app from the Play Store to do it. Some backup apps like Titanium can also do it.

Then, for all of us who can not use the Standard API method of recording, we must install the ROOT apk, which is currently named CallRecorderROOT_v.1.0_beta03.1.apk. You can get this from the main post on this XDA thread. Install it like you did for the Unlocker apk. This ROOT app is not available on the google Play Store because google would just ban the app again like they did last time.

In total, we must install all three apk files:

CallRecorder_v.3.0_beta03.1.apk # The main application

CallRecorderROOT_v.1.0_beta03.1.apk # The ROOT app

CallRecorderUnlockOld_v.1.0.2.apk # The Unlocker app

Next we must worry about SELinux and Magisk.

In my case, my ROM seems to be in Permissive mode by default, so I don't even need to apply a new SELinux policy, but if you do, this bash script below may help fix SELinux issues in Enforcing mode. This did work for me in Enforcing mode, so hopefully it's right:

WAS_ENFORCING=$(getenforce) || { echo "Failed to getenforce" ; exit 1 ; }
# If SE Linux was enforcing, temporarily disable it.
if [ "$WAS_ENFORCING" == Enforcing ] ; then
setenforce 0 || || { echo "Failed to setenforce" ; exit 1 ; }
fi
# This is valid syntax, but I don't know if it is correct
magiskpolicy --live "allow untrusted_app su binder { call transfer }"
magiskpolicy --live "allow audioserver audioserver process execmem"
# If SE Linux was enforcing, re-enable it.
if [ "$WAS_ENFORCING" == Enforcing ] ; then
setenforce 1
fi
unset WAS_ENFORCING

The above bash script will probably need to be run on every boot. You can do that via a init.d/userinit.d system, which is outside the scope of this post. Unfortunately, this is a rather complex matter and will be difficult for non-devs. There were a lot of posts here on XDA which were wrong for fixing SELinux and Magisk. Hopefully I got this right. If anyone can clarify on this matter, that would help. I am not a Magisk or SELinux expert.

Finally, we must configure the Call Recorder app to use the root method, if the Standard API does not work for you. use the Call Recorder app and navigate: Settings --> Recording --> Recording Method = ROOT.

Then set the "ROOT: Settings for ROOT recording method" settings, similar to the way it was done in version 2.4. In my case, I have to use CAF.

Finally, I had to reboot the phone after app installation and possibly configuration change. Otherwise recording would not work properly. So, be sure to reboot if you have problems.

This is how I successfully got Call Recorder 3.0 working with Magisk on my Samsung S4 with a 7.1-based ROM.

I hope these instructions help someone else. Please improve them if you can.