Skip to content

Instantly share code, notes, and snippets.

@shri-kanth
shri-kanth / android_gdb.md
Created June 15, 2022 04:47 — forked from sekkr1/android_gdb.md
Attaching GDB to Android apps' native libraries

How to GDB android native libraries

[1] Install NDK from android studio

[2] Push appropriate gdb-server to phone

adb push ~/android-sdk-linux/ndk-bundle/prebuilt/android-<arch>/gdbserver/gdbserver /data/local/tmp
adb shell "chmod 777 /data/local/tmp/gdbserver"
adb shell "ls -l /data/local/tmp/gdbserver"

[4] Forward ports

adb forward tcp:1337 tcp:1337

Android ADB over Wifi

Here is a simple way to use ADB over wifi with your device. Make sure that ADB can reach your device over the network.

  1. Connect device to usb

  2. Restart the ADB daemon to listening on TCP port

adb tcpip 5555

@shri-kanth
shri-kanth / script.sh
Created February 7, 2018 06:34 — forked from rohithpeddi/script.sh
Post install script
#!/bin/bash
#Steps to run this script
# $ sudo -s
# $ touch script.sh
## copy paste this file to script.sh
# $ chmod +x script.sh
# $ ./script.sh 2>&1 | tee scriptoutput