How does the app modify resources to advertise

There are two types of advertisements: pop-up and open-screen advertisements. Since advertising information needs to be obtained through the network, directly deleting its network authority will result in the situation where the APP cannot obtain the advertising information when sending the advertisement request, and the purpose of removing the advertisement is achieved.

One: Delete the network permission to remove the pop-up window

Take the "stickman" APP as an example:

1. First open the AndroidKiller tool, drag the "stickman" APP into the AndroidKiller tool, and automatically start to decompile the APP. After the decompilation is complete, click the "Project Manager" option to open the "AndroidManifest.xml" file, as shown in the figure below .
2.

How does the app modify resources to advertise

2. Delete the network-related permissions in the "AndroidManifest.xml" file to achieve the function of removing the advertisement pop-up window, as shown in the figure below.
There are five types of permissions related to the network:
<!--Allow the application to change the network state, -->
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<!--Allow the application to change the WIFI Connection status -->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<!--Allows applications to access relevant network information, -->
<uses-permission android:name="android.permission .ACCESS_NETWORK_STATE"/>
<!--Allows applications to access the network information of the WIFI network card-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<!--Allows applications to use the network completely-- >
<uses-permission android:name="android.permission.INTERNET"/>

How does the app modify resources to advertise

Note: The stand-alone game will also access the network during the running process, such as game updates, file downloads, etc. Therefore, you must never delete the "android.permission.INTERNET" permission. If the permission is deleted, the APP will crash and fail to run. We only select the first four permissions to delete, and the last permission remains unconditionally.

2: Modify the APP entry interface to remove the on-screen advertisement

1. Find the activity interface in the "AndroidManifest.xml" file. If the activity interface contains the following two attributes at the same time, it is the entry interface of the program, as shown in the figure below.

<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

How does the app modify resources to advertise
2. After finding the APP entry interface, find the main interface of the game. Install the game on the emulator, click "start" in the lower left corner, enter the cmd command, open the command window, enter the "adb shell dumpsys activity top" command, press Enter to execute, get the activity information on the main interface of the game, and see that its package name is com.miniclip.angerofstick2.yyh, the activity org.cocos2dx.lua.AppActivity, is the main interface of the game we are looking for, as shown in the figure below.
How does the app modify resources to advertise
3. After obtaining the activity information of the main game interface, replace the entry interface of the original APP with the main game interface, and modify it as shown in Figure 4.5. After completion, as shown in the following figure.

How does the app modify resources to advertise
How does the app modify resources to advertise
4. After the replacement is complete, back to compile, install and run.

summary

(1) There are two ways to remove advertisements:
delete network permissions and modify program entry interface. The process is not complicated.
(2) Determine the program entry interface:
its basis is whether the attributes in the activity interface contain the following two at the same time
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent .category.LAUNCHER"/>
(3) When deleting network-related permissions, keep <!--allow applications to use the network completely-->
<uses-permission android:name="android.permission.INTERNET"/> permissions, no To delete.

Guess you like

Origin blog.51cto.com/15002917/2551318