Get rid of Google ads in the app yourself

Source: Internet
Author: User
Tags string back

Recently wanted to study the removal of Google ads in the app, as a result of changing the phone, and the use of Android 6.0 system, temporarily unable to install the auxiliary software root.


Objective:

See a lot of network articles, generally are two methods: the display ad size parameters to 0, or modify the ad access connection as invalid connection, the former is more general and simple, the latter is a comparative fee, but more savings in traffic and system resources, and then found that the network of the articles are mostly reproduced, And the people who reproduced the article did not detect the actual effect and the experimental environment, no notes the experimental time, so many reproduced the article just to provide a way of thinking, but has not reached the effect, so had to re-study, because I did not learn the Java language system, can only see what parameters are to find information, more casual.


Test environment and time:

Oppo x9077, System Coloros 2.0.57 (based on Android 5.0)

Asus Zenfone2 Z00AD, WW-4.2.1.40 (based on Android 6.0)

Android bag, speedtest.net.apk (v3.2.27)

Tools, APK editor (Google market has to download, if on the computer modified with APK modified software)

Time, 20170107


Experimental steps:

The first is to refer to the following methods, http://www.miui.com/thread-425941-1-1.html, most of the network is reproduced in this way:

1) Hide ads:

Find Layout folder (General)

For the first time, find Android:layout_width= "fill_parent" replaced with android:layout_width= "0.0dip"

The second time, find android:layout_height= "wrap_content" replaced with android:layout_height= "0.0dip"

This is to change the size of the display area of the ad, by hiding the way to remove the ads, but the ads are still running, just can't see, the result is:

-"Client: Use WiFi or traffic to download ads, background resources to refresh ads, but do not see the display;"

-"Server side: Accept client ad requests, advertise and have been delivered to the client without being viewed."


Actual operation:

In the XML file that contains the keyword of the ad, just modify the XML header section of the code, change the size to 0 to achieve the entire file content hiding (the following small class too much, more annoying trouble, have tried to directly comment this large section of content, did not succeed ...) ), it is possible in several files.

Test Result: Only middle ads are hidden on my Android 5.0 and 6.0 devices.


2) Modify the ad request connection

Follow the network to replace HTTP//did not succeed, view the file found many links are direct//after the address, and some links are software must, so the modification in three steps

The first step is to replace the necessary link with any string (such as howareyou.cc), the second step, replace the remaining link with another invalid link (such as 0.0.0.0 or localhost), the third step, replace the first step of the string back to the necessary link, complete.

Test Result: Two ads were successfully hidden on my Android 5.0 device (the ads below when the test was completed and the ad in the middle after the test), but only the middle ad was hidden on my Android 6.0 ... (Although try to use this method, but very time to find, temporarily first busy other things--20170107)


Finally had to use the hidden method, on my Android 6.0 test success ...


The following methods can be consulted, but need to combine their own Android package to make adjustments, more in-depth method Oh, the online reprint is really just copy and paste it AH ~ ~

Http://android.tgbus.com/faq/511855.shtml

http://blog.csdn.net/crazyjiang/article/details/8498789

Interested in learning about mobile development and Java knowledge, know the rules to do more handy.



Resources:

Http://android.tgbus.com/faq/511855.shtml

http://blog.csdn.net/crazyjiang/article/details/8498789

Http://www.miui.com/thread-425941-1-1.html



This article is from the "Rickyhul" blog, make sure to keep this source http://rickyh.blog.51cto.com/10934856/1890286

Get rid of Google ads in the app yourself

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.