Skip to content

Commit

Permalink
Merge Marshmallow changes to app_process
Browse files Browse the repository at this point in the history
- Add mips64 support to app_process.
- app_main missing include for sys/stat.h
- Better systrace slices for application startup.

Not merged yet:
- Frameworks/base: Turn on -Wall -Werror in cmds
  (requires corrections in many Xposed-specific places)
  • Loading branch information
rovo89 committed Nov 11, 2015
1 parent f1aba39 commit 1ace35e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions app_main2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

#define LOG_TAG "appproc"

#include <stdio.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <unistd.h>

#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <utils/Log.h>
Expand All @@ -17,11 +23,6 @@
#include <android_runtime/AndroidRuntime.h>
#include <private/android_filesystem_config.h> // for AID_SYSTEM

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/prctl.h>

#include "xposed.h"
#include <dlfcn.h>

Expand Down Expand Up @@ -100,8 +101,10 @@ class AppRuntime : public AndroidRuntime

virtual void onZygoteInit()
{
#if PLATFORM_SDK_VERSION <= 22
// Re-enable tracing now that we're no longer in Zygote.
atrace_set_tracing_enabled(true);
#endif

sp<ProcessState> proc = ProcessState::self();
ALOGV("App process: starting thread pool.\n");
Expand Down Expand Up @@ -157,8 +160,10 @@ static void maybeCreateDalvikCache() {
static const char kInstructionSet[] = "arm";
#elif defined(__i386__)
static const char kInstructionSet[] = "x86";
#elif defined (__mips__)
#elif defined (__mips__) && !defined(__LP64__)
static const char kInstructionSet[] = "mips";
#elif defined (__mips__) && defined(__LP64__)
static const char kInstructionSet[] = "mips64";
#else
#error "Unknown instruction set"
#endif
Expand Down

0 comments on commit 1ace35e

Please sign in to comment.