You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ndk-gdb from NDK r11c for Windows x64 can't start the debugging session - it just outputs ERROR: Failed to find running process 'com.example.native_activity'
#63
Closed
dosvidos opened this issue
Apr 1, 2016
· 3 comments
I've tried to debug the native-activity NDK sample with ndk-gdb script on Nexus 9 running API23 with February 2016 security updates - the script fails to start the default activity if a package process is not running on the device:
f:\work\android-ndk-r11c\ndk-gdb.cmd -v
ADB command used: 'adb -s HT4AHJT08522'
ADB version: Android Debug Bridge version 1.0.32 Revision 09a0d98bebce-android
Using project directory: c:\wrk\android\android-ndk-samples\native-activity
Found package name: com.example.native_activity
Attaching to existing application process.
Application ABIs: arm64-v8a, armeabi, armeabi-v7a, armeabi-v7a-hard, mips, mips64, x86, x86_64
Device ABIs: arm64-v8a, armeabi-v7a, armeabi
Selecting ABI: arm64-v8a
Detected pretty printer: none
Found application data directory: /data/data/com.example.native_activity
App gdbserver not found at /data/data/com.example.native_activity/lib/gdbserver, uploading.
Copying gdbserver to /data/data/com.example.native_activity/arm64-gdbserver.
Uploaded gdbserver to /data/data/com.example.native_activity/arm64-gdbserver
ERROR: Failed to find running process 'com.example.native_activity'
--delay option makes no difference, maybe it's not working at all:
f:\work\android-ndk-r11c\ndk-gdb.cmd -v --delay 3.0
ADB command used: 'adb -s HT4AHJT08522'
ADB version: Android Debug Bridge version 1.0.32 Revision 09a0d98bebce-android
Using project directory: c:\wrk\android\android-ndk-samples\native-activity
Found package name: com.example.native_activity
Attaching to existing application process.
Application ABIs: arm64-v8a, armeabi, armeabi-v7a, armeabi-v7a-hard, mips, mips64, x86, x86_64
Device ABIs: arm64-v8a, armeabi-v7a, armeabi
Selecting ABI: arm64-v8a
Detected pretty printer: none
Found application data directory: /data/data/com.example.native_activity
App gdbserver not found at /data/data/com.example.native_activity/lib/gdbserver, uploading.
Copying gdbserver to /data/data/com.example.native_activity/arm64-gdbserver.
Uploaded gdbserver to /data/data/com.example.native_activity/arm64-gdbserver
ERROR: Failed to find running process 'com.example.native_activity'
After the process for package com.example.native_activity is created on the device - either by hand from Android launcher or by Activity Manager command adb shell am start ndk-gdb script works without a problem.
The issue is reproduced on other devices, too.
My Nexus 9 props:
The text was updated successfully, but these errors were encountered:
dosvidos
changed the title
ndk-gdb from NDK r11c can't start the debugging - it returns ERROR: Failed to find running process 'com.example.native_activity'
ndk-gdb from NDK r11c for Windows x64 can't start the debugging session - it just outputs ERROR: Failed to find running process 'com.example.native_activity'
Apr 1, 2016
the script fails to start the default activity if a package process is not running on the device:
ndk-gdb.cmd -v
If I understand correctly, this is working as intended. (although apparently undocumented after I added the optional arg to --attach). It works with --launch, right? (i.e. the bug is that --help makes it sound like --launch is the default)
If I understand correctly, this is working as intended. (although apparently undocumented after I added the optional arg to --attach). It works with --launch, right? (i.e. the bug is that --help makes it sound like --launch is the default)
You're right, ndk-gdb.cmd -v --launch works like it should, but it's very confusing because the --launch switch is implied as the default one.
I've tried to debug the
native-activity
NDK sample with ndk-gdb script on Nexus 9 running API23 with February 2016 security updates - the script fails to start the default activity if a package process is not running on the device:--delay
option makes no difference, maybe it's not working at all:After the process for package
com.example.native_activity
is created on the device - either by hand from Android launcher or by Activity Manager commandadb shell am start
ndk-gdb script works without a problem.The issue is reproduced on other devices, too.
My Nexus 9 props:
The text was updated successfully, but these errors were encountered: