question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger can't read memory address

See original GitHub issue

Hi. 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:closed
  • Created 2 years ago
  • Comments:27

github_iconTop GitHub Comments

1reaction
Ha0riscommented, Apr 23, 2021

I am delighted that AEroot is now working properly on your setup.

Thank you for your comments, they really helped me.

1reaction
Ha0riscommented, Apr 23, 2021

Fine! Yep. I’ll try to implement this workaround in aeroot soon.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual studio c++ debugger unable to read memory when ...
It turns out that a coworker introduces a variable with the same name of the class scoped "resources" variable inside of the "else...
Read more >
Solved: CVI debugger: unable to read memory - NI Community
The most likely explanation of why we cannot read memory at that address is that the address is simply invalid.
Read more >
Use the Memory windows in the Visual Studio debugger (C# ...
Under Debug > Windows > Memory, select Memory 1, Memory 2, Memory 3, or Memory 4. (Some editions of Visual Studio offer only...
Read more >
Examining Memory With a Debugger - Robert G. Plantz
I will describe the purpose of the commands as we walk through this terminal interaction. The addresses you see on your Raspberry Pi...
Read more >
GDB can not access memory address. - Google Groups
I am trying to debug my program using debug module but it showing me this. ... Cannot access memory at address 0x1cc Command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found