GG help
gg Class Reference

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...
 
mixed dumpMemory (long from, long to, string dir)
 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...
 
nil gotoAddress (long address)
 Go to the address in the memory editor. 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...
 
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)
 Perform a search for a number, with the specified parameters. More...
 
mixed startFuzzy (int type=gg.TYPE_AUTO, long memoryFrom=0, long memoryTo=-1)
 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)
 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)
 Perform an address search with the specified parameters. 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...
 
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...
 
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...
 
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 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_*)

Flags used for set sign in searchAddress, searchNumber.

int SIGN_EQUAL
 Flag for searchAddress, searchNumber. More...
 
int SIGN_NOT_EQUAL
 Flag for searchAddress, searchNumber. More...
 
int SIGN_LESS_OR_EQUAL
 Flag for searchAddress, searchNumber. More...
 
int SIGN_GREATER_OR_EQUAL
 Flag for searchAddress, searchNumber. More...
 
Fuzzy sign flags (SIGN_FUZZY_*)

Flags used for set sign in searchFuzzy.

int SIGN_FUZZY_EQUAL
 Flag for searchFuzzy. More...
 
int SIGN_FUZZY_NOT_EQUAL
 Flag for searchFuzzy. More...
 
int SIGN_FUZZY_LESS
 Flag for searchFuzzy. More...
 
int SIGN_FUZZY_GREATER
 Flag for searchFuzzy. More...
 
Memory regions flags (REGION_*)

Flags used for set memory regions.

int REGION_JAVA_HEAP
 Flag for getRanges, setRanges. More...
 
int REGION_C_HEAP
 Flag for getRanges, setRanges. More...
 
int REGION_C_ALLOC
 Flag for getRanges, setRanges. More...
 
int REGION_C_DATA
 Flag for getRanges, setRanges. More...
 
int REGION_C_BSS
 Flag for getRanges, setRanges. More...
 
int REGION_PPSSPP
 Flag for getRanges, setRanges. More...
 
int REGION_ANONYMOUS
 Flag for getRanges, setRanges. More...
 
int REGION_JAVA
 Flag for getRanges, setRanges. More...
 
int REGION_STACK
 Flag for getRanges, setRanges. More...
 
int REGION_ASHMEM
 Flag for getRanges, setRanges. More...
 
int REGION_OTHER
 Flag for getRanges, setRanges. More...
 
int REGION_BAD
 Flag for getRanges, setRanges. More...
 
int REGION_CODE_APP
 Flag for getRanges, setRanges. More...
 
int REGION_CODE_SYS
 Flag for getRanges, setRanges. More...
 
Flags for load the saved lists (LOAD_*)

Flags used in loadList.

int LOAD_VALUES_FREEZE
 Flag for loadList. More...
 
int LOAD_VALUES
 Flag for loadList. More...
 
int LOAD_APPEND
 Flag for loadList. More...
 
Flags for save the saved lists (SAVE_*)

Flags used in saveList.

int SAVE_AS_TEXT
 Flag for saveList. More...
 
Flags for field "freezeType" (FREEZE_*)

Flags used in addListItems, getListItems.

int FREEZE_NORMAL
 Flag for field "freezeType" in addListItems, getListItems. More...
 
int FREEZE_MAY_INCREASE
 Flag for field "freezeType" in addListItems, getListItems. More...
 
int FREEZE_MAY_DECREASE
 Flag for field "freezeType" in addListItems, getListItems. More...
 
int FREEZE_IN_RANGE
 Flag for field "freezeType" in addListItems, getListItems. More...
 
Flags for field "mode" (PROT_*)

Flags used in allocatePage.

int PROT_NONE
 Flag for field "mode" in allocatePage. More...
 
int PROT_READ
 Flag for field "mode" in allocatePage. More...
 
int PROT_WRITE
 Flag for field "mode" in allocatePage. More...
 
int PROT_EXEC
 Flag for field "mode" in allocatePage. More...
 
Flags for the pointer filter in #getResults (POINTER_*)
int POINTER_NO
 Flag for getResults. More...
 
int POINTER_READ_ONLY
 Flag for getResults. More...
 
int POINTER_WRITABLE
 Flag for getResults. More...
 
int POINTER_EXECUTABLE
 Flag for getResults. More...
 
int POINTER_EXECUTABLE_WRITABLE
 Flag for getResults. More...
 

Detailed Description

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:

print(gg)

Member Function Documentation

◆ addListItems()

mixed addListItems ( table  items)

Add items to the saved list.

Parameters
itemsA 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).
Returns
True or string with error.
Examples:
-- retrieving a table from another call
t = gg.getResults(5) -- load items
t[1].value = '15'
t[1].freeze = true
print('addListItems: ', gg.addListItems(t))
-- creating a table as a list of items
t = {}
t[1] = {}
t[1].address = 0x18004030 -- some desired address
t[1].flags = gg.TYPE_DWORD
t[1].value = 12345
t[2] = {}
t[2].address = 0x18004040 -- another desired address
t[2].flags = gg.TYPE_BYTE
t[2].value = '7Fh'
t[2].freeze = true
t[3] = {}
t[3].address = 0x18005040 -- another desired address
t[3].flags = gg.TYPE_DWORD
t[3].value = '777'
t[3].freeze = true
t[3].freezeType = gg.FREEZE_MAY_INCREASE
t[4] = {}
t[4].address = 0x18007040 -- another desired address
t[4].flags = gg.TYPE_DWORD
t[4].value = '7777'
t[4].freeze = true
t[4].freezeType = gg.FREEZE_IN_RANGE
t[4].freezeFrom = '6666'
t[4].freezeTo = '8888'
print('addListItems: ', gg.addListItems(t))
-- The first 7 results are frozen with a value of 8.
local t = gg.getResults(7)
for i, v in ipairs(t) do
t[i].value = '8'
t[i].freeze = true
end
See also
getValues, getResults

