Added script for native debugging
This commit is contained in:
parent
ebc2c3fbb0
commit
7cc8ebf000
1 changed files with 13 additions and 0 deletions
13
OsmAnd/ndebug.sh
Executable file
13
OsmAnd/ndebug.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get pid of our process
|
||||||
|
pid=`adb shell ps | grep 'net.osmand' | head -n1 | awk '{print $2}'`
|
||||||
|
package=`adb shell ps | grep 'net.osmand' | head -n1 | awk '{print $9}'`
|
||||||
|
echo "OsmAnd package: $package"
|
||||||
|
echo "OsmAnd pid: $pid"
|
||||||
|
|
||||||
|
# Launch gdbserver on target
|
||||||
|
adb shell run-as $package /data/data/$package/lib/gdbserver :5039 --attach $pid &
|
||||||
|
|
||||||
|
# Launch gdb on host
|
||||||
|
"$ANDROID_NDK/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-gdb"
|
Loading…
Reference in a new issue