How to transform the 'hosts' documents to reroute URLs?

For home windows equipment we obtained the hosts submit to modify to reroute link's to various other domains. Exists a documents like that on android?

I'm aiming to reroute a long link to a much shorter one making use of the hosts documents, is this feasible? This can additionally be made use of to reroute a checklist of well-known spam domains to absolutely nothing so the most awful flash/gif includes are gotten rid of.

I'm running Android 2.1 on a rooted samsung galaxy S

2019-05-07 13:53:18
Source Share
Answers: 1

The initial link is dead. I drew this short guide from way back machine, replicated below:

With the first couple of main Pre - Alpha builds of CyanogenMod 7 being launched, it's worth keeping in mind that a new attribute has actually been consisted of that permits you to transform the hostname on your tool from the Settings food selection. If you have actually a sustained tool, you can get the every night builds from the TeamDouche Mirror System. As soon as you've blinked (I take no duty if you damage something-- see to it to check out issues/pitfalls/requirements prior to blinking), open the Settings food selection, after that pick Applications, after that Development, and also select Device Hostname near the bottom. This setup lingers in between reboots and also ROM upgrades (unless you clean).

Caution : I approve no duty if you block your phone while doing this.

I abandoned my apple iphone as a result of troubles my neighborhood carrier was having and also obtained an HTC Dream rather. I without delay rooted it making use of the Cyanogen Mod, yet saw that by default, Android reports the hostname as 'localhost'. I do not actually similar to this, so I undertake locating a very easy means to transform it.

First of all, also rooted, the/ dividing is placed read - just when you boot generally, so you require too to Recovery Mode (Home+Power). In the recuperation food selection, pick too to console. From there, surf to/ system/etc/init. d.

IMPORTANT : Make a back-up of '05userinit' prior to proceeding! You can do this by merely running the adhering to command-- 'cp 05userinit/ 05userinit' (without quotes). This will certainly create a duplicate of it in the/ directory site. If you mess up your editing and enhancing, you can simply rm the screwed up variation and also cp the back-up back in.

To add the command to set the host name, we're merely mosting likely to resemble in the adhering to 2 lines:

echo  >> 05userinit

echo hostname NEWHOSTNAME >> 05userinit

Note that there are 2 rooms after the first 'resemble' command. This develops an empty line at the end of the documents. The 2nd resemble includes the hostname command. In this manner, whenever your phone boots, the hostname is set. Additionally, make certain to make use of 2 better - than indicators (>), as that adds-- if you just make use of one, it overwrites the materials of the documents.

See to it the edits are proper by keying 'tail 05userinit'-- as long as it isn't empty, and also there's greater than simply the hostname line, you're gold. Restart the phone by keying 'reboot' at the punctual and also striking 'Enter', and also you're done.

As soon as you've started back up, open your incurable emulator of selection and also type 'hostname' (on its own, no parameters)-- it needs to resemble out whatever hostname you defined.

Update (April 6th, 2010) : To transform your hostname on Cyanogen 5.x, add the adhering to line to the base of/ system/etc/init. d/01sysctl-- and also see to it you make a back-up of 01sysctl prior to editing and enhancing it!

echo NEWHOSTNAME > /proc/sys/kernel/hostname
2019-05-09 09:23:04