How to filter ads in Android applications. How to remove ads in games on Android using the HOSTS file. Using manual mode

This lesson involves surgical removal of advertising from apk. For those who want to try alternative options removal of advertising, then you should pay attention to the articles:

Necessary!

If you have opened this lesson, then you should already know what decompilation and compilation are.

3. Application with advertising for example Backgammon Free

Instructions for removing ads from apk Android applications

1. After decompiling the apk of the Backgammon Free application, open the file AndroidManifest.xml

2. We remove the ability for the application to connect to the Internet, since advertising is downloaded from the Internet

3. If you try to assemble and sign the application, you will receive an error message in the application " You must have Inertnet and ACCESS_NETWORK_STATE permissions in AndroidManifest.xml" This means that the advertisement is asking for a connection, but it is not there!

4. Move on to the second stage, remove this error from the application. Open the search -> search in files (specify the folder with the decompiled application) -> write the text with the error “You must have ....”

5. Delete the row data

6. We compile the application, sign and install, after which we observe that there are no advertisements!

This is how we quickly and painlessly removed ads from the apk of the Android application.

After surgery on the apps and signatures, you will not be able to update it in the Google Play store, so to update it you need to remove it, reassemble it and sign it! The signature for each PC is unique!

Software manufacturers live off advertising or app purchases. If you want your application or game to develop and improve, I strongly recommend supporting the Developer and using this method as described in this article as little as possible!



There is probably no need to say that advertising in Android applets or in browsers when accessing the Internet is incredibly annoying to all users without exception. But own funds the system cannot get rid of this scourge. So what to do? Ad blocking on Android systems can be done either using special programs or manually by changing one of the key system files.

Where do ads come from in Android applications?

Probably every owner of an Android device has wondered where so much junk in the form of advertising comes from in programs. The answer to this question must be sought in the Google Play service itself, from which in most cases mobile applications are downloaded and installed.

The situation is that absolutely everything free apps, which are presented in the service, have built-in advertising. All!!! The only exceptions are paid programs. They don't have this garbage. But not everyone wants (or can) pay a certain amount just to get rid of constantly pop-up messages and banners. But there is a way out. You need to use some kind of ad blocking application on Android, which can remove it from both installed applications and from the browser when the user surfs the Internet.

Types of advertising and ways to eliminate them

But before we begin to consider the question of how, for example, advertising is blocked in Chrome on Android or eliminated in installed applets, it is worth looking at what the main types of advertising can be found.

Many experts, having analyzed all possible situations, tend to divide advertising into several main types:

  • static or dynamic (pop-up) banners at the top, bottom or full screen with a picture or video;
  • built-in advertising directly in the program interface;
  • advertising that appears after 2-3 days of using the application;
  • “useful” advertising, after viewing which the user receives some points, bonuses, coins, etc.

As for the methods for eliminating it, in most cases, when installing additional applets, superuser rights are required, otherwise it will not be possible to achieve at least some significant result. But! If it doesn't work out, it doesn't mean it's impossible in principle. Advertising can also be blocked on Android without root rights. Let's dwell on this separately.

By the way, one of the most simple methods The way to prevent the appearance of advertising in applications is to download and install them not from the Google Play service, but to download their full analogues in the form of APK files with subsequent installation from other sources. But the resources must be verified, otherwise no one can guarantee that you won’t catch the virus somewhere. Programs on such sites in most cases are already free of advertising, even in situations where the application requires constant Internet access to work correctly.

Ad blocking on Android: the most popular applications

On the Internet you can now find quite a lot of software applets aimed at ridding the user of annoying banners and messages. Not all of them are equivalent to each other. But in most cases, there are several of the most powerful, popular and interesting applications:

  • AdAway.
  • LuckyPatcher.
  • AdFree.
  • AdBlock.
  • Adguard.
  • Adblock Browser, etc.

This list is interesting because the first three applications necessarily require root rights, the second three can work without them. Let's look at several utilities. In principle, they all work on similar principles.

AdAway is the easiest app to use

Blocking ads on Android using this program is based on automatically changing the hosts file.

After installing and launching the application, you only need to use two buttons. First, click on the file download button, and then on the button to turn off advertising. True, as is already clear, the appearance of such programs is completely unprofitable for Google corporation, so it is pointless to look for it in the Market. You will have to download from other sources and install manually.

AdBlock is a program for Android. Ad blocking for free

