{"record":{"id":"24522ec3e0758fc4","repo":"Hmbown/CodeWhale","slug":"android-authority-reported-deleted-loaded-image","errorCode":null,"errorMessage":"Android {authority} reported deleted loaded image `{}`","messagePattern":"Android (.+?) reported deleted loaded image `(.+?)`","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/update.rs","lineNumber":487,"sourceCode":"    Ok(AndroidExecutableProof {\n        path: resolved_mapping,\n        device_major: mapping.device_major,\n        device_minor: mapping.device_minor,\n        inode: mapping.inode,\n        proof_kind: AndroidExecutableProofKind::DladdrAndProcMaps,\n    })\n}\n\n#[cfg(any(target_os = \"android\", all(test, unix)))]\nfn validate_android_reported_path(authority: &str, path: &Path) -> Result<()> {\n    if !path.is_absolute() {\n        bail!(\n            \"Android {authority} reported non-absolute loaded-image path `{}`\",\n            path.display()\n        );\n    }\n    if path.to_string_lossy().ends_with(\" (deleted)\") {\n        bail!(\n            \"Android {authority} reported deleted loaded image `{}`\",\n            path.display()\n        );\n    }\n    if is_android_linker_name(path) {\n        bail!(\n            \"Android {authority} identifies runtime linker `{}`; refusing to use the linker as an update target\",\n            path.display()\n        );\n    }\n    Ok(())\n}\n\n#[cfg(any(target_os = \"android\", all(test, unix)))]\nfn validate_android_mapping_identity(\n    mapping: &AndroidImageMapping,\n    candidate: &Path,\n) -> Result<()> {","sourceCodeStart":469,"sourceCodeEnd":505,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/update.rs#L469-L505","documentation":"Linux appends \" (deleted)\" to the path in /proc/self/maps when the mapped file has been unlinked. A deleted loaded image means the on-disk file the process runs from no longer exists at that name, so there is nothing legitimate to replace — updating would target a name no longer backed by the running inode. The updater detects the suffix and refuses.","triggerScenarios":"validate_android_reported_path, called from android_loaded_executable_proof_report, when either the dladdr path or the maps row path ends with \" (deleted)\".","commonSituations":"Something replaced or deleted the binary while the old process was still running (e.g. a prior partial update, an `rm` + reinstall, or a package manager swap); the updater itself previously swapped files without restarting the process.","solutions":["Kill the running process and start the newly installed binary by its full path; self-update only from a binary that still exists on disk.","Reinstall the current release so a live file exists at the expected path, then run the update from that fresh process.","Avoid deleting/renaming the updater binary while an update from it is in flight.","If this recurs after every update, check for another agent (sync client, antivirus, package manager) removing the binary mid-run."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"fn path_is_live(p: &std::path::Path) -> bool {\n    let s = p.to_string_lossy();\n    !s.ends_with(\" (deleted)\") && p.exists()\n}\nif !path_is_live(&reported_path) { /* restart from a freshly installed binary before updating */ }","typeGuard":null,"tryCatchPattern":"match run_update() {\n    Err(e) if e.to_string().contains(\"reported deleted loaded image\") => {\n        // instruct user: restart the newly installed binary by full path, retry\n    }\n    other => other?,\n}","preventionTips":["Never rm/rename the binary while a process is running from it.","After replacing a binary, always start the new one before updating again.","Check for background agents (sync, AV, package manager) touching the install directory.","Make updates atomic and serialized within your own tooling."],"tags":["android","self-update","deleted-file","procfs"],"backgroundTag":"file-not-found","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}