I've made my website and it can be accessed only through specific domain name.


And of course, you have to change your /etc/hosts configuration and add


to make it look to the right IP.

Any idea how to do this on a Sony XPeria Arc?

1 Answer 1


You need a rooted phone for this. First get the /hosts file:

adb pull /system/etc/hosts

This copies it into your current working directory. Now make your changes. (If you're not using a UNIX system make sure that you use something that supports UNIX newlines, like Notepad++, Sublime Text, Gedit etc.)

Then we need to send it back to the device with:

adb remount
adb push hosts /system/etc/hosts

The first line remounts your /system partiton so you can write to, and the second pushes it back. Now reboot your device. As you already have a terminal open just type:

adb reboot
  • What is "adb" and how can I root my phone? Jul 4, 2012 at 16:14
  • @OlivierPons abd is short for android debug bridge. It's a tool for developers to interact with phones using a computer. It can be download from here. Regarding rooting, look here. Xda-developers usually has the most up to date guides for rooting.
    – user13391
    Jul 4, 2012 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .