Disable Samsung Activation Verify to solve -45(2000) error during activation on China Mainland Samsung devices (#446)

This commit is contained in:
由崎黑板
2025-10-06 23:02:54 +08:00
committed by GitHub
parent fbaa69f3fb
commit 7ef9230d66

View File

@@ -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(())