mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-17 21:47:37 +00:00
Identify tmpfs used by magisk
This commit is contained in:
parent
5520f0fbf7
commit
2a4aa95a6f
@ -45,10 +45,8 @@ static bool mount_mirror(const std::string_view from, const std::string_view to)
|
||||
|
||||
static void mount_mirrors() {
|
||||
LOGI("* Prepare worker\n");
|
||||
if (auto worker_dir = MAGISKTMP + "/" WORKERDIR;
|
||||
xmount(worker_dir.data(), worker_dir.data(), nullptr, MS_BIND, nullptr) == 0) {
|
||||
xmount(nullptr, worker_dir.data(), nullptr, MS_PRIVATE, nullptr);
|
||||
}
|
||||
auto worker_dir = MAGISKTMP + "/" WORKERDIR;
|
||||
xmount("worker", worker_dir.data(), "tmpfs", 0, "mode=755");
|
||||
|
||||
LOGI("* Mounting mirrors\n");
|
||||
// recursively bind mount / to mirror dir
|
||||
|
@ -231,7 +231,7 @@ void BaseInit::exec_init() {
|
||||
void BaseInit::prepare_data() {
|
||||
LOGD("Setup data tmp\n");
|
||||
xmkdir("/data", 0755);
|
||||
xmount("tmpfs", "/data", "tmpfs", 0, "mode=755");
|
||||
xmount("magisk", "/data", "tmpfs", 0, "mode=755");
|
||||
|
||||
cp_afc("/init", "/data/magiskinit");
|
||||
cp_afc("/.backup", "/data/.backup");
|
||||
|
Loading…
x
Reference in New Issue
Block a user