mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-16 09:52:31 +00:00
Support remote function call with ptrace
End up not used for anything, but keep it for good
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <sys/mount.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/sendfile.h>
|
||||
#include <sys/ptrace.h>
|
||||
|
||||
#include <utils.hpp>
|
||||
|
||||
@@ -470,3 +471,10 @@ int xmknod(const char *pathname, mode_t mode, dev_t dev) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
long xptrace(int request, pid_t pid, void *addr, void *data) {
|
||||
long ret = ptrace(request, pid, addr, data);
|
||||
if (ret < 0)
|
||||
PLOGE("ptrace %d", pid);
|
||||
return ret;
|
||||
}
|
||||
|
@@ -60,4 +60,4 @@ int xpoll(struct pollfd *fds, nfds_t nfds, int timeout);
|
||||
int xinotify_init1(int flags);
|
||||
char *xrealpath(const char *path, char *resolved_path);
|
||||
int xmknod(const char *pathname, mode_t mode, dev_t dev);
|
||||
|
||||
long xptrace(int request, pid_t pid, void *addr = nullptr, void *data = nullptr);
|
||||
|
Reference in New Issue
Block a user