◆ alert()

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).

Parameters
textText message.
positiveText for positive button. This button return code 1.
negativeText for negative button. This button return code 2.
neutralText for neutral button. This button return code 3.
Returns
if dialog canceled - 0, else: 1 for positive, 2 for negative, 3 for neutral buttons.
Examples:
gg.alert('Script ended')
-- Show alert with single 'ok' button
gg.alert('Script ended', 'Yes')
-- Show alert with single 'Yes' button
gg.alert('A or B?', 'A', 'B')
-- Show alert with two buttons
gg.alert('A or C?', 'A', nil, 'C')
-- Show alert with two buttons
gg.alert('A or B or C?', 'A', 'B', 'C')
-- Show alert with three buttons
See also
toast
choice
multiChoice

◆ allocatePage()

mixed allocatePage ( int  mode = gg.PROT_READ | gg.PROT_EXEC,
long  address = 0 
)

Allocated memory page (4 KB) in the target process.

Parameters
modeBit mask of flags PROT_*.
addressIf 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.
Returns
Address of the page or string with error.
Examples:
print('allocatePage 1: ', string.format('0x%08x', gg.allocatePage()))
print('allocatePage 2: ', string.format('0x%08x', gg.allocatePage(gg.PROT_READ | gg.PROT_EXEC)))
print('allocatePage 3: ', string.format('0x%08x', gg.allocatePage(gg.PROT_READ | gg.PROT_WRITE)))
print('allocatePage 4: ', string.format('0x%08x', gg.allocatePage(gg.PROT_READ)))
print('allocatePage 5: ', string.format('0x%08x', gg.allocatePage(gg.PROT_READ | gg.PROT_WRITE, 0x12345)))

◆ bytes()

string bytes ( string  text,
string  encoding = 'UTF-8' 
)

Gets the text bytes in the specified encoding.

Parameters
text
encodingPossible values: 'ISO-8859-1', 'US-ASCII', 'UTF-16', 'UTF-16BE', 'UTF-16LE', 'UTF-8'
Returns
A table with a set of bytes in the specified encoding.
Examples:
print('UTF-8', gg.bytes('example'))
print('UTF-8', gg.bytes('example', 'UTF-8'))
print('UTF-16', gg.bytes('example', 'UTF-16LE'))

◆ choice()

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.

Parameters
itemsTable with items for choice.
selectedIs not specified or is specified as nil, then the list will be without the default choice.
messageSpecifies the optional title of the dialog box.
Returns
nil if the dialog has been canceled, or the index of the selected item.
Examples:
print('1: ', gg.choice({'A', 'B', 'C', 'D'}))
-- show list of 4 items
print('2: ', gg.choice({'A', 'B', 'C', 'D'}, 2))
-- show list of 4 items with selected 2 item
print('3: ', gg.choice({'A', 'B', 'C', 'D'}, 3, 'Select letter:'))
-- show list of 4 items with selected 3 item and message
print('4: ', gg.choice({'A', 'B', 'C', 'D'}, nil, 'Select letter:'))
-- show list of 4 items without selection and message
See also
alert
multiChoice
prompt

◆ clearList()

mixed clearList ( )

Clear the saved list.

Returns
true or string with error.
Examples:
print('clearList:', gg.clearList())

◆ clearResults()

nil clearResults ( )

Clear the list of search results.

See also
removeResults

◆ copyMemory()

mixed copyMemory ( long  from,
long  to,
int  bytes 
)

Copy memory.

Parameters
fromAddress for source of copy.
toAddress for destination of copy.
bytesAmount bytes to copy.
Returns
true or string with error.
Examples:
print('copyMemory:', gg.copyMemory(0x9000, 0x9010, 3))
-- copies 3 bytes 0x9000-0x9002 to 0x9010-0x9012

◆ copyText()

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.

Parameters
textThe text for copy.
fixLocaleFlag to disable fix locale-specific separators.
Examples:
-- selected 'ru' locale, where decimal separator is ',' and thousand separator is ' '.
-- in English locale (en_US) decimal separator is '.' and thousand separator is ','.
gg.copyText('1,234,567.890') -- Will copy '1 234 567,890'
gg.copyText('1,234,567.890', true) -- Will copy '1 234 567,890'
gg.copyText('1,234,567.890', false) -- Will copy '1,234,567.890'

◆ dumpMemory()

mixed dumpMemory ( long  from,
long  to,
string  dir 
)

Dump memory to files on disk.

Parameters
fromAddress for start dump. Will be rounded to largest possible memory page.
toAddress for end dump. Will be rounded to smallest possible memory page.
dirDirectory for save dump files.
Returns
True or string with error.
Examples:
print('dumpMemory:', gg.dumpMemory(0x9000, 0x9010, '/sdcard/dump'))
-- dump at least one memory page into the dir '/sdcard/dump'

◆ editAll()

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.

Parameters
valueString with data for edit.
typeOne constant from TYPE_*.
Returns
Int with count of changes or string with error.
Examples:
See also
setValues

