{
  "name": "rootchain",
  "icon": "https://bb10repo.whytofly.de/img/bb10-rootchain.png",
  "category": "System",
  "type": "cli",
  "author": "whytofly",
  "homepage": "https://bb10repo.whytofly.de/",
  "description": "rootchain — makes root survive a reboot on a rooted BlackBerry 10 device. Installed automatically with bb10-newdroid, and worth having on its own if you are rooted at all.\n\nTHE PROBLEM. Root here is not a property of the device, it is the outcome of a chain of scripts that runs at every boot. That chain is fragile and it fails silently: the phone boots normally, looks completely fine, and simply has no ssh. By the time you notice, the shell you would have used to investigate is the thing that is missing. Worse, the chain shares a boot path with the Android runtime, so anything that stops the runtime from starting can take root down with it — which is exactly the risk of installing a modified runtime.\n\nWHAT IT ADDS. Two things, both of which run before anything else can go wrong.\n\nA boot log you can actually read afterwards. The boot that loses root is the boot that leaves nothing behind, because the logging ran through a privileged path that silently did nothing. This writes unprivileged, on purpose, so it still works on the boot where everything else did not — and the first line it records is the one that decides everything: whether the previous boot planted the link that gives this boot ssh. It also attempts a second ssh on port 2222. Be clear about that attempt: on a stock device it is expected to FAIL, because the only setuid helper that could start it is refused by the trust system. It is kept because it costs nothing, and it records whether it ended up listening rather than merely whether it was launched — an earlier version logged the launch, so a lifeline that had never once worked looked exactly like one that had. Do not count on port 2222 being there.\n\nA boot guard that checks, before the runtime starts, whether a patched Android image is present without the loader that can run it. That combination is the one state the runtime cannot start in, and it is the state a badly timed reboot leaves behind. The guard puts the stock runtime back so the boot completes and root re-arms normally.\n\nHOW IT INSTALLS. There is exactly one file on the device that owns the boot chain, and the reliable way to corrupt it is to have two tools rewriting it. So this package does not edit it: the finished file is composed at build time, shipped whole, checksummed at both ends, and written in place without replacing the file, which would lose its trust entry. It refuses to touch a boot chain it does not recognise, and it keeps a copy of what was there before.\n\nUNINSTALLING puts the previous boot chain back. It will refuse to do so while bb10-newdroid is still applied, because removing the safety net before removing the thing it protects against is the wrong order.\n\nREQUIRES OS 10.3.3.3216 and bb10-rootd.",
  "history": [
    {
      "version": "2026.09.27",
      "released": "2026-09-27",
      "changes": "- First release. Unprivileged boot-evidence log that records whether the previous boot planted the btool symlink -- the fact that decides whether this boot has ssh at all. Best-effort :2222 lifeline, verified by netstat rather than assumed from a successful fork, and documented as expected-to-fail rather than sold as a guarantee. Boot guard reverts a patched Android image (not just the loader) so a reboot while armed cannot cost root. Boot chain composed at build time and shipped whole with a checksum verified on device; written in place to preserve its PathTrust entry; refuses an unrecognised chain and keeps a backup. Uninstall restores the previous chain and refuses while bb10-newdroid is applied."
    }
  ]
}
