Skip to content

Commit

Permalink
Check --xposedversion before setting ADDR_COMPAT_LAYOUT
Browse files Browse the repository at this point in the history
Otherwise this parameter might not work if the file is not stored
as /system/bin/app_process. This also means that we trust ourself
not to do those bad things which the workaround is needed for.
  • Loading branch information
rovo89 committed Aug 26, 2013
1 parent 90e4924 commit 8e82e7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ static void setArgv0(const char *argv0, const char *newArgv0)

int main(int argc, char* const argv[])
{
if (argc == 2 && strcmp(argv[1], "--xposedversion") == 0) {
printf("Xposed version: " XPOSED_VERSION "\n");
return 0;
}

#if PLATFORM_SDK_VERSION >= 18
#ifdef __arm__
/*
Expand Down Expand Up @@ -174,11 +179,6 @@ int main(int argc, char* const argv[])
#endif
#endif

if (argc == 2 && strcmp(argv[1], "--xposedversion") == 0) {
printf("Xposed version: " XPOSED_VERSION "\n");
return 0;
}

// These are global variables in ProcessState.cpp
mArgC = argc;
mArgV = argv;
Expand Down

0 comments on commit 8e82e7d

Please sign in to comment.