mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 21:27:41 +02:00
Store hidelist in magisk database
This commit is contained in:
@ -8,6 +8,10 @@
|
||||
#include <sys/un.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int setup_done;
|
||||
extern int seperate_vendor;
|
||||
|
||||
@ -95,4 +99,8 @@ void ls_hide_list(int client);
|
||||
|
||||
void su_daemon_handler(int client, struct ucred *credential);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,12 +4,16 @@
|
||||
#include <sqlite3.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************
|
||||
* DB Settings *
|
||||
***************/
|
||||
|
||||
#define DB_SETTING_KEYS \
|
||||
((char *[]) { \
|
||||
((const char *[]) { \
|
||||
"root_access", \
|
||||
"multiuser_mode", \
|
||||
"mnt_ns" \
|
||||
@ -62,7 +66,7 @@ NAMESPACE_MODE_REQUESTER, \
|
||||
**************/
|
||||
|
||||
#define DB_STRING_KEYS \
|
||||
((char *[]) { \
|
||||
((const char *[]) { \
|
||||
"requester", \
|
||||
})
|
||||
|
||||
@ -122,4 +126,8 @@ int get_uid_policy(sqlite3 *db, int uid, struct su_access *su);
|
||||
int validate_manager(char *alt_pkg, int userid, struct stat *st);
|
||||
int exec_sql(const char *sql);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //DB_H
|
||||
|
@ -6,6 +6,10 @@
|
||||
|
||||
#include "logging.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAIN_SOCKET "d30138f2310a9fb9c54a3e0c21f58591"
|
||||
#define LOG_SOCKET "5864cd77f2f8c59b3882e2d35dbf51e4"
|
||||
#define JAVA_PACKAGE_NAME "com.topjohnwu.magisk"
|
||||
@ -19,7 +23,6 @@
|
||||
#define MOUNTPOINT MAGISKTMP "/img"
|
||||
#define COREDIR MOUNTPOINT "/.core"
|
||||
#define HOSTSFILE COREDIR "/hosts"
|
||||
#define HIDELIST COREDIR "/hidelist"
|
||||
#define SECURE_DIR "/data/adb"
|
||||
#define MAINIMG SECURE_DIR "/magisk.img"
|
||||
#define DATABIN SECURE_DIR "/magisk"
|
||||
@ -55,4 +58,8 @@ int su_client_main(int argc, char *argv[]);
|
||||
int resetprop_main(int argc, char *argv[]);
|
||||
int imgtool_main(int argc, char *argv[]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#ifndef _RESETPROP_H_
|
||||
#define _RESETPROP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int prop_exist(const char *name);
|
||||
int setprop(const char *name, const char *value);
|
||||
int setprop2(const char *name, const char *value, const int trigger);
|
||||
@ -14,4 +18,8 @@ int deleteprop2(const char *name, const int persist);
|
||||
int read_prop_file(const char* filename, const int trigger);
|
||||
void getprop_all(void (*callback)(const char *, const char *, void *), void *cookie);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user