As is probably clear from the name, this applet is mobile version computer add-on for browsers, adapted to Android systems.

This utility, like Adblock Browser, which is a regular browser with a built-in blocker, is intended for use as an add-on (extension) to all existing browsers in the system. True, it has one drawback. If the system provides root rights, the application will filter absolutely all traffic, and to block without them, you will additionally need to configure the proxy server settings. And please note that this application may not work on all devices and not all operating versions Android systems.

Lucky Patcher - a universal solution

Many experts believe that this application is best program to block ads on Android. And it's not even about the operating principles.

The program itself is in some way a slightly modified analogue of the AdAway applet in terms of interface. However, its possibilities are much wider. In fact, the application is a whole patcher complex for all occasions.

When programs are launched, it performs a full scan of the system, and distributes the results in the application category into several types, highlighting them in different colors:

  • yellow - the application has been fixed and no additional action is required;
  • green - Google license verification required;
  • blue - presence of advertising.

A separate section contains programs that cannot be patched. By clicking on the desired application, the user receives an additional menu in which an action option is selected (removing advertising, installing a patch, etc.).

AdFree is another simple tool

This program almost completely repeats the AdAway applet presented above.

It not only uses the same principle of changing the hosts file, but also the procedure for eliminating problems in the form of using buttons to download a file and disable advertising.

Using manual mode

Blocking ads on Android in this case means independently downloading a modified hosts file from the Internet or creating it on your computer using any text editor(for example, Notepad). It looks like the image below.

The original system file, in order to avoid troubles, must first be renamed (or backed up), after which new object hosts should be placed in the etc directory, which can be located either in the system root or in the System directory, using a file manager like Root Explorer for this. After that, all that remains is to reboot the device and rejoice.

What to use?

As for choosing the preferred method for getting rid of advertising, it is difficult to recommend something specific, since each program is focused on a specific type of task. However, if you have superuser rights, it is better to install LuckyPatcher (the application may be useful for other purposes). But in optimal option In order to remove advertising from both installed programs and the browser, the optimal solution would be to install two applets, one of which will block the appearance of unwanted banners in applications, and the second will eliminate advertising when surfing the Internet. For example, in addition to LuckyPatcher, you can install AdBlock. However, here the choice is up to the owner of the mobile device. As for downloading or manually creating a hosts file, this option can be used if suddenly (which is unlikely) nothing else helps.

Advertising nowadays simply fills everything possible: TV programs, streets, fences, billboards, the Internet and even our smartphones and tablets. Advertising is most annoying in applications on your smartphone and in your browser. The smartphone screen is quite small even without advertising, and you want to use it to the maximum, but advertising only interferes with this. In addition, advertising eats up a huge part of the battery charge and, importantly, traffic due to it is also rapidly decreasing. And on top of that, advertising simply distracts us from the process of using the application. Another disadvantage is the risk of infecting your phone with viruses due to the presence of advertising in applications. So, we urgently need to take measures to rid our smartphone of advertising.

Method number 1. Using AdFree.

Let's start with the fact that there is such a wonderful program with which you can save your device from devouring traffic, battery, and of course advertising, it's called AdFree Android. One click on the “Download and install hosts” button( download and install) in this program will save you from advertising and all the ensuing consequences. After launching this option, you will need to restart all applications that contain advertising. After that, you can say goodbye to advertising in applications and even in the browser. But, if you suddenly want to return the advertisement to its usual place, all you need to do is click on the “Revert” button in the AdFree Android application ( return original) and the advertisement will appear again. The disadvantage of this program is that it does not have the ability to selectively remove ads from the applications you select. It removes all advertisements. AdFree Android requires root when using it, this program will not work without obtaining superuser rights. AdFree Android is free and publicly available, you can download it.

Method number 2. Replacing hosts

To get rid of advertising in programs using this method, go along the path system/etc/hosts for example using (Root required).

We delete it, and in its place we insert a new hosts that you download from the network, you can get it at www.mvps.org/winhelp2002/hosts.txt - after downloading, delete the file extension (remove after the dot TXT). How it works? If you open the Hosts.txt file you will see something like this 127.0.0.1 00fun.com
The 00fun.com website will link to the internal IP address 127.0.0.1 and will not be able to access the Internet.

Method No. 3. Editing a file

