geokar2006 / ByNameModding

MOVED https://github.com/ByNameModding/BNM-Android
112 stars 34 forks source link

Getting crash in a game #14

Closed UxHarshit closed 2 years ago

UxHarshit commented 2 years ago

I have tried it in many games and it worked fine but a game name codm in it giving crash. I got this in LogCat. Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa24c9078 in tid 13658 (Thread-7), pid 13579 #(lofduty.shooter)

FATAL EXCEPTION: UnityMain Process: com.activision.callofduty.shooter, PID: 13574 java.lang.Error: signal 6 (SIGABRT), code 0 (?), fault addr -------- Build fingerprint: 'xiaomi/wayne/wayne:8.1.0/OPM1.171019.011/V9.5.11.0.ODCCNFA:user/release-keys' Revision: '0' pid: 13574, tid: 23817, name: UnityMain >>> com.activision.callofduty.shooter <<< r0 00000000 r1 00005d09 r2 00000006 r3 adbfc660 r4 adbfc674 r5 adbfc658 r6 00003506 r7 0000016b r8 adbfc660 r9 adbfc670 sl adbfc690 fp adbfc680 ip 00005d09 sp adbfc630 lr ebcb9001 pc ebcb9014 cpsr 3131302e

I tried with all il2cpp version result is same.

geokar2006 commented 2 years ago

What game architecture?

UxHarshit commented 2 years ago

What game architecture?

Unity with UNITY_VER 202

geokar2006 commented 2 years ago

What game architecture?

Unity with UNITY_VER 202

Architecture - armeabi-v7a, arm64-v8a, x86, x86-64?

UxHarshit commented 2 years ago

Class that i am trying to get in codm game

Other Game Class: (Successfull) //Using Namespace: UnityEngine public sealed class Screen { public static extern int get_height(); public static extern int get_width(); }

Codm game class: (Not able to get) //Using Namespace: UnityEngine public sealed class Screen { public static Int32 get_width() { }; public static Int32 get_height() { }; }

UxHarshit commented 2 years ago

What game architecture?

Unity with UNITY_VER 202

Architecture - armeabi-v7a, arm64-v8a, x86, x86-64?

armeabi-v7a

geokar2006 commented 2 years ago

Show your code, how you getting classes

UxHarshit commented 2 years ago

Show your code, how you getting classes

auto Screen = new LoadClass(OBFUSCATE("UnityEngine"), OBFUSCATE("Screen"));
InitFunc(UnityEngine.Screen.get_height,Screen->GetMethodOffsetByName(OBFUSCATE("get_height"),0));
InitFunc(UnityEngine.Screen.get_width,Screen->GetMethodOffsetByName("get_width",0));
geokar2006 commented 2 years ago

Try

    auto Screen = LoadClass(OBFUSCATE("UnityEngine"), OBFUSCATE("Screen"));
    InitFunc(UnityEngine.Screen.get_height,Screen.GetMethodOffsetByName(OBFUSCATE("get_height"),0));
    InitFunc(UnityEngine.Screen.get_width,Screen.GetMethodOffsetByName("get_width",0));

If don't work, show logs by tag "ByNameModding"

UxHarshit commented 2 years ago

Try

    auto Screen = LoadClass(OBFUSCATE("UnityEngine"), OBFUSCATE("Screen"));
    InitFunc(UnityEngine.Screen.get_height,Screen.GetMethodOffsetByName(OBFUSCATE("get_height"),0));
    InitFunc(UnityEngine.Screen.get_width,Screen.GetMethodOffsetByName("get_width",0));

If don't work, show logs by tag "ByNameModding"

Fixed thanks