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

game report not running on the phone #4

Open
AveyondFly opened this issue Apr 20, 2024 · 6 comments
Open

game report not running on the phone #4

AveyondFly opened this issue Apr 20, 2024 · 6 comments

Comments

@AveyondFly
Copy link

Hi,

Wish you have a good weekend.
Today, when running a horror java game as following, I find the game reports it is not running on the phone.
ss1.jar.txt

I observed the execption as following:

java.io.IOException: Class not found Error Adapting Class XMessage java.io.IOException: Class not found Error Adapting Class XConnection java.io.IOException: Class not found Error Adapting Class emulator.Emulator java.io.IOException: Class not found

It is very simple to reproduce the issue, just press 5 and issue can be reproduced.
Meanwhile, the game can be started successfully with j2me-loader from android.

Thanks.

@zixing131
Copy link

you can modify the jar
/* renamed from: a */ public static boolean m240a() { boolean z = true; if (C0020at.f419j) { String appProperty = Main.self.getAppProperty("copyRight"); if (appProperty == null || !(appProperty == null || appProperty.equals("0"))) { if (Runtime.getRuntime().totalMemory() == 8000000) { z = false; } if (!m236b()) { z = false; } } } return z; }

this is the code where check phone runtime , you can make this function always return true.
I will upload the modified jar after .

@zixing131
Copy link

zixing131 commented Apr 23, 2024

https://zixing.lanzouq.com/i0vAU1w7elyf

this is the modified jar .
you can play it on freej2me .

@AveyondFly
Copy link
Author

https://zixing.lanzouq.com/i0vAU1w7elyf

this is the modified jar . you can play it on freej2me .

Sorry, I missed the message. Yes, that works. But it would still be better if it can be supported natively as j2me-loader. Hope can be addressed simply from j2me side.

@AveyondFly
Copy link
Author

AveyondFly commented May 22, 2024

you can modify the jar /* renamed from: a */ public static boolean m240a() { boolean z = true; if (C0020at.f419j) { String appProperty = Main.self.getAppProperty("copyRight"); if (appProperty == null || !(appProperty == null || appProperty.equals("0"))) { if (Runtime.getRuntime().totalMemory() == 8000000) { z = false; } if (!m236b()) { z = false; } } } return z; }

this is the code where check phone runtime , you can make this function always return true. I will upload the modified jar after .

From what you wrote here, I tried with "-ap copyRight=0" and it works. Thanks.
But still pretty confused why j2me-loader works without such code.

Maybe C0020at.f419j can tell the truth.

@zb3
Copy link
Owner

zb3 commented Jun 2, 2024

Apologies for not responding earlier, but github didn't send me any notifications.. :(

The game code probably attempts to check if it's running inside an emulator (and refuses to run if emulator detected) by detecting the presence of some classes. While these classes don't exist here (and they don't exist in J2ME-Loader too), the code should pass. But the problem was that FreeJ2ME is not throwing the ClassNotFoundException exception..

Now I'm not sure what to do, because throwing the exception could potentially break some games.. this one is unusual because it expects a class to not exist..

@AveyondFly
Copy link
Author

Apologies for not responding earlier, but github didn't send me any notifications.. :(

The game code probably attempts to check if it's running inside an emulator (and refuses to run if emulator detected) by detecting the presence of some classes. While these classes don't exist here (and they don't exist in J2ME-Loader too), the code should pass. But the problem was that FreeJ2ME is not throwing the ClassNotFoundException exception..

Now I'm not sure what to do, because throwing the exception could potentially break some games.. this one is unusual because it expects a class to not exist..

Hi, thank you so much for the reply. I agree this would be very hard to debug.
Meanwhile, FYI, I ported another freej2me to my retro-console and that one also passes the emulator checking.
https://github.com/AveyondFly/freej2me-miyoomini

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