You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
improve: ELF utils and SoList code
This commit improves the code related to ELF and SoList, porting them to C.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "files.hpp"
|
||||
#include "misc.hpp"
|
||||
|
||||
#include "solist.hpp"
|
||||
#include "solist.h"
|
||||
|
||||
#include "art_method.hpp"
|
||||
|
||||
@@ -616,7 +616,7 @@ void ZygiskContext::run_modules_post() {
|
||||
|
||||
if (modules.size() > 0) {
|
||||
LOGD("modules unloaded: %zu/%zu", modules_unloaded, modules.size());
|
||||
clean_trace("/data/adb", modules.size(), modules_unloaded, true);
|
||||
clean_trace("/data/adb/rezygisk", modules.size(), modules_unloaded, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -778,8 +778,11 @@ static void hook_register(dev_t dev, ino_t inode, const char *symbol, void *new_
|
||||
void clean_trace(const char* path, size_t load, size_t unload, bool spoof_maps) {
|
||||
LOGD("cleaning trace for path %s", path);
|
||||
|
||||
if (load > 0 || unload >0) SoList::ResetCounters(load, unload);
|
||||
bool path_found = SoList::DropSoPath(path);
|
||||
if (load > 0 || unload > 0) solist_reset_counters(load, unload);
|
||||
|
||||
LOGI("Dropping solist record for %s", path);
|
||||
|
||||
bool path_found = solist_drop_so_path(path);
|
||||
if (!path_found || !spoof_maps) return;
|
||||
|
||||
LOGD("spoofing virtual maps for %s", path);
|
||||
|
||||
Reference in New Issue
Block a user