From 96e93294fac2905910a1549a9cfb7078c175c34a Mon Sep 17 00:00:00 2001 From: Cody Northrop Date: Mon, 18 Sep 2017 23:45:04 -0600 Subject: [PATCH] android: Update layer push to support 64-bit The path we were using doesn't exist for arm64. The new path should work for all ABIs. --- renderdoc/core/android.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/renderdoc/core/android.cpp b/renderdoc/core/android.cpp index 4acbe7171..169434973 100644 --- a/renderdoc/core/android.cpp +++ b/renderdoc/core/android.cpp @@ -968,8 +968,16 @@ extern "C" RENDERDOC_API bool RENDERDOC_CC RENDERDOC_PushLayerToInstalledAndroid if(layerPath.empty()) return false; - string layerDst = "/data/data/" + packageName + "/lib/"; + // Determine where to push the layer + string pkgPath = trim(adbExecCommand(deviceID, "shell pm path " + packageName).strStdout); + // Isolate the app's lib dir + pkgPath.erase(pkgPath.begin(), pkgPath.begin() + strlen("package:")); + string libDir = removeFromEnd(pkgPath, "base.apk") + "lib/"; + + // There will only be one ABI in the lib dir + string libsAbi = trim(adbExecCommand(deviceID, "shell ls " + libDir).strStdout); + string layerDst = libDir + libsAbi + "/"; result = adbExecCommand(deviceID, "push " + layerPath + " " + layerDst); // Ensure the push succeeded