Before any manipulations with the application, it is advisable to make a backup copy. In other applications, things may be different and 100% results are not guaranteed. Let's start in order by unpacking the applications using ApkTool, we need the file AndroidManifest.xml which we open using Notetpad++

If the advertisement is from AdMob


Deleting lines

And another example

Deleting lines

If advertising is from Google

Deleting lines

More about Google Ads

If you deleted the necessary lines as indicated above and a small black banner with red letters pops up in the application (there is no advertising, but the banner remains).

We do the following, delete the lines indicated above in AndroidManifest.xml and go to the folder smali - com - google- and delete the folder ads

If the application does not start after deleting the ads folder

If the application does not start, then do the following, open Notepad++ click on the tab ( search) and select from the drop-down menu ( find in files) select the folder with the decompiled application, namely the folder smali and enter the following phrase into the search: “You must have AdActivity declared in AndroidManifest.xml”. After searching, delete this line (basically this line is in the file AdView.smali) and assemble the application back (we do not delete the ADS folder). Everything should work. Before this, of course, you need to remove advertising from AndroidManifest.

Removing a graphic banner

There is such a thing as a graphic banner, that is, a banner picture. First, delete everything from AndroidManifest.xml and in other folders if necessary, then go to the folder drawable(located in the folder res) and find the banner.

After we found it, compress it in Paint to a size of 1x1 px (pixels)

After that, save and assemble the project.

APK Related Articles:

It's no secret that by downloading applications from a special one, you can improve your smartphone in various ways, or become the owner of some popular toy. Often, paid versions from free ones, They differ only in the presence of advertising in them.

Today we will look at 5 of the fastest and the best ways how to remove ads on Android so that they don’t appear again and you don’t have to start all over again.

Of course, you don’t have to pay any attention to it, but we will discuss at least three reasons, why it’s better to get rid of such ads, and then we’ll figure out how to remove pop-up ads on your phone.

Updating information and checking the relevance of all applications - 03/08/2018

  1. Advertising is a separate process that not only takes up space on RAM, but also affects the rapid discharge of the battery (by the way, here are some recommendations about your device).
  2. In addition, the presence of advertising on a smartphone can cause unwanted software to appear on it ( software), or even worse - .
  3. Also advertising consumes internet traffic(You may ask how, the answer is simple - to display ads you need to send a request to the advertiser’s server and then show it to you. So, for example, if when viewing the news feed of the VK social network in an hour you will consume a maximum of 10-20 MB, and if at this time You will see advertisements pop up, then when you use this at least 70% used in addition to traffic, that is, ~ 15 MB), and, as you know, not everyone has unlimited traffic.

Naturally, all this suggests that advertising in applications and games is This is not a harmless "add-on" for free download. And when you are convinced of this, you will be ready to remove it from your smartphone. Now, having presented several convincing facts about the undesirability of the appearance advertisements on your phone due to malware, I will give you many different solutions for different situations.

Method 1: Disable Pop-up Ads Using AdBlock Plus

AdBlock Plusbest program of its kind to get rid of annoying ads from applications and games. She is so good that she was able to damage the business by almost $22 billion, and this is only for 2015! Do you still need any confirmation? This is an excellent ad removal program.

But it’s worth saying right away that in the store You won't find such an application on Google Play.. Probably because Google's only source of income in this case is advertising! It turns out that distributing a program in your store that would deprive you of this way of earning money is inappropriate.

This means only one thing - you will need install the program manually. There is nothing terrible in such a process, especially since after the installation is complete, you will enjoy numerous programs, games and applications without the presence of advertising in them.

Update information - Adblock Browser

But you still can download old versions of Adblock Plus on third-party sites. We recommend going to the 4PDA forum thread, where you will find past and improved versions. But remember that then you will not have access to updates.

Where to find and how to install

  • Download the Adblock Plus program from the 4PDA forum, and follow the next step. If you downloaded it on your computer, then you should transfer it to your device;
  • Click on the line with the program in your file explorer;
  • Let's start the installation.

What to do if a third-party application does not want to be installed

In order to install the program from a source other than an official one, you will have to change some things in the settings.

  1. We are looking for the “Settings” section.
  2. In the window that appears, find the “Security” or “Applications” section. Different devices will have one of these partitions.
  3. Having opened the desired one, find the item “ unknown sources" This is where you need to check the box.

Sometimes this window appears on its own, during the installation of such an application. Then in the pop-up window you will need to immediately check the required box and wait for the installation to complete.

