Files
oxmc 0f7c9a87ed Fix NOTES-ota-recovery-ab.md references after move to notes repo
Root workspace's NOTES-ota-recovery-ab.md was absorbed into
notes/ota-non-a-ab-research-work.md; update the two README pointers.
2026-08-30 20:34:06 -07:00
..

recovery_toolkit

TWRP's partition manager, backup engine, filesystem/format support, and scripting/automation tooling — the "standalone additive" bucket from the TWRP-vs-stock-recovery diff (confirmed via source grep: zero references either direction between this code and recovery.cpp/install/install.cpp, so none of it requires forking stock bootable/recovery). See the main workspace's notes/ota-non-a-ab-research-work.md for the full investigation.

Source copied verbatim from TeamWin's android_bootable_recovery (android-14.1), the only living copy found (Google removed the equivalent functionality's siblings — applypatch/updater/edify — from stock AOSP in 2024; see external_update_binary).

Status: source staged, no build files yet

This is source-only. None of these directories have an Android.bp yet. That's real remaining work, not cleanup — each of these historically had its module definition scattered inside TWRP's single top-level bootable/recovery/Android.bp, not self-contained per-directory the way applypatch/updater/edify were, so each needs a new Android.bp written from scratch, not just copied and path-fixed.

Layout

  • partitionmanager/partition.cpp, partitionmanager.cpp, partitions.hpp, BasePartition.cpp.
  • backup/twrpTar.*, tarWrite.*, twrpDigestDriver.*, twrpAdbBuFifo.*, twrpApex.*, infomanager.*, plus libtar/, twrpDigest/, adbbu/, twrpTarMain/ (each of those four already has its own directory structure from upstream, not yet inspected for existing build files).
  • Filesystem/format support: exfat/, dosfstools/, libblkid/, simg2img/, minzip/, openaes/, gpt/, fuse/ (+ fuse.h), mtp/, crypto/.
  • scripting/ (openrecoveryscript.*) + orscmd/ + twrpinstall/ — TWRP's scripting/automation interface. twrpinstall/ is referenced by recovery_ui/gui/Android.bp's include_dirs already (this module needs to exist before recovery_ui can build).
  • helpers/ — shared utilities (find_file.*, exclude.*, fixContexts.*, mounts.c, startupArgs.*, progresstracking.*, kernel_module_loader.*, abx-functions.hpp, twrp-functions.*, twrp.cpp), plus libcrecovery/, libmincrypt/, attr/.

Known gap shared with recovery_ui

helpers/twrp.cpp needs to build into libaosprecovery — TWRP builds this via a custom Go Soong plugin (libaosprecovery_defaults.go, not yet copied/ported) that recovery_ui/gui's libguitwrp depends on as a shared_libs entry. recovery_ui won't link until this exists.

Priority if picking up this work

twrpinstall/ and helpers/ (for libaosprecovery) block recovery_ui from building at all — do those first. partitionmanager/ and backup/ are the actual user-facing value (what makes this "TWRP" rather than just a GUI skin) and are next. Filesystem/format support modules (exfat/dosfstools/etc.) can come last — they're each independent and only needed for the specific formats they support.

License

GPL-3.0 (TeamWin) — same situation as recovery_ui, full license text not yet added to this repo.