mirror of
https://github.com/Light-Speech/C-Android-Memory-Tool.git
synced 2024-10-23 09:33:45 +08:00
Update main.cpp
This commit is contained in:
parent
4e9754f8ad
commit
a737348721
37
main.cpp
37
main.cpp
@ -1,29 +1,22 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "MemoryTools.h"
|
#include "MemoryTools.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
initXMemoryTools(
|
/* 1. Package Name of the game
|
||||||
/*process name*/
|
2. ROOT_MODE (tells you are using rooted device (not reooted device not implimented yet))
|
||||||
"com.tencent.ig",
|
*/
|
||||||
/*mode root/no root*/
|
MemoryTools memoryTools("com.tencent.ig", MODE_ROOT);
|
||||||
MODE_ROOT
|
|
||||||
/*MODE_NO_ROOT - for no root*/
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
// Initialize the search range to global (check other ranges in header file of memory tool)
|
||||||
TYPE_DWORD,
|
memoryTools.SetSearchRange(ALL);
|
||||||
TYPE_FLOAT,
|
// Search for 1 in whole memory of type byte
|
||||||
TYPE_DOUBLE,
|
memoryTools.MemorySearch("1", TYPE_BYTE);
|
||||||
TYPE_WORD,
|
// This is another usage if you want to write a value at given offset you can use below line else above line will write all the data in memory
|
||||||
TYPE_BYTE,
|
memoryTools.MemoryOffset("2", 2, /*offset*/ TYPE_BYTE);
|
||||||
TYPE_QWORD,
|
// Finally write the value to the memory
|
||||||
*/
|
memoryTools.MemoryWrite("0", 2, /*offset*/ TYPE_BYTE);
|
||||||
|
// clear results function clean all the offsets/values from memory
|
||||||
SetSearchRange(ALL);
|
memoryTools.ClearResults();
|
||||||
MemorySearch("1", TYPE_BYTE);
|
|
||||||
MemoryOffset("2", 2,/*offset*/ TYPE_BYTE);
|
|
||||||
MemoryWrite("0", 2,/*offset*/ TYPE_BYTE);
|
|
||||||
ClearResults();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user