{"record":{"id":"3b95d3a2d9024b79","repo":"Hmbown/CodeWhale","slug":"android-loaded-image-authorities-disagree-dladdr","errorCode":null,"errorMessage":"Android loaded-image authorities disagree: dladdr resolved to {}, but /proc/self/maps resolved to {}","messagePattern":"Android loaded-image authorities disagree: dladdr resolved to (.+?), but /proc/self/maps resolved to (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/update.rs","lineNumber":417,"sourceCode":") -> Result<AndroidExecutableProof> {\n    let mapping = parse_android_image_mapping(maps, marker)?;\n    validate_android_reported_path(\"dladdr\", dladdr_path)?;\n    validate_android_reported_path(\"/proc/self/maps\", &mapping.path)?;\n\n    let resolved_dladdr = dladdr_path.canonicalize().with_context(|| {\n        format!(\n            \"failed to canonicalize Android dladdr path {}\",\n            dladdr_path.display()\n        )\n    })?;\n    let resolved_mapping = mapping.path.canonicalize().with_context(|| {\n        format!(\n            \"failed to canonicalize Android loaded-image mapping {}\",\n            mapping.path.display()\n        )\n    })?;\n    if resolved_dladdr != resolved_mapping {\n        bail!(\n            \"Android loaded-image authorities disagree: dladdr resolved to {}, but /proc/self/maps resolved to {}\",\n            resolved_dladdr.display(),\n            resolved_mapping.display()\n        );\n    }\n    if is_android_linker_name(&resolved_mapping) {\n        bail!(\n            \"Android loaded-image authorities resolved to runtime linker {}; refusing to use the linker as an update target\",\n            resolved_mapping.display()\n        );\n    }\n    if !is_executable_file(&resolved_mapping) {\n        bail!(\n            \"Android loaded image `{}` is not an executable regular file; refusing to select an update target\",\n            resolved_mapping.display()\n        );\n    }\n","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/cli/src/update.rs#L399-L435","documentation":"The two Android authorities disagreed: dladdr's path and the /proc/self/maps row path canonicalize to different files. Because replacing the wrong file on Android is destructive, the updater requires both authorities to agree on the exact file before selecting an update target.","triggerScenarios":"Android self-update where the same image is reachable through two different canonical paths: bind mounts, symlinked install dirs, mount namespaces (Termux, app sandboxes), or chroots that make dladdr's link-map path and the maps path resolve differently.","commonSituations":"Binaries installed under bind-mounted or symlinked directories, proot/chroot environments, devices where /data or /apex aliasing changes canonicalization.","solutions":["Reinstall the binary at a plain, non-aliased filesystem path and retry","Remove bind mounts or symlink layers that alias the install directory","Report the two paths from the message along with mount info (cat /proc/mounts) for the affected directory"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Catch the disagreement error and print both canonicalized paths plus a hint to check mounts/symlinks on the install directory; do not pick either path automatically.","preventionTips":["Install the binary at a plain path with no bind mounts or symlink layers","Keep the install directory outside alias-prone locations","Compare the message's two paths to spot the aliasing culprit"],"tags":["android","canonicalize","mounts","self-update"],"backgroundTag":"canonical-path-mismatch","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}