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 21f2aacfd7
commit 908dd917b6
5 changed files with 36 additions and 0 deletions

View File

@ -119,3 +119,7 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
device/phh/treble/files/adbd.rc:system/etc/init/adbd.rc
#MTK incoming SMS fix
PRODUCT_PACKAGES += \
mtk-sms-fwk-ready

View File

@ -48,3 +48,18 @@ cc_binary {
"libhidlbase",
],
}
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

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