Addon Development: Bass Lineout
This page is for Bass: Lineout (vendor/ax86-lite, tools/build.sh).
If you are on classic Bass OS with private/addons/ and unfold_bliss.sh, use the separate guide instead:
→ Addon Development: Legacy Bass OS
Do not mix the two. Lineout does not scan private/addons/ the way older Bass unfold did.
Lineout overview
On Lineout, "addon" work falls into two buckets:
How build addons are laid out differs by generation:
Addons on Android 16 and 17
Each addon is a self-contained unit and its own git repo. It carries everything it needs: sources, Soong wrappers, patches, product makefiles, repo manifest fragments and its build flags. Dropping addons/<id>/ with an addon.cfg into the vendor tree is enough: there is no central list to edit.
addons/<id>/
├── addon.cfg # metadata + enable flags (shell)
├── build/flags.sh # build.sh flags this addon adds (optional)
├── packages/<Pkg>/... # app / script / prebuilt sources
├── device_wrappers/<ns>/ax86-addons/<Pkg>/
│ ├── Android.bp # Soong module (staged into the device tree)
│ └── .stagecfg # how to stage the sources (optional)
├── patches/api-<level>/<aosp-path>/*.patch # AOSP patches (optional)
├── manifest.xml # repo local_manifest fragment (repo-backed addons)
├── manifest-api-<level>.xml # per-release fragment (Android 17)
├── sync_<id>.sh # fetch script (optional)
├── <id>_product.mk # inherit-product makefile(s) (optional)
├── README.md # developers
└── USER_GUIDE.md # end users
addon.cfg
Build flags
build/flags.sh registers the addon's flags with build.sh, which picks them up for parsing and --help:
ax86_register_flag --my-feature USE_MY_FEATURE true \
"Enable My Feature (one line of help)"
ax86_register_flag --my-feature-mode MY_FEATURE_MODE @VALUE \
"My Feature mode: a | b (default: a)"
The environment variable is what ADDON_REQUIRES_ANY and the addon's makefiles test. Several addons can share one flag: --extras turns on the whole Bliss apps family, each app still its own addon.
What happens during a build
tools/build.shloads everyaddons/*/build/flags.sh, then the profile, then your command-line flags.apply-patches.shapplies the corepatches/api-<level>/queue, then runsintegrate-addons.sh.integrate-addons.shreads everyaddon.cfg, enables the addons whose flags are set, and for each one:- fetches it if it is missing (see
Getting addons into a tree ); - merges its manifest fragment and applies its patch set for the build's API level;
- adds its
ADDON_PRODUCT_MKStoaddons/enabled.mk; - stages its
device_wrappers/into the device tree.
- fetches it if it is missing (see
ax86_lite.mkincludesaddons/enabled.mk, so the enabled addons join the product.
Privileged apps: device-tree staging
Android 16 tightened Android.bp visibility: privileged, platform-signed app modules under vendor/ax86-lite are not visible to the product. So addons ship their Soong wrapper under device_wrappers/<ns>/ax86-addons/<Pkg>/, and the build copies the wrapper and the sources into <device tree>/ax86-addons/<Pkg>/. That copy is a build artifact (git-ignored in the device tree); edit the sources under addons/<id>/.
The vendor's core patch queue adds one line to the device tree's device.mk, -include $(LOCAL_PATH)/ax86-addons/product.mk, and git-ignores ax86-addons/. Staging writes that file; without it the line does nothing.
.stagecfg next to the wrapper describes the source layout:
Vendor binaries and rc/sh-only addons (for example chvt, Config Overrides) build in the vendor/ax86-lite namespace and need no staging.
Patches
- An addon patch set lives under
patches/api-<level>/<aosp-path>/(api-36for Android 16,api-37for Android 17). A build only applies the set for its API level; an addon without a set for that level applies no patches there. - Patches are
git format-patchoutput of real commits in the target project, never hand-written diffs. Keep the source commits on a ref in the project (for examplerefs/addon-patches/<id>/api-37), change them there, and regenerate the files. - Name them
000N-description.patch; the build applies them in order withgit am -3and records them as commits. - A patch counts as applied when the same change (by content) is already a commit in the project. A patch whose change is only present as uncommitted edits, or whose subject matches a commit with different content, fails the build: fix the project or regenerate the patch.
- Moving to a new Android release: apply the old set with
git am -3on a branch from the new tree, resolve conflicts, and export the new set from those commits.tools/port_patch_queue.shdoes this for the core queue.
Release compatibility
A profile's vendor_release (lineout, or submix for Waydroid-based builds) is checked against ADDON_COMPAT / ADDON_INCOMPAT. For example, aaropa-options builds on Lineout and is excluded on Submix.
Boot check-ins
An addon's boot script should record that it ran, in /data/misc/bass_checkins/<id>: one line, overwritten each boot, written on every exit path. Use key=value fields with boot= (the current /proc/sys/kernel/random/boot_id) and verdict= last. boot= proves the check-in is current; the wall clock can be wrong early in boot. Copy the helper from the BootSight addon rather than sourcing another addon's file, and chmod 0644 it. Assert the check-in in the addon's test.
Creating a new addon
mkdir -p addons/<id>and writeaddon.cfg.- Add
packages/<Pkg>/, and for privileged appsdevice_wrappers/<ns>/ax86-addons/<Pkg>/Android.bp(+.stagecfg). - Add
build/flags.sh. - Add the product makefile(s) and list them in
ADDON_PRODUCT_MKS. - Run
tools/sync-vendor-package-symlinks.sh(keepsvendor_packages/<Pkg>paths pointing at the addon).
Before calling it done, work through the vendor tree's docs/ADDON_FEATURE_CHECKLIST.md. In short:
- Settings entry: an
EXTRA_SETTINGSactivity with category, summary, a 24 dp white vector icon andcom.android.settings.icon_tintable=true; no launcher icon for Settings-only tools. - UI: Material 3, an explicit toolbar with back, content that does not draw under the status bar.
- Properties: document new
persist.*/ apply triggers inOVERRIDES.md. - Tests:
tests/test_<id>.shthat skips cleanly when the addon is not in the build, and a host check for the Settings tile metadata. - Docs:
USER_GUIDE.mdfor end users,README.mdfor developers.
Android 17 differences
- Per-release manifest fragments: an addon can ship
manifest-api-37.xmlnext tomanifest.xmlwhen it syncs different repos or branches on Android 17 (Digitalis does). - Bass-Core device tree: the public Android 17 device tree carries no
vendor/ax86-liteincludes and no staging hook; the core patch queue adds both at build time. Addons reach the build only through that hook, so an addon must not edit committed device-tree files. - Feature flags: aconfig flags stay switchable at runtime. An addon that changes a flag's built-in value should keep it
READ_WRITEunless it must not change; see Feature Flags (aconfig).
Packaging and distribution
These apply to Android 16 and 17. Android 14 addons live in the vendor tree itself.
One repo per addon
Every addon is its own git repo in the BlissBass-Addons organization, named after the addon id (BlissBass-Addons/<id>), on the lineout branch. One branch serves Android 16 and 17: release-specific content goes in patches/api-<level>/ and manifest-api-<level>.xml, not in separate branches.
Repos are public or private. Access to a private repo is what licenses that addon. The vendor repo does not track addon sources (addons/* is git-ignored), so an addon is versioned, released and licensed on its own.
Getting addons into a tree
cd vendor/ax86-lite
tools/clone-addons.sh # the default set (repos you cannot reach are skipped)
tools/clone-addons.sh bliss-tweaks btnmgr # specific addons
ADDON_GIT_ORG=MyOrg ADDON_GIT_BRANCH=lineout tools/clone-addons.sh # another org or branch
tools/sync-vendor-package-symlinks.sh
You rarely need to do this by hand: when a build flag enables an addon that is missing, the build fetches it. If the repo cannot be reached, the build stops with a licensing contact message (Navotpala Tech, info@navotpala.tech) instead of producing an image without the feature.
Repo-backed and synced addons
Some addons are thin: their content lives in other repos that go elsewhere in the tree.
A synced repo is only cloned when missing. Update it later with git -C vendor/<repo> pull.
Prebuilt apps
- Commit the unsigned APK under
packages/<Pkg>/prebuilts/and import it withandroid_app_import(certificate: "platform"for privileged apps). The image build signs it with that build's keys. - To test a new APK on a running device without rebuilding the image, sign it with the same platform key the image was built with, replace it at the package's
codePath, and reboot. Never push an unsigned APK, or one signed with another key (such as AOSP test keys), over a privileged app: the device will not boot. - Apps released elsewhere are fetched at build time instead of committed: GameNative and BlissDeck from their GitHub releases (needs
gh), FOSS user apps from F-Droid (--update-foss-userapps).
Pinning addon versions for a release
The AOSP pin (manifests/bass-lineage-*-static.xml) covers the Bass-Core tree only. Addons are pinned separately, so a release can be rebuilt with the same addon commits:
manifests/update-addons.sh
# writes (not committed):
# private/manifests/addons-catalog.json every addon, its remote and commit
# private/manifests/addons-private.xml repo manifest of those checkouts
Copy both files to another checkout's private/manifests/. Its unfold then clones those addon repos at those commits.
Keeping addons out of Bass-Core
Bass-Core (the public LineageOS forks, device tree and manifest under los-tv-x86) never contains addon code:
- addon repos and private pins are removed before the static manifest is written;
- commercial patches sit on
bass-api-<level>branches above the Bass-Core commits, and only commits taggedbass-core/<branch>/<date>are pushed to the public repos; - addon patches apply at build time, in the builder's own tree.
Android 14: vendor_packages
Android 14 (Lineage 21.0) Lineout trees have no addon framework: features are product packages in the vendor tree, gated by ax86_lite.mk and tools/build.sh. Only the private Restricted Launcher Pro uses addons/.
vendor/ax86-lite/vendor_packages/<Name>/
Android.bp / *.mk
README.md # picked up by Ax86Docs when present
init .rc / .sh # optional; keep package-local when possible
BT Ferry, GameNative, Linux Services, BlissDeck, Bass Audio and Bass Style are Android 16 and 17 addons.
Adding an Android 14 package
- Create
vendor_packages/YourFeature/with a product.mkand (for apps)Android.bp. - Wire it in
ax86_lite.mkbehind a flag (or always-on if that is intentional). - Add the flag to
tools/build.shhelp and export defaults. - Drop a
README.mdin the package so Ax86Docs picks it up on the next--extrasbuild. - Prefer package-local
init.rc/ scripts. Avoid editing coreaddon_init.rcunless the feature is shared early-boot plumbing.
Runtime overrides (addon_init)
Lineout also supports on-device overrides without rebuilding the ISO. Scripts under /vendor/bin/addon_*.sh run from addon_init.rc after /data is available. They can bind-mount files from /data/misc/ over vendor/system paths, apply settings, and react to property triggers.
This is still the Lineout product path (same vendor tree). It is not the legacy Bass private-addon unfold flow.
GRUB / cmdline toggles (Lineout)
How-tos:
On --extras builds, Touch Mapper can generate the input-port file from Settings. Prefer that UI when available; GRUB flags still matter for headless imaging.
Config files and property triggers (Lineout)
Vendor reference (also in Ax86Docs): OVERRIDES.md and VENDOR_DEPLOYMENT.md in vendor/ax86-lite.
Good uses for runtime overrides
- Field fixes (digitizer axes, DPI) without a new ISO
- Fleet imaging: push
/data/miscfiles, set GRUB flags, reboot - Config Override examples under
vendor/ax86-lite/docs/examples/
Runtime overrides are not how you ship a new privileged app. New apps are build addons (addons/<id>/ on Android 16 and 17, vendor_packages/ on Android 14) behind a build flag.
App docs
- Touch Mapper
- Display Mapper
- Config Overrides
- Bliss Tweaks
- Button Manager
- Ax86 Logger
- Ax86 Power
- BootSight
- BT Ferry
- GameNativeX64
- Bass boot options
- Lockdown install block
Related (Lineout)
- Building Bass: Lineout (flags and profiles per generation)
- Feature Flags (aconfig)
- Ax86Docs
- Config Overrides
- Fleet Management
- Addon Development: Legacy Bass OS (different product tree)