MCPcopy Create free account
hub / github.com/baldurk/renderdoc / IsDebuggable

Function IsDebuggable

renderdoc/android/android_utils.cpp:311–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311bool IsDebuggable(const rdcstr &deviceID, const rdcstr &packageName)
312{
313 RDCLOG("Checking that APK is debuggable");
314
315 rdcstr info = adbExecCommand(deviceID, "shell dumpsys package " + packageName).strStdout;
316
317 rdcstr pkgFlags = GetFirstMatchingLine(info, "pkgFlags=[");
318
319 if(pkgFlags == "")
320 {
321 RDCERR("Couldn't get pkgFlags from adb");
322 return false;
323 }
324
325 return pkgFlags.contains("DEBUGGABLE");
326}
327
328// on android only when we hit this function we write a marker that isn't a standard log. The
329// purpose is to always try and have a unique message in the last N lines so that we can detect if

Callers 1

Calls 3

adbExecCommandFunction · 0.85
GetFirstMatchingLineFunction · 0.85
containsMethod · 0.45

Tested by

no test coverage detected