{"record":{"id":"ca695078ffb6d0f0","repo":"Hmbown/CodeWhale","slug":"android-loaded-image-authorities-resolved-to-runti","errorCode":null,"errorMessage":"Android loaded-image authorities resolved to runtime linker {}; refusing to use the linker as an update target","messagePattern":"Android loaded-image authorities resolved to runtime linker (.+?); refusing to use the linker as an update target","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/update.rs","lineNumber":424,"sourceCode":"            \"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\n    validate_android_mapping_identity(&mapping, &resolved_mapping)?;\n    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,","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/cli/src/update.rs#L406-L442","documentation":"Both Android authorities (dladdr and /proc/self/maps) resolved the updater's loaded image to Bionic's runtime linker (matched by is_android_linker_name, e.g. /system/bin/linker64 or /apex/.../linker64). The whole marker+maps cross-check exists precisely because Android's current_exe can misreport the linker; if the marker itself is attributed to the linker, updating would overwrite a system component, so it is refused by design.","triggerScenarios":"Android self-update where the marker symbol's address is attributed to the linker image - typically a packaging or launch-path bug where the CLI is loaded by/in the linker's namespace rather than exec'd normally.","commonSituations":"Custom launchers that dlopen the binary, mispackaged builds, or tooling that execs the linker directly with the program as an argument.","solutions":["Launch the CLI by exec'ing the binary itself, not through the dynamic linker or dlopen wrappers","Reinstall using the documented Android install method","Report it as a bug with the resolved linker path from the message and how the binary was launched"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Catch and hard-stop: any workflow that reaches the linker refusal must never retry or write to the linker path; report a packaging/launch bug instead.","preventionTips":["Always exec the binary directly, never load it via the linker or dlopen","Use documented install methods","Watch launch wrappers that change which image owns the marker symbol"],"tags":["android","linker","bionic","self-update"],"backgroundTag":"runtime-linker-returned-as-executable","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","schemaVersion":2},"datasetVersion":"2026-08-22T04:17:13.399Z"}