oxmc b33843feb4 Support merged remove_projects manifests and add repo.yml docs
local_manifests values are normally a single URL. The remove_projects
key may instead be a list of URLs, merged/de-duplicated into a single
manifest fragment rather than one file per key. Document repo.yml
structure in README and add a fully commented example.repo.yml.
2026-07-04 02:37:14 -07:00
2025-11-05 00:45:21 +00:00
2025-11-04 03:12:53 -08:00
2025-11-05 17:22:24 +00:00

PawletOS-Build

Scripts and helpers to build PawletOS.

Usage

Setup Environment

# Install dependencies
pip3 install -r requirements.txt

# Setup and sync source code
python3 environ.py --applyPatches

# Or with custom source directory
python3 environ.py --sourceDir my-source --applyPatches

Configuration

Create repo.yml (or copy example.repo.yml, which has this same structure with full inline comments):

repo:
  # Upstream manifest repo, passed to `repo init -u`.
  url: "https://android.googlesource.com/platform/manifest"
  # Tag/branch, passed to `repo init -b`. Must match an AOSP release tag.
  branch: "android-14.0.0_r1"
  # Extra flags appended verbatim to `repo init`.
  options:
    - "--depth=1"
    - "--no-clone-bundle"
  # Local manifest XML fragments. Downloaded with `requests` and written to
  # <sourceDir>/.repo/local_manifests/<key>.xml after `repo init`, before
  # `repo sync` — `repo` merges every *.xml in that directory into the manifest
  # (adding projects, removing projects, overriding revisions, etc).
  #
  # Each value is either:
  #   - a single URL string -> downloaded as-is to "<key>.xml"
  #   - a YAML list of URLs -> all downloaded and merged into one "<key>.xml",
  #     combining child elements and de-duplicating ones that share the same
  #     tag + name attribute (first occurrence wins). Handy for splitting a
  #     long <remove-project> list across a common file and a device-specific one.
  local_manifests:
    device_manifest: "https://raw.githubusercontent.com/example/device-manifest/main/manifest.xml"
    vendor_manifest: "https://raw.githubusercontent.com/example/vendor-manifest/main/manifest.xml"
    remove_projects:
      - "https://raw.githubusercontent.com/example/manifests/main/common/remove_projects.xml"
      - "https://raw.githubusercontent.com/example/manifests/main/device/remove_projects.xml"

# Used with --applyPatches / --forceApplyPatches.
patches:
  # Directories (relative to sourceDir) to search recursively for *.patch files,
  # resolved after repo sync. Subdirectory layout mirrors AOSP project paths:
  #   patches/frameworks/base/*.patch        -> applied at frameworks/base/
  #   patches/packages/apps/Settings/*.patch -> applied at packages/apps/Settings/
  dirs:
    - patches

  # Optional: maps a patch subdirectory to a different AOSP project path, for
  # layouts that don't/shouldn't mirror the AOSP tree directly (e.g. grouping
  # patches by Android version instead of by project path).
  mappings:
    android/36: frameworks/base

Command Line Options

Option Description
--noSync Skip repo sync (sync is enabled by default)
--forceResync Force sync source code with repo sync --force-sync
--applyPatches Apply patches from patches directory
--forceApplyPatches Force apply patches even if some fail
--patchLevel <n> Patch level for -p option (default: 1)
--sourceDir <path> Source directory (default: AOSP-source)
--patchDir <dirs> Patch directories (default: patches). Can specify multiple.
--syncJobs <n> Number of parallel jobs for repo sync
--ignorePatches <files> List of patches to ignore
--useLegacyPatch Use legacy patch command instead of robust handler
--verbosePatches Verbose output for patch application
--config <file> Path to repo configuration file (default: repo.yml)
--no-git-lfs Disable Git LFS setup (enabled by default)

Files

  • environ.py - Main setup script
  • repo.yml - Repository configuration (not tracked; create your own, see below)
  • example.repo.yml - Fully commented example/reference for repo.yml
  • scripts/better-patch.py - Patch management
  • patches/ - Patch files

Requirements

  • Python 3.6+
  • Git (recommended for advanced patch features)
  • Git LFS (optional, for large file support)
  • Android build tools (repo, patch)
  • Bash shell for setup scripts
  • Python packages:
    • PyYAML (for YAML configuration support)
    • requests (for downloading local manifests)

Installing Python Dependencies

pip3 install PyYAML requests
S
Description
A repo that has scripts and helpers to build PawletOS
Readme AGPL-3.0 163 KiB
Languages
Python 97.4%
Shell 2.6%