You've already forked TrickyStore
mirror of
https://github.com/5ec1cff/TrickyStore.git
synced 2025-09-06 06:37:07 +00:00
Fix SafetyNet verdicts and slight refactor
This commit is contained in:
@@ -111,11 +111,24 @@ public:
|
|||||||
auto app_data_dir = env_->GetStringUTFChars(args->app_data_dir, nullptr);
|
auto app_data_dir = env_->GetStringUTFChars(args->app_data_dir, nullptr);
|
||||||
auto nice_name = env_->GetStringUTFChars(args->nice_name, nullptr);
|
auto nice_name = env_->GetStringUTFChars(args->nice_name, nullptr);
|
||||||
|
|
||||||
std::string_view process(nice_name);
|
|
||||||
std::string_view dir(app_data_dir);
|
std::string_view dir(app_data_dir);
|
||||||
|
std::string_view process(nice_name);
|
||||||
|
|
||||||
|
bool isGms = false, isGmsUnstable = false;
|
||||||
|
isGms = dir.ends_with("/com.google.android.gms");
|
||||||
|
isGmsUnstable = process == "com.google.android.gms.unstable";
|
||||||
|
|
||||||
|
env_->ReleaseStringUTFChars(args->app_data_dir, app_data_dir);
|
||||||
|
env_->ReleaseStringUTFChars(args->nice_name, nice_name);
|
||||||
|
|
||||||
|
if (!isGms) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
api_->setOption(zygisk::FORCE_DENYLIST_UNMOUNT);
|
||||||
|
if (!isGmsUnstable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (dir.ends_with("/com.google.android.gms") &&
|
|
||||||
process == "com.google.android.gms.unstable") {
|
|
||||||
int enabled = 0;
|
int enabled = 0;
|
||||||
SpoofConfig spoofConfig{};
|
SpoofConfig spoofConfig{};
|
||||||
auto fd = api_->connectCompanion();
|
auto fd = api_->connectCompanion();
|
||||||
@@ -152,10 +165,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
env_->ReleaseStringUTFChars(args->nice_name, nice_name);
|
|
||||||
env_->ReleaseStringUTFChars(args->app_data_dir, app_data_dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
void preServerSpecialize(ServerSpecializeArgs *args) override {
|
void preServerSpecialize(ServerSpecializeArgs *args) override {
|
||||||
api_->setOption(zygisk::DLCLOSE_MODULE_LIBRARY);
|
api_->setOption(zygisk::DLCLOSE_MODULE_LIBRARY);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user