◆ getFile()

string getFile ( )

Gets the filename of the currently running script.

Returns
The string with the filename of the currently running script.
E.g.:
'/sdcard/Notes/gg.example.lua'
See also
getLine

◆ getLine()

int getLine ( )

Gets the current line number of the script being executed.

Returns
The current line number of the script being executed.
E.g.:
24
See also
getFile

◆ getListItems()

mixed getListItems ( )

Return the contents of the saved list as a table.

Returns
Table with results or string with error. Each element is a table with the following fields: address (long), value (string with a value), flags (one of the constants TYPE_*), name (string), freeze (boolean), freezeType (one of the constants FREEZE_*), freezeFrom (string), freezeTo (string).
Examples:
local r = gg.getListItems()
print('Items: ', r)
print('First item: ', r[1])
print('First item address: ', r[1].address)
print('First item value: ', r[1].value)
print('First item type: ', r[1].flags)
print('First item name: ', r[1].name)
print('First item freeze: ', r[1].freeze)
print('First item freeze type: ', r[1].freezeType)
print('First item freeze from: ', r[1].freezeFrom)
print('First item freeze to: ', r[1].freezeTo)
See also
getValues, getResults

◆ getLocale()

string getLocale ( )

Gets the string with the currently selected locale in the GameGuardian.

Returns
The string with the currently selected locale in the GameGuardian.
E.g.:
en_US, zh_CN, ru, pt_BR, ar, uk

◆ getRanges()

int getRanges ( )

Return memory regions as bit mask of flags REGION_*.

Returns
Bit mask of flags REGION_*.
See also
setRanges

◆ getRangesList()

table getRangesList ( string  filter = '')

Get the list of memory regions of the selected process.

Parameters
filterThe 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.
Returns
A list table with memory regions. Each element is a table with fields: state, start, end, type, name, internalName.
Examples:
print(gg.getRangesList())
print(gg.getRangesList('libc.so'))
print(gg.getRangesList('lib*.so'))
print(gg.getRangesList('^/data/'))
print(gg.getRangesList('.so$'))

◆ getResults()

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.

Parameters
maxCountMax count of loaded results.
skipThe count of skipped results from the beginning. By default - 0.
addressMinThe minimum value of the address. Number or nil.
addressMaxThe maximum value of the address. Number or nil.
valueMinThe minimum value of the value. Number as string or nil.
valueMaxThe maximum value of the value. Number as string or nil.
typeSet of flags TYPE_* or nil.
fractionalFilter by fractional values. If the first character is "!", then the filter will exclude all values whose fractional part matches the specified one.
pointerSet of flags POINTER_* or nil.
Returns
Table with results or string with error. Each element is a table with three keys: address (long), value (string with a value), flags (one of the constants TYPE_*).
Examples:
local r = gg.getResults(5)
print('First 5 results: ', r)
print('First result: ', r[1])
print('First result address: ', r[1].address)
print('First result value: ', r[1].value)
print('First result type: ', r[1].flags)
r = gg.getResults(3, 2)
print('Skip 2 items and get next 3: ', r)
r = gg.getResults(3, nil, 0x80000000, 0xF0000000)
print('Address between 0x80000000 and 0xF0000000: ', r)
r = gg.getResults(3, nil, nil, nil, 23, 45)
print('Value between 23 and 45: ', r)
r = gg.getResults(3, nil, nil, nil, nil, nil, gg.TYPE_DWORD | gg.TYPE_FLOAT)
print('Dword or Float: ', r)
r = gg.getResults(3, nil, nil, nil, nil, nil, nil, '0.5')
print('Only with fractional part equal 0.5: ', r)
r = gg.getResults(3, nil, nil, nil, nil, nil, nil, '!0.0')
print('Only with fractional part not equal 0.0: ', r)
r = gg.getResults(3, nil, nil, nil, nil, nil, nil, nil, gg.POINTER_READ_ONLY)
print('Only pointers to read-only memory: ', r)
See also
getValues

◆ getResultsCount()

long getResultsCount ( )

Get the number of found results.

Returns
The number of found results.
Examples:
print('Found: ', gg.getResultsCount())

◆ getSpeed()

double getSpeed ( )

Get the current speed from the speedhack.

Returns
The current speed from the speedhack.
See also
setSpeed

◆ getTargetInfo()

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, packageName, 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.

Returns
A table with information about the selected process or nil.
Examples:
-- check for game version
local v = gg.getTargetInfo()
if v.versionCode ~= 291 then
print('This script only works with game version 291. You have game version ', v.versionCode, ' Please install version 291 and try again.')
os.exit()
end
See also
getTargetPackage

◆ getTargetPackage()

mixed getTargetPackage ( )

Get the package name of the selected process, if possible.

Returns
The package name of the selected process as string or nil.
E.g.:
'com.blayzegames.iosfps'
See also
getTargetInfo

◆ getValues()

mixed getValues ( table  values)

Gets the values for the list of items.

Parameters
valuesThe table as a list of tables with address and flags fields (one of the constants TYPE_*).
Returns
A new table with results or string with error. Each element is a table with three keys: address (long), value (string with a value), flags (one of the constants TYPE_*).
Examples:
local r = gg.getResults(5) -- load items
r = gg.getValues(r) -- refresh items values
print('First 5 results: ', r)
print('First result: ', r[1])
print('First result address: ', r[1].address)
print('First result value: ', r[1].value)
print('First result type: ', r[1].flags)
local t = {}
t[1] = {}
t[1].address = 0x18004030 -- some desired address
t[1].flags = gg.TYPE_DWORD
t[2] = {}
t[2].address = 0x18004040 -- another desired address
t[2].flags = gg.TYPE_BYTE
t = gg.getValues(t)
print(t)
See also
getResults, getListItems

