Tuesday, August 25, 2015

Let's Start... AND DISASSEMBLE!

First step: what are native mods?

Native mods for BlockLauncher are apps which require a permission from BlockLauncher, so it knows that there are new mods installed on your device. I'll show you how to disassemble the libminecraftpe.so and tell you how it works.

How does this work?

BlockLauncher can load mods to Minecraft PE by replacing Minecraft PE functions with it's own. All objects in Android get an unique address in memory. BlockLauncher replaces the original function with it's own which calls custom functions and then (optionally) the original one. Native mods (addons) for BlockLauncher can do the same thing.

How do i know what functions does Minecraft PE have?

The answer is: disassembly!

Minecraft PE is an android native app - that means it has java code and c/c++ code. In android, jni code (c/c++) is generated into a .so (shared object) file. In an apk file this .so is located in /libs/armeabi-v7a/[name].so. Minecraft PE has it's library named libminecraftpe.so.
To disassemble it you'll need the following:
- A computer with a good cpu (the better the cpu is, the faster the .so is being disassembled),
- IDA (Integrated Disassembly Application),
- An apk of minecraft pe,
- File Explorer (e.g. Windows Explorer).

Last Steps

  1. Change the minecraftpe.apk name to minecraftpe.zip
  2. Open the archive
  3. Navigate to /libs/armeabi-v7a
  4. Copy libminecraftpe.so
  5. Paste it anywhere out of the archive
  6. Open IDA and open the libminecraftpe.so
  7. Change processor type to ARM LITTLE-ENDIAN
  8. Click ok and ok once again in the new window
  9. You'll get an error: Couldn't find signature... it's normal, just click ok
  10. Wait until the file is disassembled
  11. Click ALT+T to open the search window
  12. You can explore all the functions right now

5 comments:

  1. "Integrated Disassembly Application"? Seriously?

    ReplyDelete
    Replies
    1. *interactive, also yes, its the most widely used disassembly as of now.

      Delete
  2. Great post I would like to thank you for the efforts you have made in writing this interesting and knowledgeable article. Minecraft forums

    ReplyDelete
  3. You could also just use APK Editor for android and get the file from there

    ReplyDelete
    Replies
    1. Can you please explain next step after extracting from Apk Editor because i dont know what to do when i dont have the IDA or computer

      Delete