Commit c27be96f authored by DidntRead's avatar DidntRead
Browse files

patches: update patches

parent ca654bd6
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
From 0c18eb90df9e0478077d5c72b9ff37971a4a47e9 Mon Sep 17 00:00:00 2001
From: DidntRead <gabro2003@gmail.com>
Date: Fri, 22 Dec 2017 19:31:17 +0200
Subject: [PATCH] whitelist mediatek path

Change-Id: I87c5054a8e3c024606045e98dcd62d7f9a562efb
---
 core/jni/fd_utils.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp
index 92a542676bc..d15e4864ffd 100644
index 4ff1cacd..580ac2de 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -43,6 +43,7 @@ static const char* kPathWhitelist[] = {
   "/dev/urandom",
   "/dev/ion",
   "/dev/dri/renderD129", // Fixes b/31172436
   "/system/framework/org.lineageos.platform-res.apk",
+  "/proc/ged",
 };
 
 static const char kFdPath[] = "/proc/self/fd";
-- 
2.14.1
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index ab90e1b7..6912b5f9 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -128,6 +128,9 @@
          no longer needs to be mapped to gids and break grant propagation. -->
     <permission name="android.permission.READ_EXTERNAL_STORAGE" />
     <permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
+        <group gid="sdcard_r" />
+        <group gid="sdcard_rw" />
+        <group gid="media_rw" /> 
 
     <!-- ================================================================== -->
     <!-- ================================================================== -->