Settings

To forget about constantly running the application, you can run it as a background process, for this use this setting:

  1. After installation, you can immediately open the program and run it. A message will appear stating that Adblock Plus cannot change the proxy. You have to do this yourself. First, click " tune" and then "Open Wi-Fi settings».
  2. Click on the network that is turned on on the device and hold until the settings window appears. Click "Advanced options" and check the proxy box by selecting " Manually».
  3. You need to enter the host name " localhost", and the port " 2020 " Afterwards you need to save.
  4. Remember! If you suddenly need to turn off the program, then simply return the Wi-Fi settings to the “ Default».

Method 2: How to remove ads on your desktop

After familiarizing yourself with the above program, you will already have the necessary knowledge, but if suddenly it cannot remove ads on the Android desktop, then it’s worth reading a short guide.

After downloading the applications (as mentioned above), you can pick up unwanted software. That is, this includes many developers from the Play Market who are dishonestly trying to make money from us. That is why, now more and more often start to panic when: “Suddenly, out of nowhere, an advertisement pops up on the desktop” and a person begins to “rush” around the Internet in a panic in search of a quick, but not always correct solution.

Adfree - Root rights

AirPush - without Root

This application scans your entire Android and identifies all suspicious applications. In the video, I tried to scan my phone, and it said that no viruses were found. We found only applications with in-app purchases, but they are not considered dangerous.

If you still have questions, ask them below in the comments.

Method 3: Removal without Root Rights

Most modern smartphones and tablets based on Android 6.0 and higher completely refuse to agree to installing Ruth rights (SuperSu), there is nothing bad here, just like everything has its pros and cons. Developers try to keep the system core away from the capable hands of users as best as possible, so that later they do not complain about the device malfunctioning. Some craftsmen overcome this milestone with smartphones, while other models remain rebellious.

But what to do if the problem is with an ad virus, and there is no way to install a special program that requires Superuser rights to block it, or you simply do not have such knowledge?! The answer is simple, choose one or more applications that can be used without ROOT rights.

  1. Lucky Patcher - a lot of errors and device freezes (strongly do not recommend)
  2. Adguard (take a closer look at this option)

Adguard

After a global update, the application no longer supports ad blocking in third-party applications. Take a closer look at other options.

Method 4: Remove ad units on YouTube

If you often watch various videos on YouTube and you are simply tired of seeing preview screens in the form of advertisements for 5-20 seconds without the ability to close before every second video, then this information will help you.

Disabling all advertising on YouTube using the Xposed Framework (RUTH ​​rights)

More detailed description look in a separate article dedicated to the Xposed Framework.

Method 5: Simple option to disable advertising

The Android system has a fairly simple browser installed as standard, which you don’t really want to use. Typically, users install options such as Chrome, Opera and Firefox. Options 2 and 3 are especially interesting. There are special built-in plugins that allow you to hide advertisements on Internet pages. Just download this application from the store.

Video instruction

In our video, we only cover the basic features in the apps and browsers mentioned above. Since I haven’t had a problem with viral advertising on my phone (and I hope I don’t), I can’t demonstrate their full functionality to you. But no one forbids you to get acquainted with them.

What to do if an advertisement pops up on Android after a call?

If you are very seriously infected with a dialer virus, that is, after incoming/outgoing calls, advertising immediately appears in the menu, then here are some tips for you.

  • Run an antivirus, there is an application on Google Play Doctor Web(others are possible, it doesn’t matter), install it. Once turned on, find the function "Full check", wait until the scanning process finishes. Afterwards, if a dangerous application is found, follow the instructions (if it is an application you installed, then decide: delete or fight. If you want to leave it, or it is a system file, then use the settings (settings - applications) to clear the application data, just do not stop it, otherwise you will have to do everything again).
  • Remember, after which advertising began to appear, perhaps you installed something, or downloaded it from the Internet. If it doesn't help, go to step 1.
  • Perhaps it will help.
  • Describe your problem in more detail in the comments, and you will be answered as quickly as possible.

Now you know at least 5 different ways how to clean your Android from adware. Again, if your question is not answered here, please ask a question in the comments.

Recently, people are constantly surrounded by advertising. It exists both on the street and in cinema and the Internet. If advertising on the street does not interfere, then while surfing the Internet in order to find the necessary information, pop-up banners greatly disturb users. This guide will help you solve the problem and learn how to remove ads in an application on an Android tablet or smartphone.

