Giter Site home page Giter Site logo

djstolen / lineage-call-recording-enabler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 2shrestha22/lineage-call-recording-enabler

0.0 0.0 0.0 3.53 MB

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

License: MIT License

Shell 100.00%

lineage-call-recording-enabler's Introduction

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)

lineage-call-recording-enabler's People

Contributors

2shrestha22 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.