From 3876947d6b27690b6c0c0467150372c160d4a4fb Mon Sep 17 00:00:00 2001
From: PythonLimited <Leonardomeitz@gmail.com>
Date: Thu, 17 Jan 2019 08:48:09 +0100
Subject: [PATCH] enable android GO definitions and add ril fix for mobile data

---
 msm8226.mk              | 2 +-
 rootdir/etc/init.ril.sh | 5 +----
 rootdir/init.qcom.rc    | 7 +------
 system.prop             | 3 +++
 4 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/msm8226.mk b/msm8226.mk
index 7e5a711..b5a9fd7 100644
--- a/msm8226.mk
+++ b/msm8226.mk
@@ -56,7 +56,7 @@ PRODUCT_PROPERTY_OVERRIDES += \
     av.offload.enable=true
 
 PRODUCT_PACKAGES += \
-    imx175_shim
+    libimx175_shim
 
 # Security
 PRODUCT_PACKAGES += \
diff --git a/rootdir/etc/init.ril.sh b/rootdir/etc/init.ril.sh
index 7faa3c4..ddbcd44 100644
--- a/rootdir/etc/init.ril.sh
+++ b/rootdir/etc/init.ril.sh
@@ -1,7 +1,4 @@
 #!/bin/sh
 
-echo "doing work" | >> /data/log.txt
-stat /data/user_de/0/com.android.providers.telephony/shared_prefs | >> /data/log.txt
+rm -rf /data/user_de/0/com.android.providers.telephony/databases/telephony.db*
 rm -rf /data/user_de/0/com.android.providers.telephony/shared_prefs
-echo "finished doing work" | >> /data/log.txt
-stat /data/user_de/0/com.android.providers.telephony/shared_prefs | >> /data/log.txt
diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc
index 2a207a7..e8afe3e 100644
--- a/rootdir/init.qcom.rc
+++ b/rootdir/init.qcom.rc
@@ -220,8 +220,6 @@ on post-fs-data
     # It will be regenerated by the system
     rmdir /data/user_de/0/com.android.providers.telephony/shared_prefs
 
-    start ril-fix
-
     setprop vold.post_fs_data_done 1
 
 on early-boot
@@ -553,9 +551,6 @@ on property:sys.boot_completed=1
     chown root system /sys/devices/system/cpu/cpu2/online
     chown root system /sys/devices/system/cpu/cpu3/online
 
-    # We want to stop our ril daemon deleting our apns
-    stop ril-fix
-
     # Symlink directories to access telephony.db and preferred-apn.xml required by libsec-ril
     symlink /data/user_de/0/com.android.providers.telephony/databases /data/data/com.android.providers.telephony/databases
     symlink /data/user_de/0/com.android.providers.telephony/shared_prefs /data/data/com.android.providers.telephony/shared_prefs
@@ -660,7 +655,7 @@ on property:ro.boot.emmc=true
 service ril-fix /system/bin/sh /system/etc/init.ril.sh
    class main
    user root
-   disabled
+   oneshot
 
 # Limit to SoC reset (1) and independent SSR (3)
 on property:persist.sys.ssr.restart_level=1
diff --git a/system.prop b/system.prop
index 1e91f22..00f8619 100644
--- a/system.prop
+++ b/system.prop
@@ -53,6 +53,9 @@ ro.qualcomm.cabl=0
 ro.sf.lcd_density=320
 debug.hwui.use_buffer_age=false
 
+# Android GO
+ro.config.low_ram=true
+
 # GPS
 persist.gps.qc_nlp_in_use=1
 ro.gps.agps_provider=1