frida / frida-core

Frida core library intended for static linking into bindings
https://frida.re
Other
618 stars 199 forks source link

App with gadget crashes in emulator #283

Closed 709924470 closed 4 years ago

709924470 commented 4 years ago

Environment:

The packed app works fine in my phone, but every time I try to start the app in the emulator, it crashes with this

D/Stat  ( 2974): [main(1): ProGuard:48] - set up java crash handler:com.tencent.android.tpush.stat.a@11a3dfa4
V/libnb   ( 2974): enter native_bridge2_isSupported /data/app/------1/lib/arm/libtpnsSecurity.so
V/libnb   ( 2974): enter native_bridge2_loadLibrary /data/app/------1/lib/arm/libtpnsSecurity.so
D/houdini ( 2974): [2974] Added shared library /data/app/------1/lib/arm/libtpnsSecurity.so for ClassLoader by Native Bridge.
V/libnb   ( 2974): enter native_bridge2_getTrampoline JNI_OnLoad, trampoline_addr 0xaf077fc4
I/TpnsSecurity( 2974): JNI_OnLoad
V/libnb   ( 2974): enter native_bridge2_isSupported /data/app/-----1/lib/arm/libBugly.so
V/libnb   ( 2974): enter native_bridge2_loadLibrary /data/app/-----1/lib/arm/libBugly.so
D/houdini ( 2974): [2974] Added shared library /data/app/------1/lib/arm/libBugly.so for ClassLoader by Native Bridge.
V/libnb   ( 2974): enter native_bridge2_getTrampoline JNI_OnLoad, trampoline_addr 0xaf077d5c
V/libnb   ( 2974): enter native_bridge2_isSupported /data/app/------1/lib/arm/libfrida-gadget.so
V/libnb   ( 2974): enter native_bridge2_loadLibrary /data/app/------1/lib/arm/libfrida-gadget.so
F/Frida   ( 2974): frida-core/lib/gadget/gadget.vala:669:frida_gadget_detect_location: assertion failed: (our_range != null)
I/Zygote  ( 1408): Process 2974 exited due to signal (6)
I/ActivityManager( 1582): Process ----- (pid 2974) has died
W/ActivityManager( 1582): Force removing ActivityRecord{1d5d55e5 u0 -----/----- t7}: app died, no saved state
D/sensor_ld( 1582): cb_activate handle=0 enabled=0
W/WindowManager( 1582): Failed looking up window

Frida server cannot spawn processes in emulator, too.

     ____
    / _  |   Frida 12.8.0 - A world-class dynamic instrumentation toolkit
   | (_| |
    > _  |   Commands:
   /_/ |_|       help      -> Displays the help system
   . . . .       object?   -> Display information about 'object'
   . . . .       exit/quit -> Exit
   . . . .
   . . . .   More info at https://www.frida.re/docs/home/
Failed to spawn: unable to inject library into process without libc
709924470 commented 4 years ago

forcing app to x86 version works fine.