Solved Hooking

Status
Not open for further replies.

NoPref

Platinian
Original poster
Mar 27, 2023
12
0
1
26
Idk
I'm trying to make a Silent Aim for standoff 2, but when I try to hook the PlayerController and get a player offset, the game crashes on loading the map

I think this code causes crashes


C++:
        if (player) {
               if (!ptr)
                     ptr = * (void **)((uint64_t) player + 0xA8);
          }
     if (player != nullptr){
        if (IsLocal(get_photon(player))) {
            me = player;
        }
        if (me){
            if (GetPlayerTeam(me) == GetPlayerTeam(player) && !IsLocal(player) ) {
                team = player;
            }
            if (GetPlayerTeam(me) != GetPlayerTeam(player)) {
                enemy = player;
            }
        }
Logcat says


Code:
2023-04-10 02:58:44.963 22181-22181 linker                  pid-22181                            W  type=1400 audit(0.0:20505): avc: denied { search } for name="battery" dev="sysfs" ino=9393 scontext=u:r:untrusted_app:s0:c237,c257,c512,c768 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0 app=com.axlebolt.standoff2
2023-04-10 02:58:44.975 20723-20813 CRASH                   com.axlebolt.standoff2               E  pid: 20723, tid: 20813, name: UnityMain  >>> com.axlebolt.standoff2 <<<
2023-04-10 02:58:44.976 20723-20813 CRASH                   com.axlebolt.standoff2               E        #00 pc 029dec18  /data/app/~~oz31hGXz6Cjasp1cfwTyYA==/com.axlebolt.standoff2-Tee7Y21greS32VJjEtFNQA==/lib/arm/libil2cpp.so (BuildId: dc8fee6b09968693596125fc008f289fdd5f6de3)
2023-04-10 02:58:45.089  1086-1173  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.axlebolt.standoff2, act:com.google.firebase.MessagingUnityPlayerActivity, state:5, pid:20723, uid:10493, fps:-1
2023-04-10 02:58:45.293 20723-20813 CRASH                   com.axlebolt.standoff2               E  Tombstone written to: /storage/emulated/0/Android/data/com.axlebolt.standoff2/files/tombstone_02
2023-04-10 02:58:45.296 20723-20813 AndroidRuntime          com.axlebolt.standoff2               E  FATAL EXCEPTION: UnityMain
                                                                                                    Process: com.axlebolt.standoff2, PID: 20723
                                                                                                    java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
                                                                                                    Version '2021.3.20f1 (577897200b8b)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
                                                                                                    Build fingerprint: 'Redmi/selene_global/selene:12/SP1A.210812.016/V13.0.15.0.SKUMIXM:user/release-keys'
                                                                                                    Revision: '0'
                                                                                                    ABI: 'arm'
                                                                                                    Timestamp: 2023-04-10 02:58:44+0300
                                                                                                    pid: 20723, tid: 20813, name: UnityMain  >>> com.axlebolt.standoff2 <<<
                                                                                                    uid: 10493
                                                                                                    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbce
                                                                                                    Cause: null pointer dereference
                                                                                                        r0  00000bba  r1  b1f24c18  r2  9e8c57e8  r3  b15f6bbc
                                                                                                        r4  9e8c57e8  r5  ca4b2e20  r6  9e8c57e8  r7  00000000
                                                                                                        r8  00000000  r9  e4881274  r10 af5419c0  r11 af5418b8
                                                                                                        ip  afc0d66c  sp  af541788  lr  ae50db08  pc  b1f24c18
                                                                                                    
                                                                                                    backtrace:
                                                                                                          #00 pc 029dec18  /data/app/~~oz31hGXz6Cjasp1cfwTyYA==/com.axlebolt.standoff2-Tee7Y21greS32VJjEtFNQA==/lib/arm/libil2cpp.so (BuildId: dc8fee6b09968693596125fc008f289fdd5f6de3)
                                                                                                          #01 pc 001fdb06  /dmabuf:
                                                                                                    
                                                                                                        at libil2cpp.0x29dec18(Native Method)
                                                                                                        at dmabuf:.0x1fdb06(Native Method)
2023-04-10 02:58:45.299 20723-20723 UnityMain               com.axlebolt.standoff2               W  type=1400 audit(0.0:20506): avc: denied { search } for name="mqsas" dev="dm-7" ino=348 scontext=u:r:untrusted_app:s0:c237,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.axlebolt.standoff2
2023-04-10 02:58:45.299 20723-20723 UnityMain               com.axlebolt.standoff2               W  type=1400 audit(0.0:20507): avc: denied { search } for name="mqsas" dev="dm-7" ino=348 scontext=u:r:untrusted_app:s0:c237,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.axlebolt.standoff2
2023-04-10 02:58:45.299 20723-20723 UnityMain               com.axlebolt.standoff2               W  type=1400 audit(0.0:20508): avc: denied { search } for name="mqsas" dev="dm-7" ino=348 scontext=u:r:untrusted_app:s0:c237,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.axlebolt.standoff2
2023-04-10 02:58:45.299 20723-20723 UnityMain               com.axlebolt.standoff2               W  type=1400 audit(0.0:20509): avc: denied { search } for name="mqsas" dev="dm-7" ino=348 scontext=u:r:untrusted_app:s0:c237,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.axlebolt.standoff2
2023-04-10 02:58:45.299 20723-20723 UnityMain               com.axlebolt.standoff2               W  type=1400 audit(0.0:20510): avc: denied { getattr } for path="/data/mqsas" dev="dm-7" ino=348 scontext=u:r:untrusted_app:s0:c237,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.axlebolt.standoff2
Also i think BNM Library can fix this, but i don`t know how to use it
 

NoPref

Platinian
Original poster
Mar 27, 2023
12
0
1
26
Idk
I found what i did wrong. I'm need to use 0xAC pointer instead of 0xA8, Also can somebody give me example on how to use ByNameModding library?
 

DaRealPanDa

Co-Administrator
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,771
15,649
2,120
27
Skyrim
Only one question per thread bud. Please create a new Thread for that question.

Thread will be set to "solved" and closed.
When you're not happy with that just send me a message and i will re-open the thread for you.

Thanks.
 
Status
Not open for further replies.