需要调整su程序,休眠system/extra/su/su.c,注释掉限制root和shell的限制: 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就被开放了,当然上面改动造成了安全漏洞是肯定的。 |
|