Handle failed APK installation and patching

If "adb install" command is used with "-g" flag, we may get java.lang.SecurityException on some devices because granting runtime permissions at installation time is only allowed for system apps (however we can enable it in the device's Developer options menu).
Also, pulling APK from /data/app/ may be restricted. We can workaround by copying the APK to a directory which we can access then try to pull the APK from there.
This commit is contained in:
tabi.katalin
2018-10-15 17:09:16 +02:00
committed by Baldur Karlsson
parent 691c115946
commit 6c39b58d0b
9 changed files with 119 additions and 21 deletions
+7 -3
View File
@@ -105,19 +105,23 @@ void RemoteHost::CheckStatus()
QThread::msleep(15);
}
void RemoteHost::Launch()
ReplayStatus RemoteHost::Launch()
{
ReplayStatus status = ReplayStatus::Succeeded;
int WAIT_TIME = 2000;
if(IsADB())
{
RENDERDOC_StartAndroidRemoteServer(hostname.c_str());
status = RENDERDOC_StartAndroidRemoteServer(hostname.c_str());
QThread::msleep(WAIT_TIME);
return;
return status;
}
RDProcess process;
process.start(runCommand);
process.waitForFinished(WAIT_TIME);
process.detach();
return status;
}