LSPlt  LSPosed Developers
lsplt.hpp File Reference
#include <sys/types.h>
#include <string>
#include <string_view>

Go to the source code of this file.

Data Structures

struct  lsplt::v2::MapInfo
 An entry that describes a line in /proc/self/maps. You can obtain a list of these entries by calling Scan(). More...
 

Namespaces

 lsplt
 
 lsplt::v2
 

Functions

bool lsplt::v2::RegisterHook (dev_t dev, ino_t inode, std::string_view symbol, void *callback, void **backup)
 Register a hook to a function by inode. For so within an archive, you should use #RegisterHook(ino_t, uintptr_t, size_t, std::string_view, void *, void **) instead. More...
 
bool lsplt::v2::RegisterHook (dev_t dev, ino_t inode, uintptr_t offset, size_t size, std::string_view symbol, void *callback, void **backup)
 Register a hook to a function by inode with offset range. This is useful when hooking a library that is directly loaded from an archive without extraction. More...
 
bool lsplt::v2::CommitHook ()
 Commit all registered hooks. More...
 
bool lsplt::v2::InvalidateBackup ()
 Invalidate backup memory regions Normally LSPlt will backup the hooked memory region and do hook on a copied anonymous memory region, and restore the original memory region when the hook is unregistered (when the callback of RegisterHook() is the original function). This function will restore the backup memory region and do all existing hooks on the original memory region. More...