Skip to content

Build Halium

Halium

https://www.youtube.com/watch?v=kDwiX-ojnls https://www.youtube.com/watch?v=XwltAlINgMA https://docs.ubports.com/sv/latest/porting/build_and_boot/H9_setup_sources.html https://devices.ubuntu-touch.io/device/enchilada/

mkdir halium-9
cd halium-9
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
repo init -u https://github.com/Halium/android -b halium-9.0 --depth=1
repo sync -c -j 16

copy the device xml to BUILDDIR/halium/devices/manifests/[manufacturer]_[device].xml.

./halium/devices/setup enchilada
./hybris-patches/apply-patches.sh --mb

There is already one for the enchilada!!

cd ~/halium-9
source build/envsetup.sh
breakfast enchilada
mka mkbootimg
export USE_HOST_LEX=yes
mka halium-boot

If some library fails, search in pkgs.org to install the package.

/work/halium-9/out/target/product/enchilada/halium-boot.img

fastboot flash boot_a ~/enchilada/halium-9/out/target/product/enchilada/halium-boot.img fastboot flash boot_b ~/enchilada/halium-9/out/target/product/enchilada/halium-boot.img fastboot reboot

I flashed https://github.com/droidian-images/rootfs-api28gsi-all/releases/tag/droidian%2Fbullseye%2F23 droidian-rootfs-api28gsi-amd64_20211127.zip and it fucking booted!!!

twrp > zip | halium | boot | works!

the touch works is old, but works. much faster than pinephone!


Let's try the latest api28 zip from droidian. this is not GSI, but I do not know how that affects.

fastboot boot ~/Downloads/enchilada/twrp/twrp-3.3.1-2-enchilada.img

copy zip droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-101.20250906_20250907.zip wipe Dalvik & system flash zip reboot bootloader fastboot flash boot_a ~/enchilada/halium-9/out/target/product/enchilada/halium-boot.img fastboot flash boot_b ~/enchilada/halium-9/out/target/product/enchilada/halium-boot.img

the zip does not work

let's try to flash the rootfs.img file to system. can not flash to system because system is tiny (500MB or so). had to flash OOS to fix it, did not want to boot twrp.

fastboot boot ~/Downloads/enchilada/twrp/twrp-3.3.1-2-enchilada.img

wipe Dalvik & system

reboot fastboot unzip droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-101.20250906_20250907.zip fastboot flash userspace ~/Downloads/enchilada/droidian/droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-101.20250906_20250907/data/rootfs.img fastboot flash boot_a ~/enchilada/halium-9/out/target/product/enchilada/halium-boot.img fastboot flash boot_b ~/enchilada/halium-9/out/target/product/enchilada/halium-boot.img

the official zip does not flash, there is a problem in the script.

how to make a zip

unzip droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-101.20250906_20250907.zip -d extracted-files
zip -u -r droidian-custom.zip extracted-files

adb sideload droidian-custom.zip

Invalid zip format...

rm droidian-custom.zip
cd extracted-files
zip -r9 ../droidian-custom.zip ./*
zip -r9u ../droidian-custom.zip ./*

adb sideload ../droidian-custom.zip

can i make the zip faster??

7z a -tzip -mx=1 -mmt=on ../droidian-custom-faster.zip ./*
adb sideload ../droidian-custom-faster.zip

you can get a shell!!!

adb shell

maybe is because there is not enough space??

adb shell
for part in /dev/block/bootdevice/by-name/*; do
  printf "%-20s %12s\n" "$(basename $part)" "$(blockdev --getsize64 $part 2>/dev/null | awk "{print \$1/1024/1024 \" MB\"}")"
done
---
cat /proc/partitions | tail -n +3 | while read major minor blocks name; do
  size_mb=$((blocks/1024))
  printf "%-20s %12s\n" "$name" "${size_mb} MB"
done
---
df -h

...

while manually extracting the zip I get this

unzip: bad length
unzip: invalid zip magic 77D0B7F9
4GB max file size...

....

is it in FAT??

doesn't matter, will flash manually.

wait, lets try ext4

fastboot format:ext4 userdata
fastboot boot ~/Downloads/enchilada/twrp/twrp-3.3.1-2-enchilada.img
adb sideload ~/Downloads/enchilada/droidian/droidian-api28/droidian-OFFICIAL-phosh-phone-rootfs-api28-arm64-101.20250906_20250907.zip

has to be my zip...

7z a -tzip -mx=1 -mmt=on ../droidian-custom-faster.zip ./*
adb sideload ../droidian-custom-faster.zip

nope, error. file too big maybe...

other builds separate the files in multiple img files like https://github.com/droidian-images/droidian/releases/download/droidian%2F101.20250906/droidian-OFFICIAL-phosh-phone-volla_yggdrasil-api28-arm64-101.20250906_20250907.zip