├── LICENSE.md
├── PyCheats.py
├── README.md
├── process_info.json
├── readme_assets
└── output_sample.png
├── requirements.txt
└── utils
├── gather_information.py
├── pprints.py
├── requirements_intaller.py
└── root_utilities.py
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Abdul Moez
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/PyCheats.py:
--------------------------------------------------------------------------------
1 | """
2 | /*
3 | * Date : 2023/10/13
4 | * Version : 0.3
5 | * Author : Abdul Moez
6 | * Email : abdulmoez123456789@gmail.com
7 | * Affiliation : Undergraduate at Government College University (GCU) Lahore, Pakistan
8 | * GitHub : https://github.com/Anonym0usWork1221/android-memorytool
9 | *
10 | */
11 | """
12 |
13 | from utils.requirements_intaller import ReqInstaller
14 |
15 | ReqInstaller().install_requirements() # Install requirements
16 |
17 | # Required Libraries
18 | from androidMemoryTool import AndroidMemoryTool, DataTypes, PMAP
19 | from utils.gather_information import GameInformationHandler
20 | from utils.root_utilities import RootUtils
21 | from utils.pprints import PPrints
22 | import asyncio
23 | import sys
24 |
25 |
26 | class PyCheats(object):
27 | """PyCheats - A Python-based Android game cheating tool."""
28 |
29 | def __init__(self, **kwargs) -> None:
30 | """
31 | Initialize the PyCheats object.
32 |
33 | Args:
34 | **kwargs: Additional keyword arguments.
35 | """
36 |
37 | super().__init__(**kwargs)
38 | self._game_info_handler: GameInformationHandler = GameInformationHandler()
39 | self._event_loop: asyncio.AbstractEventLoop = asyncio.get_event_loop()
40 | self._root_utils: RootUtils = RootUtils()
41 | self._pprints: PPrints = PPrints()
42 |
43 | # Memory Tools Instances Required
44 | # CODE APP Range instances
45 | self._dword_code_app_instance = None
46 | self._utf_8_code_app_instance = None
47 | self._float_code_app_instance = None
48 |
49 | # C_ALLOC Range Instances
50 | self._dword_c_alloc_instance = None
51 | self._float_c_alloc_instance = None
52 |
53 | # A_ANONYMOUS Range Instances
54 | self._float_a_anonymous_instance = None
55 | self._dword_a_anonymous_instance = None
56 |
57 | # C_Data Range Instances
58 | self._float_c_data_instance = None
59 | self._dword_c_data_instance = None
60 |
61 | async def __async__get_ticks(self) -> None:
62 | """
63 | Asynchronously get information about the Android game and initialize instances.
64 | This method retrieves game information, checks if the game is running, and initializes memory tool instances.
65 | Raises:
66 | SystemExit: Exits the application if the game is not running.
67 | """
68 |
69 | await self._pprints.decoration() # Prints the PyCheat on screen
70 | await self._root_utils.is_rooted_acquired() # Get root access if the device is rooted
71 | package_name = await self._game_info_handler.upack_information()
72 | if not await self._root_utils.is_game_running(package_name=package_name):
73 | await self._pprints.pprints(text="Game is not running", info_type=3)
74 | sys.exit(1)
75 |
76 | await self._initialize_instances(package_name=package_name)
77 | await self.controller_menu()
78 |
79 | async def _initialize_instances(self, package_name: str) -> None:
80 | """
81 | Initialize memory tool instances for various memory ranges and data types.
82 | Args:
83 | package_name (str): The package name of the Android game.
84 | This method initializes memory tool instances for different memory ranges and data types.
85 | """
86 |
87 | # CODE APP Range instances
88 | self._dword_code_app_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, CODE_APP=True),
89 | SPEED_MODE=True, WORKERS=AndroidMemoryTool.get_cpu_counts(3))
90 | self._utf_8_code_app_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, CODE_APP=True),
91 | TYPE=DataTypes.UTF_8,
92 | SPEED_MODE=True, WORKERS=AndroidMemoryTool.get_cpu_counts(3))
93 | self._float_code_app_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, CODE_APP=True),
94 | TYPE=DataTypes.FLOAT,
95 | SPEED_MODE=True, WORKERS=AndroidMemoryTool.get_cpu_counts(3))
96 |
97 | # C_ALLOC Range Instances
98 | self._dword_c_alloc_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, C_ALLOC=True),
99 | SPEED_MODE=True, WORKERS=AndroidMemoryTool.get_cpu_counts(3))
100 | self._float_c_alloc_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, C_ALLOC=True),
101 | TYPE=DataTypes.FLOAT,
102 | SPEED_MODE=True, WORKERS=AndroidMemoryTool.get_cpu_counts(3))
103 |
104 | # A_ANONYMOUS Range Instances
105 | self._dword_a_anonymous_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, A_ANONYMOUS=True),
106 | SPEED_MODE=True,
107 | WORKERS=AndroidMemoryTool.get_cpu_counts(3))
108 | self._float_a_anonymous_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, A_ANONYMOUS=True),
109 | TYPE=DataTypes.FLOAT, SPEED_MODE=True,
110 | WORKERS=AndroidMemoryTool.get_cpu_counts(3))
111 |
112 | # C_Data Range Instances
113 | self._dword_c_data_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, C_DATA=True),
114 | SPEED_MODE=True, WORKERS=AndroidMemoryTool.get_cpu_counts(3))
115 | self._float_c_data_instance = AndroidMemoryTool(PKG=package_name, pMAP=PMAP(ALL=False, C_DATA=True),
116 | TYPE=DataTypes.FLOAT,
117 | SPEED_MODE=True, WORKERS=AndroidMemoryTool.get_cpu_counts(3))
118 |
119 | async def logo_bypass(self) -> None:
120 | """
121 | Perform a logo bypass to modify game values.
122 | This method modifies various game values to bypass the game's anti-cheat system.
123 | """
124 |
125 | utf_8_anti_cheat = ["libUE4.so", "libBugly.so", "libanogs.so", "l_report", "get_report",
126 | "tss_sdk_rcv_anti_data", "AreaData.dat", "AntiCheatData", "Reports", "hack", "ban",
127 | "cheat", "qq.com"
128 | ]
129 | code_app_dword_values = [118334, 856896, 123010, 123179, 123274, 1026]
130 | code_app_float_values = [9.21970312e-41, 13073.3740234375]
131 | offsets_libUE4_dword = ['0x7E2A78', '0x7E2A80', '0x7E2A88']
132 |
133 | replaced_value: int = 0
134 | for value in utf_8_anti_cheat:
135 | replaced_value += self._utf_8_code_app_instance.read_write_value(read=value, write="ruler_king")
136 |
137 | for value in code_app_dword_values:
138 | replaced_value += self._dword_code_app_instance.read_write_value(read=value, write=1)
139 |
140 | for value in code_app_float_values:
141 | replaced_value += self._float_code_app_instance.read_write_value(read=value, write=0.1)
142 |
143 | lib_offset = self._dword_code_app_instance.get_module_base_address("libUE4.so")
144 | for value in offsets_libUE4_dword:
145 | if self._dword_code_app_instance.write_lib(base_address=lib_offset, offset=value,
146 | write_value=1):
147 | replaced_value += 1
148 |
149 | await self._pprints.pprints(text=f"Updated {replaced_value} Values")
150 |
151 | @staticmethod
152 | async def write_group_values_with_filter(instance, read: list, write: any, refine: any = None,
153 | limit: int = -1) -> int:
154 | """
155 | Write values to memory based on specified filter criteria.
156 | Args:
157 | instance: An instance of the memory tool.
158 | read (list): A list of values to read from memory.
159 | write: The value to write to memory.
160 | refine: A value to refine memory addresses (optional).
161 | limit: The maximum number of values to modify (optional).
162 | Returns:
163 | int: The number of values replaced.
164 | This method writes values to memory based on the specified criteria.
165 | """
166 |
167 | value_replaced: int = 0
168 | group_values = instance.read_value(read=read, is_grouped=True)
169 | if group_values:
170 | if refine:
171 | group_values = instance.refiner_address(list_address=group_values[0], value_to_refine=refine)
172 | if limit > 0:
173 | group_values = group_values[:limit]
174 | for value in group_values:
175 | if instance.write_lib(base_address=value, offset='0x0', write_value=write):
176 | value_replaced += 1
177 |
178 | return value_replaced
179 |
180 | async def lobby_bypass(self) -> None:
181 | """
182 | Perform a lobby bypass to remove unnecessary files and modify game values.
183 | This method removes unnecessary files and modifies game values to bypass the game's
184 | anti-cheat system in the lobby.
185 | """
186 |
187 | unnecessary_files = [
188 | "src/main/java/com/google/errorprone/annotations",
189 | "src/main/java/com/google/errorprone/annotations/concurrent",
190 | "third_party.java_src.error_prone.project.annotations.Google_internal"
191 | ]
192 | refine_groups = {
193 | self._dword_c_alloc_instance: [
194 | {"value": [135682, 144387], "replace": 67109633, "refine": 135682, "limit": 50000},
195 | {"value": [134914, 262403], "replace": 67109633, "refine": 134914, "limit": 50000},
196 | {"value": [134658, 131586], "replace": 67109633, "refine": 134658, "limit": 50000},
197 | {"value": [133378, 262403], "replace": 67109633, "refine": 133378, "limit": 50000},
198 | {"value": [131842, 132098], "replace": 67109633, "refine": 131842, "limit": 50000},
199 | ]
200 | }
201 | # Removing some unnecessary files
202 | values_replaced: int = 0
203 | for file in unnecessary_files:
204 | await self._root_utils.remove_file(file_path=file)
205 |
206 | for key, values in refine_groups.items():
207 | for value in values:
208 | values_replaced += await self.write_group_values_with_filter(
209 | instance=key,
210 | read=value["value"],
211 | refine=value["refine"],
212 | limit=value["limit"],
213 | write=value["replace"]
214 | )
215 |
216 | async def basic_cheats(self, cheat_code: int) -> None:
217 | """
218 | Activate basic game cheats based on the specified cheat code.
219 | Args:
220 | cheat_code (int): The code for the desired cheat.
221 | This method activates basic game cheats such as HEADSHOT, ANTENNA, AIM-BOT, and SPEED-HACK.
222 | """
223 |
224 | basic_cheat_sheet = {
225 | 1: "HEADSHOT",
226 | 2: "ANTENNA",
227 | 3: "AIM-BOT",
228 | 4: "SPEED-HACK"
229 | }
230 | cheat = basic_cheat_sheet.get(cheat_code, None)
231 | match cheat:
232 | case "HEADSHOT":
233 | address_list = []
234 | address_list.extend(self._float_a_anonymous_instance.read_value(read=[9.20161819458, 23.0, 25.0, 30.5],
235 | is_grouped=True)[0])
236 |
237 | address_list.extend(self._float_a_anonymous_instance.read_value(read=[25.0, 30.5], is_grouped=True)[0])
238 | address_list = address_list[:10] # Get only 10 results
239 | for address in address_list:
240 | self._float_a_anonymous_instance.write_lib(base_address=address, offset='0x0', write_value=240.0)
241 |
242 | await self._pprints.pprints(text=f"Activated Headshot Cheat")
243 |
244 | case "ANTENNA":
245 | address_list = []
246 | address_list.extend(self._float_a_anonymous_instance.read_value(read=[88.50576019287,
247 | 87.27782440186, 1],
248 | is_grouped=True, range_val=13)[0])
249 |
250 | address_list.extend(self._float_a_anonymous_instance.read_value(read=[25.0, 30.5], is_grouped=True)[0])
251 | address_list = address_list[:6] # Get only 6 results
252 | for address in address_list:
253 | self._float_a_anonymous_instance.write_lib(base_address=address, offset='0x0', write_value=1.96875)
254 |
255 | await self._pprints.pprints(text=f"Activated ANTENNA Cheat")
256 |
257 | case "AIM-BOT":
258 | address_list = []
259 | address_list.extend(self._float_a_anonymous_instance.read_value(read=[360.0, 0.0001, 1478828288.0],
260 | is_grouped=True)[0])
261 |
262 | address_list.extend(self._float_a_anonymous_instance.read_value(read=0.0001, is_grouped=False)[0])
263 | address_list = address_list[:100] # Get only 100 results
264 | for address in address_list:
265 | self._float_a_anonymous_instance.write_lib(base_address=address, offset='0x0', write_value=9999.0)
266 |
267 | await self._pprints.pprints(text=f"Activated AIM-BOT Cheat")
268 |
269 | case "SPEED-HACK":
270 | address_list = []
271 | address_list.extend(self._float_a_anonymous_instance.read_value(read=[1.0, 1.0, 1.0, 0.0001, 20.0,
272 | 0.0005, 0.4],
273 | is_grouped=True, range_val=50)[0])
274 |
275 | address_list.extend(self._float_a_anonymous_instance.read_value(read=1, is_grouped=False)[0])
276 | address_list = address_list[:100] # Get only 100 results
277 | for address in address_list:
278 | self._float_a_anonymous_instance.write_lib(base_address=address, offset='0x0', write_value=1.5)
279 |
280 | address_list.clear()
281 | address_list.extend(self._float_c_data_instance.read_value(read=[-6.1526231e27, -1.0070975e28],
282 | is_grouped=True)[0])
283 |
284 | address_list.extend(self._float_c_data_instance.read_value(read=-6.1526231e27, is_grouped=False)[0])
285 | address_list = address_list[:1] # Get only 100 results
286 | for address in address_list:
287 | self._float_a_anonymous_instance.write_lib(base_address=address, offset='0x0', write_value=0.01)
288 |
289 | await self._pprints.pprints(text=f"Activated SPEED-HACK Cheat")
290 |
291 | async def controller_menu(self) -> None:
292 | """
293 | Display a controller menu to interact with the PyCheats tool.
294 | This method displays a menu with options for performing various actions using the PyCheats tool.
295 | """
296 |
297 | while True:
298 | await self._pprints.pprints(text="1. Logo Anti-Cheat System", off_info=True)
299 | await self._pprints.pprints(text="2. Lobby Anti-Cheat System", off_info=True)
300 | await self._pprints.pprints(text="3. HEADSHOT", off_info=True)
301 | await self._pprints.pprints(text="4. ANTENNA", off_info=True)
302 | await self._pprints.pprints(text="5. AIM-BOT", off_info=True)
303 | await self._pprints.pprints(text="6. SPEED-HACK", off_info=True)
304 | await self._pprints.pprints(text="7. Dump Maps", off_info=True)
305 | await self._pprints.pprints(text="8. Exit", off_info=True)
306 | await self._pprints.pprints(text=">>>> ", off_info=True, info_type=5, no_end=True)
307 | ans = input()
308 | ans = int(ans)
309 | match ans:
310 | case 1:
311 | await self.logo_bypass()
312 | case 2:
313 | await self.lobby_bypass()
314 | case 3:
315 | await self.basic_cheats(cheat_code=1)
316 | case 4:
317 | await self.basic_cheats(cheat_code=2)
318 | case 5:
319 | await self.basic_cheats(cheat_code=3)
320 | case 6:
321 | await self.basic_cheats(cheat_code=4)
322 | case 7:
323 | self._float_c_data_instance.dump_maps()
324 | case 8:
325 | sys.exit(0)
326 | case _:
327 | await self._pprints.pprints(text="Choose given options", info_type=2)
328 | await asyncio.sleep(2)
329 |
330 | def get_ticks(self) -> None:
331 | """
332 | Start the PyCheats tool and enter the event loop to interact with the controller menu.
333 | """
334 |
335 | self._event_loop.run_until_complete(self.__async__get_ticks())
336 |
337 |
338 | if __name__ == '__main__':
339 | py_cheats_object = PyCheats()
340 | py_cheats_object.get_ticks()
341 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | PyCheats - An Ultimate Android Cheat Script
2 | ====
3 | [](https://github.com/Anonym0usWork1221/Android-Py-Cheats-Script/stargazers)
4 | [](https://github.com/Anonym0usWork1221/Android-Py-Cheats-Script/network/members)
5 | [](https://github.com/Anonym0usWork1221/Android-Py-Cheats-Script/issues)
6 | [](https://github.com/Anonym0usWork1221/Android-Py-Cheats-Script/watchers)
7 | [](https://www.python.org)
8 | [](https://opensource.org/licenses/)
9 |
10 | -----------
11 | **This is an example of using androidMemoryTool on android**
12 |
13 | If you find any bug or not working function you can contact me.
14 |
15 | * date : 2023/10/13
16 | * Version : 0.3
17 | * author : Abdul Moez (abdulmoez123456789@gmail.com)
18 | * Study : UnderGraduate in GCU Lahore, Pakistan
19 |
20 | MIT License
21 |
22 | Copyright (c) 2022 AbdulMoez
23 |
24 | ## Introduction
25 | **_PyCheats_** is a Python-based Android game cheating tool designed to help you modify
26 | and manipulate game values for **Android games**. This tool allows you to bypass
27 | **anti-cheat** systems, **activate basic game cheats**, and perform various actions to
28 | gain an advantage in your favorite Android games. This documentation provides
29 | detailed information for both developers and simple users.
30 |
31 | > That's it! You can now use PyCheats to enhance your gaming experience and gain an advantage in your
32 | favorite Android games. Enjoy cheating responsibly!
33 | ---------
34 | ## LOGS
35 |
36 | -----------------------------------------MODIFICATION LOG--------------------------------------------------
37 | 1. Introducing an enhanced group search system and a streamlined tool arrangement for improved efficiency.
38 | 2. Replacing the outdated search system with a cutting-edge, advanced alternative.
39 | 3. Version 0.3 offers compatibility with androidMemoryTool version 0.6.3 or higher.
40 |
41 | ------
42 | Requirements
43 | -----------
44 | * Python Version >= 3.7
45 | * Rooted Environment needed.
46 |
47 | Compatible
48 | -----------
49 | * This script is made for an example the target packaged used in script was (com.tencent.ig)(PUBG MOBILE)
50 | * For other games just change the addresses or values.
51 | * This script uses ASYNC to boost work speed.
52 |
53 | Installation
54 | ----------------------------------------
55 | * **__Manual Installation__**
56 | 1. First fulfill python requirements ``pip3 install -r ./requirements.txt``
57 | 2. Second run script as root ``sudo python3 PyCheats.py``
58 |
59 | * **__Auto Installation__**
60 | 1. Simply run ``python3 PyCheats.py`` it will automatically install all requirements**
61 |
62 | Video Demonstration
63 | ----------------------------------------
64 | [](https://www.youtube.com/watch?v=XgKjv0k_8pQ)
65 |
66 | Old Versions
67 | ----------------------------------------
68 | **Old versions can be found in packages section**
69 |
70 |
71 | OutPut Sample
72 | -----------
73 |
74 |
75 |
76 |