MotoNrEnabler: Add a service to enable 5G via OEM RIL request lineage-20
authordianlujitao <dianlujitao@lineageos.org>
Fri, 12 Jan 2024 14:33:52 +0000 (22:33 +0800)
committerdianlujitao <dianlujitao@lineageos.org>
Fri, 12 Jan 2024 15:22:35 +0000 (23:22 +0800)
commit42a4d5f2097cbce932551ef104c8c2eb75e96582
tree5cf3e9933aed58d09455e6fb93bd996d4bec740e
parent0847f2dbca5b064b3066fe4993e3389e864e0f7c
MotoNrEnabler: Add a service to enable 5G via OEM RIL request

Clearing and rebuilding modem cache (e.g. mdmddr, mdm1m9kefs1,
mdm1m9kefs2, carrier, and ddr partitions for MDM devices) is typically
necessary after modem firmware upgrade. However, NR is disabled in
Moto's modem firmware by default, so choosing NR results in "No signal"
after rebuilding modem cache with custom ROMs installed. Users have to
go back to stock once to make it work again, which is a huge pain.

It's observed that stock ROMs control NR via a custom RIL request, and
choose it based on carrier config and user preference (yes they have a
toggle in system settings) after SIM provisioning. Here, we implement a
service to automatically enable NR and DSS in the same approach, so
that users no longer need to go back to stock after upgrading modem
firmware. The implementation is based on telephony-common.jar,
qti-telephony-common.jar and qcom-moto-telephony-ext.jar from nio.
You're suggested to check if the magic numbers and payload formats
match your device's stock ROM before using this service.

Change-Id: I5ecfae93717fe87e6b1c1a75caa674b466403391
MotoNrEnabler/Android.bp [new file with mode: 0644]
MotoNrEnabler/AndroidManifest.xml [new file with mode: 0644]
MotoNrEnabler/src/com/qualcomm/qcrilmsgtunnel/IQcrilMsgTunnel.aidl [new file with mode: 0644]
MotoNrEnabler/src/org/lineageos/motorola/nrenabler/BootCompletedReceiver.kt [new file with mode: 0644]
MotoNrEnabler/src/org/lineageos/motorola/nrenabler/NrEnablerService.kt [new file with mode: 0644]
MotoNrEnabler/src/org/lineageos/motorola/nrenabler/NrMode.kt [new file with mode: 0644]
MotoNrEnabler/src/org/lineageos/motorola/nrenabler/QcomMotoExtTelephonyService.kt [new file with mode: 0644]
MotoNrEnabler/src/org/lineageos/motorola/nrenabler/QcomNvInfo.kt [new file with mode: 0644]
MotoNrEnabler/src/org/lineageos/motorola/nrenabler/QcomNvUtils.kt [new file with mode: 0644]
MotoNrEnabler/src/org/lineageos/motorola/nrenabler/QcomOemConstants.kt [new file with mode: 0644]
MotoNrEnabler/src/org/lineageos/motorola/nrenabler/QcrilMsgTunnelConnector.kt [new file with mode: 0644]