answered
2014-06-13 22:20:14 +0200
As you've already found out, the main hosts file is located at /etc/hosts
, but keep in mind that there are two additional hosts files that are used by Alien Dalvik: /system/etc/hosts
and /opt/alien/system/etc/hosts
and you'll have to change those two as well if you intend to use your hosts settings with Android apps.
When it comes to changing them, since they are out of the regular user space you'll have to use Developer Mode and devel-su
prior to modifying (or overwriting) them.
edit:
I see you're not acquainted with terminal mojo, so here's a quick guide if you want to replace your hosts file (and don't want to use SFTP for transfer). First move your replacement hosts file via USB to, say, your Public
folder exposed via MTP and then from the terminal do:
devel-su
cp /etc/hosts /etc/hosts.original
cp /system/etc/hosts /system/etc/hosts.original
cp /opt/alien/system/etc/hosts /opt/alien/system/etc/hosts.original
echo /etc/hosts /system/etc/hosts /opt/alien/system/etc/hosts | xargs -n 1 cp ~/Public/hosts
This will 'backup' all the original hosts files (as hosts.original in their designated directories) so you can get them back in case something goes wrong, and then replace them with the hosts file you've placed in the Public
folder in your home.
As a rule of thumb, you should include in your new hosts file the lines from the original hosts file before replacing - that way you can be sure it won't mess up internal domain name spaces and such, but it isn't a requirement.