Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Modding Minecraft P.E.


  • Please log in to reply
67 replies to this topic

#1

Matthewbe
    Matthewbe

    Retired Staff

  • Retired Staff
  • 343 posts
  • Location: United States
  • Minecraft: Matthewbe
  • Xbox:matthewbee9

Posted 19 October 2011 - 08:12 PM

So I was thinking...

If we can mod PC version...

How about the Mobile edition as well?

Well...let's adventure through the files...

If you go to 4shared, and look for the APK file for Minecraft Pocket Edition, and download it, etc.

And go into yojur File Manager of choice (Mine would be ASTRO, I HIGHLY Recommend this app)

Go to downloads, then look for that apk, a prompt will come up, and hit "Browse File"

Now you will see Files and Folders, the names of these will be
the "AndroidManifest" file
the "assets" folder
the "classes" file
the "lib" folder
the "META-INF" folder
the "res" folder
and the "resources" file.

Now, there are some files you can not open, but if you want you could simple email them to yourself and edit
them on your computer, wether it's a hex edit, Notepad++, or what, and you can email it back and replace it.

ASTRO, can open .XML files depending on your device, I have the Galaxy Tab 10.1.
Some files may be able to be opened in SilverEdit, available on the android market.

If anyone is curious now...

the "assets" folder contains:
a "font" folder which contains an image of the "Default" font
a "gui" folder which contains all the gui, like controls, buttons, etc.
an "item" folder which contains an image called "camera".
a "mob" folder containing the "char" image, which is the same template as PC version!
a "particles" image. It shows the snow flakes, rain drops, etc in picture.
a "sounds" folder which contains the "random" folder which contains sounds "click" "explode" and "splash"
and last but not least the terrain image!

Note: To open images, hold down on the image, tap Open As, and select Image.

the "lib" folder inside the app contains another folder named "armeabi-v7a" which contains a libminecraftpe.so file.

the META-INF folder contains the manifest, and CERT files. This is the folder we usually delete when adding mods to the PC version of Minecraft.

the "res" folder in the app contains:

the "drawable" folder, which contains a "bg32" image which is the dirt tile used in the background of the app, the "bgtiled" file which (I believe) tells the bg32 image to make a tile pattern, and also the "iconc" image which is the app's shortcut icon (size is 132,782)

the "drawable-hdpi" folder, which contains an "icon" image, which is also the same icon but very low res (im guessing for smaller devices)

the "drawable-ldpi" folder, which contains yet another (terrible quality) icon.

the "drawable-mdpi" folder, which contains THE SAME THING AS THE LAST FOLDER. Maybe as layers?

the "layout" folder, which contains: a "create_world_screen.xml" file (I'm guessing it tells the app what to show when you create a new world ), a "main.xml" file (No clue), a "mainmenu_options.xml" file ( Im now starting to guess it's the popups), and a "rename_mp_world.xml" file.

the "raw" folder, which contains (AHA!)
I see all the sounds, I will list them (Sounds are all .ogg formats); click, cloth1, cloth2, cloth 3, cloth4(I will just put 1-4 for the rest) explode, grass1-4, gravel1-4, ladder1-4, sand1-4, snow1-4, splash, stone1-4, wood1-4

the "xml" folder, which contains a "preferences" file. This is self explanatory as it memorizes your settings for the app.


If anyone can do anything with this, drop me a line. Also, I don't mind sending any files to anybody.

So far I can see that you can mod:
The font
Possibly the GUI
Your character
The terrain (That may possibly mean theme packs!)
Maybe the sounds, maybe someone could make me a .xml file to run a continuous music .ogg sound?)

So, these are ALL the files, images, and sounds related to the mobile app.

You can do this same thing as well, as long as you have the .apk file! I did this for educational purposes only, I actually bought the app, if you bought it, you should be entitled to getting the apk and editing it yourself.

Also, doing it this way, when modding any of this, you have to REINSTALL the application to your android!

