mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add check for Android Version
We need to check the android version running on the device to know whether or not we need to make the adb install command use the --force-queryable flag Devices running Android R/11/SDK 30 are ones which support this flag
This commit is contained in:
committed by
Baldur Karlsson
parent
050e9e1bba
commit
d9915388c7
@@ -413,8 +413,20 @@ ReplayStatus InstallRenderDocServer(const rdcstr &deviceID)
|
||||
"%s missing - ensure you build all ABIs your device can support for full compatibility",
|
||||
apk.c_str());
|
||||
|
||||
Process::ProcessResult adbInstall =
|
||||
adbExecCommand(deviceID, "install -r -g --force-queryable \"" + apk + "\"");
|
||||
rdcstr api =
|
||||
Android::adbExecCommand(deviceID, "shell getprop ro.build.version.sdk").strStdout.trimmed();
|
||||
|
||||
int apiVersion = atoi(api.c_str());
|
||||
|
||||
Process::ProcessResult adbInstall;
|
||||
if(apiVersion >= 30)
|
||||
{
|
||||
adbInstall = adbExecCommand(deviceID, "install -r -g --force-queryable \"" + apk + "\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
adbInstall = adbExecCommand(deviceID, "install -r -g \"" + apk + "\"");
|
||||
}
|
||||
|
||||
RDCLOG("Installed package '%s', checking for success...", apk.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user