# Minecraft PE crashdump decoder ## Setting up environment [Install depot_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html) and make sure the tools are available in your `PATH` variable. You might need to add them to your path manually. ## Getting a crashdump file Requirements: - A **rooted** Android device with MCPE installed. 1. Trigger the crash you want to debug. **When your game crashes, DON'T RESTART IT**. 2. Copy the crash `.dmp` file from your device. Usually it'll be located in `/data/data/com.mojang.minecraftpe/files/` on the device. The crashdump will have a `.dmp` file extension. Example: `1a1b1707-81e5-8dcb-5d9760be-6ff89af9.dmp` 3. Copy the `.apk` file for the MCPE version that produced the crashdump. You can find this in a directory with a name **something like** `/data/app/com.mojang.minecraftpe/`. ## Decoding the crashdump file Run the above script: `./read_crashdump.sh ` Example: `./read_crashdump.sh minecraftpe.apk my_crashdump_file.dmp` If successful, the decoded crashdump will be written to `.decoded.txt`, for example: `my_crashdump_file.dmp.decoded.txt`. ## Pitfalls - When your game crashes, **DO NOT RESTART IT**. When you next launch the game, it will send the crashdump to Mojang, and then delete it. Once this happens, you can't get the crashdump back to debug.