The first Android reverse

Source: Internet
Author: User

Game: The Great Adventures of Gollum Kingdom

Platform: Android

Goal:

1. Removal of clutter tips (this goal)

2. Remove Google pop-up windows

3. Crack "All stages"

Breaking text begins:

1. Use apkide to decompile; search string "problem setting up In-app", see

Then came

The analysis function should pay attention to: The return value, here is V, that is void, so the downward attention should be able to achieve our goal, there is no need to pay attention to; The function: stitching the target string and passing it as a parameter to the attention function;

The trace function comes to:

This function functions: Use the reflection call in Java, that is, this function uses the Java reflection mechanism, invokes the SENDTOASTMSG function in the gameapplication; continue to trace to:

This function: Using handle in Java to send messages is essentially passing data, note that handle messages are generally handled in Handlemessage in the class that implements handle, usually the switch branch expression is a message The handle sendMessage is the target of the V0 object, that is, the field MyHandler in the Golorunnerstart class; So continue to trace to:

We need to find out who the value of the MyHandler variable is, pay attention to the Iput-object statement, see what value is assigned to this variable; This graph, indeed, conforms to the conditions of concern, but, slightly analyzed, knowing that this is <init>v, is a constructor, The place where the variables are initialized, and then see MyHandler is given v1, and v1=0x0; So here is not worth paying attention to, continue to look for:

Here is where to pay attention, see MyHandler is given a meaningful value; This value is a class that implements the handler, and this class is the target of SendMessage; So the trace comes to:

See Handlemessage, remember the previous SendMessage when the What field is given the value is? Know, then see it, do not remember the words, look back and then come back;

Here is a combination of what the value, you can know, the front SendMessage sent over the message, so that the program executed:: Sswitch_c branch; see:

Remember what SendMessage sent in addition to what the value is? And the string that we searched for in the first step, and the string after the concatenation of the other string, that is, the complete annoying string shown on our target image, the branch that gets the string, and then Call the wrapped function to display the toast Showtoast to show us the annoying hint, and here we can modify the code perfectly, how to modify it:

If this is the end, one might ask why not follow up on the showtoast? In fact, this showtoast function should be followed by a look inside, depending on whether the toast object exists, choose one of two ways to use toast (one is to use a Toast object, to make a maketest static method that uses the Toast Class) Because this wrapper function Showtoast function, it may be used elsewhere to show the hint we don't hate, so I don't recommend changing the code in this wrapper function, and finally giving the wrapper function:

The first Android reverse

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.