Magisk/native/jni/magiskhide/magiskhide.h
Park Ju Hyung 24da3485bd Hardcode GMS unstable to MagiskHide
With the new detection method, it is impossible to check for components.

Remove additional checks for components and simply hardcode string to
proc_monitor.cpp and query cmdline to see if it's GMS unstable.

This addresses wasted resources on applying custom namespace
on all GMS processes.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
2019-02-12 23:39:57 -05:00

59 lines
1.1 KiB
C++

#ifndef MAGISK_HIDE_H
#define MAGISK_HIDE_H
#include <pthread.h>
#include <vector>
#include <string>
#include "daemon.h"
#define TERM_THREAD SIGUSR1
#define SAFETYNET_COMPONENT "com.google.android.gms/.droidguard.DroidGuardService"
#define SAFETYNET_PROCESS "com.google.android.gms.unstable"
#define SAFETYNET_PKG "com.google.android.gms"
// Daemon entries
int launch_magiskhide(int client);
int stop_magiskhide();
int add_list(int client);
int rm_list(int client);
void ls_list(int client);
// Update APK list for inotify
void update_apk_list();
// Process monitor
void proc_monitor();
// Utility functions
void manage_selinux();
void hide_sensitive_props();
void clean_magisk_props();
// List managements
int add_list(const char *proc);
bool init_list();
extern bool hide_enabled;
extern pthread_mutex_t list_lock;
extern std::vector<std::string> hide_list;
enum {
LAUNCH_MAGISKHIDE,
STOP_MAGISKHIDE,
ADD_HIDELIST,
RM_HIDELIST,
LS_HIDELIST,
HIDE_STATUS,
};
enum {
HIDE_IS_ENABLED = DAEMON_LAST,
HIDE_NOT_ENABLED,
HIDE_ITEM_EXIST,
HIDE_ITEM_NOT_EXIST
};
#endif