您的位置:首页 > 移动开发 > Android开发

Android4.0 开放Root权限

2015-06-03 09:58 169 查看
system/extras/su/

1>Android.mk:

添加: ifeq ($(strip $(TARGET_OPEN_ROOT)),true)

LOCAL_CFLAGS += -DOPEN_ROOT=1

endif

2>su.c:

/* Until we have something better, only root and the shell can use su. */

myuid = getuid();

#if OPEN_ROOT

#else

if (myuid != AID_ROOT && myuid != AID_SHELL) {

fprintf(stderr,"su: uid %d not allowed to su\n", myuid);

return 1;

}

#endif

3>init.rc:

chown root root /system/xbin/su

chmod 4755 /system/xbin/su

4>删除busybox里面的su
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: