Google deleted this source from bootable/recovery outright (commit c7ebad5f, "rm -rf non-AB code", 2024-04-05) — confirmed present at android-14, absent at android-16.0.0_r4. The runtime side (install.cpp's SetUpNonAbUpdateCommands) and build-side packaging (ota_from_target_files.py's GenerateNonAbOtaPackage) both survived; only the source that builds the update-binary executable itself was removed. Sourced from TeamWin's android_bootable_recovery (android-14.1), the only living copy found, with install/ZipUtil.cpp, get_args.cpp, and set_metadata.cpp intentionally left out (only wired into TeamWin's modified install.cpp, which PawletOS isn't adopting — twrpinstall carries its own independent copies). Kept as its own repo, not folded into a recovery fork, so it's buildable independent of whichever recovery UI ends up in use.
external_update_binary
Provides the applypatch/updater/edify stack — the code that builds the
updater binary embedded as update-binary inside a non-A/B OTA zip, and
interpreted by recovery's install/install.cpp (SetUpNonAbUpdateCommands())
at install time.
Why this repo exists
Google deleted this source from AOSP outright in commit c7ebad5f
("rm -rf non-AB code", 2024-04-05, Bug 324360816) — confirmed present in the
android-14 tag, absent from android-16.0.0_r4. The runtime side survived
(install/install.cpp in stock bootable/recovery still unconditionally
extracts and executes update-binary from an OTA zip) and the build-side
packaging survived too (ota_from_target_files.py still has
GenerateNonAbOtaPackage/--binary) — only the source that builds the
updater executable itself was removed. This repo restores just that piece,
sourced from TeamWin's android_bootable_recovery (android-14.1 branch),
the only living copy found.
Kept as its own repo rather than folded into a recovery fork so it's
buildable independent of whichever recovery UI PawletOS ends up using (stock
AOSP UI or a TWRP-derived one) — see PawletOS/NOTES-ota-recovery-ab.md in
the main workspace for the full investigation.
Layout
applypatch/— binary patch application (imgpatch,bspatch), plus the standaloneapplypatch/imgdifftools. Self-contained Soong module, no changes made against TeamWin's source.updater/— theupdaterexecutable itself (updater/Android.mk,LOCAL_MODULE := updater) and its supporting static libs (libupdater_core,libupdater_device,libupdater_host). Uses classicAndroid.mk/BUILD_EXECUTABLE— verified still supported in raspberry-vanilla'sandroid-16.0build/makefork (core/executable.mkpresent,LOCAL_FORCE_STATIC_EXECUTABLEhandling present).edify/— the scripting languageupdater-scriptis written in (libedify: lexer/parser/expression evaluator).
What was intentionally left out
install/ZipUtil.cpp,install/get_args.cpp,install/set_metadata.cpp— these existed in TeamWin's tree but are wired only into their modifiedinstall.cpp(bootable/recovery's top-levelAndroid.bp), which PawletOS is not adopting (stockinstall.cppis being kept as-is). Confirmedtwrpinstall(a separate standalone module, not part of this repo) ships its own independent copies ofZipUtil/get_args, so nothing depends on the ones that used to live here. Left out rather than carried along as dead weight.uncrypt/Android.mk—uncryptstill exists, unmodified, in stockbootable/recovery. Nothing to restore there.
Compatibility notes (android-16.0.0_r4, raspberry-vanilla build)
- Adapted
updater/Android.bpandedify/Android.bpto declare their ownlicense {}module instead of referencing bootable/recovery's internalbootable_recovery_licensename — keeps this repo buildable without a hard coupling to bootable/recovery's own license plumbing.applypatch/already declared its own license module upstream, left as-is. - All
static_libs/shared_libsdependencies referenced (libbootloader_message,libotautil,libavb,liblp,libdm,libfec/libfec_rs,libselinux,libsparse,libsquashfs_utils,libbrotli,libbz,libziparchive,libbase,libcrypto_utils,libbsdiff,libdivsufsort/libdivsufsort64) are long-stable AOSP library names fromsystem//external/, not modified by PawletOS or raspberry-vanilla — not individually re-verified against the android-16.0 tag, flagged here in case a build turns one of these up as missing. - Not yet build-tested end to end (no local AOSP build environment available in this workspace) — the checks above were done by reading source and grepping actual cloned trees, not by compiling.
License
Apache License 2.0 (see NOTICE), consistent with the upstream AOSP/TeamWin
source this was derived from.