- In Android Studio, go to
Run -> Edit configurations...
- Make sure the
app
configuration is selected. - In the
Debugger
tab, selectDual (Java + Native)
- Start debugging the app as usual from Android Studio. The app should now stop on a SIGURG signal.
- Select the
LLDB
tab in the debugger. Now you can set breakpoints etc, e.g.breakpoint set -n open_tun
- Before continuing run
pro hand -p true -s false SIGURG
- Click
Resume Program
and the app will resume until the breakpoint is hit.
NOTE: When running LLDB, Android Studio can sometimes get into a state where it will try to
connect to the debugger when running the app normally, which blocks the app from starting.
To fix this run adb shell am clear-debug-app
.