TGD on a rooted device (shell id = 0) crashes the process when trying to inject debugger

I’ve been using TGD with debuggable apps for a while, but I also want to profile non-debuggable builds. As I’ve searched this forum, it turned out that TGD checks for the “rooted” device by checking “adb root, adb shell id” so I have spent quite some time on making it work (and it finally does).
However, TGD still can’t launch the process as it fails at start (apps just crash)

Starting ADB server, please wait...
Scanning for devices...
Device Product Model: SHIELD Tablet
Detected current device is running Android N
Located 32-bit driver libraries in /vendor/lib/egl/
Waiting for the device to become available
Checking If adbd has root permission
Waiting for the device to become available.
Rooted device
Setting SELinux policy to permissive.
SELinux policy successfully changed to permissive.
Querying instrumentation property.
Checking debugger status...
Host supports 32-bit graphics debugging
Graphics debugger is enabled.
Scan for devices complete.
ABI: armeabi-v7a
Unsetting property
Launching com.myAwesomeAppBundleIdHere/LaunchActivity
Scanning process...
Injecting debugger...
Debugger injection failed
Can't find process

As you can see, it sees the device as rooted, tries to launch some app, but it crashes instantly and TGD can’t find the process anymore (I have replaced bundle id and activity name)

Hi cyrilltoboe,

Is your device rooted? If not, even TGD sees the device as rooted, it will not be able to debug non-debuggable app.

Oooh I see now.
Yes, it’s rooted and I have spent quite some time to root it and to also appear as rooted to TGD (with that adb root thingy)
I have misunderstood your previous answer:

I thought that it meant that in order to profile a non-debuggable app the device must be rooted.

codym_nv can you please specify why would we possibly need to root our Shield Tablets for?

It’s mainly for permission reason.
On a non-root device, we cannot debug a non-debuggable apk, because android system security doesn’t allow it. To debug an app, we will launch it with -D argument, but on non-debuggable apk and on non-rooted device, it’s not allowed by the system.

Thanks for your time answering these questions!

I confirm that the device is rooted and I can launch any APK with -D argument via ADB, and apps launch saying that they are waiting for the debugger.

If I do the same thing via TGD, it launches with the same message, but instantly crashes (most likely due to some internal debugging stuff) so TGD says that it can’t find the process anymore (because it has just crashed)
If I launch it with -D manually and then go to the “Attach” menu of TGD, it says that it can’t find any suitable process to attach to.

So the setup is:

  1. Rooted device
  2. TGD sees it as rooted
  3. I can launch any app with -D argument (it launches and waits for the debugger)
  4. When I “Launch” my target app via TGD, it launches with -D but instantly crashes

Here are some adb log messages right after crash:

WindowManager: Failed looking up window
WindowManager: java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W@dc9cda9 does not exist
WindowManager:         at
WindowManager:         at
WindowManager:         at
WindowManager:         at
WindowManager:         at android.view.ViewRootImpl.dispatchDetachedFromWindow(
WindowManager:         at android.view.ViewRootImpl.doDie(
WindowManager:         at android.view.ViewRootImpl$ViewRootHandler.handleMessage(
WindowManager:         at android.os.Handler.dispatchMessage(
WindowManager:         at android.os.Looper.loop(
WindowManager:         at
WindowManager:         at

Hi cyrilltoboe,

Could you please share more information?

  • Android OS version, build
  • TGD version
  • How did you root the OS?

Could you also share us the app? or any other app with the same issue.

  • Android 7.0, build NRD90M.1928188_1006.1489, Shield software version - 5.3 (24.29.404.182)
  • TGD version - 2.6.23382753
  • nvidiashieldzone method (the one for original Shield Tablet, not Shield K1 as I have the original tablet)

test apk (really bare minimum setup, but reproduces this issue) -

Thank you

I have the same issue. BTW, nsight for vs also can not debug, it crashes. But we can deploy and install the app, and see android logs via adb

It is working on other phones. it is only not working on my Huawei mate 10 pro running Android 8.

Thanks for the info. But only userdebug OS image is officially supported. Other methods of rooting device is not guaranteed to work with TGD.

Hi lixizhi,

Could you please provide more information?

  • TGD version
  • how did you root the device?
  • what are the detailed steps to reproduce the crash?