Repo created
This commit is contained in:
parent
0bf9b15769
commit
b7554a5383
363 changed files with 72328 additions and 0 deletions
2
userspace/su/.gitignore
vendored
Normal file
2
userspace/su/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/obj
|
||||
/libs
|
||||
6
userspace/su/jni/Android.mk
Normal file
6
userspace/su/jni/Android.mk
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := su
|
||||
LOCAL_SRC_FILES := su.c
|
||||
include $(BUILD_EXECUTABLE)
|
||||
3
userspace/su/jni/Application.mk
Normal file
3
userspace/su/jni/Application.mk
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
APP_ABI := arm64-v8a x86_64 armeabi-v7a
|
||||
APP_PLATFORM := android-24
|
||||
APP_STL := none
|
||||
11
userspace/su/jni/su.c
Normal file
11
userspace/su/jni/su.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
// This is a simple example. If you want a full-featured "su", please use "/data/adb/ksud debug su".
|
||||
int main(){
|
||||
int32_t result = 0;
|
||||
prctl(0xdeadbeef, 0, 0, 0, &result);
|
||||
system("/system/bin/sh");
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue