Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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

http://my.specific.domain.name.

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

my.specific.domain.name 192.222.222.222

to make it look to the right IP.

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

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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
share|improve this answer
    
What is "adb" and how can I root my phone? –  Olivier Pons Jul 4 '12 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. –  Richard Borcsik Jul 4 '12 at 16:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.