我在Android设备上使用su,busybox。 但在做“su”时,似乎我没有root权限:
shell@nemo:/ $ su
1|shell@nemo:/ $
1|shell@nemo:/ $ whoami
shell
shell@nemo:/ $
EDIT1 :
似乎苏的特权是好的。请参阅下面的adb shell:shell @ nemo:/ system / xbin $ ls -al su -rwxr-xr-x root root 75364 2015-11-21 13:10
EDIT2 :
我已设置7777权限(suid),但仍然失败。
chmod 7777 su-arm
shell@nemo:/ $ ls -al /system/xbin/su-arm
-rwsrwsrwt root shell 467952 2016-11-20 12:01 su-arm
shell@nemo:/ $ su-arm
255|shell@nemo:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=u:r:shell:s0
shell@nemo:/ $whoami
shell
EDIT3: 我已经更新了su二进制文件和busybox二进制文件,但每个文件现在都有所不同:
shell@nemo:/ $ busybox su
su: unknown user root
1|shell@nemo:/ $ su
error: only position independent executables (PIE) are supported.
1|shell@nemo:/ $
我如何理解su的错误以及如何修复它?
谢谢, 兰畴
答案 0 :(得分:3)
您必须使用root权限安装“su”。
使用普通用户权限复制su并不意味着“生根设备”。
我认为你的问题应该是“我如何根植我的设备?”
答案 1 :(得分:0)
busybox
su
正在寻找 root
中的 /etc/passwd
用户。在我的 android 设备上,此文件不存在。您可以通过简单地运行
root
条目
echo 'root:x:0:0:root:/root:/system/bin/sh' > /etc/passwd
此后,su
很高兴。