feat:bugfix
This commit is contained in:
@@ -88,12 +88,8 @@ void load_so_file_custom_linker(const char *game_data_dir, const Config::SoFile
|
||||
void hack_thread_func(const char *game_data_dir, const char *package_name, JavaVM *vm) {
|
||||
LOGI("Hack thread started for package: %s", package_name);
|
||||
|
||||
// Get injection delay from config
|
||||
int delay = Config::getInjectionDelay();
|
||||
LOGI("Waiting %d seconds before injection", delay);
|
||||
|
||||
// Wait for app to initialize and files to be copied
|
||||
sleep(delay);
|
||||
// Note: Delay is now handled in main thread before this thread is created
|
||||
LOGI("Starting injection immediately (delay already applied in main thread)");
|
||||
|
||||
// Get injection method for this app
|
||||
Config::InjectionMethod method = Config::getAppInjectionMethod(package_name);
|
||||
|
||||
@@ -45,6 +45,13 @@ public:
|
||||
// Get JavaVM
|
||||
JavaVM *vm = nullptr;
|
||||
if (env->GetJavaVM(&vm) == JNI_OK) {
|
||||
// Get injection delay from config
|
||||
int delay = Config::getInjectionDelay();
|
||||
LOGI("Main thread blocking for %d seconds before injection", delay);
|
||||
|
||||
// Block main thread for the delay period
|
||||
sleep(delay);
|
||||
|
||||
// Then start hack thread with JavaVM
|
||||
std::thread hack_thread(hack_prepare, _data_dir, _package_name, data, length, vm);
|
||||
hack_thread.detach();
|
||||
|
||||
Reference in New Issue
Block a user