|
关于5.1系统如何ROOT(免授权)
发表于 2016-6-23 14:39:16
浏览:118952
|
回复:61
打印
只看该作者
[复制链接]
楼主
本帖最后由 风之空响 于 2016-6-23 14:42 编辑
1.删除system/extras/su/Android.mk 屏蔽系统su编译
2.使用PRODUCT_COPY_FILES拷贝附件的su到out/../system/xbin/目录下
例 PRODUCT_COPY_FILES +=$(CUR_PATH)/su:system/xbin/su
3.如下添加对应的代码到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
4.修改
+++ 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" },
5.编译后烧写固件,如无法获取root,请查看ls -l system/xbin/su 的权限是否为6755
默认root权限.rar
(51.69 KB, 下载次数: 583)
这里说明的时免授权的root,如需要授权root可以使用superuser的su,细节稍微有点区别,我会再发帖说明了
|
|