Branch lineage-23.2. Phone build, not Android TV.
Upstream WayDroid-ATV remove-projects ~15
LineageOS projects and re-adds its own forks at the same paths, so every later
LineageOS merge is a manual fork rebase. This repo keeps the LineageOS
checkout and layers patches on top instead. Nothing LineageOS maintains is ever
removed or re-pointed.
sudo pacman -S --needed \
bc bison flex gperf g++-multilib gcc-multilib git-lfs gnupg imagemagick \
lzop pngcrush rsync schedtool squashfs-tools xsltproc zip \
python-setuptools python-mako python-yaml cbindgen clang lib32-glibc \
openjdk-17-jdk
rustup target add x86_64-linux-android i686-linux-androidpython-mako, cbindgen, clang and lib32-glibc are the four that bite.
Each fails mesa late, naming a program or a library rather than anything to do
with Waydroid:
| missing | error |
|---|---|
python-mako |
ERROR: ... Python (3.x) mako module >= 0.8.0 required to build mesa. |
cbindgen |
src/nouveau/nil/meson.build:3:16: ERROR: Program 'cbindgen' not found or not executable |
clang |
bindgen/lib.rs:616: Unable to find libclang: couldn't find any valid shared libraries matching: ['libclang.so', ...] |
lib32-glibc |
/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found |
The clang one reads like a source bug, because the panic is raised inside a
vendored crate. It is only a runtime dep of the cbindgen binary.
Check everything at once instead of one per build:
for f in /usr/include/gnu/stubs-32.h /usr/lib32/libc.so /usr/bin/cbindgen \
/usr/lib/libxml2.so.16; do
printf '%-40s %s\n' "$f" "$([ -e "$f" ] && echo ok || echo MISSING)"
done
python3 -c "import mako" && echo "mako ok" || echo "mako MISSING"
rustup target list --installed | grep -q android && echo "rust ok" || echo "rust MISSING"./waydroid-patches.sh manifest /path/to/LineageOS # add fragments, sync
./waydroid-patches.sh apply /path/to/LineageOS # layer the patches
./waydroid-patches.sh status /path/to/LineageOS
./waydroid-patches.sh revert /path/to/LineageOS # plan only
./waydroid-patches.sh revert /path/to/LineageOS --yesapply is idempotent and syncs by itself, so re-run it after any repo sync.
Source dir may be relative.
revert resets the patched projects and drops tags but leaves the manifest and
added projects, so re-applying needs no re-sync. Teardown is explicit:
--uninstall (fragments) or --purge-projects (also the added dirs).
Options: -j <n>, --no-sync, --dry-run, --layer <name>, --only <project>,
--no-aosp-swaps, --uninstall, --purge-projects.
10-lineage-forks (140) — generated by tools/gen-fork-patches.sh as
format-patch merge-base..fork-tip, so it holds only Waydroid commits and
never a LineageOS one. A diverged fork is fine: lineage-sdk is 2 LineageOS
commits behind, and those stay untouched. GPL-3.0.
15-ours (6) — hand-written build fixes, Apache-2.0, kept in their own layer so
the licences stay separate. docs/build-fixes.md explains each.
20-upstream (53) — upstream's base-patches-36 verbatim plus the roms-patches
conflict fallbacks. Written against the forks, so it goes after layer 10.
GPL-3.0.
packages/apps/TvSettings is absent on purpose: the fork is 4 commits behind
LineageOS and has nothing we lack, and a phone build does not use it.
gmmlib. Upstream removes platform/external/gmmlib and adds intel/gmmlib
at vendor/intel/gmmlib. Both declare libigdgmm_android and friends with no
soong_namespace, so bootstrap dies with module already defined. LineageOS's
own copy is used unpatched; its two upstream patches are both no-ops there.
tools/check-dup-modules.py is the preflight for this class of bug.
AOSP swaps. repo cannot point an existing project at a different upstream:
<project path="X"> is duplicate path, and <extend-project> keeps the
original project name. So swapping is only expressible as
remove-project + project. These seven are AOSP-remote display/media/rust
trees LineageOS does not maintain, and the build does not link without them —
ffmpeg's 32-bit variant needs libva for android-x86, and LineageOS's
external/libva only enables x86_64. They are the only remove-project in
this repo. --no-aosp-swaps for the strict pure-add manifest.
python3 tools/track-upstream.py # fork drift; output is TRACKING.md
python3 tools/check-dup-modules.py <src> --ours manifest/10-waydroid-projects.xml
tools/gen-fork-patches.sh <los-root> "$PWD/base-patches-36/10-lineage-forks" frameworks/basedocs/tools.md explains what each does and why it works the way it does.
Not driven by this repo. In an envsetup'd shell:
lunch lineage_waydroid_x86_64-bp4a-userdebug
mka systemimage
mka vendorimageTwo environment gotchas:
repocaches JSON beside whatever gitconfig it reads. If~/.gitconfigis newer than~/.repo_.gitconfig.json, thebuild-manifest.xmlrule tries to rewrite it, and soong mounts$HOMEread-only, so it dies withRead-only file system. Fix: runrepo manifest -o /dev/nullonce outside a build.- 15 GB of RAM is under what kati wants; it was
SIGKILLed at "finishing Make module rules". A big swap file helps but does not remove the need for RAM.
docs/tools.md covers the tooling. docs/build-fixes.md covers the six
hand-written patches in 15-ours,
including the mesa-tools libxml2.so.2 soname alias, which is an alias and not
the library LLVM 20 was built against.
10-lineage-forks/ and 20-upstream/ derive from
WayDroid-ATV/android_vendor_waydroid
branch lineage-23.2 and are GPL-3.0. 15-ours/, waydroid-patches.sh and
tools/ are ours under Apache-2.0 (LICENSE-APACHE-2.0). The layers are split
so the two licences never overlap. See LICENSE-NOTES.md.