◆ getValuesRange()

mixed getValuesRange ( table  values)

Get the memory regions for the passed value table.

Parameters
valuesThe table can be either an address list or a list of tables with the address field.
Returns
A table where each key, from the original table, will be associated with a short region code (Ch, for example). Or string with error.
Examples:
print('1: ', gg.getValuesRange({0x9000, 0x9010, 0x9020, 0x9030}))
-- table as a list of addresses
local r = gg.getResults(5)
print('2: ', r, gg.getValuesRange(r))
-- table as a list of tables with the address field

◆ gotoAddress()

nil gotoAddress ( long  address)

Go to the address in the memory editor.

Parameters
addressDesired address.

◆ isPackageInstalled()

bool isPackageInstalled ( string  pkg)

Check whether the specified application is installed on the system by the package name.

Parameters
pkgString with package name.
Returns
True if package installed or false otherwise.
Examples:
print('Game installed:', gg.isPackageInstalled('com.blayzegames.iosfps'))

◆ isProcessPaused()

bool isProcessPaused ( )

Get pause state of the selected process.

Returns
True if the process paused or false otherwise.
See also
processPause

◆ isVisible()

bool isVisible ( )

Check if the GameGuardian UI is open.

Returns
True if the GameGuardian UI open or false otherwise.
See also
setVisible

◆ loadList()

mixed loadList ( string  file,
int  flags = 0 
)

Load the saved list from the file.

Parameters
fileFile for load.
flagsSet of flags LOAD_*.
Returns
true or string with error.
Examples:
print('loadList:', gg.loadList('/sdcard/Notes/gg.victim.txt'))
print('loadList:', gg.loadList('/sdcard/Notes/gg.victim.txt', 0))
print('loadList:', gg.loadList('/sdcard/Notes/gg.victim.txt', gg.LOAD_APPEND))
print('loadList:', gg.loadList('/sdcard/Notes/gg.victim.txt', gg.LOAD_VALUES_FREEZE))
print('loadList:', gg.loadList('/sdcard/Notes/gg.victim.txt', gg.LOAD_APPEND | gg.LOAD_VALUES))

◆ loadResults()

mixed loadResults ( table  results)

Loads the search results from the table.

Existing search results will be cleared.

Parameters
resultsThe table as a list of tables with address and flags fields (one of the constants TYPE_*).
Returns
True or string with error.
Examples:
local r = gg.getResults(5)
print('load first 5 results: ', gg.loadResults(r))

◆ makeRequest()

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 200
  • message - 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.

Parameters
urlA string with a URL.
headersA 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.
dataA string with data for the POST request. If you specify nil, then there will be a GET request.
Returns
The table on success, the string on error.
Examples:
print('GET 1: ', gg.makeRequest('http://httpbin.org/headers').content) -- simple GET request
print('GET 2: ', gg.makeRequest('http://httpbin.org/headers', {['User-Agent']='My BOT'}).content) -- GET request with headers
print('GET 3: ', gg.makeRequest('http://httpbin.org/headers', {['User-Agent']={'My BOT', 'Tester'}}).content) -- GET request with headers
print('GET 4: ', gg.makeRequest('https://httpbin.org/get?param1=value2&param3=value4', {['User-Agent']='My BOT'}).content) -- HTTPS GET request with headers
print('POST 1: ', gg.makeRequest('http://httpbin.org/post', nil, 'post1=val2&post3=val4').content) -- simple POST request
print('POST 2: ', gg.makeRequest('http://httpbin.org/post', {['User-Agent']='My BOT'}, 'post1=val2&post3=val4').content) -- POST request with headers
print('POST 3: ', gg.makeRequest('http://httpbin.org/post', {['User-Agent']={'My BOT', 'Tester'}}, 'post1=val2&post3=val4').content) -- POST request with headers
print('POST 4: ', gg.makeRequest('https://httpbin.org/post?param1=value2&param3=value4', {['User-Agent']='My BOT'}, 'post1=val2&post3=val4').content) -- HTTPS POST request with headers
print('FULL: ', gg.makeRequest('https://httpbin.org/headers')) -- print full info about the request

◆ multiChoice()

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.

Parameters
itemsTable with items for choice.
selectionThe table specifies the selection status for each item from items by same key. If key not found then the element will be unchecked.
messageSpecifies the optional title of the dialog box.
Returns
nil if the dialog has been canceled, or a table with the selected keys and values true (analogue of the selected param).
Examples:
print('1: ', gg.multiChoice({'A', 'B', 'C', 'D'}))
-- show list of 4 items without checked items
print('2: ', gg.multiChoice({'A', 'B', 'C', 'D'}, {[2]=true, [4]=true}))
-- show list of 4 items with checked 2 and 4 items
print('3: ', gg.multiChoice({'A', 'B', 'C', 'D'}, {[3]=true}, 'Select letter:'))
-- show list of 4 items with checked 3 item and message
print('4: ', gg.multiChoice({'A', 'B', 'C', 'D'}, {}, 'Select letter:'))
-- show list of 4 items without checked items and message
-- Performing multiple actions
local t = gg.multiChoice({'A', 'B', 'C', 'D'})
if t == nil then
gg.alert('Canceled')
else
if t[1] then
gg.alert('do A')
end
if t[2] then
gg.alert('do B')
end
if t[3] then
gg.alert('do C')
end
if t[4] then
gg.alert('do D')
end
end
See also
choice
prompt

