LLM text that I did not bother reading but may have some information
# I want to build from source droidian for oneplus 6 enchilada using halium 9 and the official rootfs image. Describe the steps, sources, and help me get set up the environment for a successfull build. Building Droidian for the OnePlus 6 (enchilada) with Halium 9 and the official rootfs is a multi-step Android/Halium porting task that closely follows the Halium 9 and Droidian porting guides, adapted to the device’s LineageOS/Android 9 sources. The general flow is: prepare a Linux build host, sync a Halium 9.0 Android tree with OnePlus 6 device/kernel/vendor sources, apply hybris/Halium patches, then use Droidian’s image-creation tooling with the official rootfs to generate the images to flash.[^2_1][^2_2][^2_3] Because direct access to up‑to‑date build instructions and device trees is not available in this environment, the outline below is high level and must be cross‑checked against the official Droidian and Halium documentation before you start.[^2_5][^2_1] ## Prerequisites and environment On your build machine (Debian or Ubuntu LTS is typical), you need a full Android build environment (repo, Java, git, build-essential, Python, etc.) plus tools recommended in the Halium 9 and Droidian porting guides. Ensure you have enough disk space (often 150–200 GB), a stable fast connection for large git syncs, and a shell configured with ulimit and git settings suitable for big repos.[^2_2][^2_4][^2_1] Also prepare your OnePlus 6 by unlocking the bootloader, installing adb/fastboot on your host, and making a full backup because you will be flashing custom boot and system images.[^2_3][^2_10] ## Getting Halium 9 sources Create a dedicated directory (often called BUILDDIR) and initialize a Halium 9.0 manifest using the standard repo command for halium-9.0, then sync the tree. This brings in the base Android sources used by Halium but not yet the device-specific trees for enchilada.[^2_4][^2_2] Next, create a local device manifest under the Halium devices/manifests directory to pull in the OnePlus 6 device, kernel, and vendor repositories, using the device’s LineageOS or Android Pie trees as specified by their dependency files. The manifest lines follow the common `Other documentation
- https://github.com/Halium/projectmanagement/issues/205
- https://github.com/Halium/halium-devices/pull/236/commits/e4ffdb518cae2a9809867001abd7c67b9a638f44 Added manifest for OnePlus6T (fajita) #236
- https://github.com/ubports-oneplus6
- https://github.com/ubports-oneplus6/documentation
- https://github.com/search?q=topic%3Aenchilada&type=Repositories
- https://wiki.postmarketos.org/wiki/User:Magdesign
- https://github.com/OP3Treble
- https://github.com/OP3-Halium
Maybe I can cheat...
- halium: https://github.com/ubports-oneplus6/documentation/releases/download/1.2/halium-boot.img
- kernel: (in no particular order)
- https://github.com/sileshn/android_kernel_oneplus_sdm845
- https://github.com/AICP/kernel_oneplus_sdm845
- https://github.com/dragonGR/kernel_oneplus_sdm845
- https://github.com/kcxt/op6
- https://github.com/rajatgupta1998/android_kernel_oneplus_sdm845
- https://github.com/ubports-oneplus6/documentation/releases/download/1.2/target.zip
- Vendor tree
- https://github.com/autoandroida/vendor_oneplus_enchilada
- https://github.com/rajatgupta1998/android_device_oneplus_enchilada
- https://github.com/AgentOrange007/android_device_oneplus_sdm845-common
- https://github.com/rajatgupta1998/android_device_oneplus_sdm845-common
- vendor blobs
- https://github.com/sileshn/proprietary_vendor_oneplus
- Rootfs
- https://github.com/droidian-images/droidian/releases/download/nightly/droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-next_20251102.zip
- Luck
Attempt #1 at attempt #2
- https://releases.ubuntu.com/20.04/ubuntu-20.04.6-live-server-amd64.iso
- VM with 32GB of RAM, 512GB of disk and 16 cores.
The cheating way.
sudo apt install unzip android-tools-adb android-tools-fastboot
>> reboot
curl 'https://dl.twrp.me/enchilada/twrp-3.3.1-2-enchilada.img' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate, br, zstd' \
-H 'DNT: 1' \
-H 'Sec-GPC: 1' \
-H 'Connection: keep-alive' \
-H 'Referer: https://dl.twrp.me/enchilada/twrp-3.3.1-2-enchilada.img.html' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'Sec-Fetch-Dest: document' \
-H 'Sec-Fetch-Mode: navigate' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-User: ?1' \
-H 'Priority: u=0, i' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
--output twrp-3.3.1-2-enchilada.img
wget https://github.com/ubports-oneplus6/documentation/releases/download/1.2/halium-boot.img
wget https://github.com/ubports-oneplus6/documentation/releases/download/1.2/target.zip
fastboot boot twrp-3.3.1-2-enchilada.img
adb push target.zip /sdcard
>> Install zip
fastboot flash boot halium-boot.img
that worked! password "phablet"
Well, now we have a base. the idea is to change things until everything running is reproducible by us. lets start with the rootfs
wget https://github.com/droidian-images/droidian/releases/download/nightly/droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-next_20251102.zip
fastboot boot twrp-3.3.1-2-enchilada.img
adb push droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-next_20251102.zip /sdcard
Error. probably too big for the partition.
Maybe an older version is smaller.
wget https://github.com/droidian-images/droidian/releases/download/droidian%2Ftrixie%2F27/droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-27_20230916.zip
fastboot boot twrp-3.3.1-2-enchilada.img
adb push droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-27_20230916.zip /sdcard
It just worked! No fiddling required. Most things don't work, but it boots!! 4.9.112 kernel. The / partition has 3582868KiB and this image uses 3538108KiB. It is smooth!
Repartition the filesystem WIP
Let's try to make system bigger
https://wiki.postmarketos.org/wiki/OnePlus_6_(oneplus-enchilada)/Multi_Booting_and_Custom_Partitioning
fastboot boot twrp-3.3.1-2-enchilada.img
adb shell
fdisk /dev/block/sda
Command (m for help): p
[...]
13 85824 817983 2860M 0700 system_a
14 817984 1550143 2860M 0700 system_b
15 1550144 1575743 100M 0700 odm_a
16 1575744 1601343 100M 0700 odm_b
17 1601344 14817274 50.4G 0700 userdata
Inside fdisk
Other sources https://xdaforums.com/t/info-android-device-partitions-and-filesystems.3586565/ https://github.com/Halium/halium-devices/pull/236
Other cool things I found for enchilada https://github.com/dreemurrs-embedded/Jumpdrive https://git.codelinaro.org/clo/qcomlt/u-boot/-/releases https://renegade-project.tech/en/home https://wiki.postmarketos.org/wiki/OnePlus_6_(oneplus-enchilada)/Multi_Booting_and_Custom_Partitioning https://wiki.postmarketos.org/wiki/OnePlus_6_(oneplus-enchilada)/Hacking#Partition_map https://wiki.postmarketos.org/wiki/OnePlus_6_(oneplus-enchilada) https://docs.halium.org/_/downloads/en/latest/pdf/ https://github.com/orgs/ubports-oneplus6/repositories?type=all https://gitlab.com/ubports/porting/community-ports/android9/oneplus-6
Build the filesystem WIP
https://docs.droidian.org/porting-guide/rootfs-creation/ https://github.com/droidian-onclite/droidian-images/blob/bookworm/.github/workflows/release.yml
Prerequisites Device specific files Docker
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
sudo usermod -a -G docker $USER
sudo apt update && sudo apt install dpkg-dev gpg apt-utils git-lfs
git clone https://github.com/droidian-releng/droidian-build-tools/ && cd droidian-build-tools/bin
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
./droidian-new-device -v OnePlus -n enchilada -c arm64 -a 28 -r phone -d droidian
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
cd droidian/oneplus/enchilada/packages/adaptation-oneplus-enchilada/sparse/
>> Add "device specific files under sparse/ with a linux directory structure"
Get "device specific files" with chatgpt help.
cd /tmp/
wget https://storage.googleapis.com/git-repo-downloads/repo
chmod a+rx repo
./repo init -u https://github.com/LineageOS/android.git -b lineage-20.0 --git-lfs
./repo sync
>> wait like one hour
cd device/oneplus/enchilada
./extract-files.sh
>> For nothing, thanks chatgpt...
git clone https://github.com/TheMuppets/proprietary_vendor_oneplus
>> Downloads like 8GiB
proprietary_vendor_oneplus/enchilada/* → sparse/vendor/
proprietary_vendor_oneplus/common/* → sparse/vendor/ (if required)
mkdir ~/droidian-build-tools/bin/droidian/oneplus/enchilada/packages/adaptation-oneplus-enchilada/sparse/vendor/
cp -r proprietary_vendor_oneplus/enchilada/* ~/droidian-build-tools/bin/droidian/oneplus/enchilada/packages/adaptation-oneplus-enchilada/sparse/vendor/
I am missing a LOT of things. I can get them from the rootfs that actually boots.
Boot into droidian. dpkg-query -L oneplus-enchilada
cd ~/droidian-build-tools/bin/droidian/oneplus/enchilada/packages/adaptation-oneplus-enchilada/
~/droidian-build-tools/bin/droidian-build-package
>> The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5E775B2A27AB0C94
Here are the jobs they run to build https://github.com/droidian-images/droidian/actions/runs/20084427533/job/57618691558#step:12:3981 Which is this script https://github.com/droidian-images/droidian/blob/trixie/.github/workflows/release.yml But I run ~/droidian-build-tools/bin/droidian-build-package
/usr/bin/docker run --rm -v /tmp/tmp.5adP0qqUHF:/buildd -v /home/user/droidian-build-tools/bin/droidian/oneplus/enchilada/packages/adaptation-oneplus-enchilada:/buildd/sources -v /home/user/droidian-build-tools/bin/droidian/oneplus/enchilada/droidian/apt:/buildd/local-repo -e RELENG_FULL_BUILD=yes -e RELENG_HOST_ARCH=arm64 quay.io/droidian/build-essential:bookworm-arm64 /bin/sh -c 'cd /buildd/sources && releng-build-package'
perplexity made me a script that does the same as the build workflow
#!/usr/bin/env bash
set -euo pipefail
# == CONFIG ==
WORK_DIR="$(pwd)"
BUILD_DIR="/tmp/buildd-results"
OUT_DIR="$WORK_DIR/out"
MATRIX_FILE="matrix.json"
DATE_STR=$(date +'%Y%m%d')
RELEASE_SUFFIX="_${DATE_STR}"
# Determine if this is a tag build
GIT_REF="$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match 2>/dev/null || true)"
if [[ "$GIT_REF" =~ ^droidian ]]; then
DROIDIAN_VERSION="$GIT_REF"
else
DROIDIAN_VERSION="next"
fi
# == STAGE 1: Generate Matrix ==
echo "[+] Generating matrix..."
JOBS_JSON="$(./generate_device_recipe.py --matrix)"
echo "$JOBS_JSON" > "$MATRIX_FILE"
# Parse JSON into Bash arrays
CONFIGS=$(echo "$JOBS_JSON" | jq -c '.[]')
# == Loop over each configuration ==
for cfg in $CONFIGS; do
# PRODUCT=$(echo "$cfg" | jq -r '.product')
PRODUCT="oneplus_oneplus6"
# ARCH=$(echo "$cfg" | jq -r '.arch')
ARCH="arm64"
# EDITION=$(echo "$cfg" | jq -r '.edition')
EDITION="phosh"
# VARIANT=$(echo "$cfg" | jq -r '.variant')
VARIANT="phone"
# APILEVEL=$(echo "$cfg" | jq -r '.apilevel')
APILEVEL="28"
# DROIDIAN_VARIANT=$(echo "$cfg" | jq -r '.droidian_variant')
DROIDIAN_VARIANT=""
JOB_NAME="${PRODUCT}-${ARCH}-${EDITION}-${VARIANT}-${APILEVEL}"
echo
echo "===> Building ${JOB_NAME} ..."
mkdir -p "$BUILD_DIR" "$OUT_DIR"
echo "[+] Pulling container..."
docker pull quay.io/droidian/rootfs-builder:next-arm64
echo "[+] Starting container..."
CONTAINER_ID=$(docker run --detach --privileged --cgroupns=host \
-v "$BUILD_DIR":/buildd/out \
-v /dev:/host-dev \
-v /sys/fs/cgroup:/sys/fs/cgroup \
-v "$WORK_DIR":/buildd/sources \
--security-opt seccomp:unconfined \
quay.io/droidian/rootfs-builder:next-arm64 sleep infinity)
echo "[+] Building rootfs inside container..."
docker exec "$CONTAINER_ID" /bin/sh -c "
cd /buildd/sources &&
DROIDIAN_VERSION='$DROIDIAN_VERSION' \
./generate_device_recipe.py '$PRODUCT' '$ARCH' '$EDITION' '$VARIANT' '$APILEVEL' '$DROIDIAN_VARIANT' &&
debos --disable-fakemachine generated/droidian.yaml"
echo "[+] Copying build results..."
cp -r "$BUILD_DIR"/* "$OUT_DIR/" || true
echo "[+] Stopping and removing container..."
docker rm -f "$CONTAINER_ID"
done
# == STAGE 2: Prepare release ==
echo
echo "[+] Creating SHA256SUMS file..."
cd "$OUT_DIR"
find . -type f ! -name "SHA256SUMS" -exec sha256sum {} \; > SHA256SUMS
cd "$WORK_DIR"
if [[ "$DROIDIAN_VERSION" == "next" ]]; then
echo "[+] Nightly release detected."
gh release delete nightly --yes || true
git push --delete origin refs/tags/nightly || true
gh release create nightly "$OUT_DIR/SHA256SUMS" --prerelease --notes "Nightly Droidian build ${DATE_STR}"
else
echo "[+] Tagged release detected: $DROIDIAN_VERSION"
gh release create "$DROIDIAN_VERSION" "$OUT_DIR/SHA256SUMS" --draft --title "Droidian $DROIDIAN_VERSION" --notes "Draft release for $DROIDIAN_VERSION"
fi
echo
echo "[✅] Build and release process complete."
Run with
sudo apt install -y jq
mkdir /tmp/perplexity
cd /tmp/perplexity
git clone https://github.com/BouncyPurpose/droidian.git
cd droidian
vim run.sh
chmod +x run.sh
./run.sh
it is intended to run on arm64...
so I cloned it in github. edited the configuration files and now I get this error
2025/12/10 16:02:00 apt | Some packages could not be installed. This may mean that you have
2025/12/10 16:02:00 apt | requested an impossible situation or if you are using the unstable
2025/12/10 16:02:00 apt | distribution that some required packages have not yet been created
2025/12/10 16:02:00 apt | or been moved out of Incoming.
2025/12/10 16:02:00 apt | The following information may help to resolve the situation:
2025/12/10 16:02:00 apt |
2025/12/10 16:02:00 apt | The following packages have unmet dependencies:
2025/12/10 16:02:00 apt | droidian-phosh-full : Depends: droidian-phosh-minimal (= 94+git20251022193233.898fae6.next.production) but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: avahi-daemon but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: cups-pk-helper but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-clocks but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-console but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gstreamer1.0-libav but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gstreamer1.0-plugins-ugly but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: libproxy1-plugin-networkmanager but it is not installable
2025/12/10 16:02:00 apt | Depends: phosh-tour but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: papers but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: file-roller but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-text-editor but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-calculator but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-calendar but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-maps but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-software but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-software-plugin-deb but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-software-plugin-flatpak but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-usage but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gnome-weather but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: phosh-plugins but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: phosh-mobile-settings but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: portfolio-filemanager but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: droidian-camera but it is not going to be installed or
2025/12/10 16:02:00 apt | gnome-snapshot but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: epiphany-browser but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: loupe but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: firefox but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: firefox-mobile-config but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: droidian-quirks-firefox but it is not going to be installed or
2025/12/10 16:02:00 apt | droidian-quirks-firefox-provider
2025/12/10 16:02:00 apt | Depends: clapper but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: droidian-quirks-totem-dummy but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: gapless but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: droidian-quirks-lollypop-dummy but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: getcutout
2025/12/10 16:02:00 apt | Depends: nfcd-tools but it is not going to be installed
2025/12/10 16:02:00 apt | Depends: droidian-quirks-lomiri but it is not going to be installed
2025/12/10 16:02:00 apt | E: Unable to satisfy dependencies. Reached two conflicting decisions:
2025/12/10 16:02:00 apt | 1. droidian-phosh-full:arm64=94+git20251022193233.898fae6.next.production is selected for install
2025/12/10 16:02:00 apt | 2. droidian-phosh-full:arm64 Depends libproxy1-plugin-networkmanager
2025/12/10 16:02:00 apt | but none of the choices are installable:
2025/12/10 16:02:00 apt | [no choices]
2025/12/10 16:02:00 apt | Attempted to remove disk file system under "/run/systemd/nspawn/propagate/root", and we can't allow that.
2025/12/10 16:02:00 Action `Build Droidian` failed at stage Run, error: exit status 100
Error: Process completed with exit code 1.