Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Commit

Permalink
fix bionic problem
Browse files Browse the repository at this point in the history
  • Loading branch information
hyln9 committed Jan 27, 2017
1 parent b6cf9b6 commit 27cf5b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CFLAGS := -Os -Wall
LDFLAGS := -pthread -static -s -Wall
CC := gcc
AS := as
OC := objcopy
CFLAGS := -Os -fPIE -Wall
LDFLAGS := -pthread -s -pie -Wall
CC := aarch64-linux-android-gcc
AS := aarch64-linux-android-as
OC := aarch64-linux-android-objcopy

debug: CFLAGS += -DDBG
debug: all
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ By "SELinux bypass" I mean the payload will run in init domian even if SELinux i

## Building

Pre-built binaries are available on the release page. Otherwise, just run `make` in a native aarch64 debian. Currently it won't work if built with NDK.
Pre-built binaries are available on the release page. Otherwise, just add NDK standalone toolchain into PATH and run `make`.

## Usage

Expand All @@ -38,9 +38,9 @@ You may run it through an adb shell (place it under /data/local/tmp) and get a r

- scumjr for the vDSO patching method.
- Tzul for helping me debug the sepolicy problem.
- RenaKunisaki for making it work with bionic.

## TODO

- Turn it into a SuperSU installer.
- Enrich the kernel database for x86 support and so on.
- Test it on Android 7 Nougat (help wanted!).
3 changes: 2 additions & 1 deletion exploit.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <arpa/inet.h>
#include <sys/ptrace.h>
#include <sys/socket.h>
#include <sys/syscall.h>

#include "payload.h"

Expand Down Expand Up @@ -135,7 +136,7 @@ debuggee(void *arg_)

CHECKSYSCALL(ptrace(PTRACE_TRACEME, 0, NULL, NULL), "ptrace");

kill(getpid(), SIGSTOP);
kill(syscall(SYS_getpid), SIGSTOP);

return 0;
}
Expand Down

0 comments on commit 27cf5b6

Please sign in to comment.