diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-12-20 17:54:28 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-12-20 17:54:28 +0100 |
commit | 55f8ecc94ebdb6ea513072501651363f69e3197f (patch) | |
tree | 299c5615ddd91c9a26c6e426082cf8b9b86b5350 /app/src/main/java | |
parent | 05b988e9a1fe644e4c029d7112fa8acf5a696316 (diff) |
tools: use cmp and right arguments for mount
Some systems don't have cmp.
Some systems have buggy mount tools.
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/wireguard/android/SettingsActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/android/SettingsActivity.java b/app/src/main/java/com/wireguard/android/SettingsActivity.java index bc6d71f2..70912a48 100644 --- a/app/src/main/java/com/wireguard/android/SettingsActivity.java +++ b/app/src/main/java/com/wireguard/android/SettingsActivity.java @@ -64,12 +64,12 @@ public class SettingsActivity extends Activity { final String arg1 = "'" + libDir + "/" + libraryNamedExecutable[0] + "'"; final String arg2 = "'/system/xbin/" + libraryNamedExecutable[1] + "'"; - cmd.append(String.format("diff %s %s && ", arg1, arg2)); + cmd.append(String.format("cmp -s %s %s && ", arg1, arg2)); } cmd.append("exit 114;"); - cmd.append("trap 'mount -o remount,ro /system' EXIT;"); - cmd.append("mount -o remount,rw /system;"); + cmd.append("trap 'mount -o ro,remount /system' EXIT;"); + cmd.append("mount -o rw,remount /system;"); for (final String[] libraryNamedExecutable : libraryNamedExecutables) { final String arg1 = "'" + libDir + "/" + libraryNamedExecutable[0] + "'"; |