◆ numberFromLocale()

string numberFromLocale ( string  num)

Replaces the localized decimal separator and thousands separator with separators used in Lua (such as in English).

Parameters
numNumber or string to replace.
Returns
Fixed number as string.
Examples:
print(gg.numberFromLocale('1.234,567')) -- print '1234.567' for German locale

◆ numberToLocale()

string numberToLocale ( string  num)

Replaces the decimal separator and the thousands separator with a localized version.

Parameters
numNumber or string to replace.
Returns
Fixed number as string.
Examples:
print(gg.numberToLocale('1,234.567')) -- print '1234,567' for German locale

◆ processKill()

bool processKill ( )

Force kill the selected process.

Attention
This can lead to data loss in this process.
Returns
True on success or false otherwise.

◆ processPause()

bool processPause ( )

Pauses the selected process.

Returns
True on success or false otherwise.
See also
isProcessPaused

◆ processResume()

bool processResume ( )

Resumes the selected process if it paused.

Returns
True on success or false otherwise.
See also
isProcessPaused

◆ processToggle()

bool processToggle ( )

Toggle the pause state of the selected process.

If process paused then it will be resumed else it will be paused.

Returns
True on success or false otherwise.
See also
isProcessPaused

◆ prompt()

mixed prompt ( table  prompts,
table  defaults = {},
table  types = {} 
)

Displays the dialog for data entry.

For respect order of fields prompts must be numeric-array.

Parameters
promptsThe table specifies the keys and description for each input field.
defaultsThe table specifies the default values for each key from prompts.
typesThe table specifies the types for each key from prompts. Valid types: 'number', 'text', 'path', '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'.

Returns
nil if the dialog has been canceled, or the table with keys from prompts and values from input fields.
Examples:
print('prompt 1: ', gg.prompt(
{'ask any', 'ask num', 'ask text', 'ask path', 'ask file', 'ask set', 'ask speed', 'checked', 'not checked'},
{[1]='any val', [7]=123, [6]=-0.34, [8]=true},
{[2]='number', [3]='text', [4]='path', [5]='file', [6]='setting', [7]='speed', [8]='checkbox', [9]='checkbox'}
))
print('prompt 2: ', gg.prompt(
{'ask any', 'ask num', 'ask text', 'ask path', 'ask file', 'ask set', 'ask speed', 'check'},
{[1]='any val', [7]=123, [6]=-0.34}
))
print('prompt 3: ', gg.prompt(
{'ask any', 'ask num', 'ask text', 'ask path', 'ask file', 'ask set', 'ask speed', 'check'}
))
-- Performing multiple actions
local t = gg.prompt({'A', 'B', 'C', 'D'}, nil, {'checkbox', 'checkbox', 'checkbox', 'checkbox'})
if t == nil then
gg.alert('Canceled')
else
if t[1] then
gg.alert('do A')
end
if t[2] then
gg.alert('do B')
end
if t[3] then
gg.alert('do C')
end
if t[4] then
gg.alert('do D')
end
end
See also
alert
choice
multiChoice

◆ removeListItems()

mixed removeListItems ( table  items)

Remove items from the saved list.

Parameters
itemsThe table as a list of tables with address. Or the table as a list of adresses.
Returns
True or string with error.
Examples:
-- retrieving a table from another call
print('removeListItems: ', gg.removeListItems(t))
-- creating a table as a list of items
t = {}
t[1] = {}
t[1].address = 0x18004030 -- some desired address
t[2] = {}
t[2].address = 0x18004040 -- another desired address
print('removeListItems: ', gg.removeListItems(t))
-- creating a table as a list of adresses
t = {}
t[1] = 0x18004030 -- some desired address
t[2] = 0x18004040 -- another desired address
print('removeListItems: ', gg.removeListItems(t))
See also
getValues, getResults

◆ removeResults()

mixed removeResults ( table  results)

Remove results from the list of results found.

Parameters
resultsThe table as a list of tables with address and flags fields (one of the constants TYPE_*).
Returns
True or string with error.
Examples:
local r = gg.getResults(5)
print('Remove first 5 results: ', gg.removeResults(r))
See also
clearResults

◆ require()

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.

Parameters
versionMinimal version of GameGuardian to run the script.
buildMinimal build number to run the script. Optional.
Examples:
gg.require('8.31.1')
gg.require('8.31.1', 5645)
gg.require(nil, 5645)
See also
VERSION
VERSION_INT
BUILD

◆ saveList()

mixed saveList ( string  file,
int  flags = 0 
)

Save the saved list to the file.

Parameters
fileFile to save.
flagsSet of flags SAVE_*.
Returns
true or string with error.
Examples:
print('saveList:', gg.saveList('/sdcard/Notes/gg.victim.txt'))
print('saveList:', gg.saveList('/sdcard/Notes/gg.victim.txt', 0))
print('saveList:', gg.saveList('/sdcard/Notes/gg.victim.txt', gg.SAVE_AS_TEXT))

◆ saveVariable()

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

local var = assert(loadfile(filename))()

