Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在android emulator中将可读权限更改为可写权限_Android_Linux_Android Emulator_Platform - Fatal编程技术网

如何在android emulator中将可读权限更改为可写权限

如何在android emulator中将可读权限更改为可写权限,android,linux,android-emulator,platform,Android,Linux,Android Emulator,Platform,我正在emulator中工作,以便在localhost中进行连接。由于某些原因,我需要更改locahost网络连接。我从系统中收到localhost文件,并移动到例如:C:/temp/host location。在主机文件中,我进行了编辑,并再次尝试移动到System/etc/hosts,但无法移动该文件。它将错误显示为无法创建文件:只读文件系统。请给我建议解决办法 以下是以下步骤: C:\Users\Android\sdk\platform tools>adb pull/system/etc/

我正在emulator中工作,以便在localhost中进行连接。由于某些原因,我需要更改locahost网络连接。我从系统中收到localhost文件,并移动到例如:C:/temp/host location。在主机文件中,我进行了编辑,并再次尝试移动到System/etc/hosts,但无法移动该文件。它将错误显示为无法创建文件:只读文件系统。请给我建议解决办法

以下是以下步骤:

  • C:\Users\Android\sdk\platform tools>adb pull/system/etc/hosts C:/temp/hosts

    [100%]/system/etc/hosts

  • 文件已成功移动到临时文件夹

  • 编辑完文件后,我尝试推送。但它失败了
  • C:\Users\Android\sdk\platform tools>adb重新安装 不以root用户身份运行。先试试adb根目录 C:\Users\Android\sdk\platform tools>adb根目录
  • C:\Users\Android\sdk\platform tools>adb推送C:\temp\hosts\system\etc

    adb错误:未能将“C:\temp\hosts”复制到“/system/etc/hosts”:无法创建文件只读文件系统。

  • 您必须在“adb根目录”之后执行“adb重新装载”,然后才能执行推送操作

    adb root
    
    adb disable-verity
    
    adb reboot
    
    adb root 
    
    adb remount 
    
    还有跑步

    adb push .....
    
    您可能会看到这样的错误,因为所有的重新启动和根

    error: no devices/emulators found
    
    只要运行这个命令

    adb devices
    
    你会看到像这样的东西

    List of devices attached
    0123456789ABCDEF        device
    

    然后再试一次。

    好的,不要重新安装,您可以试试:adb shell mount-o rw,remount/system吗