mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 04:25:27 +00:00
parent
b72004e9cc
commit
7219947237
@ -44,7 +44,7 @@ dependencies {
|
|||||||
implementation 'androidx.work:work-runtime:2.0.0'
|
implementation 'androidx.work:work-runtime:2.0.0'
|
||||||
implementation 'androidx.transition:transition:1.1.0-alpha02'
|
implementation 'androidx.transition:transition:1.1.0-alpha02'
|
||||||
|
|
||||||
def libsuVersion = '2.3.3'
|
def libsuVersion = '2.4.0'
|
||||||
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
|
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
|
||||||
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}"
|
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}"
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ public class Config {
|
|||||||
public static void initialize() {
|
public static void initialize() {
|
||||||
SharedPreferences pref = App.self.prefs;
|
SharedPreferences pref = App.self.prefs;
|
||||||
SharedPreferences.Editor editor = pref.edit();
|
SharedPreferences.Editor editor = pref.edit();
|
||||||
SuFile config = new SuFile("/data/adb/" + Const.MANAGER_CONFIGS);
|
File config = SuFile.open("/data/adb", Const.MANAGER_CONFIGS);
|
||||||
if (config.exists()) {
|
if (config.exists()) {
|
||||||
try {
|
try {
|
||||||
SuFileInputStream is = new SuFileInputStream(config);
|
SuFileInputStream is = new SuFileInputStream(config);
|
||||||
|
@ -164,9 +164,9 @@ public abstract class MagiskInstaller {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SuFile init64 = new SuFile(installDir, "magiskinit64");
|
File init64 = SuFile.open(installDir, "magiskinit64");
|
||||||
if (Build.VERSION.SDK_INT >= 21 && Build.SUPPORTED_64_BIT_ABIS.length != 0) {
|
if (Build.VERSION.SDK_INT >= 21 && Build.SUPPORTED_64_BIT_ABIS.length != 0) {
|
||||||
init64.renameTo(new SuFile(installDir, "magiskinit"));
|
init64.renameTo(SuFile.open(installDir, "magiskinit"));
|
||||||
} else {
|
} else {
|
||||||
init64.delete();
|
init64.delete();
|
||||||
}
|
}
|
||||||
@ -214,8 +214,8 @@ public abstract class MagiskInstaller {
|
|||||||
ShellUtils.pump(tarIn, tarOut);
|
ShellUtils.pump(tarIn, tarOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SuFile boot = new SuFile(installDir, "boot.img");
|
File boot = SuFile.open(installDir, "boot.img");
|
||||||
SuFile recovery = new SuFile(installDir, "recovery.img");
|
File recovery = SuFile.open(installDir, "recovery.img");
|
||||||
if (vbmeta && recovery.exists() && boot.exists()) {
|
if (vbmeta && recovery.exists() && boot.exists()) {
|
||||||
// Install Magisk to recovery
|
// Install Magisk to recovery
|
||||||
srcBoot = recovery.getPath();
|
srcBoot = recovery.getPath();
|
||||||
@ -320,7 +320,7 @@ public abstract class MagiskInstaller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean storeBoot() {
|
protected boolean storeBoot() {
|
||||||
SuFile patched = new SuFile(installDir, "new-boot.img");
|
File patched = SuFile.open(installDir, "new-boot.img");
|
||||||
try {
|
try {
|
||||||
OutputStream os;
|
OutputStream os;
|
||||||
if (isTar) {
|
if (isTar) {
|
||||||
|
Loading…
Reference in New Issue
Block a user