Stores only strings, numbers, and tables. Cyclic references are processed correctly. If you need something more, read: lua-users wiki: Table Serialization

Parameters
variableVariable to save.
filenameFull path to save the file.
Returns
True or string with error.
Examples:
local t = {}
t['test1'] = {1, 2, 3, 4}
t['test2'] = 42
t['test3'] = 86.3
t['test4'] = 'weapon'
t[4] = t['test1']
gg.saveVariable(t, '/sdcard/test.lua') -- saved
local var = assert(loadfile('/sdcard/test.lua'))() -- loaded
-- Saving input between script restarts
local configFile = gg.getFile()..'.cfg'
local data = loadfile(configFile)
if data ~= nil then data = data() end
local input = gg.prompt({'Please input something'}, data)
if input == nil then os.exit() end
gg.saveVariable(input, configFile)

◆ searchAddress()

mixed searchAddress ( string  text,
long  mask = -1,
int  type = gg.TYPE_AUTO,
int  sign = gg.SIGN_EQUAL,
long  memoryFrom = 0,
long  memoryTo = -1 
)

Perform an address search with the specified parameters.

If no results in results list then perform new search else refine search.

Parameters
textSearch string. The format same as the format for the search from the GameGuardian UI.
maskMask. Default is -1 (0xFFFFFFFFFFFFFFFF).
typeType. One of the constants TYPE_*.
signSign. SIGN_EQUAL or SIGN_NOT_EQUAL.
memoryFromStart memory address for the search.
memoryToEnd memory address for the search.
Returns
True or string with error.
Examples:
gg.searchAddress('A20', 0xFFFFFFFF)
gg.searchAddress('0B?0', 0xFFF, gg.TYPE_FLOAT)
gg.searchAddress('??F??', 0xBA0, gg.TYPE_BYTE, gg.SIGN_NOT_EQUAL, 0x9000, 0xA09000)

◆ searchFuzzy()

mixed searchFuzzy ( string  difference = '0',
int  sign = gg.SIGN_FUZZY_EQUAL,
int  type = gg.TYPE_AUTO,
long  memoryFrom = 0,
long  memoryTo = -1 
)

Refine fuzzy search, with the specified parameters.

Parameters
differenceDifference between old and new values. By default is '0'.
signSign. One of the constants SIGN_FUZZY_*.
typeType. One of the constants TYPE_*.
memoryFromStart memory address for the search.
memoryToEnd memory address for the search.
Returns
True or string with error.
Examples:
-- value not changed
-- value changed
-- value increased
-- value decreased
-- value increased by 15
gg.searchFuzzy('-115')
-- value decreased by 115
See also
startFuzzy

◆ searchNumber()

mixed searchNumber ( string  text,
int  type = gg.TYPE_AUTO,
bool  encrypted = false,
int  sign = gg.SIGN_EQUAL,
long  memoryFrom = 0,
long  memoryTo = -1 
)

Perform a search for a number, with the specified parameters.

If no results in results list then perform new search else refine search.

Parameters
textString for search. The format same as the format for the search from the GameGuardian UI.
typeType. One of the constants TYPE_*.
encryptedFlag for run search encrypted values.
signSign. One of the constants SIGN_*.
memoryFromStart memory address for the search.
memoryToEnd memory address for the search.
Returns
True or string with error.
Examples:
-- number search
-- encrypted search
-- range search
gg.searchNumber('6~7;7;1~2;0;0;0;0;6~8::29', gg.TYPE_DWORD)
-- group search with ranges
gg.searchNumber('5Ch;E3h;0Bh;4Bh;90h;9Bh;11h;7Bh::8', gg.TYPE_BYTE)
-- search for HEX '5C E3 0B 4B 90 9B 11 7B'
gg.searchNumber('5Ch;0~~0;0Bh;4Bh;0~~0;9Bh;11h;7Bh::8', gg.TYPE_BYTE)
-- search for HEX '5C ?? 0B 4B ?? 9B 11 7B' where '??' can be any byte

◆ setRanges()

nil setRanges ( int  ranges)

Set memory regions to desired bit mask of flags REGION_*.

Parameters
rangesBit mask of flags REGION_*.
Examples:
See also
getRanges
skipRestoreState

◆ setSpeed()

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.

Parameters
speedDesired speed. Must be in range [1.0E-9; 1.0E9].
Returns
True or string with error.
See also
getSpeed

◆ setValues()

mixed setValues ( table  values)

Set the values for the list of items.

Parameters
valuesThe table as a list of tables with three keys: address (long), value (string with a value), flags (one of the constants TYPE_*).
Returns
True or string with error.
Examples:
local r = gg.getResults(5) -- load items
r[1].value = '15'
print('Edited: ', gg.setValues(r))
local t = {}
t[1] = {}
t[1].address = 0x18004030 -- some desired address
t[1].flags = gg.TYPE_DWORD
t[1].value = 12345
t[2] = {}
t[2].address = 0x18004040 -- another desired address
t[2].flags = gg.TYPE_BYTE
t[2].value = '7Fh'
print('Set', t, gg.setValues(t))
See also
editAll

◆ setVisible()

nil setVisible ( bool  visible)

Open or close the GameGuardian UI.

Parameters
visibleTrue for open GameGuardian UI or false for hide.
Examples:
-- Performing an action by clicking on the GG icon
function doAction()
local ret = gg.alert('Here some action', 'OK', 'Cancel', 'Exit')
if ret == 3 then os.exit() end -- exit from the script
end
gg.setVisible(false)
while true do
if gg.isVisible() then
gg.setVisible(false)
doAction()
end
gg.sleep(100)
end
See also
isVisible

