| 309 | } |
| 310 | |
| 311 | bool 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 |
no test coverage detected