Init
This commit is contained in:
8
userspace/jni/Android.mk
Normal file
8
userspace/jni/Android.mk
Normal file
@@ -0,0 +1,8 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := su
|
||||
LOCAL_SRC_FILES := su.c
|
||||
LOCAL_LDFLAGS := -static
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
3
userspace/jni/Application.mk
Normal file
3
userspace/jni/Application.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
APP_ABI := arm64-v8a
|
||||
APP_PLATFORM := android-24
|
||||
APP_STL := c++_static
|
||||
10
userspace/jni/su.c
Normal file
10
userspace/jni/su.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
int main(){
|
||||
int32_t result = 0;
|
||||
prctl(0xdeadbeef, 0, 0, 0, &result);
|
||||
system("/system/bin/sh");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user