2021-01-11 02:19:10 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2021-08-24 02:39:54 -07:00
|
|
|
#include <functional>
|
2021-01-11 02:19:10 -08:00
|
|
|
|
|
|
|
extern bool RECOVERY_MODE;
|
|
|
|
extern int DAEMON_STATE;
|
|
|
|
|
|
|
|
void unlock_blocks();
|
|
|
|
void reboot();
|
2021-08-12 03:26:54 -07:00
|
|
|
void start_log_daemon();
|
2021-01-11 02:19:10 -08:00
|
|
|
void setup_logfile(bool reset);
|
2021-08-21 03:52:59 -07:00
|
|
|
void magisk_logging();
|
2021-01-11 02:19:10 -08:00
|
|
|
|
2021-08-24 02:39:54 -07:00
|
|
|
// Thread pool
|
|
|
|
void exec_task(std::function<void()> &&task);
|
|
|
|
|
2021-01-11 02:19:10 -08:00
|
|
|
// Module stuffs
|
|
|
|
void handle_modules();
|
|
|
|
void magic_mount();
|
|
|
|
void disable_modules();
|
|
|
|
void remove_modules();
|
|
|
|
void exec_module_scripts(const char *stage);
|
|
|
|
|
|
|
|
// Scripting
|
|
|
|
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> &module_list);
|
|
|
|
void install_apk(const char *apk);
|
|
|
|
[[noreturn]] void install_module(const char *file);
|