I have no yet found the ACTUALL already-installed files on my Galaxy except where my maps are. If you want me to teach you how to import/export maps, to back them up, or w/e, I will make a tutorial for it!

Please comment and lemme know what you think guys! This took my a VERY long time to make!
Posted Image

*-Game Modes Forum Moderator-*

Register or log in to remove.

#2

Matthewbe
    Matthewbe

    Retired Staff

  • Retired Staff
  • 343 posts
  • Location: United States
  • Minecraft: Matthewbe
  • Xbox:matthewbee9

Posted 19 October 2011 - 10:30 PM

Note: Error: "Application not Installed" After modding it. Fail. Not sure how to resolve this yet.


Me, and everyone else on XDA-DEVELOPERS are stumped.
Posted Image

*-Game Modes Forum Moderator-*

#3

MineZ0R
    MineZ0R

    Carpenter

  • Members
  • 53 posts
  • Location: Germany
  • Minecraft: MineZ0R

Posted 20 October 2011 - 06:54 AM

As the textures are the only thing we got properly working mod-wise, check our texture modding thread out.
Also, you can get your apk without illegal websites - just use the “backup“ function of astro...
And you can just unzip the apks with 7zip...

#4

Mordraug
    Mordraug

    Tree Puncher

  • Members
  • 23 posts
  • Location: Poland, Gdańsk

Posted 20 October 2011 - 12:56 PM

In order to mod an android app, you have to disassemble it. You can do it using apk manager 4.9 it can also recompile it later. Anyway, there is no way for android app to be decompilet like java app, it's because of different compilation process. You can decompile dex classes so they will be readable.. But if you want to modify something you have to use smali. That's for regular android app. As such complex game like minecraft propably uses native coding mostly, it gets even more complicated, if not impossible...

@Mathewbe did you uninstall game before trying to install mod?

#5

marc.
    marc.

    Gold Miner

  • Members
  • 353 posts
  • Location: The Netherlands

Posted 20 October 2011 - 05:02 PM

I hope someone can hack the inventory. So you can for example use gravel from in game menu...

Posted Image


#6

Caleb
    Caleb

    Gold Miner

  • Members
  • 388 posts
  • Location: USA, GA
  • Minecraft: _Caleb

Posted 20 October 2011 - 05:23 PM

View Postmarc., on 20 October 2011 - 05:02 PM, said:

I hope someone can hack the inventory. So you can for example use gravel from in game menu...

That's separate, you hack the inventory via a hex editor.

View PostMordraug, on 20 October 2011 - 12:56 PM, said:

In order to mod an android app, you have to disassemble it. You can do it using apk manager 4.9 it can also recompile it later. Anyway, there is no way for android app to be decompilet like java app, it's because of different compilation process. You can decompile dex classes so they will be readable.. But if you want to modify something you have to use smali. That's for regular android app. As such complex game like minecraft propably uses native coding mostly, it gets even more complicated, if not impossible...

@Mathewbe did you uninstall game before trying to install mod?

He already knows what he did wrong - he needed to sign the APK.

Quote

Also, doing it this way, when modding any of this, you have to REINSTALL the application to your android!

Wrong. If you have root you can replace the apk in the /data/app folder. If you don't have root you have the sign the APK and then install it.

Posted Image


#7

500 Internal Server Error
  • Location: Test.neverCallThis() (Test.java:42)
  • Minecraft: zhuowei

Posted 21 October 2011 - 10:43 PM

View PostMordraug, on 20 October 2011 - 12:56 PM, said:

As such complex game like minecraft propably uses native coding mostly, it gets even more complicated, if not impossible...
It does. The Minecraft Pocket Edition is mostly written in C++, not Java. The main file is the libminecraftpe.so file, and is a Linux shared library. You can disassemble it by downloading the Android NDK and running arm-linux-androideabi-objdump -dC libminecraftpe.so, which would give you raw assembler code. Unfortunately, I'm not familiar with assembler, so I don't quite understand the output.
Also, I'm curious: where does Minecraft Pocket Edition store its settings? On the SD card, perhaps?

