The recovery_toolkit/recovery_ui merge broke ninja generation for the whole tree (everything runs at analysis time, even for modules nothing builds). Fixes, in the order the errors surfaced: - BoardConfigSoong.mk: export TW_THEME=landscape_hdpi via the twrpVarsPlugin soong config namespace (RPi 4/5 are 1080p HDMI); libguitwrp's theme selection hard-exits analysis when unset - soong/copy.go: re-anchor runtime.Caller path derivation — the 'bootable' anchor never matches at vendor/pawlet/recovery_ui and the slice paniced; recovery dir is now derived relative to this file - scrypt sources.bp + libpixelflinger: hoist arch.arm.neon.* contents into plain arm blocks — the neon variant was removed in android-16 Soong (NEON is mandatory on armv7-a+) - recovery_ui/Android.bp: port twrp_defaults verbatim from android_vendor_twrp (android-14.1, build/soong) — it never lived in bootable/recovery; pure soong_config machinery, contributes no flags until twrpGlobalVars vars are set - gui/Android.bp: drop libaosprecovery from libguitwrp's shared_libs — the module doesn't exist (TWRP's forked install/*.cpp was never ported) and an undefined dep is analysis-fatal; compile is unaffected (static lib), the gap moves to link time and is documented - recovery_ui/Android.bp: librecovery_ui_pawlet_twrp shared -> static (librecovery_ui_ext absorbs TARGET_RECOVERY_UI_LIB via whole_static_libs) and libpixelflinger_twrp moved to static_libs - scrypt Android.bp + libminuitwrp_defaults.go: rewrite leftover bootable/recovery/* self-referential paths to the new vendor/pawlet locations Requires the libminadbd_headers visibility patch in the patches repo. m nothing now completes for pawlet_rpi4-bp4a-userdebug.
recovery_ui
TWRP's GUI engine, packaged as a librecovery_ui_ext plugin instead of a
bootable/recovery fork. Stock AOSP recovery already dlopen()s
librecovery_ui_ext.so and dlsym()s make_device() out of it at runtime
(see recovery_main.cpp) — this module is what TARGET_RECOVERY_UI_LIB
(set in BoardConfig.mk) should point at. bootable/recovery itself stays
stock, unforked (see the main workspace's NOTES-ota-recovery-ab.md for the
full investigation behind this approach).
Status: first-draft scaffolding, not build-tested
This is real progress, not a finished module. What's solid vs. what's open:
Solid — copied verbatim from TeamWin's android_bootable_recovery
(android-14.1), self-contained:
gui/,minuitwrp/,libpixelflinger/— TWRP's actual GUI/graphics engine, unmodified exceptinclude_dirspath fixes (see below).soong/copy.go,soong/makevars.go— shared helpers all three of the above's custom Go Soong plugins depend on.
New — written from scratch for this port, not copied from anywhere
(TWRP's own bootable/recovery fork never ships a make_device() — every
real TWRP device provides its own, and PawletOS didn't have a reference
device tree to copy from):
device/pawlet_recovery_ui.h/device/pawlet_recovery_ui.cpp—PawletTwrpUI, aScreenRecoveryUIsubclass. OverridesInit()to callgui_init()/gui_loadResources()/gui_start()(TWRP's real entry points, confirmed viagui/gui.h), plusPrint()/PrintOnScreenOnly()/ShowFile()to route throughgui_print()/gui_startPage(). Everything else falls back toScreenRecoveryUI's stock behavior.device/make_device.cpp— the actualmake_device()factoryrecovery_main.cpplooks up.Android.bp(top-level) — defineslibrecovery_ui_pawlet_twrp, the moduleTARGET_RECOVERY_UI_LIBshould reference.
Adapted: gui/Android.bp and minuitwrp/Android.bp had their
include_dirs rewritten — paths that still genuinely live in stock
bootable/recovery (otautil, install, recovery_ui, fuse_sideload)
kept as-is; paths for things that moved (twrpinstall → now in
vendor/pawlet/recovery_toolkit, gui/minuitwrp/libpixelflinger → now
here) rewritten to their new locations. libpixelflinger/Android.bp needed
no changes — it only used relative include_dirs.
Known gap — this will not link yet
gui/Android.bp's libguitwrp depends on libaosprecovery (shared_libs).
TWRP builds that from top-level twrp.cpp via another custom Go Soong
plugin (libaosprecovery_defaults.go) that hasn't been ported yet.
twrp.cpp currently sits unbuilt in
vendor/pawlet/recovery_toolkit/helpers/. Until libaosprecovery gets a
real Android.bp, this module won't compile.
Also not yet done
- The three custom Go Soong plugins this depends on (
libguitwrp_defaults.go,libminuitwrp_defaults.go,libpixelflingertwrp_defaults— the last is plaincc_defaults, not Go) have not been checked for API compatibility against raspberry-vanilla's android-16.0 Soong the wayvendor_twrp'sgenerator.gowas (that check found one real incompatibility —PathForSourceRelaxed— seeexternal_update_binary's history). These three haven't had the same treatment yet. data.cpp/data.hpp,variables.h,twcommon.hare staged as loose files at this directory's top level —data.cppis wired into the new top-levelAndroid.bp'ssrcs, but hasn't been checked for its ownbootable/recovery-relative include assumptions.recovery_ui.h(top-level, copied from TWRP) is not used — it's a pre-2015 legacydevice_recovery_start()-style header TWRP still carries but doesn't actually reference from the modern GUI path. Left in the repo for now rather than silently dropped; safe to delete once confirmed genuinely dead.- A proper GPL-3.0 license file for
gui//minuitwrp//libpixelflinger/(TWRP's own code, GPL-3.0-licensed pergui/gui.h's header — distinct from the Apache-2.0device/glue) hasn't been added yet, just flagged here.
License
Mixed: device/*.cpp/.h and this Android.bp are Apache-2.0 (PawletOS,
2026). gui/, minuitwrp/, libpixelflinger/ are GPL-3.0 (TeamWin, see
gui/gui.h's header) — full license text not yet added to this repo, see
"Also not yet done" above.