From fc17dc2548234461eb43ff83539ede4c9893a825 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Tue, 23 Apr 2013 15:30:45 -0700 Subject: Don't set ADDR_COMPAT_LAYOUT on the emulator Don't work around third party app bugs on the emulator. Change-Id: I4440fcd56b72e3a74881ddec2a469f037a060525 --- cmds/app_process/app_main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmds/app_process') diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 0668be6..6f37180 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -7,6 +7,7 @@ #define LOG_TAG "appproc" +#include #include #include #include @@ -144,7 +145,10 @@ int main(int argc, char* const argv[]) * This breaks some programs which improperly embed * an out of date copy of Android's linker. */ - if (getenv("NO_ADDR_COMPAT_LAYOUT_FIXUP") == NULL) { + char value[PROPERTY_VALUE_MAX]; + property_get("ro.kernel.qemu", value, ""); + bool is_qemu = (strcmp(value, "1") == 0); + if ((getenv("NO_ADDR_COMPAT_LAYOUT_FIXUP") == NULL) && !is_qemu) { int current = personality(0xFFFFFFFF); if ((current & ADDR_COMPAT_LAYOUT) == 0) { personality(current | ADDR_COMPAT_LAYOUT); -- cgit v1.1