summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkParsing.cpp
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2025-01-13 13:38:52 -0800
committer Elliott Hughes <enh@google.com> 2025-01-15 07:42:12 -0800
commitac794475e2d6897405d8b26ac57c8724c874855f (patch)
tree4be78ad777f135cc1501f50c3f9fc491627cd216 /libs/androidfw/ApkParsing.cpp
parent22d1c0bf1a7dcd5d1d5214d30c3a3172f10d8cd1 (diff)
Remove special case for libs when debuggable="true".
This causes confusion, is hard to debug (because the debuggable="true" behavior is more lenient), and doesn't have any obvious value (since it's trivially worked around by renaming "executable" to "libexecutable.so" anyway). Flag: EXEMPT bugfix Bug: https://issuetracker.google.com/160129591 Change-Id: I6a27a5b13df7bdc3fd3f76d8c8682867afded624
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
-rw-r--r--libs/androidfw/ApkParsing.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/libs/androidfw/ApkParsing.cpp b/libs/androidfw/ApkParsing.cpp
index 7eedfdb5c921..b80c8755f23e 100644
--- a/libs/androidfw/ApkParsing.cpp
+++ b/libs/androidfw/ApkParsing.cpp
@@ -33,7 +33,7 @@ const size_t LIB_SUFFIX_LEN = LIB_SUFFIX.size();
static const std::array<std::string_view, 2> abis = {"arm64-v8a", "x86_64"};
namespace android::util {
-const char* ValidLibraryPathLastSlash(const char* fileName, bool suppress64Bit, bool debuggable) {
+const char* ValidLibraryPathLastSlash(const char* fileName, bool suppress64Bit) {
// Make sure the filename is at least to the minimum library name size.
const size_t fileNameLen = strlen(fileName);
static const size_t minLength = APK_LIB_LEN + 2 + LIB_PREFIX_LEN + 1 + LIB_SUFFIX_LEN;
@@ -66,14 +66,6 @@ const char* ValidLibraryPathLastSlash(const char* fileName, bool suppress64Bit,
return nullptr;
}
- if (!debuggable) {
- // Make sure the filename starts with lib and ends with ".so".
- if (strncmp(fileName + fileNameLen - LIB_SUFFIX_LEN, LIB_SUFFIX.data(), LIB_SUFFIX_LEN) != 0
- || strncmp(lastSlash, LIB_PREFIX.data(), LIB_PREFIX_LEN) != 0) {
- return nullptr;
- }
- }
-
// Don't include 64 bit versions if they are suppressed
if (suppress64Bit && std::find(abis.begin(), abis.end(), std::string_view(
fileName + APK_LIB_LEN, lastSlash - fileName - APK_LIB_LEN)) != abis.end()) {