parent
c7509151fb
commit
00e18cf3b6
|
|
@ -88,6 +88,7 @@ namespace edxp {
|
||||||
deopt_boot_image_enabled_ = access(GetConfigPath("deoptbootimage").c_str(), F_OK) == 0;
|
deopt_boot_image_enabled_ = access(GetConfigPath("deoptbootimage").c_str(), F_OK) == 0;
|
||||||
resources_hook_enabled_ = access(GetConfigPath("disable_resources").c_str(), F_OK) != 0;
|
resources_hook_enabled_ = access(GetConfigPath("disable_resources").c_str(), F_OK) != 0;
|
||||||
no_module_log_enabled_ = access(GetConfigPath("disable_modules_log").c_str(), F_OK) == 0;
|
no_module_log_enabled_ = access(GetConfigPath("disable_modules_log").c_str(), F_OK) == 0;
|
||||||
|
hidden_api_bypass_enabled_ = access(GetConfigPath("disable_hidden_api_bypass").c_str(), F_OK) != 0;
|
||||||
|
|
||||||
// use_white_list snapshot
|
// use_white_list snapshot
|
||||||
use_white_list_snapshot_ = access(use_whitelist_path_.c_str(), F_OK) == 0;
|
use_white_list_snapshot_ = access(use_whitelist_path_.c_str(), F_OK) == 0;
|
||||||
|
|
@ -98,6 +99,7 @@ namespace edxp {
|
||||||
LOGI(" resources hook: %s", BoolToString(resources_hook_enabled_));
|
LOGI(" resources hook: %s", BoolToString(resources_hook_enabled_));
|
||||||
LOGI(" deopt boot image: %s", BoolToString(deopt_boot_image_enabled_));
|
LOGI(" deopt boot image: %s", BoolToString(deopt_boot_image_enabled_));
|
||||||
LOGI(" no module log: %s", BoolToString(no_module_log_enabled_));
|
LOGI(" no module log: %s", BoolToString(no_module_log_enabled_));
|
||||||
|
LOGI(" hidden api bypass: %s", BoolToString(hidden_api_bypass_enabled_));
|
||||||
if (black_white_list_enabled_) {
|
if (black_white_list_enabled_) {
|
||||||
SnapshotBlackWhiteList();
|
SnapshotBlackWhiteList();
|
||||||
}
|
}
|
||||||
|
|
@ -183,6 +185,10 @@ namespace edxp {
|
||||||
return deopt_boot_image_enabled_;
|
return deopt_boot_image_enabled_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE bool ConfigManager::IsHiddenAPIBypassEnabled() const {
|
||||||
|
return hidden_api_bypass_enabled_;
|
||||||
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE std::string ConfigManager::GetInstallerPackageName() const {
|
ALWAYS_INLINE std::string ConfigManager::GetInstallerPackageName() const {
|
||||||
return installer_pkg_name_;
|
return installer_pkg_name_;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ namespace edxp {
|
||||||
|
|
||||||
bool IsNoModuleLogEnabled() const;
|
bool IsNoModuleLogEnabled() const;
|
||||||
|
|
||||||
|
bool IsHiddenAPIBypassEnabled() const;
|
||||||
|
|
||||||
std::string GetInstallerPackageName() const;
|
std::string GetInstallerPackageName() const;
|
||||||
|
|
||||||
std::string GetXposedPropPath() const;
|
std::string GetXposedPropPath() const;
|
||||||
|
|
@ -46,6 +48,7 @@ namespace edxp {
|
||||||
|
|
||||||
bool IsAppNeedHook(const std::string &app_data_dir);
|
bool IsAppNeedHook(const std::string &app_data_dir);
|
||||||
|
|
||||||
|
bool hidden_api_bypass_enabled_ = false;
|
||||||
private:
|
private:
|
||||||
inline static ConfigManager *instance_;
|
inline static ConfigManager *instance_;
|
||||||
uid_t last_user_ = false;
|
uid_t last_user_ = false;
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,9 @@ namespace edxp {
|
||||||
if (art_hooks_installed) {
|
if (art_hooks_installed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (ConfigManager::GetInstance() -> IsHiddenAPIBypassEnabled()) {
|
||||||
art::hidden_api::DisableHiddenApi(art_handle, hook_func);
|
art::hidden_api::DisableHiddenApi(art_handle, hook_func);
|
||||||
|
}
|
||||||
art::Runtime::Setup(art_handle, hook_func);
|
art::Runtime::Setup(art_handle, hook_func);
|
||||||
art::gc::Heap::Setup(art_handle, hook_func);
|
art::gc::Heap::Setup(art_handle, hook_func);
|
||||||
art::ClassLinker::Setup(art_handle, hook_func);
|
art::ClassLinker::Setup(art_handle, hook_func);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue