mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 21:27:41 +02:00
Load libsqlite dynamically
This commit is contained in:
@ -182,12 +182,6 @@ bool MagiskInit::patch_sepolicy(const char *file) {
|
||||
return patch_init;
|
||||
}
|
||||
|
||||
constexpr const char wrapper[] =
|
||||
"#!/system/bin/sh\n"
|
||||
"export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH:/apex/com.android.runtime/" LIBNAME "\"\n"
|
||||
"exec /sbin/magisk.bin \"$0\" \"$@\"\n"
|
||||
;
|
||||
|
||||
static void sbin_overlay(const raw_data &self, const raw_data &config) {
|
||||
mount_sbin();
|
||||
|
||||
@ -199,17 +193,8 @@ static void sbin_overlay(const raw_data &self, const raw_data &config) {
|
||||
fd = xopen("/sbin/magiskinit", O_WRONLY | O_CREAT, 0755);
|
||||
xwrite(fd, self.buf, self.sz);
|
||||
close(fd);
|
||||
if (access("/system/apex", F_OK) == 0) {
|
||||
LOGD("APEX detected, use wrapper\n");
|
||||
dump_magisk("/sbin/magisk.bin", 0755);
|
||||
patch_socket_name("/sbin/magisk.bin");
|
||||
fd = xopen("/sbin/magisk", O_WRONLY | O_CREAT, 0755);
|
||||
xwrite(fd, wrapper, sizeof(wrapper) - 1);
|
||||
close(fd);
|
||||
} else {
|
||||
dump_magisk("/sbin/magisk", 0755);
|
||||
patch_socket_name("/sbin/magisk");
|
||||
}
|
||||
dump_magisk("/sbin/magisk", 0755);
|
||||
patch_socket_name("/sbin/magisk");
|
||||
|
||||
// Create applet symlinks
|
||||
char path[64];
|
||||
|
Reference in New Issue
Block a user