diff --git a/userspace/ksud/src/init_event.rs b/userspace/ksud/src/init_event.rs index 0c8bc7b4..05784311 100644 --- a/userspace/ksud/src/init_event.rs +++ b/userspace/ksud/src/init_event.rs @@ -117,6 +117,28 @@ pub fn on_post_data_fs() -> Result<()> { info!("no mount requested"); } + // Disable Samsung Activation Verify + if let Some(model) = utils::getprop("ro.product.model") { + if model.starts_with("SM-") { + info!("Disable Samsung Activation for model {}", model); + if Path::new("/system/app/ActivationDevice_V2").exists() { + if let Err(e) = std::fs::create_dir_all("/data/local/tmp/ActivationDevice_V2") { + warn!("Failed to create directory: {}", e); + } else { + if let Err(e) = mount( + "/data/local/tmp/ActivationDevice_V2", + "/system/app/ActivationDevice_V2", + "none", + MountFlags::BIND, + "", + ) { + warn!("Failed to mount ActivationDevice_V2: {}", e); + } + } + } + } + } + run_stage("post-mount", true); Ok(())