#ifndef MAGISK_HIDE_H #define MAGISK_HIDE_H #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define LOGFILE "/cache/magisk.log" #define HIDELIST "/magisk/.core/magiskhide/hidelist" #define DUMMYPATH "/dev/magisk/dummy" #define ENFORCE_FILE "/sys/fs/selinux/enforce" #define SEPOLICY_INJECT "/data/magisk/magiskpolicy" // Main thread void monitor_proc(); // Forked process for namespace setting int hideMagisk(); // List monitor thread void update_list(const char *listpath); void quit_pthread(int sig); void *monitor_list(void *path); // Util functions char **file_to_str_arr(FILE *fp, int *size); void read_namespace(const int pid, char* target, const size_t size); void lazy_unmount(const char* mountpoint); void run_as_daemon(); void manage_selinux(); // Global variable sharing through process/threads extern FILE *logfile; extern int i, list_size, pipefd[2]; extern char **hide_list, buffer[512]; extern pthread_t list_monitor; extern pthread_mutex_t mutex; #endif