diff --git a/app/src/main/java/eu/thedarken/rootvalidator/tests/subinary/SuBinary.java b/app/src/main/java/eu/thedarken/rootvalidator/tests/subinary/SuBinary.java index 5663bfa..b474036 100644 --- a/app/src/main/java/eu/thedarken/rootvalidator/tests/subinary/SuBinary.java +++ b/app/src/main/java/eu/thedarken/rootvalidator/tests/subinary/SuBinary.java @@ -13,7 +13,7 @@ public class SuBinary implements Parcelable { public enum Type { - SUPERSU, SUPERUSER, KINGROOT, UNKNOWN + SUPERSU, SUPERUSER, KINGUSER, UNKNOWN } final File mPath; diff --git a/app/src/main/java/eu/thedarken/rootvalidator/tests/subinary/SuBinaryTest.java b/app/src/main/java/eu/thedarken/rootvalidator/tests/subinary/SuBinaryTest.java index bd82d51..181644c 100644 --- a/app/src/main/java/eu/thedarken/rootvalidator/tests/subinary/SuBinaryTest.java +++ b/app/src/main/java/eu/thedarken/rootvalidator/tests/subinary/SuBinaryTest.java @@ -21,6 +21,8 @@ public class SuBinaryTest extends ATest { private static final String TAG = "RV:SuBinaryTest"; private static final Pattern KOUSH_SUPERUSER_PATTERN = Pattern.compile("^([0-9]{1,2})\\s([\\S]+)$"); private static final Pattern CF_SUPERSU_PATTERN = Pattern.compile("^([0-9\\.]*):(SUPERSU)$"); + private static final Pattern KINGUSERSU_PATTERN = Pattern.compile("^([0-9\\.]*):(kinguser_su)$"); + private List mRaw; public SuBinaryTest(Context context) { @@ -138,6 +140,14 @@ private void checkBinary(SuBinary binary) { binary.mExtra = kuMatcher.group(2); break; } + // SUPERUSER from kinguser e.g. "3.43:kinguser_su" + Matcher kingMatcher = KINGUSERSU_PATTERN.matcher(line); + if (kingMatcher.matches()) { + binary.mType = SuBinary.Type.KINGUSER; + binary.mVersion = kingMatcher.group(1); + binary.mExtra = kingMatcher.group(2); + break; + } } } }