◆ skipRestoreState()

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.

Examples:
-- do some things like search values
-- gg.skipRestoreState() -- if you uncomment this line -
-- memory ranges after end script stay same as we set in first line.
-- If not - it will be restored to state which be before script run.

◆ sleep()

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.

Parameters
millisecondsThe length of time to sleep in milliseconds.
Examples:
-- 200 ms
gg.sleep(200)
-- 300 ms
local v = 300

◆ startFuzzy()

mixed startFuzzy ( int  type = gg.TYPE_AUTO,
long  memoryFrom = 0,
long  memoryTo = -1 
)

Start a fuzzy search, with the specified parameters.

Parameters
typeType. One of the constants TYPE_*.
memoryFromStart memory address for the search.
memoryToEnd memory address for the search.
Returns
True or string with error.
Examples:
See also
searchFuzzy

◆ timeJump()

mixed timeJump ( string  time)

Performs a time jump.

Parameters
timeString with time. The format is similar to the time format in the time jump dialog.
Returns
True or string with error.
Examples:
print('jump 1:', gg.timeJump('42345678'))
-- jump for 1 year 125 days 2 hours 41 minutes 18 seconds
print('jump 2:', gg.timeJump('1:125:2:41:18'))
-- same as above
print('jump 3:', gg.timeJump('5:13'))
-- jump for 5 minutes 13 seconds
print('jump 4:', gg.timeJump('7:3:1'))
-- jump for 7 hours 3 minutes 1 seconds
print('jump 5:', gg.timeJump('3600'))
-- jump for 1 hour
print('jump 6:', gg.timeJump('2:15:54:32'))
-- jump for 2 days 15 hours 54 minutes 32 seconds
print('jump 7:', gg.timeJump('3600.15'))
-- jump for 1 hour 0.15 seconds
print('jump 8:', gg.timeJump('7:3:1.519'))
-- jump for 7 hours 3 minutes 1.519 seconds

◆ toast()

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.

Parameters
textThe text for toast.
fastFlag for show the toast for a short period of time.
Examples:
gg.toast('This is toast')
-- Show text notification for a long period of time
gg.toast('This is toast', true)
-- Show text notification for a short period of time
See also
alert

◆ unrandomizer()

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.

Parameters
qwordQword parameter. Set to nil to disable.
qincrQword increment. Set to nil to disable.
doubleDouble parameter. Set to nil to disable.
dincrDouble increment. Set to nil to disable.
Returns
True or string with error.
Examples:
print('unrandomizer:', gg.unrandomizer(0)) -- set only qword = 0
print('unrandomizer:', gg.unrandomizer(0, 1)) -- set only qword = 0 with increment = 1
print('unrandomizer:', gg.unrandomizer(nil, nil, 0.3)) -- set only double without increment
print('unrandomizer:', gg.unrandomizer(nil, nil, 0.3, 0.01)) -- set only double with increment
print('unrandomizer:', gg.unrandomizer(2, 3, 0.45, 0.67)) -- set both
print('unrandomizer:', gg.unrandomizer()) -- off

Member Data Documentation

◆ BUILD

int BUILD

Number build of the GameGuardian.

Examples:
print("GG build number: "..gg.BUILD)
E.g.:
5645
See also
require

◆ CACHE_DIR

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.

Examples:
print("Cache dir: "..gg.CACHE_DIR)
E.g.:
'/data/data/catch_.me_.if_.you_.can_/cache'

◆ EXT_CACHE_DIR

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.

Examples:
print("External cache dir: "..gg.EXT_CACHE_DIR)
E.g.:
'/sdcard/Android/data/catch_.me_.if_.you_.can_/cache'

◆ EXT_FILES_DIR

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.

Examples:
print("External files dir: "..gg.EXT_FILES_DIR)
E.g.:
'/sdcard/Android/data/catch_.me_.if_.you_.can_/files'

◆ EXT_STORAGE

string EXT_STORAGE

The primary shared/external storage directory.

Examples:
print("External storage: "..gg.EXT_STORAGE)
local file = io.open(gg.EXT_STORAGE.."/test_log.txt", "w")
file:write("This is log file")
file:close()
E.g.:
'/mnt/sdcard'

◆ FILES_DIR

string FILES_DIR

The path of the directory holding GameGuardian files.

Placed in internal memory. Not visible for other apps.

Examples:
print("Files dir: "..gg.FILES_DIR)
E.g.:
'/data/data/catch_.me_.if_.you_.can_/files'

◆ FREEZE_IN_RANGE

int FREEZE_IN_RANGE

Flag for field "freezeType" in addListItems, getListItems.

Allows the value to change only within specified range.

◆ FREEZE_MAY_DECREASE

int FREEZE_MAY_DECREASE

Flag for field "freezeType" in addListItems, getListItems.

Allows the value to decrease, but does not allow to increase.

◆ FREEZE_MAY_INCREASE

int FREEZE_MAY_INCREASE

Flag for field "freezeType" in addListItems, getListItems.

Allows the value to increase, but does not allow to decrease.

◆ FREEZE_NORMAL

int FREEZE_NORMAL

Flag for field "freezeType" in addListItems, getListItems.

Freezes the value, not allowing it to change. Used by default.

◆ LOAD_APPEND

int LOAD_APPEND

