• Open a root terminal in Kali or Linux system and run the command : adb install gdb -y
  • Now open another terminal and check if genymotion is running and adb is connected or not using adb command : adb devices
    If this commands returns some device its good, otherwise we need to connect adb to genymotion using command: adb connect <genymotion-ip:5555>
  • Now as you are connected to genymotion using adb, lets enter into shell: adb shell
  • We need to check if we have gdbserver in our genymotion or not, to check this we need to move into location: cd /system/bin/ && ls | grep “gdbserver”
  • If gdbserver file is there its good, otherwise we need to download it manually and push it using adb to respected location. To download file click here & download Linux 64-bit (x86).
  • Its time to attach the process. To check the process of any running android application, we can run command: adb shell ps | grep “application-name”
  • As we have the PID, we can attach it using gdbserver: gdbserver :8888 –attach PID
  • We also need to forward all the tcp traffic to this port 8888 to do so we can run command: adb forward tcp:8888 tcp:8888
  • Its time to launch gdb, in the terminal run command : gdb
  • To start debugging we need to set the target : target remote :8888
  • Now we are all set to interact with the memory segment and registers of the process.


Discover more from Upcoming Hackers

Subscribe to get the latest posts sent to your email.

Discover more from Upcoming Hackers

Subscribe now to keep reading and get access to the full archive.

Continue reading