I'm using Termux(root) on LineageOS 16 (Android 9) with radare2 (v3.6.0 linux-arm32). When i attach to a process with 'r2 -d pid' the app freezes properly but doesn't continue with 'dc'. I'm not sure in which condition the debugger is exactly but when i try to step in code (F7/F8 in visual) some errors are flickering (SIGILL somewhat..). The Zygote instance (we are connected to) seems to be corrupted by r2.

On IDA you attach the remote debugger (android_server) to the pid and you'll land somewhere in the code, can set breakpoints, continue execution and so on. I'm trying to achieve the same with r2.

How is it meant to be done to debug Android native code with radare2 at runtime (dynamic analysis)?


1 Answer 1


Have you tried to start a gdbserver on your android device and to attach to it in r2 ?

It worked for me.


  • It doesn't for me. I wanted to observe a static initializing library loading (step through the JNI_OnLoad function), so I set the app as debug application and told the OS to wait for the debugger. After launching the app, I attach gdbserver and connect to it with r2. Then I do dc, but the app is still frozen and I don't get my prompt back in r2.
    – TobTobXX
    Sep 20, 2021 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.