This commit is contained in:
2023-05-13 13:14:30 +08:00
parent 896214d2b7
commit 31aeb66cd4
60 changed files with 4904 additions and 54 deletions

View File

@@ -0,0 +1,13 @@
#include <iostream>
using namespace std;
int main(){
// 检查是否是 root 用户
if(system("[[ `whoami` == root ]]")){
cout << "这不是 root 账户,失败!";
return 1;
}
system("modprobe binder_linux");
system("mkdir /dev/binderfs");
system("mount -t binder binder /dev/binderfs");
return 0;
}

View File

@@ -0,0 +1,13 @@
#!/bin/bash
if [[ `whoami` != root ]]; then
echo 这不是 root 用户,结束
exit 1
fi
if [ -d /dev/binderfs ]; then
echo 已启动 binderend
exit
fi
modprobe binder_linux
modprobe ashmem_linux
mkdir /dev/binderfs
mount -t binder binder /dev/binderfs