#8

Matthewbe
    Matthewbe

    Retired Staff

  • Retired Staff
  • 343 posts
  • Location: United States
  • Minecraft: Matthewbe
  • Xbox:matthewbee9

Posted 21 October 2011 - 10:55 PM

View Post500 Internal Server Error, on 21 October 2011 - 10:43 PM, said:

It does. The Minecraft Pocket Edition is mostly written in C++, not Java. The main file is the libminecraftpe.so file, and is a Linux shared library. You can disassemble it by downloading the Android NDK and running arm-linux-androideabi-objdump -dC libminecraftpe.so, which would give you raw assembler code. Unfortunately, I'm not familiar with assembler, so I don't quite understand the output.
Also, I'm curious: where does Minecraft Pocket Edition store its settings? On the SD card, perhaps?

I have to look somewhere in my internal storage....as that's the only storage I have on my Galaxy Tab 10.1
I'll look around all my files. As I'm rooted now also, that might help.

I have a 64GB SdCard that is about halfway full on my phone,  Idont want to bother with my phone.....
Posted Image

*-Game Modes Forum Moderator-*

#9

500 Internal Server Error
  • Location: Test.neverCallThis() (Test.java:42)
  • Minecraft: zhuowei

Posted 21 October 2011 - 11:33 PM

View PostMatthewbe, on 21 October 2011 - 10:55 PM, said:

I have to look somewhere in my internal storage....as that's the only storage I have on my Galaxy Tab 10.1
I'll look around all my files. As I'm rooted now also, that might help.

