现在的位置: 首页 > 综合 > 正文

在android上开启root权限临时解决方法

2013年07月20日 ⁄ 综合 ⁄ 共 436字 ⁄ 字号 评论关闭

需要调整su程序,休眠system/extra/su/su.c,注释掉限制rootshell的限制:

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

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

     //   return 1; 注释掉这句话。 

   }

然后chmod 24xxx /system/xbin/su ,开启suid权限(xxx根据需要调整)。

检查init.rc确保su放置的文件系统挂接时候没有nosuid这样的代码:

mount ext3 mtd@system /system nosuid nodev noatime nodiratime ,需把nosuid去掉。

mount ext3 mtd@system /system suid noatime nodiratime

这样root就被开放了,当然上面改动造成了安全漏洞是肯定的。

抱歉!评论已关闭.