From b2ef4884e03e984fa68a19e29a3651a7c59cb71b Mon Sep 17 00:00:00 2001 From: Cody Northrop Date: Tue, 28 May 2019 14:07:11 -0600 Subject: [PATCH] android: Remove android:process from GetExecutableFilename In Android Q, apps that use android:process will have a colon and text in the result of cmdline, breaking the intent of the function. https://developer.android.com/guide/topics/manifest/service-element#proc --- renderdoc/os/posix/android/android_stringio.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renderdoc/os/posix/android/android_stringio.cpp b/renderdoc/os/posix/android/android_stringio.cpp index 17c92e2a5..e85351387 100644 --- a/renderdoc/os/posix/android/android_stringio.cpp +++ b/renderdoc/os/posix/android/android_stringio.cpp @@ -90,7 +90,10 @@ void GetExecutableFilename(std::string &selfName) return; } - selfName = buf; + // Strip any process name from cmdline (android:process) + std::string cmdline = buf; + std::string filename = cmdline.substr(0, cmdline.find(":")); + selfName = filename; } void GetLibraryFilename(std::string &selfName)