Skip to content

Commit

Permalink
Create /data/adb/sui if it was deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed Feb 23, 2022
1 parent 4959e47 commit 9075da2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions module/src/main/cpp/main/sui_main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <unistd.h>
#include <sched.h>
#include <app_process.h>
#include <sys/stat.h>

/*
* argv[1]: path of the module, such as /data/adb/modules/zygisk-sui
Expand All @@ -37,6 +38,12 @@ static int sui_main(int argc, char **argv) {

wait_for_zygote();

if (access("/data/adb/sui", F_OK) != 0) {
mkdir("/data/adb/sui", 0600);
}
chmod("/data/adb/sui", 0600);
chown("/data/adb/sui", 0, 0);

auto root_path = argv[1];

char dex_path[PATH_MAX]{0};
Expand Down

0 comments on commit 9075da2

Please sign in to comment.