Created
December 2, 2020 19:25
-
-
Save shashank-shekhar/12bdceef787667c7f16df00db5e1dc8b to your computer and use it in GitHub Desktop.
Add custom domains to android emulator hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Start emulator in write-only mode | |
C:\Program Files (x86)\Android\android-sdk\emulator>emulator -avd pixel-3 -writable-system | |
# Pull the existing hosts file to your local machine: | |
adb root | |
adb remount | |
adb pull /system/etc/hosts c:\temp\hosts | |
# Edit your hosts file e.g. | |
10.0.2.2 local.mysite.com | |
# Push the file back | |
adb push c:\temp\hosts /system/etc/host | |
# Restart the server and you are good to go. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment