Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to patch Unity based Apps #83

Open
DeltaPy opened this issue Jan 13, 2024 · 1 comment
Open

Unable to patch Unity based Apps #83

DeltaPy opened this issue Jan 13, 2024 · 1 comment

Comments

@DeltaPy
Copy link

DeltaPy commented Jan 13, 2024

Hello,
I'm trying to patch a Unity 3D VR app for the Meta Quest, but after executing .\modder.bat patch -m .\downloaded-app-folder
the script responds with "Cannot find launchable activity from apk".

I tried modifying the Patcher.kt code and setting val launchableActivity = "com.unity3d.player.UnityPlayerActivity" after building the project and running the patcher again, it runs into a NullPointerException (output below).

Output:
I: Using Apktool v2.9.0-22-bea15e6f-SNAPSHOT on base.apk I: Copying raw resources... I: Copying raw manifest... I: Baksmaling classes.dex... I: Baksmaling classes2.dex... I: Copying assets and libs... I: Copying unknown files... I: Copying original files... INFO : decompiled at C:\Users\test\AppData\Local\Temp\ModderDecompiledApk13937601818461560685 java.lang.NullPointerException at modder.Resource.CopyResourceFile(Resource.kt:25) at modder.Patcher$AddMemScannerLib$1.invoke(Patcher.kt:193) at modder.Patcher$AddMemScannerLib$1.invoke(Patcher.kt:177) at modder.Patcher.IterateNativeLibArchDir(Patcher.kt:142) at modder.Patcher.AddMemScannerLib(Patcher.kt:177) at modder.Patcher.AddMemScanner(Patcher.kt:267) at modder.ModderMainCmd.Patch(ModderMainCmd.kt:116) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at picocli.CommandLine.executeUserObject(CommandLine.java:2066) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at picocli.CommandLine.execute(CommandLine.java:2170) at modder.Main$Companion.cliInit(Main.kt:24) at modder.Main$Companion.main(Main.kt:38) at modder.Main.main(Main.kt).

The launchableActivity that I setted is probably wrong. If someone can please explain to me what is the expected output of the LaunchableActivityToSmaliRelativePath() function in Patcher.kt, I can try to make it work as I can't find enough information online.

Thank you!

@KuhakuPixel
Copy link
Owner

thanks for the report

can you tell me the apk name? so I can reproduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants