> For the complete documentation index, see [llms.txt](https://techbrunch.gitbook.io/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://techbrunch.gitbook.io/workspace/mobile/emulator.md).

# Emulator

```
cd ${ANDROID_HOME}/emulator
./emulator -list-avds
./emulator -avd $(./emulator -list-avds) -writable-system
```

### Modifying system files

```
cd ${ANDROID_HOME}/tools
adb root
adb remount
adb pull /system/etc/hosts ~/Downloads/hosts
echo '192.168.0.17 www.test.com' >> ~/Downloads/hosts
adb push ~/Downloads/hosts /system/etc/hosts
adb reboot
```

{% hint style="warning" %}
The host file might be in a [different location](https://stackoverflow.com/a/47622017)
{% endhint %}

Source: <https://medium.com/code-procedure-and-rants/use-modified-hosts-file-on-android-emulator-4f29f5d12ac1>
