service rw-system /system/bin/mount -o rw,remount /system class late_start user root group root无法实现安卓设备开机自动挂载system分区为可读写模式
时间: 2024-03-21 14:42:08 浏览: 18
可能是因为你的设备需要进行 SELinux 策略的修改,以允许系统将 /system 分区挂载为可读写模式。你可以尝试在 /system/etc/selinux/plat_sepolicy.cil 文件中添加以下规则:
```
(kernel) allow mount systemfs:file rw_file_perms;
(kernel) allow mount systemfs:filesystem remount;
```
然后重新编译并刷入修改后的 selinux 策略文件。这样应该就能够实现安卓设备开机自动挂载 /system 分区为可读写模式了。
相关问题
echo 1 > /sys/class/remount/need_remount;mount -o rw,remount /system
这是一个针对 Android 系统的命令,意为将系统分区重新挂载为可读写模式。具体来说,使用 echo 命令将数字 1 写入到 /sys/class/remount/need_remount 文件中,从而通知系统需要重新挂载分区。接着使用 mount 命令将系统分区以可读写的方式重新挂载。这个命令需要以管理员权限(root)执行。注意,对系统分区进行操作有可能导致系统损坏或数据丢失,请谨慎使用。
adb remount 和 mount -o rw,remount /system的区别
adb remount和mount -o rw,remount /system都是用于重新挂载系统分区为可读写模式的命令,但它们有一些区别。
adb remount是通过ADB(Android Debug Bridge)工具执行的命令,需要连接到Android设备并具有root权限。它会将系统分区重新挂载为可读写模式,以便可以对系统文件进行修改。这个命令通常用于在开发或调试过程中修改系统文件。
而mount -o rw,remount /system是在Android设备的终端或shell中执行的命令。它也是将系统分区重新挂载为可读写模式,但不需要通过ADB连接设备或具有root权限。这个命令通常用于在设备上进行一些系统级的修改或修复。
总结一下:
- adb remount需要通过ADB连接设备并具有root权限,而mount -o rw,remount /system可以在设备的终端或shell中执行。
- adb remount通常用于开发或调试过程中修改系统文件,而mount -o rw,remount /system用于设备上的系统级修改或修复。