Artix compiling Android 1 ‐ crDroid‐Revived
This guide is mainly written by Mick Faustin; with me testing the ensuing build and helping with Artix stuff.
Last updated : 14/3/2026 (I'd call this a stub for now as I am yet to completely compile stuff, so this is all there is)
Introduction
Personally, I kind of wanted to be an Android developer, but the entrance seems to be rather challenging. So I settled by building an existing custom ROM and having someone else in the vicinity to test it. Fortunately, Garry just so happened to get his OP5T assembled (minus the missing IMEI but we won't need it) so I can also use him as my guinea pig for my builds... after I convinced him to volunteer his OP5T for the task, which is easier said than done (and please don't get me started on his G710EAW, that thing is his daily).
Prerequisites
- Any Android device with unlocked bootloader, which you will flash the build into.
- The best computer you got.
- At least 16GB RAM and/or 32GB SWAP. Welp, guess I'll have to save up for another 8GB stick...
Attempted with 12GB RAM & 4GB SWAP, soong failed.
- At least 512GB SSD, though I got 1TB to account for stuff like ccache.
- Definitely some gaming‐grade processors... and now I get my greatest hurdle as my main computer was still serviced & I am stuck with a shitty A475.
For anyone asking: B0ss daily drove A475 as well, so I'll send your regards to him.
- This guide assumes you're running Artix Linux, with Artix lib32 and Arch extra & multilib enabled.
- The greatest internet access your computer can access. And no, I'm not talking about the ethernet, but the entire network stack.
- Unlimited spare time, especially when you're compiling on potatoes instead of supercomputers and/or gaming rigs.
- Reliable electricity.
- Familiarity with Linux terminal commands.
- Familiarity with basic Android operation & terminology.
Dependencies
pacman stuff
# pacman ‐S repo bc ccache git‐lfs gitg gperf gradle jdk11‐openjdk lib32‐zlib lib32‐ncurses lib32‐readline libxcrypt‐compat lzop maven ninja noto‐fonts perl‐switch pngcrush schedtool sdl squashfs‐tools rsync ttf‐dejavu vim
Notes :
- Any Java stuff installations (gradle, jdk11, maven) will also install openjdk as dependency. I went with jdk‐openjdk, which provides Java runtime and JDK 25.
- The packages are scraped from aosp‐devel AUR metapackage & lineageos‐devel AUR metapackage, though installing those 2 metapackages are actually optional.
- ccache is mainly used to speed up subsequent builds and is normally considered optional.
- gitg (or any user interface for Git) : Optional, but if you're familiar with Git commit it will be quite useful.
AUR stuff (ncurses5‐compat‐libs, lib32‐ncurses5‐compat‐libs, xml2)
Required PGP keys for ncurses5‐compat packages :
ncurses5‐compat‐libs :
- $ git clone https://aur.archlinux.org/ncurses5‐compat‐libs.git ~/AUR/ncurses5
- $ cd ~/AUR/ncurses5
- Read PKGBUILD (optional)
- $ makepkg ‐sirc
lib32‐ncurses5‐compat‐libs :
- $ git clone https://aur.archlinux.org/ncurses5‐compat‐libs.git ~/AUR/ncurses5
- $ cd ~/AUR/ncurses5
- Read PKGBUILD (optional)
- $ makepkg ‐sirc
xml2 :
- $ git clone https://aur.archlinux.org/xml2.git ~/AUR/xml2
- $ cd ~/AUR/xml2
- Read PKGBUILD (optional)
- $ makepkg ‐sirc
Other preparations
- Git setup (identity & lfs)
- $ git config ‐‐global user.email "email@example.com"
- $ git config ‐‐global user.name "Your Name"
- $ git config ‐‐global trailer.changeid.key "Change‐Id" (optional, may be necessary if developing custom ROM)
- $ git lfs install
- ccache
- $ export USE_CCACHE=1
- $ export CCACHE_EXEC=/usr/bin/ccache
- nano ~/.bashrc (enter the 2 listed entries into bashrc)
- $ ccache ‐M 100G (at least 25G)
- Entering build environment
- $ mkdir ~/android/$rom
- $ cd ~/android/$rom
Building the ROM
If you're not in build environment, please cd there. All operations in this part happens there.
Repo initialization
- $ repo init ‐u https://github.com/crDroid‐revived/android.git ‐b 11.0 ‐‐git‐lfs ‐‐no‐clone‐bundle
- $ repo sync ‐c
‐j 4 by default (4 simultaneous connections/threads; ‐c by default to pull current ranch but explicitly mentioned)
- First repo syncs also downloads the source codes so it takes a while, especially on potato internets. Hope you have something else to do.
After the repo sync...
- $ source build/envsetup.sh
- Test out croot
- $ cd ~/android/$rom/$dir (cd to any directory within repository)
- $ croot
You should be back in ~/android/$rom.
Manifest initialization
We give a shout‐out to MSe1969 for solving our manifest headaches. In a previous attempt (my 1st repo sync), we just copied over the 5T entries into a roomservice.xml in local_manifests & did $ breakfast dumpling, only to fuck up the entire local repo with /vendor aimed at root. Lesson learned ‐ do NOT breakfast when compiling from someone else's tree, and repo sync after making the manifests.
- local_manifests
- $ cd ~/android/$rom/.repo
- $ mkdir ~/android/$rom/.repo/local_manifests
- OnePlus 5(T) (cheeseburger/dumpling by SirRGB)
- Synchronize repo and have it prepare our device codes
- $ croot
- $ repo sync ‐‐no‐tags
Compiling
- OnePlus 5(T) (cheeseburger/dumpling by SirRGB)
Conclusion
As the build compilation kept failing from random ninja / soong issues we can offer no solid conclusions yet.
To‐do list (Garry's addendum)
- Get another LG845 (G7/V40, V35 too rare, Velvet 4G not desired) for development?
- Delete all forms of Pixel spoofing and preferably make it a Git commit so repo sync doesn't undo the deletion.
- Delete microG spoofing, build with GmsCompat.
- Optimize network permission to limit / eliminate ensuing app crashes from denying network permission, then delete per‐app data restriction
Back to top
Main Page