I have a 64GB SdCard that is about halfway full on my phone,  Idont want to bother with my phone.....
It's probably stored near the world storage folders, which are located at \games\com.mojang\
I'm curious to see whether there are hidden settings. (I'm hoping for an option to enable a F3-like debug screen. )

#10

Matthewbe
    Matthewbe

    Retired Staff

  • Retired Staff
  • 343 posts
  • Location: United States
  • Minecraft: Matthewbe
  • Xbox:matthewbee9

Posted 22 October 2011 - 12:31 AM

View Post500 Internal Server Error, on 21 October 2011 - 11:33 PM, said:

It's probably stored near the world storage folders, which are located at \games\com.mojang\
I'm curious to see whether there are hidden settings. (I'm hoping for an option to enable a F3-like debug screen. )

Did not find anything ANYWHERE.

Um..... Caleb may know. Lol.
Posted Image

*-Game Modes Forum Moderator-*

#11

Matthewbe
    Matthewbe

    Retired Staff

  • Retired Staff
  • 343 posts
  • Location: United States
  • Minecraft: Matthewbe
  • Xbox:matthewbee9

Posted 22 October 2011 - 12:31 AM

View Post500 Internal Server Error, on 21 October 2011 - 11:33 PM, said:

It's probably stored near the world storage folders, which are located at \games\com.mojang\
I'm curious to see whether there are hidden settings. (I'm hoping for an option to enable a F3-like debug screen. )

Did not find anything ANYWHERE.

Um..... Caleb may know. Lol.
Posted Image

*-Game Modes Forum Moderator-*

#12

rickythemaniac

Posted 22 October 2011 - 10:06 AM

Hi!
Interesting thread, I recently (just for educational purposes only) successfully decompiled Minecraft PE into editable java-files, so in theory, modding is possible.
Posted Image

#13

500 Internal Server Error
  • Location: Test.neverCallThis() (Test.java:42)
  • Minecraft: zhuowei

Posted 22 October 2011 - 10:09 AM

View Postrickythemaniac, on 22 October 2011 - 10:06 AM, said:

Hi!
Interesting thread, I recently (just for educational purposes only) successfully decompiled Minecraft PE into editable java-files, so in theory, modding is possible.
That's just the title screen and settings; the real stuff is the C++ code in libminecraftpe.so . I disassembled it, but couldn't understand the resulting ARM assembler.

#14

rickythemaniac

Posted 22 October 2011 - 10:12 AM

View Post500 Internal Server Error, on 22 October 2011 - 10:09 AM, said:

That's just the title screen and settings; the real stuff is the C++ code in libminecraftpe.so .

Still working on how to decompile it to decent editable files, will come back when I have achieved some result =)
Posted Image

#15

500 Internal Server Error
  • Location: Test.neverCallThis() (Test.java:42)
  • Minecraft: zhuowei

Posted 22 October 2011 - 10:14 AM

View Postrickythemaniac, on 22 October 2011 - 10:12 AM, said:

Still working on how to decompile it to decent editable files, will come back when I have achieved some result =)
I tried the objdump from the Android NDK, following the instructions from http://wiki.multimed...p?title=Objdump
The resulting file is ~15MB, and I'm too lazy to upload it.
Edit: Uploaded it at https://github.com/d...com/mpe_dis.zip

#16

rickythemaniac

Posted 22 October 2011 - 10:21 AM

View Post500 Internal Server Error, on 22 October 2011 - 10:14 AM, said:

I tried the objdump from the Android NDK, following the instructions from http://wiki.multimed...p?title=Objdump
The resulting file is ~15MB, and I'm too lazy to upload it.
Edit: Uploaded it at https://github.com/d...com/mpe_dis.zip

Yay, assembly *sigh*

Think I found a better method, will try it on my stationary computer right now
Posted Image

#17

Caleb
    Caleb

    Gold Miner

  • Members
  • 388 posts
  • Location: USA, GA
  • Minecraft: _Caleb

Posted 29 October 2011 - 09:03 PM

View PostMatthewbe, on 22 October 2011 - 12:32 AM, said:

Did not find anything ANYWHERE.

Um..... Caleb may know. Lol.

I feel so relied on.

The Minecraft PE settings reset after uninstalling and installing the game again, so I'm guessing they're stored in a default Android system location.. Like where any other app would store settings. According to a section of dev.android.com there are multiple methods of storing settings/other data.

I also looked a couple places but could not find it.


Source: http://developer.and...ta-storage.html

Posted Image


#18

500 Internal Server Error
  • Location: Test.neverCallThis() (Test.java:42)
  • Minecraft: zhuowei

Posted 11 November 2011 - 06:05 AM

I found out that the Minecraft PE demo runs now, albeit extremely slowly, on the Android Ice Cream Sandwich SDK armv7-eabi emulator. The older emulators does not seem to work as they emulate an Armv5 processor, while Minecraft requires an Arm7 processor. I ran the emulator on a separate computer, as the other computer was faster, so I could not use the OpenGL acceleration, which meant that the world refused to render, as it required OpenGL ES 2.0. The UI seemed to work fine, with the exception of the settings button from the title screen, which segfaulted Android and caused the simulator to reboot.
Pictures:
Spoiler:


#19

Zimonitrome

Posted 20 November 2011 - 07:43 PM

I've transered the files to my pc but i can't open the images... why?

Posted Image

Posted Image Posted Image

#20

rickythemaniac

Posted 28 November 2011 - 08:26 AM

View Post500 Internal Server Error, on 11 November 2011 - 06:05 AM, said:

I found out that the Minecraft PE demo runs now, albeit extremely slowly, on the Android Ice Cream Sandwich SDK armv7-eabi emulator. The older emulators does not seem to work as they emulate an Armv5 processor, while Minecraft requires an Arm7 processor. I ran the emulator on a separate computer, as the other computer was faster, so I could not use the OpenGL acceleration, which meant that the world refused to render, as it required OpenGL ES 2.0. The UI seemed to work fine, with the exception of the settings button from the title screen, which segfaulted Android and caused the simulator to reboot.
Pictures:
Spoiler:

How did you install the apk to the emu?
"adb push"?
Posted Image