Push settings file to android devices

* This allows settings to be used to control debug logging on android as well.
This commit is contained in:
baldurk
2020-04-03 15:07:13 +01:00
parent 445c54f967
commit 8d6615697b
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -1071,6 +1071,7 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const char *a, const char *w
// if in VR mode, enable frame delimiter markers
Android::adbExecCommand(m_deviceID, "shell setprop debug.vr.profiler 1");
// create the data directory we will use for storing, in case the application doesn't
// NOTE: if processName != packageName, process may not be able to write to this directory
// unless
@@ -1079,12 +1080,18 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const char *a, const char *w
// has the permissions set correctly, and we don't have a convenient way to get the package name
// from native code.
Android::adbExecCommand(m_deviceID, "shell mkdir -p /sdcard/Android/data/" + processName);
Android::adbExecCommand(m_deviceID,
"shell mkdir -p /sdcard/Android/data/" + processName + "/files");
// set our property with the capture options encoded, to be picked up by the library on the
// device
Android::adbExecCommand(m_deviceID,
StringFormat::Fmt("shell setprop debug.rdoc.RENDERDOC_CAPOPTS %s",
opts.EncodeAsString().c_str()));
// try to push our settings file into the appdata folder
Android::adbExecCommand(m_deviceID, "push \"" + FileIO::GetAppFolderFilename("renderdoc.conf") +
"\" /sdcard/Android/data/" + processName + "/files");
rdcstr installedPath = Android::GetPathForPackage(m_deviceID, packageName);
rdcstr RDCLib = Android::adbExecCommand(m_deviceID, "shell ls " + installedPath +
+2
View File
@@ -454,6 +454,8 @@ void RenderDoc::ProcessConfig()
{
rdcstr confFile = FileIO::GetAppFolderFilename("renderdoc.conf");
RDCLOG("Loading config from %s", confFile.c_str());
SDObject *loadedConfig = NULL;
{
StreamReader reader(FileIO::fopen(confFile.c_str(), "rb"));