当前位置:   article > 正文

rk3288 Android 5.1root方法_anroid5.1 怎么root

anroid5.1 怎么root


1.替换附带的su(5.1)

 修改 system/extras/su/su.c 源码

 注释掉下面的代码

/*    if (myuid != AID_ROOT && myuid != AID_SHELL) {
        fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
        return 1;
    }*/


2.如下添加对应的代码到init.rk30board.rc
diff --git a/device/rockchip/common/init.rk30board.rc b/device/rockchip/common/init.rk30board.rc
index 8a44718..db978a0 100644
--- a/device/rockchip/common/init.rk30board.rc
+++ b/device/rockchip/common/init.rk30board.rc
@@ -164,3 +164,8 @@ on property:app.logsave.start=1
 
 on property:app.logsave.start=0
     stop catlog
+
+
+service daemonsu /system/xbin/su --daemon
+    class main
+    oneshot
3.修改
+++ b/system/core/include/private/android_filesystem_config.h
@@ -245,7 +245,7 @@ static const struct fs_path_config android_files[] = {
 
     /* the following five files are INTENTIONALLY set-uid, but they
      * are NOT included on user builds. */
-    { 04750, AID_ROOT,      AID_SHELL,     0, "system/xbin/su" },
+    { 06755, AID_ROOT,      AID_ROOT,     0, "system/xbin/su" },




4.编译后烧写固件,如无法获取root,请查看ls -l system/xbin/su 的权限是否为6755

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/134511
推荐阅读
相关标签
  

闽ICP备14008679号