Flag for loadList.

Append to list.

◆ LOAD_VALUES

int LOAD_VALUES

Flag for loadList.

Load values.

◆ LOAD_VALUES_FREEZE

int LOAD_VALUES_FREEZE

Flag for loadList.

Load values and freeze.

◆ PACKAGE

string PACKAGE

Package name of the GameGuardian.

Examples:
print("GG package: "..gg.PACKAGE)
E.g.:
'catch_.me_.if_.you_.can_'

◆ POINTER_EXECUTABLE

int POINTER_EXECUTABLE

Flag for getResults.

Pointer to executable memory.

◆ POINTER_EXECUTABLE_WRITABLE

int POINTER_EXECUTABLE_WRITABLE

Flag for getResults.

Pointer to executable and writable memory.

◆ POINTER_NO

int POINTER_NO

Flag for getResults.

Not a pointer.

◆ POINTER_READ_ONLY

int POINTER_READ_ONLY

Flag for getResults.

Pointer to read-only memory.

◆ POINTER_WRITABLE

int POINTER_WRITABLE

Flag for getResults.

Pointer to writable memory.

◆ PROT_EXEC

int PROT_EXEC

Flag for field "mode" in allocatePage.

Pages may be executed.

◆ PROT_NONE

int PROT_NONE

Flag for field "mode" in allocatePage.

Pages may not be accessed.

◆ PROT_READ

int PROT_READ

Flag for field "mode" in allocatePage.

Pages may be read.

◆ PROT_WRITE

int PROT_WRITE

Flag for field "mode" in allocatePage.

Pages may be written.

◆ REGION_ANONYMOUS

int REGION_ANONYMOUS

Flag for getRanges, setRanges.

◆ REGION_ASHMEM

int REGION_ASHMEM

Flag for getRanges, setRanges.

◆ REGION_BAD

int REGION_BAD

Flag for getRanges, setRanges.

◆ REGION_C_ALLOC

int REGION_C_ALLOC

Flag for getRanges, setRanges.

◆ REGION_C_BSS

int REGION_C_BSS

Flag for getRanges, setRanges.

◆ REGION_C_DATA

int REGION_C_DATA

Flag for getRanges, setRanges.

◆ REGION_C_HEAP

int REGION_C_HEAP

Flag for getRanges, setRanges.

◆ REGION_CODE_APP

int REGION_CODE_APP

Flag for getRanges, setRanges.

◆ REGION_CODE_SYS

int REGION_CODE_SYS

Flag for getRanges, setRanges.

◆ REGION_JAVA

int REGION_JAVA

Flag for getRanges, setRanges.

◆ REGION_JAVA_HEAP

int REGION_JAVA_HEAP

Flag for getRanges, setRanges.

◆ REGION_OTHER

int REGION_OTHER

Flag for getRanges, setRanges.

◆ REGION_PPSSPP

int REGION_PPSSPP

Flag for getRanges, setRanges.

◆ REGION_STACK

int REGION_STACK

Flag for getRanges, setRanges.

◆ SAVE_AS_TEXT

int SAVE_AS_TEXT

Flag for saveList.

Save list as text.

◆ SIGN_EQUAL

int SIGN_EQUAL

◆ SIGN_FUZZY_EQUAL

int SIGN_FUZZY_EQUAL

Flag for searchFuzzy.

◆ SIGN_FUZZY_GREATER

int SIGN_FUZZY_GREATER

Flag for searchFuzzy.

◆ SIGN_FUZZY_LESS

int SIGN_FUZZY_LESS

Flag for searchFuzzy.

◆ SIGN_FUZZY_NOT_EQUAL

int SIGN_FUZZY_NOT_EQUAL

Flag for searchFuzzy.

◆ SIGN_GREATER_OR_EQUAL

int SIGN_GREATER_OR_EQUAL

◆ SIGN_LESS_OR_EQUAL

int SIGN_LESS_OR_EQUAL

◆ SIGN_NOT_EQUAL

int SIGN_NOT_EQUAL

◆ TYPE_AUTO

int TYPE_AUTO

Type Auto.

◆ TYPE_BYTE

int TYPE_BYTE

Type Byte.

Size: 1 byte. Align: 1 byte boundary.

◆ TYPE_DOUBLE

int TYPE_DOUBLE

Type Double.

Size: 8 byte. Align: 4 (x86) or 8 (ARM) byte boundary.

◆ TYPE_DWORD

int TYPE_DWORD

Type Dword.

Size: 4 byte. Align: 4 byte boundary.

◆ TYPE_FLOAT

int TYPE_FLOAT

Type Float.

Size: 4 byte. Align: 4 byte boundary.

◆ TYPE_QWORD

int TYPE_QWORD

Type Qword.

Size: 8 byte. Align: 4 (x86) or 8 (ARM) byte boundary.

◆ TYPE_WORD

int TYPE_WORD

Type Word.

Size: 2 byte. Align: 2 byte boundary.

◆ TYPE_XOR

int TYPE_XOR

Type Xor.

Size: 4 byte. Align: 4 byte boundary.

◆ VERSION

string VERSION

Text version of the GameGuardian.

Examples:
print("GG string version: "..gg.VERSION)
E.g.:
'8.31.1'
See also
require

◆ VERSION_INT

int VERSION_INT

Numeric version of the GameGuardian.

Examples:
print("GG numeric version: "..gg.VERSION_INT)
E.g.:
83101
See also
require