Hot fix for detecting MagiskHide
This commit is contained in:
parent
aa0b9e2db2
commit
f742bb1c47
@ -8,7 +8,7 @@ android {
|
|||||||
applicationId "com.topjohnwu.magisk"
|
applicationId "com.topjohnwu.magisk"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 56
|
versionCode 57
|
||||||
versionName "5.4.0"
|
versionName "5.4.0"
|
||||||
ndk {
|
ndk {
|
||||||
moduleName 'zipadjust'
|
moduleName 'zipadjust'
|
||||||
|
@ -20,6 +20,7 @@ import com.topjohnwu.magisk.components.AlertDialogBuilder;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
@ -57,7 +58,7 @@ public class AboutActivity extends Activity {
|
|||||||
ab.setDisplayHomeAsUpEnabled(true);
|
ab.setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
appVersionInfo.setSummary(BuildConfig.VERSION_NAME);
|
appVersionInfo.setSummary(String.format(Locale.US, "%s (%d)", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
|
||||||
|
|
||||||
String changes = null;
|
String changes = null;
|
||||||
try (InputStream is = getAssets().open("changelog.html")) {
|
try (InputStream is = getAssets().open("changelog.html")) {
|
||||||
|
@ -312,7 +312,11 @@ public class MagiskManager extends Application {
|
|||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
disabled = false;
|
disabled = false;
|
||||||
}
|
}
|
||||||
ret = shell.sh("getprop " + MAGISKHIDE_PROP);
|
if (magiskVersionCode > 1435) {
|
||||||
|
ret = shell.su("resetprop -p " + MAGISKHIDE_PROP);
|
||||||
|
} else {
|
||||||
|
ret = shell.sh("getprop " + MAGISKHIDE_PROP);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
magiskHide = !Utils.isValidShellResponse(ret) || Integer.parseInt(ret.get(0)) != 0;
|
magiskHide = !Utils.isValidShellResponse(ret) || Integer.parseInt(ret.get(0)) != 0;
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
@ -8,7 +8,7 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.0.0-beta7'
|
classpath 'com.android.tools.build:gradle:3.0.0-rc1'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
Loading…
Reference in New Issue
Block a user