Skip to content

Instantly share code, notes, and snippets.

@Ralireza
Created December 13, 2022 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ralireza/22414212565441336221edd781090121 to your computer and use it in GitHub Desktop.
Save Ralireza/22414212565441336221edd781090121 to your computer and use it in GitHub Desktop.
debug .so file in android

Debug Sharedlibrary (.so file) in android application:

need:

  • gdb
  • gdbserver
  • emulator

step 1

  • open application on emulator
  • adb shell
  • ps | grep
  • copy pid
  • gdbserver 0.0.0.0:44444 --attach

step 2

  • get library file (.so) into your machine for next use
  • unzip .apk and copy /lib/arch/... to your ~/Desktop/lib

step 3

  • on another machine like linux type in terminal: gdb
  • target remote :44444
  • set solib-search-path ~/Desktop/lib/nameOfyourLib
  • info sharedlibrary
  • break Java_
  • continue

refrences:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment