新增加载新版内核的binder功能
This commit is contained in:
parent
59e2ccfd63
commit
1d3ca4bf2d
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
if [[ `whoami` != root ]]; then
|
||||
echo 这不是 root 用户,结束
|
||||
exit 1
|
||||
modprobe binder_linux
|
||||
mkdir /dev/binderfs
|
||||
mount -t binder binder /dev/binderfs
|
Loading…
Reference in New Issue