android - 如何使用 adb 在 bash 脚本中以读写方式重新安装我的 Android/系统?

标签 android bash adb mount

了解详情

adb remount 

返回“重新挂载失败:不允许操作”

adb shell 'su -c  mount -o rw,remount /system'

返回未知选项--o

我的设备已root。

最佳答案

remount 失败的可能原因是您没有以 root 身份运行 adb

Shell 脚本应如下所示。

# Script to mount Android Device as read/write.
# List the Devices.
adb devices;

# Run adb as root (Needs root access).
adb root;

# Since you're running as root su is not required
adb shell mount -o rw,remount /;

如果失败,您可以尝试以下方法:

# List the Devices.
adb devices;

# Run adb as root
adb root;

adb remount;
adb shell su -c "mount -o rw,remount /";

要查找您是哪个用户:

$ adb shell whoami

关于android - 如何使用 adb 在 bash 脚本中以读写方式重新安装我的 Android/系统?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28009716/

相关文章:

Bash:带有变量的彩色输出

Bash 正则表达式,否则

Android - 尝试在启动时测试服务(java.lang.SecurityException : Permission Denial)

android - 由于写入权限,无法使用 Android shell atrace 命令

java - 仅 adb 出错

Android:将 OpenGL 效果应用于相机

android - 如何在 firebase 中分离用户角色?

android - 如何在 Kotlin 中删除小数末尾多余的零?

android - 在 Android 上的 OpenCV 中逐帧处理视频

linux - 动态间接 Bash 数组