From 77ffb1b00f70b8e71b10ee2723c3b1d2f2563286 Mon Sep 17 00:00:00 2001 From: Denis Suarez Jr Date: Thu, 17 Mar 2016 19:22:25 -0400 Subject: [PATCH 1/2] VendorDevice fix for N preview --- .../lovejoy777/rroandlayersmanager/DeviceSingleton.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lovejoy777/rroandlayersmanager/DeviceSingleton.java b/app/src/main/java/com/lovejoy777/rroandlayersmanager/DeviceSingleton.java index ab7cb44..4672ac2 100644 --- a/app/src/main/java/com/lovejoy777/rroandlayersmanager/DeviceSingleton.java +++ b/app/src/main/java/com/lovejoy777/rroandlayersmanager/DeviceSingleton.java @@ -26,14 +26,17 @@ public static Singleton getInstance() { boolean vendorDevice = false; if (mountDataArray != null) { - for (String mountDataLine : mountDataArray) { + if(mountData.contains ("/vendor")){ + vendorDevice = true; + } + /*for (String mountDataLine : mountDataArray) { String[] anotherStringArray = StringUtils.split(mountDataLine); if (anotherStringArray != null && anotherStringArray.length >= 2 && anotherStringArray[1].equals("/vendor")) { vendorDevice = true; break; } - } + }*/ } if (vendorDevice) { From 619a469f526f8f66e04882cb90eb61c7832099cd Mon Sep 17 00:00:00 2001 From: Denis Suarez Jr Date: Thu, 17 Mar 2016 19:23:40 -0400 Subject: [PATCH 2/2] Mount command fix for N preview --- .../com/lovejoy777/rroandlayersmanager/utils/Utils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/lovejoy777/rroandlayersmanager/utils/Utils.java b/app/src/main/java/com/lovejoy777/rroandlayersmanager/utils/Utils.java index 019482e..691d46f 100644 --- a/app/src/main/java/com/lovejoy777/rroandlayersmanager/utils/Utils.java +++ b/app/src/main/java/com/lovejoy777/rroandlayersmanager/utils/Utils.java @@ -140,8 +140,8 @@ public static boolean remount(String mountType) { public static boolean remount(String mountType, String location) { if (!isRootAvailable()) return false; - CommandOutput out = runCommand("mount -o remount," - + mountType + " " + location + "\n", true); + CommandOutput out = runCommand("mount -o " + + mountType + ",remount " + location + "\n", true); return out != null && out.exitCode == 0; } @@ -401,4 +401,4 @@ public static String getStringFromFile(String path) { if (out != null) Log.d("TEST", out.output); return out != null ? out.output : null; } -} \ No newline at end of file +}