一肩月光 发表于 2018-8-26 20:19

B860AV1.1-T优化第二弹:获取 root 权限

▌ B860AV1.1-T 优化第二弹:获取 root 权限

以前也刷手机,却不懂 root 什么意思。现在大概有点了解,root 是 Linux/Unix 系统管理员账户,我们所说的 root 即获得管理员权限,并能够给程序赋予管理员权限运行的权限,如此一来有些安全敏感操作,才能得以执行。

su 是 Switch User 的缩写,Linux 系统中,运行这个命令就能切换到 root 账户,故 root 的关键就是能够运行 su 切换到管理员账户,并且管理好让哪些程序能够执行这个 su 程序,SuperSU 这软件大概就是管理 su 权限的。

本篇文章在「B860AV1.1-T 优化第一弹:获取 adb 权限」基础上操作。



▌ 一、下载 root 所需文件

感谢作者 Geekman 文章:原创教程 中兴ZXV10 B860AV2.1 Root,电视盒子通用Root方法

地址:www.znds.com/forum.php?mod=viewthread&tid=630892&page=1

我直接将文件搬运过来了,省的大家跑。

附件:

▌ 二、上传文件

看过上篇文章,相信您已经会用 ADB 连接上电视盒子了。
adb connect 192.168.50.83 # 连接 IP 为 192.168.50.83 的电视盒子
mount -o remount,rw /system # 挂载 /system 为可读写

我们将 SuperSU.zip 解压到本地,假设文件路径为 ~/Downloads/SuperSU/ 执行命令上传
adb push ~/Downloads/SuperSU/su /system/bin/
adb push ~/Downloads/SuperSU/su /system/xbin/
adb push ~/Downloads/SuperSU/supolicy /system/bin/
adb push ~/Downloads/SuperSU/supolicy /system/xbin/
adb push ~/Downloads/SuperSU/chattr /system/bin/
adb push ~/Downloads/SuperSU/chattr /system/xbin/
adb push ~/Downloads/SuperSU/suinit /system/bin/
adb push ~/Downloads/SuperSU/suinit /system/xbin/
adb push ~/Downloads/SuperSU/sukernel /system/bin/
adb push ~/Downloads/SuperSU/sukernel /system/xbin/
adb push ~/Downloads/SuperSU/daemonsu /system/bin/
adb push ~/Downloads/SuperSU/daemonsu /system/xbin/
adb push ~/Downloads/SuperSU/libsupol.so /system/lib/

adb install ~/Downloads/SuperSU/Superuser.apk # 安装 Superuser 软件


▌ 三、设置文件权限

输入 adb shell 进入盒子 bash 环境。
执行赋权命令,chmod 部分整个复制粘贴就好了,最后回车一下。
adb shell

# 以下在盒子 bash 环境执行
chmod 4755 /system/bin/su
chmod 4755 /system/xbin/su
chmod 4755 /system/bin/supolicy
chmod 4755 /system/xbin/supolicy
chmod 4755 /system/bin/chattr
chmod 4755 /system/xbin/chattr
chmod 4755 /system/bin/suinit
chmod 4755 /system/xbin/suinit
chmod 4755 /system/bin/sukernel
chmod 4755 /system/xbin/sukernel
chmod 4755 /system/bin/daemonsu
chmod 4755 /system/xbin/daemonsu
chmod 0644 /system/lib/libsupol.so


▌ 四、配置开机启动

root 权限需要 /system/xbin/daemonsu 文件保持运行,在盒子 /system/bin/init.zte.post_boot.sh 文件添加命令,令其开机时自启。
# 在机顶盒 bash 环境下执行
echo "/system/xbin/daemonsu --auto-daemon &" >> /system/bin/init.zte.post_boot.sh

/system/xbin/daemonsu --auto-daemon & # 可先执行一次,然后去电视上直接打开 Superuser,省的重启

电视上,打开 Superuser 软件就能,选择 Normal 模式,就完成了。



End

arielzou 发表于 2018-9-1 16:55

请问 mount -o remount,rw /system 这条命令在win7系统下怎么用。。。总是提示 mount不是内部或外部命令,也不是可运行的程序或批量处理文件。。。

fzxj520 发表于 2018-10-20 19:08

jianggs 发表于 2018-10-19 11:38
我的也是你的情况,福建电信的盒子

什么都不懂 我还是搞出来了 不要拷贝这个 chattr就不会影响有线 {znds1}
另可参考([教程]手动更新 SuperSU 二进制文件)

一肩月光 发表于 2018-9-4 00:00

hasayakey 发表于 2018-9-2 10:44
mount -o remount,rw /system这一步就需要root权限。。。玩蛇

adb 本身就由 root 权限啊,这个只是安装 SU 让软件也能拿到 Root 权限。

libaizibubai 发表于 2018-8-26 20:20

第二弹了,必须支持一波!

一肩月光 发表于 2018-8-26 20:29

libaizibubai 发表于 2018-8-26 20:20
第二弹了,必须支持一波!

感谢版主捧场啊~~~{:121:}

jmpengbo 发表于 2018-8-26 21:00

老铁666!必须支持一波!

shiqixiaoma 发表于 2018-8-27 09:11

支持一下!

fljd 发表于 2018-8-29 15:31

高手在当贝啊!学习了

qinjunjiex 发表于 2018-9-1 12:18

有没有视频啊

qinjunjiex 发表于 2018-9-1 12:35

使用不了!!!

hasayakey 发表于 2018-9-2 10:44

mount -o remount,rw /system这一步就需要root权限。。。玩蛇
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: B860AV1.1-T优化第二弹:获取 root 权限