无法将android系统目录更改为rw [英] Cannot change android system directory to rw

查看:286
本文介绍了无法将android系统目录更改为rw的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将/system挂载为rw文件系统,以便将某些文件推送到/system/framework中.这是一个运行Android 6.0 x86图像的android模拟器.

I am trying to remount the /system as a rw file system so I can push some files into /system/framework. It is an android emulator running Android 6.0 x86 image.

$ mount
...
/dev/block/vda /system ext4 ro,seclabel,relatime,data=ordered 0 0
...

然后我做

su
mount -o rw,remount /system
mount
...
    /dev/block/vda /system ext4 rw,seclabel,relatime,data=ordered 0 0
...

这时候我想我没事.然后我在主机上做

At this time I am thinking I am ok. Then I am doing on host:

adb push test.jar /system/framework/

但是我看到了:

failed to copy 'test.jar' to '/system/framework/test.jar': Read-only file system

然后我回到adb:

mount
...
    /dev/block/vda /system ext4 ro,seclabel,relatime,data=ordered 0 0
...

它又回到ro.

当我尝试重新安装时,这次甚至都不允许我这样做:

When I trying to do remount again, it doesn't even let me do it this time:

mount: Read-only file system
255|root@generic_x86:/ # 

那么我在哪里做错了?谢谢!

So where I am doing wrong? Thanks!

___编辑____

___ Edit____

通过adb root命令以root身份重新启动adbd解决了我的问题.

restarting adbd as root via adb root command solves my issue.

推荐答案

基于@ raed-hosny的答案我解决了问题

based on @raed-hosny answer I solve the problem with

$ emulator -writable-system -netdelay none -netspeed full -avd Nexus_5X_API_25

在您的日志中,您将看到类似的内容

In your log you will have something like this

sh: 1: glxinfo: not found emulator: WARNING: System image is writable sh: 1: glxinfo: not found emulator: Listening for console connections on port: 5554 emulator: Serial number of this emulator (for ADB): emulator-5554

sh: 1: glxinfo: not found emulator: WARNING: System image is writable sh: 1: glxinfo: not found emulator: Listening for console connections on port: 5554 emulator: Serial number of this emulator (for ADB): emulator-5554

这篇关于无法将android系统目录更改为rw的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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