使用谷歌(occam)的最新股票 rom .img 为 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/"
我不断收到错误
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
我尝试过使用多种方法来获取 r/w 访问权限,但似乎没有任何效果。由于其他人将使用该脚本,因此我必须自动化此过程,因此它需要自动化友好,但我无法弄清楚这一点。
我也试过
#su
#mount
#mount | grep system
然后输入带有系统挂载的分区并将其更改为 r/w 访问,但这也没有奏效。
在这一点上真的很沮丧。任何人都可以帮忙吗?