How to Crack an Android App
How to Crack an Android App
← Home
hotsjf
18 Jan 2014
OK, the purpose of this guide is to show you how to reverse engineer Android applications such as games. I’m
not going to go into much detail on anything else, as I want to keep this guide simple. But this method can be
used to alter just about anything you like in an APK application.
If you, like me, have ever played those annoying, addictive Android games that never end, and may even
require you to pay money to advance, this is a work around — especially if you like to cheat.
Tools Needed
Please download and install the following programs if you don’t already have them. Your success will depend
on this.
xdaAutoTool
Android SDK
The Android SDK also contains an emulator. This is useful if you would like to test your work on the emulator
before installing the APK on your Android device.
Let’s Begin
OK, you have the SDK installed, and have downloaded xdaAutoTool. You now need a copy of the APK file you
would like to modify. I’m going to assume that you can locate the APK file. If you have difficulty, Google is
your friend.
.line 26
sget v2, LCB/somegame/Defense;->POWER_TURRET:I
aget v0, v1, v2
.line 27
.local v0, level:I
if-lez v0, :cond_0
.line 28
sget-object v1, LCB/somegame/Defense;->shopItemData:[[I
sget v2, LCB/somegame/Defense;->POWER_TURRET:I
aget-object v1, v1, v2
add-int/lit8 v2, v0, -0x1
aget v1, v1, v2
iput v1, p0, LCB/somegame/Defense/tower/Turret;->powerAdd:I
.line 30
:cond_0
sget-object v1, LCB/somegame/Defense;->instance:LCB/somegame/Defense;
iget-object v1, v1, LCB/somegame/Defense;->shopItemsLevel:[I
All the references to POWER_TURRET are a dead giveaway that you are in the right place to make your tweak.
NOTE: Please visit this site for an explanation of smali code.
Just by reading the code, you can see that this script is determining what the firepower will be for the turret.
It is using sget to pull information that will determine the firepower.
The iput call is the key here. That is where the script sets the firepower level. We want to give it a little boost.
The aget call grabs an integer array element and stores it in v1.
v1 is our target.
Let’s add the following between the aget and the iput calls.:
mul-int v1, v1, v1 tells the program to multiply the integer in v1 by itself and put the result in v1.
Save the file. Congratulations. You have just made your first tweak. Do not get too carried away with making
changes. I would recommend only making one or two at a time before testing the program. This will make
troubleshooting much easier.
via: neatphp
downvote
05 Mar 2015
hotsjf
06 Mar 2015
Ak0-Sardashti
28 Sep 2015
the topice
Share Share
Full Version