1. adb push hosts etc/hosts 将hosts文件复制到手机上(覆盖etc里的hosts)

    错误:failed to copy hosts to etc/hosts: Read-only file system

    解决方法:adb remount , adb shell , chmod 777 system然后重试。

  2. 修改手机hosts文件:

    1. adb shell

    2. cat /etc/hosts

    3. exit

    4. adb pull /etc/hosts 将手机内的hosts文件pull出来

    5. adb push hosts /etc/hosts 将修改后的hosts文件push进手机



  3. 打开world: gedit &


4.  修改环境变量sudo gedit ~/.bashrc 修改完后source .bashrc