Failed to attach: Failed to start debug server on device

It has been a while since I last attempted to use the Tegra Debugger in Visual Studio. However, I’m re-evaluating its usefulness so I’m once again attempting to “Debug an Existing APK” as specified here: http://docs.nvidia.com/tegra/Content/Nsight_Tegra_Debugging.html.

I have replaced my device drivers with the one provided in the TDK, and also bundled the included gdbserver in my application. However, when attempting to debug the app on my Nexus 7, I get the error, “Failed to attach: Failed to start debug server on device: run-as: Package ‘com.ea.samplegame’ is unknown.”

Interestingly, using the same project on my Samsung Galaxy S3 I9300 yields much better results (everything succeeds), but I’m greeted with a License Error, “NVIDIA Nsight Tegra, Visual Studio Edition is not inteded to run on a non-NVIDIA hardware. Please visit Mentor Embedded … to request support for you hardware.” For the sake of completeness, I have already submitted a request.

I’ve been informed that this is due to my device running 4.3. I will downgrade and update this thread with info.

Downgrading to 4.2.2 resolved this problem, though another issue cropped up. I will start a new topic for the sake of clarity.

Hello,

The issue with the run-as is a Google’s bug, here’s the link: https://code.google.com/p/android/issues/detail?id=58373

wexler tab 7t 4.2.2 (2.0.2) Tegra 3

install : tadp-2.0-r7-windows.exe
VS 2010
win7 64

Open exsist progect “native_basic” or … (NVPACK\TDK_Samples\tegra_android_native_samples_v10p14)

When run or attempting to debug the app, I get the error, “Failed to attach: Failed to start debug server on device: run-as: Package ‘com.nvidia.devtech.NativeBasic’ is unknown.”

Device API level: 17
Android: Setting ports…
Android: Starting GDB server on device…

what did I do wrong ?

Hi OlegDX,

The error message suggests that your device has the same issues as the official Android 4.3. Have you tried debugging via ndk-gdb or manually or running anything via run-as command - did that work for you? Vendors often apply various patches to the Android branch and that might have broken the debugging (or run-as, more specifically) for you.