Jump to content

Reverse Engineering An Android Package


Sysadmin
 Share

Recommended Posts

  • Administrators

First and foremost much love to Lohan over at Android Cracking for making antilvl.

I am not going to go in depth and talk about dalvik java, vm machines, smali/baksmali, and all that jazz. It DOES help to know what these things are and how they work... but I find that it would go beyond the scope of our aim... which is to hack games!!!

Ok, so here is what we are faced with. A new breed of games that block us from launching the game because we have GameCIH installed. We're going to need some tools.... well, actually, just one.

I like AntiLVL for many reason, but in this context I like it because it decompiles the files and then compiles and Signs them! Any apk needs to be signed in order to install. Ever seen "There is a problem parsing the package" error? There are a few reasons why you would see this error, but one of the main reasons is that someone forgot to sign the package. You MUST have a signed apk file in order for it to install. The second you change the apk, it is no longer signed (well it is, but it's not valid) and it needs to be signed again. AntiLVL does a lot more than just that.. but for right now, let's just stick with the basics.

Download the files from below. Unzip AntiLVL and place all the files in an easy to get to place. We will have to navigate there by way of command prompt. Let us suppose I place the files in a folder off my M drive called APK.

Now grab "HvyGnnr3D1.0.6 Broke.apk". It's not broken, it works; however, if you have GameCIH installed it will not launch so for us we can consider it broken. Place the HvyGnnr3D1.0.6 Broke.apk into the same directory as you did all the AntiLVL files - and because I'm lazy, rename it to HvyGnnr3D.apk.

Now open a command prompt as admin and let's make sure Java is working. Type:

java -version

When you press enter it should tell you the version of Java you have installed. If you get "Java" is a unrecognized command you will need to add Java to your enviromental variables. Please google this or if it is a huge issue I will add the steps at a later date. But let us assume that you get told you have Java installed.

Next navigate to your folder. For me I would type the following:

M:

cd apk

I'm now in the APK folder. So type the following command:

java -jar antilvl.jar -d --skip-cleanup HvyGnnr3D.apk

Wait for it to finish. When it is done you will have a new folder in the APK folder called "HvyGnnr-dump". RENAME THE FOLDER TO HvyGnnr3D!!! (You don't have to do this, but I'm lazy and prefer simple names) This is the decompiled apk. Poke around and see what you can discover. Most of the files are smali files. You can launch them in notepad (I do), but some people think Notepad++ is better.

Navigate to

HvyGnnr3D\smali\com\com2us\wrapper

and locate the file called

WrapperUtility.smali

Open it in notepad. I have smali files associated with notpad cause it makes it easier. Press Ctrl+F and do a search for the word

game

The first line you will find reads as follows:

const-string v6, "com.cih.gamecih"

What it means is moot. I do not even know, but what I do know is that there is no reason for this game to refer to gamecih. I make a small change here and change gamecih to tamecih. So the line should read

const-string v6, "com.cih.tamecih"

If you scroll two more lines down you will see the game also looking for Gamekiller. Feel free to edit this line as well. It is not a good idea to remove the line completely. It MIGHT work, but why test fate? Save your change and back out of the directory until you are in the APK folder. Go back to the command line and type the following:

java -jar antilvl.jar --assemble-only -f HvyGnnr3D HvyGnnr3D.apk

Allow it to finish. Once it is done take the apk file and throw it on your phone's SD card. Install it, launch it, and hack it with gamecih till you're happy. Game still looks for GameCIH but it does so in the wrong file location, so it will not find it.

http://www.mediafire...2jvoq48jokqs4do AntiLVL

http://www.mediafire...o1m3syk5sq3wwjx HeavyGunner 3D that will not launch

http://www.mediafire...adiat59do1fa9n8 HeavyGunner that will launch

http://www.mediafire...y71d9053g7ciufw Inotia 3 that will launch

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
  • 2 months later...

This will be a bit lame question, but how to download the apk from google play store. There only option Buy/Install and it wont download, instead it directly install the apk into our phone when it connected. I found browser plugin, but it same, when already installed we cant download the apk (and its a bit untrusted to install plugin which can access your wallet)

NVM, found it on the device it self. On /data/app if anyone need to know where the apk location after downloaded/installed.

Link to comment
Share on other sites

There's a couple other ways to get your apk not the least of which is titanium backup or lucky patcher depending on what you want to do with that particular apk

Sent from my DROID4 using Tapatalk 2

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.