试图获得对Android /系统的r/w访问权限

Beb*_*op_ 3 shell android system root

使用最新的股票rom .img for google(occam)处理Nexus 4的根脚本,我有以下代码片段:

./adb wait-for-device
echo "remounting system"
./adb shell "mount -o remount,rw /system"
./adb push su /system/bin/
echo "pushing super user"
./adb push Superuser.apk /system/app/
echo "pushing busybox"
./adb push busybox /system/xbin/
./adb shell "chmod 06755 /system/bin/su"
./adb shell "chmod 0644 /system/app/Superuser.apk"
./adb shell "chmod 04755 /system/xbin/busybox"
./adb shell "cd /system/xbin"
./adb shell "busybox --install /system/xbin/"
Run Code Online (Sandbox Code Playgroud)

我一直在收到错误

mount: Operation not permitted
failed to copy 'su' to '/system/bin//su': Read-only file system
pushing super user
failed to copy 'Superuser.apk' to '/system/app//Superuser.apk': Read-only file system
pushing busybox
failed to copy 'busybox' to '/system/xbin//busybox': Read-only file system
Unable to chmod /system/bin/su: No such file or directory
Unable to chmod /system/app/Superuser.apk: No such file or directory
Unable to chmod /system/xbin/busybox: No such file or directory
/system/bin/sh: busybox: not found
Run Code Online (Sandbox Code Playgroud)

我尝试过使用多种获取r/w访问的方法,但似乎没有任何工作.我必须自动执行此过程,因为其他人将使用脚本,因此它需要自动化,但我无法弄清楚这一点.

我也试过了

#su
#mount
#mount | grep system
Run Code Online (Sandbox Code Playgroud)

然后输入具有系统挂载的分区并将其更改为r/w访问,但这也没有奏效.

在这一点上真的很沮丧.有人可以帮忙吗?

Gig*_*egs 5

它给出了错误,因为你不是root.系统分区以只读方式挂载.您可以尝试将二进制文件推送到/ data/local/tmp.然后你可以使su可执行并最终运行它.但这并不意味着你可以拥有root.要成为root用户,您需要将像psneuter这样的漏洞利用到/ data/local/tmp并运行它.它崩溃shell并重新打开一个具有root权限的新shell.然后你可以重新安装系统分区读写并安装su.