diff --git a/native/src/init/selinux.rs b/native/src/init/selinux.rs index 9e58dcdee..4144890fa 100644 --- a/native/src/init/selinux.rs +++ b/native/src/init/selinux.rs @@ -225,6 +225,9 @@ impl MagiskInit { let mut sepol = SePolicy::from_file(preload_policy()); + // Keep a copy of the original policy for future use + preload_policy().copy_to(MOCK_LOAD)?; + // Remove the files before loading the policy preload_policy().remove()?; preload_ack().remove()?;