Remove some android log spam while idle, promote debug print to error

This commit is contained in:
baldurk
2018-05-11 12:16:57 +01:00
parent 50dc1d6faa
commit 6a0aa28ea3
2 changed files with 10 additions and 8 deletions
+9 -7
View File
@@ -31,15 +31,17 @@
namespace Android
{
void adbForwardPorts(int index, const std::string &deviceID, uint16_t jdwpPort, int pid)
void adbForwardPorts(int index, const std::string &deviceID, uint16_t jdwpPort, int pid, bool silent)
{
const char *forwardCommand = "forward tcp:%i localabstract:renderdoc_%i";
int offs = RenderDoc_AndroidPortOffset * (index + 1);
adbExecCommand(deviceID, StringFormat::Fmt(forwardCommand, RenderDoc_RemoteServerPort + offs,
RenderDoc_RemoteServerPort));
RenderDoc_RemoteServerPort),
".", silent);
adbExecCommand(deviceID, StringFormat::Fmt(forwardCommand, RenderDoc_FirstTargetControlPort + offs,
RenderDoc_FirstTargetControlPort));
RenderDoc_FirstTargetControlPort),
".", silent);
if(jdwpPort && pid)
adbExecCommand(deviceID, StringFormat::Fmt("forward tcp:%hu jdwp:%i", jdwpPort, pid));
@@ -260,7 +262,7 @@ ExecuteResult StartAndroidPackageForCapture(const char *host, const char *packag
jdwpPort = 0;
}
adbForwardPorts(index, deviceID, jdwpPort, pid);
adbForwardPorts(index, deviceID, jdwpPort, pid, false);
// sleep a little to let the ports initialise
Threading::Sleep(500);
@@ -501,7 +503,7 @@ bool CheckAndroidServerVersion(const string &deviceID)
void ResetCaptureSettings(const std::string &deviceID)
{
Android::adbExecCommand(deviceID, "shell setprop debug.vulkan.layers :");
Android::adbExecCommand(deviceID, "shell setprop debug.vulkan.layers :", ".", true);
}
}; // namespace Android
@@ -549,7 +551,7 @@ extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_EnumerateAndroidDevices(rdc
ret += StringFormat::Fmt("adb:%d:%s", idx, tokens[0].c_str());
// Forward the ports so we can see if a remoteserver/captured app is already running.
Android::adbForwardPorts(idx, tokens[0], 0, 0);
Android::adbForwardPorts(idx, tokens[0], 0, 0, true);
idx++;
}
@@ -591,7 +593,7 @@ extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_StartAndroidRemoteServer(co
if(abis.empty())
return;
Android::adbForwardPorts(index, deviceID, 0, 0);
Android::adbForwardPorts(index, deviceID, 0, 0, false);
Android::ResetCaptureSettings(deviceID);
// launch the first ABI, as the default 'most compatible' package
+1 -1
View File
@@ -681,7 +681,7 @@ void PosixHookApply()
if(success)
HOOK_DEBUG_PRINT("Hooked successfully, trampoline is %p", trampoline);
else
HOOK_DEBUG_PRINT("Failed to hook!");
RDCERR("Failed to hook %s::%s!", lib.c_str(), hook.first.c_str());
GetHookInfo().SetHooked(oldfunc);