Table gg
provides access to the GameGuardian functions.
More...
Public Member Functions | |
mixed | allocatePage (int mode=gg.PROT_READ|gg.PROT_EXEC, long address=0) |
Allocated memory page (4 KB) in the target process. More... | |
string | bytes (string text, string encoding='UTF-8') |
Gets the text bytes in the specified encoding. More... | |
mixed | copyMemory (long from, long to, int bytes) |
Copy memory. More... | |
nil | copyText (string text, bool fixLocale=true) |
Copy text to the clipboard. More... | |
string | disasm (int type, long address, int opcode) |
Disassemble the specified value. More... | |
mixed | dumpMemory (long from, long to, string dir, int flags=nil) |
Dump memory to files on disk. More... | |
table | getRangesList (string filter='') |
Get the list of memory regions of the selected process. More... | |
mixed | getTargetInfo () |
Get a table with information about the selected process if possible. More... | |
mixed | getTargetPackage () |
Get the package name of the selected process, if possible. More... | |
bool | isPackageInstalled (string pkg) |
Check whether the specified application is installed on the system by the package name. More... | |
mixed | makeRequest (string url, table headers={}, string data=nil) |
Performs a GET or POST request over HTTP or HTTPS. More... | |
bool | processKill () |
Force kill the selected process. More... | |
nil | require (string version=nil, int build=0) |
Checks the version of GameGuardian. More... | |
mixed | saveVariable (mixed variable, string filename) |
Saves the variable to a file. More... | |
nil | skipRestoreState () |
Do not restore the state of the GameGuardian, after the script is completed. More... | |
nil | sleep (int milliseconds) |
Causes the currently executing script to sleep (temporarily cease execution) for the specified number of milliseconds, subject to the precision and accuracy of system timers and schedulers. More... | |
mixed | unrandomizer (long qword=nil, long qincr=nil, double double_=nil, double dincr=nil) |
Work with Unrandomizer. More... | |
Dialogs and toasts | |
Methods for show various dialogs and toasts. | |
nil | toast (string text, bool fast=false) |
Show the toast. More... | |
int | alert (string text, string positive='ok', string negative=nil, string neutral=nil) |
Displays a dialog with several buttons. More... | |
mixed | prompt (table prompts, table defaults={}, table types={}) |
Displays the dialog for data entry. More... | |
mixed | choice (table items, string selected=nil, string message=nil) |
Displays the selection dialog from the list. More... | |
mixed | multiChoice (table items, table selection={}, string message=nil) |
Displays the multiple choice dialog. More... | |
GameGuardian UI related methods. | |
bool | isVisible () |
Check if the GameGuardian UI is open. More... | |
nil | setVisible (bool visible) |
Open or close the GameGuardian UI. More... | |
int | getActiveTab () |
Get active tab in the GameGuardian UI. More... | |
UI button related methods | |
nil | showUiButton () |
Shows the UI button. More... | |
nil | hideUiButton () |
Hides the UI button. More... | |
mixed | isClickedUiButton () |
Gets the click status of the ui button. More... | |
Memory ranges related methods | |
int | getRanges () |
Return memory regions as bit mask of flags REGION_*. More... | |
nil | setRanges (int ranges) |
Set memory regions to desired bit mask of flags REGION_*. More... | |
Search related methods | |
mixed | searchNumber (string text, int type=gg.TYPE_AUTO, bool encrypted=false, int sign=gg.SIGN_EQUAL, long memoryFrom=0, long memoryTo=-1, long limit=0) |
Perform a search for a number, with the specified parameters. More... | |
mixed | refineNumber (string text, int type=gg.TYPE_AUTO, bool encrypted=false, int sign=gg.SIGN_EQUAL, long memoryFrom=0, long memoryTo=-1, long limit=0) |
Perform a refine search for a number, with the specified parameters. More... | |
mixed | startFuzzy (int type=gg.TYPE_AUTO, long memoryFrom=0, long memoryTo=-1, long limit=0) |
Start a fuzzy search, with the specified parameters. More... | |
mixed | searchFuzzy (string difference='0', int sign=gg.SIGN_FUZZY_EQUAL, int type=gg.TYPE_AUTO, long memoryFrom=0, long memoryTo=-1, long limit=0) |
Refine fuzzy search, with the specified parameters. More... | |
mixed | searchAddress (string text, long mask=-1, int type=gg.TYPE_AUTO, int sign=gg.SIGN_EQUAL, long memoryFrom=0, long memoryTo=-1, long limit=0) |
Perform an address search with the specified parameters. More... | |
mixed | refineAddress (string text, long mask=-1, int type=gg.TYPE_AUTO, int sign=gg.SIGN_EQUAL, long memoryFrom=0, long memoryTo=-1, long limit=0) |
Perform an address refine search with the specified parameters. More... | |
mixed | searchPointer (int maxOffset, long memoryFrom=0, long memoryTo=-1, long limit=0) |
Searches for values that may be pointers to elements of the current search result. More... | |
Results related methods | |
long | getResultsCount () |
Get the number of found results. More... | |
mixed | getResults (int maxCount, int skip=0, long addressMin=nil, long addressMax=nil, string valueMin=nil, string valueMax=nil, int type=nil, string fractional=nil, int pointer=nil) |
Load results into results list and return its as a table. More... | |
mixed | editAll (string value, int type) |
Edit all search results. More... | |
nil | clearResults () |
Clear the list of search results. More... | |
mixed | removeResults (table results) |
Remove results from the list of results found. More... | |
mixed | loadResults (table results) |
Loads the search results from the table. More... | |
mixed | getSelectedResults () |
Returns the selected items in the search results. More... | |
Values related methods | |
mixed | setValues (table values) |
Set the values for the list of items. More... | |
mixed | getValues (table values) |
Gets the values for the list of items. More... | |
mixed | getValuesRange (table values) |
Get the memory regions for the passed value table. More... | |
Memory editor related methods | |
nil | gotoAddress (long address) |
Go to the address in the memory editor. More... | |
mixed | getSelectedElements () |
Returns the selected adresses in the memory editor. More... | |
Pause related methods | |
bool | processPause () |
Pauses the selected process. More... | |
bool | processResume () |
Resumes the selected process if it paused. More... | |
bool | processToggle () |
Toggle the pause state of the selected process. More... | |
bool | isProcessPaused () |
Get pause state of the selected process. More... | |
Speedhack related methods | |
mixed | timeJump (string time) |
Performs a time jump. More... | |
double | getSpeed () |
Get the current speed from the speedhack. More... | |
mixed | setSpeed (double speed) |
Set the speed of the speedhack. More... | |
Saved lists related methods | |
mixed | loadList (string file, int flags=0) |
Load the saved list from the file. More... | |
mixed | saveList (string file, int flags=0) |
Save the saved list to the file. More... | |
mixed | clearList () |
Clear the saved list. More... | |
mixed | addListItems (table items) |
Add items to the saved list. More... | |
mixed | getListItems () |
Return the contents of the saved list as a table. More... | |
mixed | removeListItems (table items) |
Remove items from the saved list. More... | |
mixed | getSelectedListItems () |
Returns the selected items in the saved lists. More... | |
Debug related methods. | |
string | getFile () |
Gets the filename of the currently running script. More... | |
int | getLine () |
Gets the current line number of the script being executed. More... | |
Locale related methods | |
string | getLocale () |
Gets the string with the currently selected locale in the GameGuardian. More... | |
string | numberToLocale (string num) |
Replaces the decimal separator and the thousands separator with a localized version. More... | |
string | numberFromLocale (string num) |
Replaces the localized decimal separator and thousands separator with separators used in Lua (such as in English). More... | |
Public Attributes | |
string | ANDROID_SDK_INT |
The SDK version of the Android currently running on this device. More... | |
string | PACKAGE |
Package name of the GameGuardian. More... | |
GameGuardian version info | |
string | VERSION |
Text version of the GameGuardian. More... | |
int | VERSION_INT |
Numeric version of the GameGuardian. More... | |
int | BUILD |
Number build of the GameGuardian. More... | |
Dirs for files | |
string | FILES_DIR |
The path of the directory holding GameGuardian files. More... | |
string | CACHE_DIR |
The absolute path to the GameGuardian specific cache directory on the filesystem. More... | |
string | EXT_FILES_DIR |
The absolute path to the directory on the primary shared/external storage device where the GameGuardian can place persistent files it owns. More... | |
string | EXT_CACHE_DIR |
The absolute path to the GameGuardian specific directory on the primary shared/external storage device where the GameGuardian can place cache files it owns. More... | |
string | EXT_STORAGE |
The primary shared/external storage directory. More... | |
Type flags (TYPE_*) | |
int | TYPE_AUTO |
Type Auto . More... | |
int | TYPE_BYTE |
Type Byte . More... | |
int | TYPE_WORD |
Type Word . More... | |
int | TYPE_DWORD |
Type Dword . More... | |
int | TYPE_XOR |
Type Xor . More... | |
int | TYPE_FLOAT |
Type Float . More... | |
int | TYPE_QWORD |
Type Qword . More... | |
int | TYPE_DOUBLE |
Type Double . More... | |
Search (expect fuzzy) sign flags (SIGN_*) | |
| |
int | SIGN_EQUAL |
int | SIGN_NOT_EQUAL |
int | SIGN_LESS_OR_EQUAL |
int | SIGN_GREATER_OR_EQUAL |
Fuzzy sign flags (SIGN_FUZZY_*) | |
| |
int | SIGN_FUZZY_EQUAL |
int | SIGN_FUZZY_NOT_EQUAL |
int | SIGN_FUZZY_LESS |
int | SIGN_FUZZY_GREATER |
Memory regions flags (REGION_*) | |
int | REGION_JAVA_HEAP |
"Jh: Java heap" memory region. More... | |
int | REGION_C_HEAP |
"Ch: C++ heap" memory region. More... | |
int | REGION_C_ALLOC |
"Ca: C++ alloc" memory region. More... | |
int | REGION_C_DATA |
"Cd: C++ .data" memory region. More... | |
int | REGION_C_BSS |
"Cb: C++ .bss" memory region. More... | |
int | REGION_PPSSPP |
"PS: PPSSPP" memory region. More... | |
int | REGION_ANONYMOUS |
"A: Anonymous" memory region. More... | |
int | REGION_JAVA |
"J: Java" memory region. More... | |
int | REGION_STACK |
"S: Stack" memory region. More... | |
int | REGION_ASHMEM |
"As: Ashmem" memory region. More... | |
int | REGION_VIDEO |
"V: Video" memory region. More... | |
int | REGION_OTHER |
"O: Other (slow)" memory region. More... | |
int | REGION_BAD |
"B: Bad (dangerous)" memory region. More... | |
int | REGION_CODE_APP |
"Xa: Code app (dangerous)" memory region. More... | |
int | REGION_CODE_SYS |
"Xs: Code system (dangerous)" memory region. More... | |
Flags for load the saved lists (LOAD_*) | |
| |
int | LOAD_VALUES_FREEZE |
Load values and freeze. More... | |
int | LOAD_VALUES |
Load values. More... | |
int | LOAD_APPEND |
Append to list. More... | |
Flags for save the saved lists (SAVE_*) | |
| |
int | SAVE_AS_TEXT |
Save list as text. More... | |
Flags for field "freezeType" (FREEZE_*) | |
| |
int | FREEZE_NORMAL |
Freezes the value, not allowing it to change. More... | |
int | FREEZE_MAY_INCREASE |
Allows the value to increase, but does not allow to decrease. More... | |
int | FREEZE_MAY_DECREASE |
Allows the value to decrease, but does not allow to increase. More... | |
int | FREEZE_IN_RANGE |
Allows the value to change only within specified range. More... | |
Flags for field "mode" (PROT_*) | |
| |
int | PROT_NONE |
Pages may not be accessed. More... | |
int | PROT_READ |
Pages may be read. More... | |
int | PROT_WRITE |
Pages may be written. More... | |
int | PROT_EXEC |
Pages may be executed. More... | |
Flags for the pointer filter in getResults (POINTER_*) | |
| |
int | POINTER_NO |
Not a pointer. More... | |
int | POINTER_READ_ONLY |
Pointer to read-only memory. More... | |
int | POINTER_WRITABLE |
Pointer to writable memory. More... | |
int | POINTER_EXECUTABLE |
Pointer to executable memory. More... | |
int | POINTER_EXECUTABLE_WRITABLE |
Pointer to executable and writable memory. More... | |
Flags for dumpMemory (DUMP_*) | |
| |
int | DUMP_SKIP_SYSTEM_LIBS |
Skip system libraries. More... | |
Constants for the result in getActiveTab (TAB_*) | |
| |
int | TAB_SETTINGS |
Settings tab. More... | |
int | TAB_SEARCH |
Search tab. More... | |
int | TAB_SAVED_LIST |
Saved list tab. More... | |
int | TAB_MEMORY_EDITOR |
Memory editor tab. More... | |
Constants for the type in disasm (ASM_*) | |
| |
int | ASM_ARM |
Arm x32. More... | |
int | ASM_THUMB |
Thumb. More... | |
int | ASM_ARM64 |
ARM x64. More... | |
Table gg
provides access to the GameGuardian functions.
A global instance gg
is automatically available. See the function details below for examples on usage.
You can print all availaible fields and methods via call print:
mixed addListItems | ( | table | items | ) |
Add items to the saved list.
items | A table with a list of items to add. Each element is a table with the following fields: address (long, required), value (string with a value, optional), flags (one of the constants TYPE_*, required), name (string, optional), freeze (boolean, optional, default false), freezeType (one of the constants FREEZE_*, optional, default FREEZE_NORMAL), freezeFrom (string, optional), freezeTo (string, optional). Values must be in English locale. |
int alert | ( | string | text, |
string | positive = 'ok' , |
||
string | negative = nil , |
||
string | neutral = nil |
||
) |
Displays a dialog with several buttons.
The return result depends on which of the buttons was pressed. The dialog can be canceled with the "Back" button (return code 0).
text | Text message. |
positive | Text for positive button. This button return code 1. |
negative | Text for negative button. This button return code 2. |
neutral | Text for neutral button. This button return code 3. |
mixed allocatePage | ( | int | mode = gg.PROT_READ | gg.PROT_EXEC , |
long | address = 0 |
||
) |
Allocated memory page (4 KB) in the target process.
mode | Bit mask of flags PROT_*. |
address | If is not 0, then the kernel takes it as a hint about where to place the page; on Android, the page will be allocated at a nearby address page boundary. |
string bytes | ( | string | text, |
string | encoding = 'UTF-8' |
||
) |
Gets the text bytes in the specified encoding.
text | |
encoding | Possible values: 'ISO-8859-1', 'US-ASCII', 'UTF-16', 'UTF-16BE', 'UTF-16LE', 'UTF-8' |
mixed choice | ( | table | items, |
string | selected = nil , |
||
string | message = nil |
||
) |
Displays the selection dialog from the list.
The list is made up of the items
table. Selected
sets the index of the table that will be selected by default. Items
must be numberic-array if you want show items in specified order.
items | Table with items for choice. |
selected | Is not specified or is specified as nil , then the list will be without the default choice. |
message | Specifies the optional title of the dialog box. |
nil
if the dialog has been canceled, or the index of the selected item. mixed clearList | ( | ) |
nil clearResults | ( | ) |
Clear the list of search results.
mixed copyMemory | ( | long | from, |
long | to, | ||
int | bytes | ||
) |
Copy memory.
from | Address for source of copy. |
to | Address for destination of copy. |
bytes | Amount bytes to copy. |
true
or string with error. nil copyText | ( | string | text, |
bool | fixLocale = true |
||
) |
Copy text to the clipboard.
If the second parameter is true or not specified, the text will be converted as a number from the English locale to the selected one.
text | The text for copy. |
fixLocale | Flag to disable fix locale-specific separators. |
string disasm | ( | int | type, |
long | address, | ||
int | opcode | ||
) |
Disassemble the specified value.
type | Type. One of the constants ASM_*. Throws an error if a non-existent type is passed. |
address | The address of the value. May be needed for some opcodes. |
opcode | Disassembly instruction. To disassemble Thumb32, the first 16-bit instruction should be in the lower half-word of the opcode, and the second in the upper half-word. |
mixed dumpMemory | ( | long | from, |
long | to, | ||
string | dir, | ||
int | flags = nil |
||
) |
Dump memory to files on disk.
from | Address for start dump. Will be rounded to largest possible memory page. |
to | Address for end dump. Will be rounded to smallest possible memory page. |
dir | Directory for save dump files. |
flags | Set of flags DUMP_* or nil. |
true
or string with error. mixed editAll | ( | string | value, |
int | type | ||
) |
Edit all search results.
Before call this method you must load results via getResults. Value
will be applied only for results with specified type
.
value | String with data for edit. Must be in English locale. |
type | One constant from TYPE_*. |
int getActiveTab | ( | ) |
string getFile | ( | ) |
Gets the filename of the currently running script.
'/sdcard/Notes/gg.example.lua'
int getLine | ( | ) |
Gets the current line number of the script being executed.
24
mixed getListItems | ( | ) |
Return the contents of the saved list as a table.
address
(long), value
(number), flags
(one of the constants TYPE_*), name
(string), freeze
(boolean), freezeType
(one of the constants FREEZE_*), freezeFrom
(string), freezeTo
(string). string getLocale | ( | ) |
Gets the string with the currently selected locale in the GameGuardian.
en_US, zh_CN, ru, pt_BR, ar, uk
int getRanges | ( | ) |
table getRangesList | ( | string | filter = '' | ) |
Get the list of memory regions of the selected process.
filter | The filter string. If specified, only those results that fall under the filter will be returned. Optional. The filter supports wildcards: ^ - the start of the data, $ - the end of the data, * - any number of any characters, ? - the one any character. |
state, start, end, type, name, internalName
.mixed getResults | ( | int | maxCount, |
int | skip = 0 , |
||
long | addressMin = nil , |
||
long | addressMax = nil , |
||
string | valueMin = nil , |
||
string | valueMax = nil , |
||
int | type = nil , |
||
string | fractional = nil , |
||
int | pointer = nil |
||
) |
Load results into results list and return its as a table.
maxCount | Max count of loaded results. |
skip | The count of skipped results from the beginning. By default - 0. |
addressMin | The minimum value of the address. Number or nil. |
addressMax | The maximum value of the address. Number or nil. |
valueMin | The minimum value of the value. Number as string or nil. |
valueMax | The maximum value of the value. Number as string or nil. |
type | Set of flags TYPE_* or nil. |
fractional | Filter by fractional values. If the first character is "!", then the filter will exclude all values whose fractional part matches the specified one. |
pointer | Set of flags POINTER_* or nil. |
address
(long), value
(number), flags
(one of the constants TYPE_*). long getResultsCount | ( | ) |
Get the number of found results.
mixed getSelectedElements | ( | ) |
Returns the selected adresses in the memory editor.
mixed getSelectedListItems | ( | ) |
Returns the selected items in the saved lists.
address
(long), value
(number), flags
(one of the constants TYPE_*), name
(string), freeze
(boolean), freezeType
(one of the constants FREEZE_*), freezeFrom
(string), freezeTo
(string). mixed getSelectedResults | ( | ) |
Returns the selected items in the search results.
address
(long), value
(number), flags
(one of the constants TYPE_*). double getSpeed | ( | ) |
Get the current speed from the speedhack.
mixed getTargetInfo | ( | ) |
Get a table with information about the selected process if possible.
The set of fields can be different. Print the resulting table to see the available fields.
Possible fields: firstInstallTime, lastUpdateTime, packageName, sharedUserId, sharedUserLabel, versionCode, versionName, activities (name, label), installer, enabledSetting, backupAgentName, className, dataDir, descriptionRes, flags, icon, labelRes, logo, manageSpaceActivityName, name, nativeLibraryDir, permission, processName, publicSourceDir, sourceDir, targetSdkVersion, taskAffinity, theme, uid, label, cmdLine, pid, x64, RSS.
cmdLine
- The contents of /proc/pid/cmdline
. pid
- PID of the process. x64
- True if the 64-bit process. RSS
- The amount of RSS memory for the process, in KB.
Read about PackageInfo and ApplicationInfo in Android
for means each field.
nil
. mixed getTargetPackage | ( | ) |
Get the package name of the selected process, if possible.
nil
. 'com.blayzegames.iosfps'
mixed getValues | ( | table | values | ) |
Gets the values for the list of items.
values | The table as a list of tables with address and flags fields (one of the constants TYPE_*). |
address
(long), value
(number), flags
(one of the constants TYPE_*). mixed getValuesRange | ( | table | values | ) |
Get the memory regions for the passed value table.
values | The table can be either an address list or a list of tables with the address field. |
Ch
, for example). Or string with error. nil gotoAddress | ( | long | address | ) |
Go to the address
in the memory editor.
address | Desired address. |
nil hideUiButton | ( | ) |
Hides the UI button.
mixed isClickedUiButton | ( | ) |
Gets the click status of the ui button.
The call resets the click status.
true
if the button has been clicked since the last check. false
- if there was no click. nil
- if the button is hidden. bool isPackageInstalled | ( | string | pkg | ) |
Check whether the specified application is installed on the system by the package name.
pkg | String with package name. |
true
if package installed or false
otherwise. bool isProcessPaused | ( | ) |
Get pause state of the selected process.
true
if the process paused or false
otherwise. bool isVisible | ( | ) |
Check if the GameGuardian UI is open.
true
if the GameGuardian UI open or false
otherwise. mixed loadList | ( | string | file, |
int | flags = 0 |
||
) |
Load the saved list from the file.
file | File for load. |
flags | Set of flags LOAD_*. |
true
or string with error. mixed loadResults | ( | table | results | ) |
Loads the search results from the table.
Existing search results will be cleared.
results | The table as a list of tables with address and flags fields (one of the constants TYPE_*). |
true
or string with error. mixed makeRequest | ( | string | url, |
table | headers = {} , |
||
string | data = nil |
||
) |
Performs a GET or POST request over HTTP or HTTPS.
The first time the function is called, the user is asked to access the Internet. Request one for each script run. If the user declines access, all subsequent calls will immediately return an error. If allowed - will be processed immediately. Permission to access must be obtained each time the script is run.
The function executes the query and returns a table with the result on success. On error, the string with the error text will be returned. In logcat there will be more information.
The result table can contain the following fields:
url
- request url, for example 'http://httpbin.org/headers'requestMethod
- HTTP method, for example 'GET'code
- HTTP response code, for example 200message
- an HTTP message, for example 'Method Not Allowed'headers
- a table with all the response headers. Each value is also a table, with numeric keys. Usually there is only one value, but if the header has met several times, such as 'Set-Cookie', then there may be several values.contentEncoding, contentLength, contentType, date, expiration, lastModified, usingProxy, cipherSuite
- fields based on the methods of the class HttpURLConnection. If the method returns null
, then this field will not be in the table.error
- true or false. true if the server returned an invalid code.content
- string of data from the server. Can be empty.If the data
string is not nil, the POST request will be executed, otherwise the GET.
By default, POST requests are set to "Content-Type" = "application/x-www-form-urlencoded". You can specify this header yourself to specify the desired type. Similarly, the header "Content-Length" is set. Other headers can be set by the system and depend on the implementation of the Android.
HTTPS requests do not perform certificate validation.
url | A string with a URL. |
headers | A table with request headers. The key is the name. The value is a table or a string. If this is a table, then the keys are ignored, and the values ​​are used. |
data | A string with data for the POST request. If you specify nil , then there will be a GET request. |
mixed multiChoice | ( | table | items, |
table | selection = {} , |
||
string | message = nil |
||
) |
Displays the multiple choice dialog.
Items
must be numberic-array if you want show items in specified order.
items | Table with items for choice. |
selection | The table specifies the selection status for each item from items by same key. If key not found then the element will be unchecked. |
message | Specifies the optional title of the dialog box. |
nil
if the dialog has been canceled, or a table with the selected keys and values true
(analogue of the selected
param). string numberFromLocale | ( | string | num | ) |
Replaces the localized decimal separator and thousands separator with separators used in Lua (such as in English).
num | Number or string to replace. |
string numberToLocale | ( | string | num | ) |
Replaces the decimal separator and the thousands separator with a localized version.
num | Number or string to replace. |
bool processKill | ( | ) |
Force kill the selected process.
If you call this call too often, your script may be interrupted.
true
on success or false
otherwise. bool processPause | ( | ) |
bool processResume | ( | ) |
Resumes the selected process if it paused.
true
on success or false
otherwise. bool processToggle | ( | ) |
Toggle the pause state of the selected process.
If process paused then it will be resumed else it will be paused.
true
on success or false
otherwise. mixed prompt | ( | table | prompts, |
table | defaults = {} , |
||
table | types = {} |
||
) |
Displays the dialog for data entry.
For respect order of fields prompts
must be numeric-array.
prompts | The table specifies the keys and description for each input field. |
defaults | The table specifies the default values for each key from prompts . |
types | The table specifies the types for each key from prompts . Valid types: 'number', 'text', 'path', 'file', 'new_file', 'setting', 'speed', 'checkbox' . From the type depends output of additional elements near the input field (for example, buttons for selecting a path or file, internal or external keyboard and so on). |
Also for the types 'number', 'setting', 'speed'
, the separators are converted to a localized version and vice versa during output.
For example, the string '6,789.12345'
will be in the form displayed as '6789,12345'
for the German locale (','
- decimal separator, '.'
- thousands separator). If the user enters '4.567,89'
, then the script will receive '4567.89'
.
To display the seek bar, you must specify the type 'number'
, the minimum and maximum value at the end of the prompt text, separated by a semicolon and surrounded by square brackets. The minimum value must be less than the maximum. If the default value is not in the range, the closest match will be used. Only integers can be used. The step size is always 1.
See examples.
If the config for seek bar is not recognized, the usual input of a number as text will be used.
nil
if the dialog has been canceled, or the table with keys from prompts
and values from input fields. mixed refineAddress | ( | string | text, |
long | mask = -1 , |
||
int | type = gg.TYPE_AUTO , |
||
int | sign = gg.SIGN_EQUAL , |
||
long | memoryFrom = 0 , |
||
long | memoryTo = -1 , |
||
long | limit = 0 |
||
) |
Perform an address refine search with the specified parameters.
If no results in results list then do nothing.
text | Search string. The format same as the format for the search from the GameGuardian UI. But it must be in English locale. |
mask | Mask. Default is -1 (0xFFFFFFFFFFFFFFFF) . |
type | Type. One of the constants TYPE_*. |
sign | Sign. SIGN_EQUAL or SIGN_NOT_EQUAL. |
memoryFrom | Start memory address for the search. |
memoryTo | End memory address for the search. |
limit | Stopping the search after finding the specified number of results. 0 means to search all results. |
true
or string with error. mixed refineNumber | ( | string | text, |
int | type = gg.TYPE_AUTO , |
||
bool | encrypted = false , |
||
int | sign = gg.SIGN_EQUAL , |
||
long | memoryFrom = 0 , |
||
long | memoryTo = -1 , |
||
long | limit = 0 |
||
) |
Perform a refine search for a number, with the specified parameters.
If no results in results list then do nothing.
text | String for search. The format same as the format for the search from the GameGuardian UI. But it must be in English locale. |
type | Type. One of the constants TYPE_*. |
encrypted | Flag for run search encrypted values. |
sign | Sign. One of the constants SIGN_*. |
memoryFrom | Start memory address for the search. |
memoryTo | End memory address for the search. |
limit | Stopping the search after finding the specified number of results. 0 means to search all results. |
true
or string with error. mixed removeListItems | ( | table | items | ) |
Remove items from the saved list.
items | The table as a list of tables with address . Or the table as a list of adresses. |
mixed removeResults | ( | table | results | ) |
Remove results
from the list of results found.
results | The table as a list of tables with address and flags fields (one of the constants TYPE_*). |
true
or string with error. nil require | ( | string | version = nil , |
int | build = 0 |
||
) |
Checks the version of GameGuardian.
If the version or build number is lower than required, the script will be ended with the message to update GameGuardian.
version | Minimal version of GameGuardian to run the script. |
build | Minimal build number to run the script. Optional. |
mixed saveList | ( | string | file, |
int | flags = 0 |
||
) |
Save the saved list to the file.
file | File to save. |
flags | Set of flags SAVE_*. |
true
or string with error. mixed saveVariable | ( | mixed | variable, |
string | filename | ||
) |
Saves the variable to a file.
The result of the execution will be a .lua file, which can then be loaded via
Stores only strings, numbers, and tables. Cyclic references are processed correctly. If you need something more, read: lua-users wiki: Table Serialization
variable | Variable to save. |
filename | Full path to save the file. |
true
or string with error. mixed searchAddress | ( | string | text, |
long | mask = -1 , |
||
int | type = gg.TYPE_AUTO , |
||
int | sign = gg.SIGN_EQUAL , |
||
long | memoryFrom = 0 , |
||
long | memoryTo = -1 , |
||
long | limit = 0 |
||
) |
Perform an address search with the specified parameters.
If no results in results list then perform new search, else refine search. So if you need to perform a search, without refine, you must first call clearResults
.
text | Search string. The format same as the format for the search from the GameGuardian UI. But it must be in English locale. |
mask | Mask. Default is -1 (0xFFFFFFFFFFFFFFFF) . |
type | Type. One of the constants TYPE_*. |
sign | Sign. SIGN_EQUAL or SIGN_NOT_EQUAL. |
memoryFrom | Start memory address for the search. |
memoryTo | End memory address for the search. |
limit | Stopping the search after finding the specified number of results. 0 means to search all results. |
true
or string with error. mixed searchFuzzy | ( | string | difference = '0' , |
int | sign = gg.SIGN_FUZZY_EQUAL , |
||
int | type = gg.TYPE_AUTO , |
||
long | memoryFrom = 0 , |
||
long | memoryTo = -1 , |
||
long | limit = 0 |
||
) |
Refine fuzzy search, with the specified parameters.
difference | Difference between old and new values. By default is '0' . Must be in English locale. |
sign | Sign. One of the constants SIGN_FUZZY_*. |
type | Type. One of the constants TYPE_*. |
memoryFrom | Start memory address for the search. |
memoryTo | End memory address for the search. |
limit | Stopping the search after finding the specified number of results. 0 means to search all results. |
true
or string with error. mixed searchNumber | ( | string | text, |
int | type = gg.TYPE_AUTO , |
||
bool | encrypted = false , |
||
int | sign = gg.SIGN_EQUAL , |
||
long | memoryFrom = 0 , |
||
long | memoryTo = -1 , |
||
long | limit = 0 |
||
) |
Perform a search for a number, with the specified parameters.
If no results in results list then perform new search, else refine search. So if you need to perform a search, without refine, you must first call clearResults
.
text | String for search. The format same as the format for the search from the GameGuardian UI. But it must be in English locale. |
type | Type. One of the constants TYPE_*. |
encrypted | Flag for run search encrypted values. |
sign | Sign. One of the constants SIGN_*. |
memoryFrom | Start memory address for the search. |
memoryTo | End memory address for the search. |
limit | Stopping the search after finding the specified number of results. 0 means to search all results. |
true
or string with error. mixed searchPointer | ( | int | maxOffset, |
long | memoryFrom = 0 , |
||
long | memoryTo = -1 , |
||
long | limit = 0 |
||
) |
Searches for values that may be pointers to elements of the current search result.
maxOffset | Maximum offset for pointers. Valid values: 0 - 65535. |
memoryFrom | Start memory address for the search. |
memoryTo | End memory address for the search. |
limit | Stopping the search after finding the specified number of results. 0 means to search all results. |
true
or string with error. nil setRanges | ( | int | ranges | ) |
Set memory regions to desired bit mask of flags REGION_*.
ranges | Bit mask of flags REGION_*. |
mixed setSpeed | ( | double | speed | ) |
Set the speed of the speedhack.
If speedhack was not loaded, then it will be loaded. The call is blocking. The script will wait for speedhack full load.
speed | Desired speed. Must be in range [1.0E-9; 1.0E9]. |
true
or string with error. mixed setValues | ( | table | values | ) |
Set the values for the list of items.
values | The table as a list of tables with three keys: address (long), value (string with a value), flags (one of the constants TYPE_*). Values must be in English locale. |
true
or string with error. nil setVisible | ( | bool | visible | ) |
Open or close the GameGuardian UI.
If you call this call too often, your script may be interrupted.
visible | true for open GameGuardian UI or false for hide. * |
nil showUiButton | ( | ) |
Shows the UI button.
The UI button has an icon with the letters "Sx" and is visible only when you open the GameGuardian interface. The button is floating, displayed on top of the main GameGuardian interface.
nil skipRestoreState | ( | ) |
Do not restore the state of the GameGuardian, after the script is completed.
For example, by default, a set of memory regions restored after end script execution. This call allow prevent this.
nil sleep | ( | int | milliseconds | ) |
Causes the currently executing script to sleep (temporarily cease execution) for the specified number of milliseconds, subject to the precision and accuracy of system timers and schedulers.
milliseconds | The length of time to sleep in milliseconds. |
mixed startFuzzy | ( | int | type = gg.TYPE_AUTO , |
long | memoryFrom = 0 , |
||
long | memoryTo = -1 , |
||
long | limit = 0 |
||
) |
Start a fuzzy search, with the specified parameters.
type | Type. One of the constants TYPE_*. |
memoryFrom | Start memory address for the search. |
memoryTo | End memory address for the search. |
limit | Stopping the search after finding the specified number of results. 0 means to search all results. |
true
or string with error. mixed timeJump | ( | string | time | ) |
Performs a time jump.
time | String with time. The format is similar to the time format in the time jump dialog. But it must be in English locale. |
true
or string with error. nil toast | ( | string | text, |
bool | fast = false |
||
) |
Show the toast.
If the second parameter is true, show the toast for a short period of time.
A toast is a view containing a quick little message for the user.
When the view is shown to the user, appears as a floating view over the application. It will never receive focus. The user will probably be in the middle of typing something else. The idea is to be as unobtrusive as possible, while still showing the user the information you want them to see. Two examples are the volume control, and the brief message saying that your settings have been saved.
text | The text for toast. |
fast | Flag for show the toast for a short period of time. |
mixed unrandomizer | ( | long | qword = nil , |
long | qincr = nil , |
||
double | double_ = nil , |
||
double | dincr = nil |
||
) |
Work with Unrandomizer.
If Unrandomizer was not loaded, then it will be loaded. The call is blocking. The script will wait for Unrandomizer full load. You can set any parameter in nil
so that it is not used.
qword | Qword parameter. Set to nil to disable. |
qincr | Qword increment. Set to nil to disable. |
double_ | Double parameter. Set to nil to disable. |
dincr | Double increment. Set to nil to disable. |
true
or string with error. string ANDROID_SDK_INT |
The SDK version of the Android currently running on this device.
27
int ASM_ARM |
Arm x32.
int ASM_ARM64 |
ARM x64.
int ASM_THUMB |
Thumb.
int BUILD |
string CACHE_DIR |
The absolute path to the GameGuardian specific cache directory on the filesystem.
These files will be ones that get deleted first when the device runs low on storage. There is no guarantee when these files will be deleted.
Note: you should not rely on the system deleting these files for you; you should always have a reasonable maximum, such as 1 MB, for the amount of space you consume with cache files, and prune those files when exceeding that space. If your app requires a larger cache (larger than 1 MB), you should use EXT_CACHE_DIR instead.
Placed in internal memory. Not visible for other apps. Can be cleared by user.
'/data/data/catch_.me_.if_.you_.can_/cache'
int DUMP_SKIP_SYSTEM_LIBS |
Skip system libraries.
string EXT_CACHE_DIR |
The absolute path to the GameGuardian specific directory on the primary shared/external storage device where the GameGuardian can place cache files it owns.
May return same value as CACHE_DIR if shared storage is not currently available. Usually placed in external memory. Visible for other apps. Can be cleared by user.
'/sdcard/Android/data/catch_.me_.if_.you_.can_/cache'
string EXT_FILES_DIR |
The absolute path to the directory on the primary shared/external storage device where the GameGuardian can place persistent files it owns.
May return same value as FILES_DIR if shared storage is not currently available. Usually placed in external memory. Visible for other apps.
'/sdcard/Android/data/catch_.me_.if_.you_.can_/files'
string EXT_STORAGE |
The primary shared/external storage directory.
'/mnt/sdcard'
string FILES_DIR |
int FREEZE_IN_RANGE |
Allows the value to change only within specified range.
int FREEZE_MAY_DECREASE |
Allows the value to decrease, but does not allow to increase.
int FREEZE_MAY_INCREASE |
Allows the value to increase, but does not allow to decrease.
int FREEZE_NORMAL |
Freezes the value, not allowing it to change.
Used by default.
int LOAD_APPEND |
Append to list.
int LOAD_VALUES |
Load values.
int LOAD_VALUES_FREEZE |
Load values and freeze.
string PACKAGE |
int POINTER_EXECUTABLE |
Pointer to executable memory.
int POINTER_EXECUTABLE_WRITABLE |
Pointer to executable and writable memory.
int POINTER_NO |
Not a pointer.
int POINTER_READ_ONLY |
Pointer to read-only memory.
int POINTER_WRITABLE |
Pointer to writable memory.
int PROT_EXEC |
Pages may be executed.
int PROT_NONE |
Pages may not be accessed.
int PROT_READ |
Pages may be read.
int PROT_WRITE |
Pages may be written.
int SAVE_AS_TEXT |
Save list as text.
int SIGN_EQUAL |
int SIGN_FUZZY_EQUAL |
int SIGN_FUZZY_GREATER |
int SIGN_FUZZY_LESS |
int SIGN_FUZZY_NOT_EQUAL |
int SIGN_GREATER_OR_EQUAL |
int SIGN_LESS_OR_EQUAL |
int SIGN_NOT_EQUAL |
int TAB_MEMORY_EDITOR |
Memory editor tab.
int TAB_SAVED_LIST |
Saved list tab.
int TAB_SEARCH |
Search tab.
int TAB_SETTINGS |
Settings tab.
int TYPE_AUTO |
Type Auto
.
int TYPE_BYTE |
Type Byte
.
Size: 1 byte. Align: 1 byte boundary.
int TYPE_DOUBLE |
Type Double
.
Size: 8 byte. Align: 4 (x86) or 8 (ARM) byte boundary.
int TYPE_DWORD |
Type Dword
.
Size: 4 byte. Align: 4 byte boundary.
int TYPE_FLOAT |
Type Float
.
Size: 4 byte. Align: 4 byte boundary.
int TYPE_QWORD |
Type Qword
.
Size: 8 byte. Align: 4 (x86) or 8 (ARM) byte boundary.
int TYPE_WORD |
Type Word
.
Size: 2 byte. Align: 2 byte boundary.
int TYPE_XOR |
Type Xor
.
Size: 4 byte. Align: 4 byte boundary.
string VERSION |
int VERSION_INT |