Tegra Tools 3.0r4 and debugging on Windows

Hey guys,

Have anybody tried to use Tegra Tools 3.0r4 on Windows, instead of the recommended 2.0r8? While in general 3.0r4 works (building, deploying, running), I can’t make it work for debugging in Visual Studio 2013. It can’t run gdbserver on the device (Note4, 4.4.4). Looking at the log (%USER%\AppData\Roaming\NVIDIA Corporation\Nsight Tegra\Logs\Nsight Tegra.log), I see the following:



2015-01-18 04:25:59.9222|WARN|Nvidia.PentaK.Debug.Interop.Gdb.GdbServer|Failed: run-as: exec failed for /data/local/tmp/gdbserver Error:Permission denied
2015-01-18 04:25:59.9222|INFO|Nvidia.PentaK.Core.RedirProcess|217-launch: C:\NVPACK\android-sdk-windows\platform-tools\adb.exe "-s 8d7864fa shell cat /data/local/tmp/gdbserver | run-as com.epicgames.VehicleGearVR sh -c 'cat > /data/data/com.epicgames.VehicleGearVR/gdbserver'"
2015-01-18 04:26:09.9278|INFO|Nvidia.PentaK.Core.RedirProcess|217-timeout: was running for 10016 ms
2015-01-18 04:26:09.9278|INFO|Nvidia.PentaK.AndroidPackage|[AndroidPackage] Mode changed to DBGMODE_Design
2015-01-18 04:26:13.6957|INFO|Nvidia.PentaK.Core.RedirProcess|217-stderr:

2015-01-18 04:26:13.6957|INFO|Nvidia.PentaK.Core.RedirProcess|217-stdout:
/system/bin/sh: can't create /data/data/com.epicgames.VehicleGearVR/gdbserver': Permission denied
/system/bin/sh: cat: <stdout>: Broken pipe


/data/data directory has the owner ‘system’ and can’t be accessed via ‘adb shell’. The phone (GearVR’s Note4) is not rooted, so I can’t even use ‘su’. Any ideas?

This is what I see in the Debug Output of VS:



Device API level: 19.
Android: Pulling system/lib64/...
Android: Pulling system/vendor/lib64/...
Android: Pulling system/bin/app_process32...
Android: Pulling system/bin/app_process64...
Android: Pulling system/bin/linker64...
Android: Pulling system/lib64/libc.so...
Android: Setting ports...
Android: Starting GDB server on device...


More info
I tried Samsung S5 and it worked, on the same PC with the same 3.0r4 Tegra tools. The difference: Note4 tries to access /data/data/com.epicgames.VehicleGearVR/gdbserver, it fails and it stops there. On S5 it also tries /data/data/com.epicgames.VehicleGearVR/lib/gdbserver and it works. I checked, Note 4 also has the gdbserver in the /data/data/com.epicgames.VehicleGearVR/lib dir, but why it doesn’t try it?

Answering my own question. I contacted NVidia via their forum (https://devtalk.nvidia.com/default/topic/798300/nsight-tegra-visual-studio-edition/debugging-unreal-engine-4-on-android/post/4426423/#4426423) and Dmitry Polyanitsa was very kind and provided me with updated beta version of Nsight Tegra 2.0 rev 15021. This one doesn’t have the issue with starting GDB server and it works like a charm. Not sure yet when it is gonna be public, though.

Hi Art_Oculus,

I would really appreciate a list of steps to successfully debugging an android application using Nsight Tegra.

I never used Tegra to debug any android app. I used it only to debug UE4 on Android. And the process of setting up Tegra tools for UE4 is described in UE4 docs pretty well.