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

application did not start after injection - Unity VR project apk on Meta Quest 3 #20

Closed
hitfzyangdianshi opened this issue Jun 28, 2024 · 5 comments

Comments

@hitfzyangdianshi
Copy link

hitfzyangdianshi commented Jun 28, 2024

I build a VR game apk by Unity, and after injection gadget and install it on Quest 3, the game did not start.

architecture: --arch arm64

I also tried --no-res and --use-aapt2 , and also did not work.

@hitfzyangdianshi hitfzyangdianshi changed the title application did not start after injection - Unity project apk on Meta Quest 3 application did not start after injection - Unity VR project apk on Meta Quest 3 Jun 28, 2024
@ksg97031
Copy link
Owner

ksg97031 commented Jul 1, 2024

@hitfzyangdianshi
Hello, I have fixed the suspicious code.
Please try again by upgrading the frida-gadget version to 1.3.8 (pip install frida-gadget --upgrade).

If it still doesn't work, please send me the APK to '[email protected]' and I'll check it.

@hitfzyangdianshi
Copy link
Author

Hi. I updated my gadget, and tried again. But, the game still did not start.

game: com.SideQuest.Banter https://sidequestvr.com/app/10831/banter
original apk: https://drive.google.com/file/d/1fghjHvYGLF8AC6O7_SpRjLtJtAToa2Xn/view?usp=sharing
logcat: https://drive.google.com/file/d/1XbRf4QqJ3av7uzCe52IaPl2AihK961pB/view?usp=sharing

This game is developed by Unity, according to the asset info in apk packet.

ksg97031 added a commit that referenced this issue Jul 2, 2024
- Update version to 1.3.9
- Modify inject_gadget_into_apk function to accept main_activity as an optional parameter
- Update CLI to include --main-activity option
- Handle cases where the main activity is not found or needs to be specified manually
@ksg97031
Copy link
Owner

ksg97031 commented Jul 2, 2024

@hitfzyangdianshi
The injection was successful and i couldn't identify the issue from your logcat.

How about trying to change the main activity to UnityPlayerActivity?
You can do it like this after upgrading to the latest version:
frida-gadget /Users/ksg/Downloads/com.SideQuest.Banter.apk --main-activity com.unity3d.player.UnityPlayerActivity

@hitfzyangdianshi
Copy link
Author

I have changed the main activity to com.unity3d.player.UnityPlayerActivity, and the library should be injected (screenshot below). But the game still did not start.
The libfrida-gadget-16.2.1-android-arm64.so is located in .apk\lib\arm64-v8a.

image

image

It seems that there is another user having met a similar issue before (#17 ), but that user had solved the issue (#17 (comment) ). That user mentioned that

Yes, I solved it with injecting the gadget library manually. I think issues depends on where you inject the library. When gadget library injection made to wrong location, app crashes, freezes or won't even starts.... (At least this was my case.)

but I do not think in my case the gadget library is injected wrong.

@mironsaid
Copy link

I am facing the same issue, very similar to @hitfzyangdianshi, the app instantly crashed and according to the logcat:

11-06 15:12:51.354 28446 28446 D AndroidRuntime: Shutting down VM
11-06 15:12:51.355 28446 28446 E AndroidRuntime: FATAL EXCEPTION: main
11-06 15:12:51.355 28446 28446 E AndroidRuntime: Process: com.riv_wallet, PID: 28446
11-06 15:12:51.355 28446 28446 E AndroidRuntime: java.lang.VerifyError: Verifier rejected class com.riv_wallet.MainActivity: void com.example.appMainActivity.<init>() failed to verify: void com.exampe.app.MainActivity.<init>(): [0x5] Expected initialization on uninitialized reference Precise Reference: java.lang.String (declaration of 'com.riv_wallet.MainActivity' appears in /data/app/~~bQ1BVcUdhV9hsAIcakW6xQ==/com.example.app-bMdH5WZb5maIC_ucA9mNfQ==/base.apk!classes2.dex)

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

3 participants