Ok, The first failing tries are compiled with my windows pc. Now used my mac at same codebase and same settings and now it worked :/idk.
I made a branch and reset it to the active repo one. Keep everything as is, except the packageName to inject.
(To be sure there isn't anything completely stupid I did). But can still be the reason why it is not working.
I also can't find anything else in the logs. Tested to install another module it worked :7
I bet I forgot something -.-
ok, now I downgraded to Magisk 26.1 Zygisk enabled:
...
I couldn't get what you mean. You could go through the logs and see why it's not injecting. It could be many reasons, it could be that the app you're trying to inject into has protection against injections but that's very unlikely. It could be that you're putting in the wrong package name. The package of your app should be: com.samsung.android.app.galaxyfinder.I have one more question.
When I attempt to locate my game, it doesn't get hooked into the system. Upon starting, I see the following message: 'appDataDir: /data/user/0/com.samsung.android.app.galaxyfinder' instead of the package name. Can games avoid being found in this location?
The app info indicates that the data is stored in /data/user/0/com.mygame, but it does not appear to be the case.
It doesn't try to inject, because it can't find the package.I couldn't get what you mean. You could go through the logs and see why it's not injecting. It could be many reasons, it could be that the app you're trying to inject into has protection against injections but that's very unlikely. It could be that you're putting in the wrong package name. The package of your app should be: com.samsung.android.app.galaxyfinder.
Check hook.cpp for extra details about how the injection works. You could try adding logs to see what exactly is going wrong.
int isGame(JNIEnv *env, jstring appDataDir)
{
if (!appDataDir)
return 0;
const char *app_data_dir = env->GetStringUTFChars(appDataDir, nullptr);
LOGD(OBFUSCATE("appDataDir: %s"),app_data_dir);
int user = 0;
static char package_name[256];
if (sscanf(app_data_dir, "/data/%*[^/]/%d/%s", &user, package_name) != 2) {
if (sscanf(app_data_dir, "/data/%*[^/]/%s", package_name) != 1) {
package_name[0] = '\0';
LOGW(OBFUSCATE("can't parse %s"), app_data_dir);
return 0;
}
}
if (strcmp(package_name, GamePackageName) == 0) {
LOGI(OBFUSCATE("detect game: %s"), package_name);
game_data_dir = new char[strlen(app_data_dir) + 1];
strcpy(game_data_dir, app_data_dir);
env->ReleaseStringUTFChars(appDataDir, app_data_dir);
return 1;
} else {
env->ReleaseStringUTFChars(appDataDir, app_data_dir);
return 0;
}
}
appDataDir: /data/user/0/com.google.android.apps.photos
/data/user/0/com.samsung.android.app.galaxyfinder
HOOKAF(void, Input, void *thiz, void *ex_ab, void *ex_ac) {
bool wantToCaptureMouse = false;
auto ctx = ImGui::GetCurrentContext();
LOGD("Input -> Checking for CTX");
if (ctx) {
LOGD("Input -> has CTX");
auto io = ImGui::GetIO();
wantToCaptureMouse = io.WantCaptureMouse;
LOGD("Input -> io.WantCaptureMouse %i", io.WantCaptureMouse);
ImGui_ImplAndroid_HandleInputEvent((AInputEvent *) thiz);
}
if (!wantToCaptureMouse) {
origInput(thiz, ex_ab, ex_ac);
}
}
Maybe there is also a resize event you can listen for. Not sure.my menu causes a change in the game's resolution causing the game to crash
how to fix this
eglQuerySurface(dpy, surface, EGL_WIDTH, &glWidth);
eglQuerySurface(dpy, surface, EGL_HEIGHT, &glHeight);
io.DisplaySize = ImVec2((float) glWidth, (float) glHeight);