Question

Environment: OS X 10.9, XCode 4.6.3,

tweejump git:(master) ✗ apportable --version      

Apportable SDK version release_1.0.31 (53ea42fec9b094b91c988f3bfde6dff8ba683a4d starter)
clang version 7fc8b05e4f57f61dbbbe5c8e62581b0e0c42941e
gdb version ff0611b8b721b3bf393c655c7d147de52cc850ac
android sdk version r21.0.1.1
android ndk version r8d.1
unknown ninja

I downloaded tweetjump built it and install this game. Then I want to check if I can debug with gdb using

apportable just_debug

and

ROOTED=yes apportable just_debug

all these two commands gave me same information;

building with TARGET_ARCH_ABI:armeabi ARM_NEON:False
Building to /Users/xxx/.apportable/SDK/Build/android-armeabi-debug
Loading configuration.
Finished parsing configuration.
scons: Building targets ...
Debugging...
Starting: Intent { cmp=com.iplayful.tweejump/com.apportable.activity.VerdeActivity (has extras) }
Warning: Activity not started, its current task has been brought to the front

Failed to load one the Breakpoints files:
/Users/xxx/workspace/tweejump/tweejump.xcodeproj/xcuserdata/xxx.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
/Users/xxx/workspace/tweejump/tweejump.xcodeproj/xcuserdata/xxx.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Attaching to pid 8085
Cannot attach to lwp 8085: Operation not permitted (1)
Exiting

I saw some run-as answer, but how can an android newbie work it out. Can I have a step by step tutorial.

Edit1:

device: SAMSUNG SCH-I739

Android version: 4.1.2

Edit2:

I searched and found a debug solution:

$ adb shell
$ su
$ cd /data/data/com.iplayful.tweejump/lib/gdbserver :1111 --attach 26337

in my Mac:

$ ~/.apportable/toolchain/macosx/gdb/bin/arm-elf-linux-gdb 
(gdb) file ./gdb/app_process
(gdb) shell adb forward tcp:1111 tcp:1111
(gdb) target remote :1111
(gdb) continue

then, gdb attached to gdbserver.

But gdb can't find the symbol, so this is the second question.

If I use this method to debug game, where to find game's symbol and libraries?

Was it helpful?

Solution

It looks like there is a gdbserver running on the device in a bad state.

Try rebooting the device and then apportable just_debug

If there are still issues, add the Android device and Android version to the question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top