Hello I try to dump the memory of a process in Android/Linux. Right now I read the memory maps to get a memory region's address space and then I read every single word like this:
ptrace(PTRACE_ATTACH, pid, NULL, NULL);
wait(NULL);
read each word in this memory region:
word = ptrace(PTRACE_PEEKDATA, pid, (void *)address, NULL);
ptrace(PTRACE_CONT, pid, NULL, NULL);
ptrace(PTRACE_DETACH, pid, NULL, NULL);
Isn't there a more efficient solution reading directly a whole memory page by specifying the start/end of a memory address space to read?