Jump to content

Recommended Posts

  • Administrators
Posted (edited)

(PICS COMING LATER)

TUTORIAL

STEP A

1) You will need an APK (One you know a lot of, to learn with this tutorial)

- We will call the APK "tetris.apk" to make the tutorial easier to understand.

2) Download APK Manager

- Make a copy of the tetris.apk , and paste in APK manager folder "place here for modding"

http://apkmultitool.com/?q=node/5

(Windows: Apk_Manager_5.0.2.zip)

(Linux: apk_manager_linux_5.0.zip)

3) Open APK manager

ss2.png

- Now hit the following keys:

22 (To set current project) (Many times you will not need this step).

9 (To Decompile the APK)

---------------------------

STEP B

1) Get Dex2Jar

http://code.google.c.../downloads/list

- extract it.

2) Get tetris.apk , and make it a .zip

- Extract tetris.zip

- After Extracting Tetris.zip, copy the file "classes.dex" to the extracted folder of "dex2jar"

3) Drag classes.dex to the file named "dex2jar"

dex2jar.jpg

- A new file will have been created in that same folder.

------------------------------

STEP C

1) Download JDgui (java decompiler)

http://java.decompil...ree.fr/?q=jdgui

- extract it

2) the new file that was just created in STEP B , 3)

- get that file and drag it to the jdgui.exe

3) It will open.

- Now you can see everything about the game / the source (But we can't do anything to it or recompile it, there is no way)

jdgui.png

---------------------------------

Step D

1) With the file open in jdgui.exe , browse through the files

2) Whenever you find something useful that you want to change while in the jdgui.exe application, browse in the extracted tetris.apk file in STEP A

- in the Smali folder

3) Say you find in JDgui.exe , a file named "cash1234" and it says somewhere inside "cash = 500."

go to the same file location on the Smali folder... and look file "cash1234".. and for the hex equivalent to 500 , (which would be 1F4)

on gdui.exe things are much simpler than on .smali files, but you can still change them with careful looking.

4) In gdui.exe, files you have open, have easy to understand numbers, on .smali files the number are not.

- The numbers in .smali files are in HEX.

To know which number in .smali is what number, use this tool:

Hex to decimal: http://www.binaryhex...cimal-converter

Decimal to hex: http://www.binaryhex...o-hex-converter

OR

you can use "Calc-p" from the market.

---------------------------------

STEP E

1) After you have modified whatever you wanted in the .smali file, save the .smali file (do not change the name or extension)

2) open APK Manager, and hit the following keys

14 (to Compile , sign, and install on your phone)

(Before installing an edited .apk, remember to uninstal the non-edited Apk that is in your phone).

( You do not need to uninstall apk(s) from your phone that you have signed with APK Manager).

------------------

STEP F

- Play have fun.

- if Step E gave you an error, you edited something wrong, or couldnt be edited.

-----------------------------------

TIPS

- IF a number on the .smali file has 2 digits, F8, and you change it to a number of more than 2 digits, 4B86, a lot of times the .apk file will not compile again.

- Every time you make 1 edit, save, and send the edited game to your phone to see if it compiles, and if it does not crash.

- mul = multiply

- sub = substract

- add = addition

- a number with a negative "-0x1" that is equal to -1 , "-0x7" that is equal to -7 , "-0x1f4" that is equal to -500

- Hex numbers do not have to be IN CAPS, can be either.

__________________________________

Credits to Xologist.

Edited by d2dyno
  • Administrators
Posted

Is this the same process you use in the modded games you release?

I use: "reverse engineering an Android package."

  • 2 weeks later...
  • Administrators
Posted

OH This is delicious! I can't believe it can be decompiled so cleanly!

Yep. This is some juicy stuff ;)

  • 3 weeks later...
Posted

Looks pretty neat but I prefer reverse engineering method. I managed to decompile apks but stuck at how to mod it. Haiz...

  • Administrators
Posted

Looks pretty neat but I prefer reverse engineering method. I managed to decompile apks but stuck at how to mod it. Haiz...

lol.

  • 10 years later...

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
×
×
  • 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.