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

Function RENDERDOC_CheckAndroidPackage

renderdoc/android/android.cpp:1679–1705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1677DeviceProtocolRegistration androidProtocol("adb", &AndroidController::Get);
1678
1679extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_CheckAndroidPackage(
1680 const rdcstr &URL, const rdcstr &packageAndActivity, AndroidFlags *flags)
1681{
1682 IDeviceProtocolHandler *adb = RenderDoc::Inst().GetDeviceProtocol("adb");
1683
1684 rdcstr deviceID = adb->GetDeviceID(URL);
1685
1686 // Reset the flags each time we check
1687 *flags = AndroidFlags::NoFlags;
1688
1689 if(Android::IsDebuggable(deviceID, Android::GetPackageName(packageAndActivity)))
1690 {
1691 *flags |= AndroidFlags::Debuggable;
1692 }
1693 else
1694 {
1695 RDCLOG("%s is not debuggable", packageAndActivity.c_str());
1696 }
1697
1698 if(Android::HasRootAccess(deviceID))
1699 {
1700 RDCLOG("Root access detected");
1701 *flags |= AndroidFlags::RootAccess;
1702 }
1703
1704 return;
1705}

Callers 1

CheckAndroidSetupMethod · 0.85

Calls 6

IsDebuggableFunction · 0.85
GetPackageNameFunction · 0.85
HasRootAccessFunction · 0.85
GetDeviceProtocolMethod · 0.80
GetDeviceIDMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected