Skip to content

A Runtime Resource Overlay for the dialer app in LineageOS to enable call recording for all countries.

License

Notifications You must be signed in to change notification settings

2shrestha22/lineage-call-recording-enabler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lineage Call Recording Enabler (Lineage Dialer RRO)

This is a Runtime Resource Overlay for the dialer app in LineageOS to enable call recording in all countries.

LineageOS native call recording is enabled or disabled depending on your current location and the those countries are listed here, https://github.com/LineageOS/android_packages_apps_Dialer/blob/lineage-19.1/java/com/android/dialer/callrecord/res/xml/call_record_states.xml. One can enable or disable call recording by updating those values and this is what this overlay does.

Runtime Resource Overlay

A runtime resource overlay (RRO) is a package that changes the resource values of a target package at runtime. For example, an app installed on the system image might change its behavior based upon the value of a resource. Rather than hardcoding the resource value at build time, an RRO installed on a different partition can change the values of the app's resources at runtime. One can enable or disable call recording by updating this file. However this overlay package changes the resource values of a target package at runtime.

https://source.android.com/docs/core/runtime/rros

How to build overlay (optional)

There is a prebuilt overlay APK, flashable/system/vendor/overlay/lineage-dialer-rro.apk so you don't need to build it again.

Generate unsigned and unaligned APK.

aapt package -M AndroidManifest.xml -S res/ \
    -I ~/Android/Sdk/platforms/android-33/android.jar \
    -F lineage-dialer-rro.apk.u

Sign the APK. Password for debug keystore is android.

jarsigner -keystore ~/.android/debug.keystore \
    lineage-dialer-rro.apk.u androiddebugkey

Align the APK.

zipalign 4 lineage-dialer-rro.apk.u lineage-dialer-rro.apk

You can find aapt and zipalign inside build-tool of Android SDK installation dir. e.g. ~/Android/Sdk/build-tools/33.0.0/

How to install

a. Manual

  • Restart ADB with root privileges:
    adb root

  • Mount the vendor folder as read-write:
    adb shell mount -o rw,remount /vendor

  • Copy the required package to the overlay folder:
    adb push lineage-dialer-rro.apk /vendor/overlay

  • Verify if the correct permissions are set (optional):
    adb shell stat /vendor/overlay/lineage-dialer-rro.apk | grep "0644"

  • Mount the system as read-write:
    adb shell mount -o rw,remount /

  • Copy the OTA survival script to the appropriate location:
    adb push 99-lineage-dialer-rro.sh /system/addon.d

  • Make the script executable:
    adb shell chmod 755 /system/addon.d/99-lineage-dialer-rro.sh

  • Verify if the correct permissions are set (optional):
    adb shell stat /system/addon.d/99-lineage-dialer-rro.sh | grep "0755"

  • After all the files have been copied, reboot the device:
    adb reboot

b. Flashable zip

  • Create zip:
    7za a -tzip -r lineage-dialer-rro_recovery.zip ./recovery/*

  • Sign:
    java -jar ./bin/zipsigner.jar lineage-dialer-rro_recovery.zip lineage-dialer-rro-signed_recovery.zip

  • Reboot to sideload mode:
    adb reboot sideload

  • Sideload zip (or flash from recovery):
    adb sideload lineage-dialer-rro-signed_recovery.zip

  • Uninstall rename the file to uninstall.zip and flash.

c. Magisk

  • Create zip:
    7za a -tzip -r lineage-dialer-rro_magisk.zip ./magisk/*

Resources:

update-binary: MindTheGapps

magisk: Developer Guides

zipsigner: Magisk (source), XDA (binary)

About

A Runtime Resource Overlay for the dialer app in LineageOS to enable call recording for all countries.

Topics

Resources

License

Stars

Watchers

Forks

Languages