Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Monday 14 October 2013

How I made my android advertisement free.!

To make android device advertisement free, one need to root android device.
There are plenty of guides available on internet to root your device so follow anyone.

Once android is rooted then follow these simple steps:

1. Install fiddler on your computer.(To capture web traffic from android)
    Download it from here: Fiddler 2
    Go to tools fiddler options and select the options as given in figure:
    Accept the notification if any.






2. Install proxydroid from google play and give it super user access.
    Now enter your ip address (using cmd and ipconfig /all) in proxydroid app.
    and then click on enable proxy switch. This will route all the traffic from your android to your system and fiddler will be able to capture it.

3. Now next step could be completed in two ways:
    We need to update hosts file provided inside /system/etc/hosts
  one way is to use adb commands, pull update and then push this file.
 other easy way is to use any root application for android which could transfer files from one location to other.

I am using second approach as it's easy and convenient.

So download File Explorer and also download root access for it.

Once it's operational copy hosts file from /system/etc/hosts to /mnt/sdcard so you can download it to your computer using data cable.

Once hosts file available on computer use all the host address(advertisers which you got from step 2) to redirect to localhost.
A sample hosts file I created and using on my android (contains some adservers URL from adfree application)

# Ad server list for use with hosts files to block ads

127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
 
127.0.0.1 ads.mopub.com
127.0.0.1 android.bonzai.mobi
127.0.0.1 d.applovin.com
127.0.0.1 a.applovin.com
127.0.0.1 applovin.com
127.0.0.1 netspiderads.indiatimes.com
127.0.0.1 netspiderads2.indiatimes.com
127.0.0.1 netspiderads3.indiatimes.com
127.0.0.1 media.admob.com
 # 127.0.0.1 your advertiser hosts to block


Add your hosts in above line and remove comment.

Now we need to push this file on android, so copy the same on your sdcrad using data cable and then using file explorer with root access replace this file at /system/etc/hosts.

Switch off and restart your phone.

Now most of the applications will be adfree.
Enjoy. :)


Note:
Android should be rooted for the whole process and proper care should be taken.
These are my views and no responsibility taken for any harm or anything wrong happens while following this process.

Sunday 16 December 2012

Connecting ad-hoc network from android devices


Connecting ad-hoc network from android devices 

I was trying to connect my android device using ad-hoc network on windows 7 and to my surprise android is not capable to discover ad-hoc network created by windows.

I tried to Google it and can't find much information.

So here is the solution : 

Microsoft included a virtual WiFi feature in Windows 7, so one can use this feature and turn network as a hot-spot for WiFi access.

There are two methods through which one can enable WiFi on windows 7 and the easiest one is using open source software such as Virtual router manager:

Download software from  http://virtualrouter.codeplex.com/

Using its GUI:


It's very simple to create a WiFi connection and then use it :)

-----------------------------------------------------------------------------------------------------------------
Another way of doing it by using command prompt:

Use a command-line tool called Netsh to create and manage the virtual router

First, enable the Internet Connection Sharing (ICS) feature of Windows 7 so the Internet access is shared with users on the Wireless Hosted Network.

Open the Network Connections window, right-click the network adapter that's connected to the Internet and select Properties. Then select the Sharing tab, check the Allow other network users to connect through this computer's Internet connection, choose the network connection name of the Microsoft Virtual WiFi Miniport Adapter from the drop-down box, and click OK.

Now open the Command Prompt: click Start > All Programs > Accessories > Command Prompt.

Set the network details:
netsh wlan set hostednetwork mode=allow ssid=YourVirtualNetworkName key=YourSecureNetworkPassword

Start the Wireless Hosted Network:
netsh wlan start hostednetwork

To stop the Wireless Hosted Network:
netsh wlan stop hostednetwork

To see the Wireless Hosted Network details, including the MAC addresses of connected users:
netsh wlan show hostednetwork
Enjoy WiFi on mobile and other devices :)