Remove usage of MAGISKTMP

This commit is contained in:
topjohnwu
2023-11-02 15:50:36 -07:00
parent 3ba00858e6
commit 16ae4aedf1
12 changed files with 72 additions and 72 deletions

View File

@@ -15,15 +15,17 @@ using namespace std;
static const char *bbpath() {
static string path;
if (path.empty())
path = MAGISKTMP + "/" BBPATH "/busybox";
if (path.empty()) {
path = get_magisk_tmp();
path += "/" BBPATH "/busybox";
}
return path.data();
}
static void set_script_env() {
setenv("ASH_STANDALONE", "1", 1);
char new_path[4096];
sprintf(new_path, "%s:%s", getenv("PATH"), MAGISKTMP.data());
ssprintf(new_path, sizeof(new_path), "%s:%s", getenv("PATH"), get_magisk_tmp());
setenv("PATH", new_path, 1);
if (zygisk_enabled)
setenv("ZYGISK_ENABLED", "1", 1);