如何使用adb在bash脚本中将Android/系统重新安装为可读写状态? [英] How can I remount my Android/system as read-write in a bash script using adb?

查看:129
本文介绍了如何使用adb在bash脚本中将Android/系统重新安装为可读写状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关信息

adb remount 

返回"remount failed: Operation not permitted"

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

返回unknown option -- o

我的设备已植根.

推荐答案

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

Probable cause that remount fails is you are not running adb as root.

Shell脚本应如下所示.

Shell Script should be as follow.

# 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 /;

如果失败,您可以尝试以下操作:

If this fails, you could try the below:

# List the Devices.
adb devices;

# Run adb as root
adb root;

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

要查找您是哪个user:

$ adb shell whoami

这篇关于如何使用adb在bash脚本中将Android/系统重新安装为可读写状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