mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 21:27:41 +02:00
Fix SuperSU installation
This commit is contained in:
@ -195,18 +195,19 @@ static void cpio_add(mode_t mode, const char *entry, const char *filename, vecto
|
||||
}
|
||||
|
||||
static void cpio_test(vector *v) {
|
||||
#define MAGISK_PATCH 0x1
|
||||
#define SUPERSU_PATCH 0x2
|
||||
int ret = 0;
|
||||
cpio_file *f;
|
||||
vec_for_each(v, f) {
|
||||
if (strcmp(f->filename, "sbin/launch_daemonsu.sh") == 0) {
|
||||
if (!ret) ret = 2;
|
||||
ret |= SUPERSU_PATCH;
|
||||
} else if (strcmp(f->filename, "init.magisk.rc") == 0) {
|
||||
ret = 1;
|
||||
break;
|
||||
ret |= MAGISK_PATCH;
|
||||
}
|
||||
}
|
||||
cpio_vec_destroy(v);
|
||||
exit(ret);
|
||||
exit((ret & SUPERSU_PATCH) ? SUPERSU_PATCH : (ret & MAGISK_PATCH));
|
||||
}
|
||||
|
||||
static int check_verity_pattern(const char *s) {
|
||||
|
Reference in New Issue
Block a user