diff --git a/Emoji Switcher/build.gradle b/Emoji Switcher/build.gradle index e3a28a0..73fc481 100644 --- a/Emoji Switcher/build.gradle +++ b/Emoji Switcher/build.gradle @@ -8,8 +8,8 @@ android { applicationId 'com.stevenschoen.emojiswitcher' minSdkVersion 19 targetSdkVersion 25 - versionCode 20 - versionName "2.1.1" + versionCode 21 + versionName "2.1.2" } compileOptions { diff --git a/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/EmojiSwitcherUtils.java b/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/EmojiSwitcherUtils.java index 4542d06..bde6375 100644 --- a/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/EmojiSwitcherUtils.java +++ b/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/EmojiSwitcherUtils.java @@ -306,9 +306,13 @@ public static String filePath(Context context, EmojiSetListing listing) { } public static void applyPermissions(String permissions, String path) throws TimeoutException, RootDeniedException, IOException { - RootTools.remount(path, "RW"); Shell shell = RootTools.getShell(true); - shell.add(new Command(0, "chmod " + permissions + " " + path)); + if (shell.isSELinuxEnforcing()) { + shell.add(new Command(0, "mount -o rw,remount /system")); + } else { + RootTools.remount(path, "RW"); + } + shell.add(new Command(1, "chmod " + permissions + " " + path)); shell.close(); }