由于档案系统唯读,因此无法推送至Android模拟器 [英] Cannot push to android emulator because of Read only file system
本文介绍了由于档案系统唯读,因此无法推送至Android模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将主机文件推送到我的adb设备.
I am trying to push a host file to my adb device.
所以,我做到了:
[~/Library/Android/sdk/tools]$ emulator -avd Nexus_5X_API_26_x86 -writable-system
emulator: WARNING: System image is writable
emulator: ### WARNING: /etc/localtime does not point to /usr .
/share/zoneinfo/, can't determine zoneinfo timezone name
emulator: ### WARNING: /etc/localtime does not point to
/usr/share/zoneinfo/, can't determine zoneinfo timezone name
现在在另一个控制台中 adb推送主机/system/etc/hosts
Now in a different console I do
adb push hosts /system/etc/hosts
但是我得到了以下错误:
But I get the follwing error:
adb:错误:无法将主机"复制到"/system/etc/hosts":远程无法创建文件:只读文件系统主机:已推送0个文件.0.1 MB/s(93字节于0.001s)
adb: error: failed to copy 'hosts' to '/system/etc/hosts': remote couldn't create file: Read-only file system hosts: 0 files pushed. 0.1 MB/s (93 bytes in 0.001s)
有什么建议吗?
推荐答案
尝试一下:
$emulator -avd Nexus_5X_API_26_x86 -writable-system
$adb root
$adb remount
$adb push hosts /system/etc/hosts
这篇关于由于档案系统唯读,因此无法推送至Android模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文