mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-13 21:36:58 -08:00
Remove busybox in APK, download from internet
This commit is contained in:
@@ -8,12 +8,15 @@ 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;
|
||||
@@ -46,9 +49,14 @@ 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();
|
||||
}
|
||||
}
|
||||
|
||||
// Now fire all async tasks
|
||||
loadModuleTask.exec();
|
||||
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
|
||||
Reference in New Issue
Block a user