Guide:Mobile inventory editing

This is a guide for inventory editing on the Mobile version of Terraria.

Background
The world of Terraria features a number of interesting items which can be obtained gradually through normal gameplay, as well as some items that are present in the game code but inaccessible through normal means. However, many players (for various reasons) find this to be a slow and lacking way of acquisition. Hence there are many tools and methods to make desired items in desired quantities more accessible. Examples for the desktop version of Terraria include various inventory editors and map viewers.

The Mobile version of Terraria is by comparison more difficult to enable similar functions on. This guide attempts to list three methods which can be used to do this on devices running the Android system.

Method 1 works by modifying the world file in real time (tested on version 5.0, but should work on versions 6 and 7).

Methods 2 & 3 work by modifying the character file (tested on Android KitKat version 4.4.4(method number 3 does not work on Android Lollipop versions 5.x+. Both methods work by modifying a character file.

NOTE: Before you continue, remember that characters can be backed up. If you need more of an item that you already have, it is advised you not edit your inventory, and instead just duplicate it by backing up characters.

Requirements

 * Root permission (also known as "superuser", but not to be confused with apps that can be used to utilize root permission (see below for examples)). Root permission is a feature in which a device system has been altered to grant the user additional administrative privileges such as deeper system browsing, enhanced features of certain apps, access to normally hidden and unavailable files, and the ability to edit and/or remove normally inaccessible data. Despite the multitude of benefits, most (if not all) devices that can be rooted are initially not, due to user safety and protection of "bloatware". Rooting can be a complex and hazardous process with the risk of destroying your device - likely also voiding your warranty - and every Android version has its own way of being rooted. As such, this guide does not have the capacity to describe rooting procedures for all Android devices capable of running Terraria.
 * As part of the rooting process, an app allowing the user to control what apps are granted root permission is required. The installation of this will likely be part of any guide providing root instructions for your device. Examples of such apps are SuperSU, Superuser by ChainsDD, Superuser by ClockworkMod, and Kingo SuperUser. SuperSU was used when creating this guide.


 * Apps: GameGuardian OR Hex Editor OR Game Killer + Lucky Patcher (see respective sections below).

Character backup
To prevent any loss of data it might be a good idea to backup characters before modifying them. Characters are (on the device used when creating this guide) stored in. Character names are stored as  (i.e. a character named "Paul" will be stored as " " where   is a number). This directory can be explored and the playerfile copied with root permission-utilizing system browsers such as the Root Browser app. It appears that the in-game character selection list and the playername.player files list is in reverse order, meaning the copy will appear above the original file in the selection screen.

Notice that the number appears to determine whether the game can recognize the .player file. If a character backup is created and later re-inserted into the folder for a newer version of the game, the game may not be able to load the character. In such cases, do the following:
 * Enter the game and create a character with the same name as your backup.
 * Exit the game and navigate to the new character's file.
 * Copy the new character's file number and replace your backup's file number with it.
 * Replace the new character file with your old character file. Your backup should now be playable.

The above information also applies to world-files, which are similarly saved as.

Items needed in game

 * 1 Chest or Container of any type. A barrel or trashcan are valid substitutions for a chest.
 * It is advised you place the container close to your spawn point, as you will need to save and exit the world on completion.
 * Any number of easily acquired block/item (Wood(any type), Dirt, Gel, etc.) Note: The more of the item you have, the easier it will be to find the value.

Step 1. Download and Install GameGuardian:

 * Download the apk file from the above webpage. Once downloaded, run the apk file. If this is your first time installing a non-playstore application, you will likely need to allow installation from unknown sources. See image 1
 * Once installed, open the app. You will be prompted to allow the app Super User Permission. Select Okay See image 2
 * After you provide permission, you will see a secondary installation taking place. This is a defensive installation that will prevent apps on your device from detecting GameGuardian's presence. There are a few apps that will not allow users to run them if a memory editor is present. GameGuardian gets around this by installing itself with a random process name. The name will be unique to your device See image 3. You will be prompted to allow Superuser permission to this installation as well. Note: this secondary installation is not mandatory and can be canceled. You may also refuse Superuser Permission on the second request. Refusing runs the risk of other apps on your device detecting GameGuardian.

Step 2. Preparation:

 * Once the app has Superuser Permission, open Terraria and navigate to the main menu.
 * Next, press your Home button on your device, leaving Terraria running.
 * Open GameGuardian again and you should see a list of running applications. Navigate through the list and select Terraria. If the list does not automatically appear, you can open it by touching current process name in the top left corner. See image 4
 * Once you have directed GameGuardian to Terraria, minimize GameGuardian by pressing your Back button on your device. You can maximize it at any time by clicking the floating icon. You can also close it if necessary by opening the menu and choosing Exit
 * Load your world in Terraria and acquire a container and a handfull of any item.
 * Place the container close to your spawn point and deposit your chosen item into it.
 * Maximize GameGuardian by pressing the floating icon.

Step 3. Finding your values:

 * In the top right side of GameGuardian, press the magnifying glass icon(the one WITHOUT the question mark) See image 5.
 * You should see a new widow pop up. In the empty value field, enter the quantity of your chosen item. You should also see a box with three "???". Press that box and choose "Word" Yours should look like image 6. Once done, press Search.
 * On this first search you will likely have too many results to judge which is the one you need. Go back to Terraria and move your item from its current slot to any other slot. Once the item is moved, open GameGuardian again and do another search. This time the value you search for should be "ZERO"
 * Alternatively, you can swap your first item with another that you have more or less of and search for that quantity instead See image 7.
 * Repeat the search process until you only have one value in the results list. Once you have only one value, proceed to the next step.

Step 4. Finding additional information:
In order to be able to change what the item IS, you need to find two more values. No worries though, the values for the item name and icon are stored in a static address directly next to your quantity.
 * In the results list, long press on your value until a box of options pop up. Choose "Go to Address".
 * On this screen, you will likely be overwhelmed by the amount of information on the screen. To simplify the view, Click the button with three lines directly next to the refresh circle in the top right See image 8. You will be presented with several options. Choose "Value Format"
 * Uncheck all boxes with the exception of the "Word" box See image 9.
 * Now that the values are easier to read, select the check box next to the one that matches your value, as well as the first and third values directly above yours(these two extra values should be the same) See image 10.
 * One additional value is optional. You will only need it if you want to add Modifiers
 * This guide will assume you chose to do this step
 * Long press on the topmost value that you selected(value "3" in image 10) and choose "Offset Calculator"
 * In the offset box, type -82 and press "GOTO" See image 11.
 * Select the checkbox next to the topmost value on the list See image 12.
 * Now that you have your four values marked, Click the top right button with three lines again(the one next to the refresh circle)See image 12 and choose "Save Values".
 * Once you have sent the values to the saved list, press the icon at the top shaped like a floppy disk("What's a floppy disk?", you ask. Google it...) This will take you to a page with the values you saved displayed.
 * The first value in this list is for the Prefix modifier. Rename this value "Prefix" OR "Modifier" by clicking the value and selecting the "Variable Name" box. Simply rename the variable without changing the value for now.
 * The second and third values are for the item name and item icon, select the checkbox on these See image 13. This will allow you to modify both at the same time. Rename these accordingly(Note: It won't matter which you name "Icon" or "Name", for that matter you could just name them both "Item", naming them only makes it easier for you to tell what's what.)
 * The fourth and final value is the items' quantity. Name it accordingly.
 * Once you've named the values to something intelligible(hopefully), click the three line button in the top right(next to the refresh circle) and choose save. Android 5.x + users will be able to load this list in the future after completely exiting their game and these 4 values will not have changed.

Step 5. Adding/Editing an item

 * Find the internal item ID of the item you wish to add.
 * Click the top three line button(same one) and choose "Modify Selected Values"
 * Change the values to the desired item.(Note: Some mobile exclusive items have multiple ID's. See the section at the bottom of this page for more information.)
 * Next, change the quantity value to the desires amount. Different items have different maximum stack sizes: Potions have a limit of 30, dirt and most blocks have a limit of 999, etc. You can exceed this limit up to 32767.
 * If the Item you are adding is a weapon, armor, tool, etc. that normally does not stack, It is advised to make the quantity value "One".
 * If the item you are adding is an equipable item, you may want to add a prefix modifier.
 * Once all values have been changed to suit your needs, DO NOT MOVE THE ITEM INTO THE PLAYERS INVENTORY!!! If you want to add more items in, move the item into another slot in the container and repeat Step 5.
 * Once you are completely finished adding/editing items, SAVE AND EXIT TO THE GAMES MAIN MENU!

Adding mobile items
It is possible to use Hex Editor or Game Killer to add mobile-exclusive items as well, but the item IDs for these are not as straightforward as for items in the PC version such as the Palladium Sword. For some reason it seems mobile items have two item IDs, and sometimes only the latter will work (the former may create an item that simply disappears when you try using it). As such it is recommended to only use the second ID. A table providing these are shown below.
 * Some items, such as pets, may still disappear when trying to use them. In such cases, try edit the item to be a stack (i.e. of 2 or more) instead of single (image 18). The stack can be used and un-stacked without disappearing.