userspace/su: implement basic features (#62)

This commit is contained in:
Scirese
2023-01-14 22:42:45 +08:00
committed by GitHub
parent 0b86cd69fc
commit 8274f6a1ff
3 changed files with 118 additions and 4 deletions

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;
}