Use global Magisk native busybox for Magisk Manager

This commit is contained in:
topjohnwu
2017-08-12 02:25:55 +08:00
parent ea884e7fa1
commit 001f8657f6
3 changed files with 48 additions and 38 deletions

View File

@@ -8,15 +8,12 @@ import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import com.topjohnwu.magisk.asyncs.DownloadBusybox;
import com.topjohnwu.magisk.asyncs.LoadModules;
import com.topjohnwu.magisk.asyncs.UpdateRepos;
import com.topjohnwu.magisk.components.Activity;
import com.topjohnwu.magisk.services.UpdateCheckService;
import com.topjohnwu.magisk.utils.Utils;
import java.io.File;
public class SplashActivity extends Activity{
private static final int UPDATE_SERVICE_ID = 1;
@@ -49,12 +46,6 @@ public class SplashActivity extends Activity{
((JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE)).schedule(jobInfo);
}
loadModuleTask.setCallBack(() -> new UpdateRepos(getApplication()).exec());
File busybox = new File(magiskManager.getApplicationInfo().dataDir + "/busybox/busybox");
if (!busybox.exists() || !TextUtils.equals(
magiskManager.prefs.getString("busybox_version", ""),
MagiskManager.BUSYBOX_VERSION)) {
new DownloadBusybox(this, busybox).exec();
}
}
loadModuleTask.exec();