+17 −0
Original line number Diff line number Diff line
diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
index 7121624..81a5b77 100644
--- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java
+++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
@@ -2152,7 +2152,11 @@ public class GsmCdmaPhone extends Phone {
             // Complete pending USSD
 
             if (isUssdRelease) {
-                found.onUssdRelease();
+                if(ussdMessage != null) {
+                    found.onUssdFinished(ussdMessage, isUssdRequest);
+                } else {
+                    found.onUssdRelease();
+                }
             } else if (isUssdError) {
                 found.onUssdFinishedError();
             } else {
+31 −9
Original line number Diff line number Diff line
diff --git a/liblog/logger_write.c b/liblog/logger_write.c
index 2754e6e..00071c4 100644
--- a/liblog/logger_write.c
+++ b/liblog/logger_write.c
@@ -725,3 +725,19 @@ LIBLOG_ABI_PUBLIC int android_get_log_transport() {
 
   return ret;
 }
+
+#ifndef __unused
+#define __unused  __attribute__((__unused__))
+#endif
+struct xlog_record {
+    const char *tag_str;
+    const char *fmt_str;
+    int prio;
+};
+
+LIBLOG_ABI_PUBLIC void __attribute__((weak)) __xlog_buf_printf(int bufid __unused, const struct xlog_record *xlog_record __unused, ...) {
+    va_list args;
+    va_start(args, xlog_record);
+    __android_log_vprint(xlog_record->prio, xlog_record->tag_str, xlog_record->fmt_str, args);
+    va_end(args);
+}
diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c
index 7739cf4..839dd22 100644
index a098d59..c181269 100644
--- a/libnetutils/ifc_utils.c
+++ b/libnetutils/ifc_utils.c
@@ -37,6 +37,7 @@
@@ -24,6 +24,7 @@
 #include <linux/ipv6_route.h>
 #include <linux/rtnetlink.h>
 #include <linux/sockios.h>
+#include <linux/un.h>
 
 #include "netutils/ifc.h"
 
@@ -737,3 +738,134 @@ ifc_configure(const char *ifname,
 #include <net/if.h>
 #include <netdb.h>
 #include <netinet/in.h>
@@ -725,3 +726,133 @@ ifc_configure(const char *ifname,
 
     return 0;
 }
+#ifdef MTK_HARDWARE
+
+static int ifc_netd_sock_init(void)
+{
+    int ifc_netd_sock;
@@ -144,5 +168,3 @@ index 7739cf4..839dd22 100644
+    close(ctl_sock);
+    return ret;
+}
+#endif

patches/system_core_liblog.patch

deleted100644 → 0
+0 −88
Original line number Diff line number Diff line
diff --git a/liblog/logger_write.c b/liblog/logger_write.c
index d322c0f0d..f5e1bcf3e 100644
--- a/liblog/logger_write.c
+++ b/liblog/logger_write.c
@@ -29,6 +29,10 @@
 #include <private/android_filesystem_config.h>
 #include <private/android_logger.h>
 
+#ifndef FAKE_LOG_DEVICE
+#include <sys/system_properties.h>
+#endif
+
 #include "config_read.h" /* __android_log_config_read_close() definition */
 #include "config_write.h"
 #include "log_portability.h"
@@ -405,23 +409,34 @@ LIBLOG_ABI_PUBLIC int __android_log_write(int prio, const char* tag,
 LIBLOG_ABI_PUBLIC int __android_log_buf_write(int bufID, int prio,
                                               const char* tag, const char* msg) {
   struct iovec vec[3];
-  char tmp_tag[32];
+  char tmp_tag[32] = "0";
 
   if (!tag) tag = "";
 
   /* XXX: This needs to go! */
   if ((bufID != LOG_ID_RADIO) &&
-      (!strcmp(tag, "HTC_RIL") ||
-       !strncmp(tag, "RIL", 3) || /* Any log tag with "RIL" as the prefix */
-       !strncmp(tag, "IMS", 3) || /* Any log tag with "IMS" as the prefix */
-       !strcmp(tag, "AT") || !strcmp(tag, "GSM") || !strcmp(tag, "STK") ||
-       !strcmp(tag, "CDMA") || !strcmp(tag, "PHONE") || !strcmp(tag, "SMS"))) {
-    bufID = LOG_ID_RADIO;
-    /* Inform third party apps/ril/radio.. to use Rlog or RLOG */
-    snprintf(tmp_tag, sizeof(tmp_tag), "use-Rlog/RLOG-%s", tag);
-    tag = tmp_tag;
+	(!strcmp(tag, "HTC_RIL") ||
+	 !strncmp(tag, "RIL", 3) || /* Any log tag with "RIL" as the prefix */
+	 !strncmp(tag, "IMS", 3) || /* Any log tag with "IMS" as the prefix */
+	 !strcmp(tag, "AT") ||
+	 !strcmp(tag, "GSM") ||
+	 !strcmp(tag, "STK") ||
+	 !strcmp(tag, "CDMA") ||
+	 !strcmp(tag, "PHONE") ||
+	 !strcmp(tag, "SMS"))) {
+	bufID = LOG_ID_RADIO;
+	/* Inform third party apps/ril/radio.. to use Rlog or RLOG */
+	snprintf(tmp_tag, sizeof(tmp_tag), "use-Rlog/RLOG-%s", tag);
+	tag = tmp_tag;
   }
-
+#ifndef FAKE_LOG_DEVICE
+    /* check property for moving all RIL logs to main */
+    if (bufID == LOG_ID_RADIO) {
+	if ((__system_property_get("persist.ril.log",tmp_tag) > 0) &&
+		!strcmp(tmp_tag,"1"))
+	    bufID = LOG_ID_MAIN;
+    }
+#endif
 #if __BIONIC__
   if (prio == ANDROID_LOG_FATAL) {
     android_set_abort_message(msg);
@@ -671,3 +686,26 @@ LIBLOG_ABI_PUBLIC int android_get_log_transport() {
 
   return ret;
 }
+
+#ifndef __unused
+#define __unused  __attribute__((__unused__))
+#endif
+struct xlog_record {
+    const char *tag_str;
+    const char *fmt_str;
+    int prio;
+};
+
+LIBLOG_ABI_PUBLIC void __attribute__((weak)) __xlog_buf_printf(int bufid __unused, const struct xlog_record *xlog_record __unused, ...) {
+#ifndef FAKE_LOG_DEVICE
+    char prop[32]="0";
+    /* check property for diable all xlog */
+    __system_property_get("ro.disable.xlog",prop);
+    if (!strcmp(prop, "0"))
+#endif
+    {
+	va_list args;
+	va_start(args, xlog_record);
+	__android_log_vprint(xlog_record->prio, xlog_record->tag_str, xlog_record->fmt_str, args);
+    }
+}