diff --git a/zygiskd/src/root_impl/mod.rs b/zygiskd/src/root_impl/mod.rs index 2f0bf99..32560d6 100644 --- a/zygiskd/src/root_impl/mod.rs +++ b/zygiskd/src/root_impl/mod.rs @@ -1,3 +1,5 @@ +use std::ptr::addr_of; + mod kernelsu; mod magisk; @@ -36,7 +38,7 @@ pub fn setup() { } pub fn get_impl() -> &'static RootImpl { - unsafe { &ROOT_IMPL } + unsafe { &*addr_of!(ROOT_IMPL) } } pub fn uid_granted_root(uid: i32) -> bool {