This commit is contained in:
tiann
2022-12-09 22:03:03 +08:00
parent fa71c6cfe1
commit 51c84400cf
76 changed files with 2579 additions and 0 deletions

8
userspace/jni/Android.mk Normal file
View 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)

View File

@@ -0,0 +1,3 @@
APP_ABI := arm64-v8a
APP_PLATFORM := android-24
APP_STL := c++_static

10
userspace/jni/su.c Normal file
View 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;
}