1. 系统源码下system/extras/su/su.c
屏蔽下面允许getuid()为AID_ROOT和AID_SHELL的进程可以使用su进行登陆
if (myuid != AID_ROOT && myuid != AID_SHELL) {
fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
return 1;
}
2. mm编译su
3. adb push su /system/xbin/
4. chomd 4755 /system/xbin/su
屏蔽下面允许getuid()为AID_ROOT和AID_SHELL的进程可以使用su进行登陆
if (myuid != AID_ROOT && myuid != AID_SHELL) {
fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
return 1;
}
2. mm编译su
3. adb push su /system/xbin/
4. chomd 4755 /system/xbin/su