我最近安装了我的Droid X,一切似乎都很完美。我做了一些改变来构建。prop,当我做adb push build时。prop /system/我得到以下错误:未能复制'c:\build。支持“到”/system//build。prop':只读文件系统。
我该如何解决这个问题?
我最近安装了我的Droid X,一切似乎都很完美。我做了一些改变来构建。prop,当我做adb push build时。prop /system/我得到以下错误:未能复制'c:\build。支持“到”/system//build。prop':只读文件系统。
我该如何解决这个问题?
当前回答
同样,必须提取并重新打包initrc。使用mount /system的代码编辑init文件
其他回答
我从谷歌上找到了这篇文章,并想在Sony Xperia Z(4.2.2)上添加必要的步骤。
索尼有一个看门狗进程,当你在/和/system(这些是我唯一试图修改的)上将ro更改为rw时,它会检测到。
下面是我运行来执行我试图实现的更改的代码。我把它们粘贴到一个窗口中,因为从/sbin/ric中删除执行位需要快速完成,以阻止它自己重新启动。(我试图阻止里克;这是行不通的-尽管它可以在之前版本的android手机上运行)。
pkill -9 ric; mount -o rw,remount -t rootfs /
chmod 640 /sbin/ric
mount -o rw,remount /system
我在这里修改了hosts文件,因此可以在这里对文件系统进行所需的更改。要让事情保持原样,请这样做:
mount -o ro,remount /system
chmod 750 /sbin/ric
mount -o ro,remount -t rootfs /
这时ric会自动重启。(它自动为我重启了。)
并不是所有的手机和安卓版本都安装了相同的东西。 重新安装时限制选项是最好的。
简单地重新挂载为rw(读/写):
# mount -o rw,remount /system
一旦你完成了修改,重新挂载到ro(只读):
# mount -o ro,remount /system
虽然我知道这个问题是关于真实设备的,但如果有人在模拟器中遇到类似的问题,无论2017年2月最新的工具是什么,模拟器都需要从命令行启动:
-writable-system
对于任何可写入/系统的内容。如果没有这个标志,remount或mount的任何组合都不允许写入/system。
在模拟器以该标志启动后,在adb根目录后重新安装一个adb就足以获得推送到/system的权限。
下面是我用来运行模拟器的命令行示例:
./emulator -writable-system -avd Nexus_5_API_25 -no-snapshot-load -qemu
-avd标志的值来自:
./emulator -list-avds
This worked for me
#Mount as ReadOnly
su -c "mount -o rw,remount /system"
# Change Permission for file
su -c "chmod 777 /system/build.prop"
#Edit the file to add the property
su -c "busybox vi /system/build.prop"
# Add now
service.adb.tcp.port=5678
# Reset old permissions
su -c "chmod 644 /system/build.prop"
# Mount as readonly again once done
su -c "mount -o ro,remount /system"
有时你会得到错误,因为目标位置在电话不存在。例如,一些android手机的外部存储位置是/storage/emulated/legacy而不是/storage/emulated/0。