Questions tagged [ndk-gdb]

A helper shell script named 'ndk-gdb' to easily launch a native debugging session for your NDK-generated machine code.

The script is located at the top-level directory of the NDK, and shall be invoked from the command-line when in your application project directory, or any of its sub-directories. For example:

cd $PROJECT
$NDK/ndk-gdb
40 questions
34
votes
4 answers

run-as Package 'a.b.c' is unknown - Galaxy S4 Jellybean or Android 4.3

I cannot run run-as (or ndk-gdb) for the Galaxy S4 running Jellybean 4.2.2. ~ $ adb shell shell@android:/ $ run-as a.b.c ls run-as: Package 'a.b.c' is unknown There are multiple answers for this issue for pre-ICS devices, but those seem to have…
Paul Beusterien
  • 21,795
  • 5
  • 61
  • 115
10
votes
6 answers

Gradle doesn't package gdbserver into apk. ndk-gdb results in "ERROR: Non-debuggable application installed on the target device"

In Android Studio 0.6 I created an android test project with a very simple C function wrapped with the JNI. I set android:debuggable="true" in the AndroidManifest.xml. I ran ndk-build NDK_DEBUG=1. This generated a gdbserver and a gdb.setup file in…
9
votes
3 answers

NDK debugging with r9 works on W7/64 but gives me issues in XP

I've recently loaded the new Android dev tools, SDK 20130717 and NDK r9. Up to now I had the previous versions, working and debugging from within Eclipse just fine on both of my systems, a XP and a W7/64. Now, the W7/64 with the new tools does work…
9
votes
2 answers

Pass gdb variable to a shell command excuted from gdb

I want to execute a shell command from gdb, this shell command needs an argument, and this argument is a gdb variable. How to make gdb interpret this variable before passing the command and argument to the shell interpreter ? For example, in a gdb…
carlito
  • 2,124
  • 3
  • 14
  • 21
8
votes
4 answers

ndk-gdb error: device does not support the application's targetted CPU ABIs

Trying to run ndk-gdb and getting this error: Android NDK installation path: /Library/AndroidSDK/ndk/ Using specific adb command: /Library/AndroidSDK/platform-tools/adb ADB version found: Android Debug Bridge version 1.0.31 Using ADB…
Kimi
  • 11,963
  • 7
  • 49
  • 79
6
votes
2 answers

Error with ndk-gdb of android-ndk-r9d-linux-x86 in ubuntu 12.04

I use ndk-gdb of android-ndk-r9d-linux-x86 in ubuntu 12.04 to debug the android native application "hello-jni", but it receive this error. WARNING: The shell running this script isn't bash. Although we try to avoid bashism in …
5
votes
0 answers

"Cannot insert breakpoint.Cannot access memory at address" error in Android ndk-gdb native code debugging

I have been trying to debug native C++ code in Android application using ndk-gdb for last 4 days. but i keep getting this error.Cannot insert breakpoint i have followed this tutorial using-eclipse-for-android-cc-debugging in mhandroid in wordpress…
Karan2020
  • 91
  • 1
  • 7
5
votes
2 answers

Android debugging ndk-gdb

I have been fighting with this for days and I have gotten closer but still no luck. I am trying to build an android app via ndk-build NDK_DEBUG=1 which works just fine. I can launch from eclipse and have it run, but I want to debug from the…
c alvarado
  • 69
  • 2
  • 8
4
votes
1 answer

Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk

I am trying to get ndk-gdb to work but I have some problems. My project structure is something like this: trunk --indiana (Here is the android_manifest) --ubravo_java ----mbravo (here is the native code) ------jni (here are the Android.mk and…
4
votes
2 answers

ndk-gdb unable to find gdb.setup

I am trying to use ndk-gdb to debug my native android project. When I run the command ndk-gdb I get the error Could not find gdb.setup under ./libs/ Explanation Running MacOSX, ndk r10e; Using ndk sample San Angeles Followed steps here to setup…
Harkish
  • 1,982
  • 2
  • 18
  • 30
4
votes
1 answer

Android Debugging native code

I'm using ndk-r9 and I am struggling trying to get ndk-gdb to work for me. I've started a small android app called "LittlestAndroid" which makes a simple call to a native C++ method that returns a hardcoded string. The app builds/installs/run just…
Cliff
  • 9,408
  • 6
  • 59
  • 95
4
votes
1 answer

Android NDK + GDB

Help me please to use ndk-gdb! I searched through StackOverflow and other internets =) but still doing something wrong. Configuration: MacOSX 64 + latest SDK + latest NDK + latest IDEA + Nexus 7 + huge C++ project. I did all the common…
mjollneer
  • 935
  • 2
  • 15
  • 33
3
votes
1 answer

The latest ndk-gdb can not connect to my device

I just get trouble to use ndk-gdb to debug my native application. This is my environment: OS X El Captain 10.11.5 NDK version r12 SDK version 24 Build tool version 24.0.0 Device Nexus 6P with Android N (NPD35K) The issue: When I was going to…
jayatubi
  • 1,623
  • 1
  • 14
  • 43
2
votes
0 answers

"Failed to retrieve application ABI from Android.mk" error in ndk-gdb

I'm trying to debug a native android app using ndk-gdb tool. When I execute the ndk-gdb, I get the following error. "/home/amila/Android/Ndk/android-ndk-r20/build/core/add-application.mk:88: *** Android NDK: Aborting... . Stop. ERROR: Failed…
2
votes
0 answers

android package is not debuggable error Android Studio NDK

I KNOW I have a debuggable APK and I am running it on the phone based on the following output showing the file being pushed to my phone: sansari@ubuntu:~/AndroidStudioProjects/Usetbt/app$ ls app.iml build build.gradle libs proguard-rules.pro …
user3326293
  • 737
  • 12
  • 33
1
2 3