There are many Internet resources where advertising blocks are located at the edges of the site and do not interfere with viewing the content. But some site owners push advertisements onto the site beyond measure in order to earn more money, but do not think that this is at least inconvenient for users. In addition, due to unscrupulous advertisers, there is a high chance of catching a virus on mobile device with android. Often the user does not even need to click on the advertising banner; the script automatically transfers from the site being viewed to the advertised one. And it’s good if this site is decent. After all, you might come across a site from the category “How to enlarge...” and I didn’t really want children to see that. But what’s much worse is that with such a transition you can run into a malicious site that can install a virus on your mobile device, due to which your passwords and personal data will be stolen.

So, how to remove ads in an Android application? An ad blocker can help you cope with this modern scourge. These applications block advertising on websites, be it banners or regular text advertising blocks, making surfing on Internet portals more enjoyable. Pages of Internet resources that are not loaded with advertising load several times faster, which will be useful in case of an unstable or slow Internet connection. In addition, due to the fact that various banners are cut out, there is a significant saving in Internet traffic, which will have a positive effect on the balance of the mobile device.

Removing advertising in the game and Android application

This article will help users who once and for all want to get rid of advertising, advertising that appears in Android applications and games. There are two ways to disable advertising, and users who have Root rights can do this. And users who do not have rights.


First of all, we’ll tell you how to remove ads for users who have Root rights, since it will be much easier for them to do this. Those who do not have rights will be able to disable advertising provided they are connected to the Internet, or mobile or Wi-Fi networks. If you do not have root rights, then getting them is also very simple, you need or its analogues: Kingo Android Root, Unlock Root or Vroot and using them you can get rights that will help you easily remove ads, and will be useful for further use of Android applications .




Open the application and log into it using root rights, then the Filtering window will appear, and you just need to disable it. It is worth paying attention to the “Acceptable Updates” button; if it is turned on, then sometimes unobtrusive pop-up advertisements will still appear, so in order to completely remove advertising, disable it too.


You can also remove advertisements for users who do not have rights using this program. Launch the application and enter the settings menu. Afterwards the Proxy Settings window will appear, here we need two items, Proxy Host Name and Proxy Port. Click the Open Wi-Fi settings button, and go to the Wi-Fi settings, when you see your access point, press and hold your finger on it until an additional menu appears and when this happens, click Change network and check the box next to the words Advanced settings. Next, select the Proxy server line and wait until a list opens that will show you a list of options. And then, select the Manual button. After entering the data, the first line is localhost, and the second line is 2020 and after that advertising in the application and the Android game will be disabled.


However, Adblock Plus cannot always help with the solution, for the simple reason that it is not suitable for all Android devices. Also, if ads are not blocked thoroughly, you can use alternative ad blockers such as Adaway, AdFree or Lucky Patcher to remove ads in games. For each of these programs, your device must be rooted. Use the one that suits you and you will definitely get rid of ads.




How to remove ads in an Android application in the browser?

On personal computers, the choice of such programs is very wide and varied, but for smartphones and tablets the choice is much smaller. For devices based on operating system Android has some great options for blocking ads online, without the need to root your device.

1. is a small application that acts as extensions for two applications - Yandex.Browser and Samsung Internet. The program has more than 20 different filters that allow you to fine-tune the blocking of advertising materials. Adguard Content Blocker has open source code located on GitHub, so you can be confident in the quality of the application. One of the disadvantages of the application is that it only works with the above listed browsers - Yandex and Samsung.

2. - a browser created by the developers of the most popular and oldest extension for desktop browsers. Adblock Browser is based on the Firefox engine and therefore inherits the fast and reliable performance, as well as the rest of the features of a modern browser, such as convenient bookmarks, multiple tabs and incognito mode. The application offers many settings for filtering unwanted advertising, and even using the Adblock Browser you can remove buttons from websites social networks. As the developers assure, the application will save both traffic and battery power on your smartphone or tablet.

With these applications you will not only remove annoying advertising on Internet pages, but also protect your phone or tablet from viruses and learn how to remove advertisements in an Android application that may have been transferred to the device when an advertising link went to a phishing site. It will be possible to safely give a phone to children to browse the Internet and be sure that they will not see something indecent because of advertising or install a viral application for a mobile device.