Migrate package detection to Rust

This commit is contained in:
topjohnwu
2025-01-09 00:14:08 +08:00
committed by John Wu
parent ee6810f417
commit 5637a258fc
12 changed files with 528 additions and 442 deletions

View File

@@ -61,9 +61,7 @@ void su_daemon_handler(int client, const sock_cred *cred);
void zygisk_handler(int client, const sock_cred *cred);
// Package
void preserve_stub_apk();
std::vector<bool> get_app_no_list();
int get_manager(int user, std::string *pkg = nullptr, bool install = false);
void prune_su_access();
// Module stuffs
@@ -77,8 +75,6 @@ void exec_module_scripts(const char *stage);
void exec_script(const char *script);
void exec_common_scripts(const char *stage);
void exec_module_scripts(const char *stage, const std::vector<std::string_view> &modules);
void install_apk(const char *apk);
void uninstall_pkg(const char *pkg);
void clear_pkg(const char *pkg, int user_id);
[[noreturn]] void install_module(const char *file);

View File

@@ -3,6 +3,8 @@
#include <base.hpp>
const char *get_magisk_tmp();
void install_apk(rust::Utf8CStr apk);
void uninstall_pkg(rust::Utf8CStr pkg);
// Rust bindings
static inline rust::Utf8CStr get_magisk_tmp_rs() { return get_magisk_tmp(); }