If you want to access a web application hosted on your local machine hosted with xampp or mamp configured with custom local domain using virtualhost from an Android emulator, do the following:
- Create AVD with Google APIs image (not Google Play image)
- Execute the following commands:
adb root
adb remount
adb pull /system/etc/hosts .
nano hosts
- Add your required entries like the following:
127.0.0.1 localhost
::1 ip6-localhost
10.0.2.2 your.custom.domain
- After that Execute the following commands
adb push hosts /system/etc/hosts
adb reboot
Top comments (1)
adb remount
remount of the / superblock failed: Permission denied