Debugger can't read memory address
See original GitHub issueHi. For any emulator except Android 11 I try to use AERoot I receive errors like the following:
[+] Detected: Android 10.0 (Q) x86 [+] Search for [adbd] process in memory (this may take a while) … [+] Exiting. Traceback (most recent call last): File “/home/vinicius/Tools/AERoot/./aeroot.py”, line 435, in <module> process_addr = find_task_struct(gdb_helper, avd_conf, target_process) File “/home/vinicius/Tools/AERoot/./aeroot.py”, line 216, in find_task_struct return next(filter(lambda x: process.match(gdb, avd, x), get_task_structs(gdb, avd)), None) File “/home/vinicius/Tools/AERoot/./aeroot.py”, line 221, in get_task_structs find_init(gdb, avd) File “/home/vinicius/Tools/AERoot/./aeroot.py”, line 212, in find_init avd[“init_addr”] = gdb.read_addr(mem_init_ptr) - avd.get(“offset_to_tasks”) File “/home/vinicius/Tools/AERoot/./aeroot.py”, line 131, in read_addr return int(response.split(“\t”)[1].replace(“\n”, “”), 16) ValueError: invalid literal for int() with base 16:
I’ve modified the script a bit to try to debug the issue, but I don’t know exactly how to proceed. It seems the debugger can’t access a memory address during the second read_addr of find_init.
[+] Search for [adbd] process in memory (this may take a while) ...
find_init1
[
{
"type": "log",
"message": null,
"payload": "x/a 0xfffffe0000034dc8\\n",
"stream": "stdout"
},
{
"type": "console",
"message": null,
"payload": "0xfffffe0000034dc8:\\t0x0\\n",
"stream": "stdout"
},
{
"type": "result",
"message": "done",
"payload": null,
"token": null,
"stream": "stdout"
}
]
find_init2
[
{
"type": "log",
"message": null,
"payload": "x/a -0x12ce0\\n",
"stream": "stdout"
},
{
"type": "console",
"message": null,
"payload": "0xfffffffffffed320:\\t",
"stream": "stdout"
},
{
"type": "log",
"message": null,
"payload": "Cannot access memory at address 0xfffffffffffed320\\n",
"stream": "stdout"
},
{
"type": "result",
"message": "error",
"payload": {
"msg": "Cannot access memory at address 0xfffffffffffed320"
},
"token": null,
"stream": "stdout"
}
]
[+] Exiting.
I think the hardcoded addresses on config.json may be the cause of this problem, but I don’t know how to adapt it for my emulator.
Issue Analytics
- State:
- Created 2 years ago
- Comments:27
I am delighted that AEroot is now working properly on your setup.
Thank you for your comments, they really helped me.
Fine! Yep. I’ll try to implement this workaround in aeroot soon.
Thank you!