Fix incoming SMS and mobile data on MT6379

This commit is contained in:
Pierre-Hugues Husson 2019-02-26 23:14:06 +01:00
parent ea419e9266
commit 3772908b38
6 changed files with 36 additions and 0 deletions

1
Android.bp Normal file
View File

@ -0,0 +1 @@
subdirs = [ "cmds" ]

View File

@ -75,3 +75,7 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
device/phh/treble/files/samsung-gpio_keys.kl:system/phh/samsung-gpio_keys.kl \ device/phh/treble/files/samsung-gpio_keys.kl:system/phh/samsung-gpio_keys.kl \
device/phh/treble/files/samsung-sec_touchscreen.kl:system/phh/samsung-sec_touchscreen.kl device/phh/treble/files/samsung-sec_touchscreen.kl:system/phh/samsung-sec_touchscreen.kl
#MTK incoming SMS fix
PRODUCT_PACKAGES += \
mtk-sms-fwk-ready

14
cmds/Android.bp Normal file
View File

@ -0,0 +1,14 @@
cc_binary {
name: "mtk-sms-fwk-ready",
srcs: [
"mtk-sms-fwk-ready.cpp",
],
shared_libs: [
"vendor.mediatek.hardware.radio@2.6",
"libutils",
"libhidlbase",
],
init_rc: [
"mtk-sms-fwk-ready.rc"
],
}

View File

@ -0,0 +1,12 @@
#include <iostream>
#include <unistd.h>
#include <vendor/mediatek/hardware/radio/2.6/IRadio.h>
using ::vendor::mediatek::hardware::radio::V2_6::IRadio;
using ::android::sp;
int main(int argc, char **argv) {
auto svc = IRadio::getService(argv[1]);
svc->setSmsFwkReady(1);
}

View File

@ -0,0 +1,3 @@
on property:sys.boot_completed=1
exec u:r:phhsu_daemon:s0 root -- /system/bin/mtk-sms-fwk-ready slot1
exec u:r:phhsu_daemon:s0 root -- /system/bin/mtk-sms-fwk-ready slot2

View File

@ -150,6 +150,8 @@ for f in /vendor/lib/mtk-ril.so /vendor/lib64/mtk-ril.so /vendor/lib/libmtk-ril.
/mnt/phh/$b /mnt/phh/$b
chcon "$ctxt" /mnt/phh/$b chcon "$ctxt" /mnt/phh/$b
mount -o bind /mnt/phh/$b $f mount -o bind /mnt/phh/$b $f
setprop persist.sys.phh.radio.force_cognitive true
done done
mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkTheme.apk || true mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkTheme.apk || true