Android emulator hosts file

怎甘沉沦 提交于 2021-02-07 11:54:54

问题


I wonder how I could update host file on a android virtual device? Each time I reopen emulator it appears with defaul hosts file, so I pull hosts file everytime.

what I do now:

  1. emulator.exe -avd %avd_name% -partition-size 256 -gpu on
  2. adb.exe wait-for-device
  3. adb.exe remount
  4. adb.exe push %avd_root_dir%\hosts /system/etc

but next time when I start the emulator there is default hosts file. How to change hosts file only once?


回答1:


Myabe you have to repack system.img.

It's under sdk/systemimages/android-**/armeabi-v7a.



来源:https://stackoverflow.com/questions/15383315/android-emulator-hosts-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!