Commit 528634d7 authored by topjohnwu's avatar topjohnwu

Remove unused code

parent 3283439f
......@@ -126,11 +126,6 @@ static void set_path(struct vector *v) {
vec_push_back(v, NULL);
}
static void uninstall_env(struct vector *v) {
vec_push_back(v, strdup("BOOTMODE=true"));
set_path(v);
}
/***********
* Scripts *
***********/
......@@ -500,7 +495,7 @@ void startup() {
}
// No uninstaller or core-only mode
if (access(UNINSTALLER, F_OK) != 0 && access(DISABLEFILE, F_OK) != 0) {
if (access(DISABLEFILE, F_OK) != 0) {
// Allocate buffer
buf = xmalloc(PATH_MAX);
buf2 = xmalloc(PATH_MAX);
......@@ -665,13 +660,6 @@ void startup() {
xsymlink(MIRRDIR "/bin/busybox", BBPATH "/busybox");
}
// uninstall
if (access(UNINSTALLER, F_OK) == 0) {
close(open(UNBLOCKFILE, O_RDONLY | O_CREAT));
exec_command(0, NULL, uninstall_env, "sh", UNINSTALLER, NULL);
return;
}
// Start post-fs-data mode
execl("/sbin/magisk", "magisk", "--post-fs-data", NULL);
}
......
......@@ -17,7 +17,6 @@
#define LOGFILE "/cache/magisk.log"
#define UNBLOCKFILE "/dev/.magisk.unblock"
#define DISABLEFILE "/cache/.disable_magisk"
#define UNINSTALLER "/cache/magisk_uninstaller.sh"
#define MAGISKTMP "/sbin/.core"
#define MIRRDIR MAGISKTMP "/mirror"
#define BBPATH MAGISKTMP "/busybox"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment