diff options
| author | 2013-04-25 22:08:20 +0000 | |
|---|---|---|
| committer | 2013-04-25 22:08:20 +0000 | |
| commit | e00a3b80635c830dc57510556231cc40db6651f5 (patch) | |
| tree | 381d9c29cf85bdeb62ecb9847fd8549dd7bf09b1 | |
| parent | c38bc5ab6b55804c7a8d440cf2bf249baa2efc98 (diff) | |
| parent | 68a032936e5922ddda271c751400b64712f8f03b (diff) | |
Merge "Don't set ADDR_COMPAT_LAYOUT on the emulator" into jb-mr2-dev
| -rw-r--r-- | cmds/app_process/app_main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 90bcb0fbdd23..28752a5315ad 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -7,6 +7,7 @@ #define LOG_TAG "appproc" +#include <cutils/properties.h> #include <binder/IPCThreadState.h> #include <binder/ProcessState.h> #include <utils/Log.h> @@ -148,7 +149,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); |