In this part we stop talking about the Android source tree from a distance and get the machine ready for real work. We check what kind of Ubuntu host we have, install the packages that matter, set up Git and Git LFS, and install the repo launcher without jumping into a full sync yet.
In the last article, we built the mental map.
We talked about manifests, many Git repositories pretending to be one tree, device support layers, and how the build flows from lunch to real output. That part was important. But theory only carries you a little distance. At some point you have to prepare the machine that will actually do the work.
This is that point.
Article 3 is where ArjunaOS starts feeling less like an idea and more like a project sitting on your desk.
We are not syncing the full source yet. We are not building yet either. First we make sure the host is sane, the packages are there, Git is configured properly, and the repo launcher works from a normal shell. If you skip this and jump straight into repo init, you usually do not save time. You just delay the pain until the first broken dependency or missing tool.
Check the host first
People love to say Android platform work needs a monster workstation. That is exaggerated. But it also does need a machine that is not going to fight you every hour.
Run these first:
lsb_release -a
lscpu
free -h
df -h /
What you are checking:
- Ubuntu version
- CPU threads
- usable RAM
- free disk space on the filesystem where the source tree will live
For this series, Ubuntu 22.04 LTS is a very safe place to be. Ubuntu 24.04 is also fine, but 22.04 still has fewer surprises around older build dependencies and random package naming differences.
RAM matters more than people think. You can limp through some Android work on 16 GB if you are patient, but 32 GB starts feeling much more normal. Disk space matters too. Source, build output, intermediates, caches, and later experiments eat space fast. If you only have 120 GB free, you are setting yourself up for a very annoying week.
My current host while writing this is on Ubuntu 22.04.5 LTS, with 30 GiB RAM and about 426 GiB free on /. Yours does not need to match that exactly. The point is not to copy my hardware. The point is to confirm your own machine is not going to become the bottleneck before the source tree even arrives.
repo launcher path.
Do not skip the disk check. CPU and RAM get all the attention, but low free space is one of the dumbest ways to lose time during Android work.
Install the packages that matter
A lot of guides dump a giant package line on you and move on like that somehow counts as teaching. Let us do it a little more cleanly.
For the Ubuntu 22.04 setup used in this series, this package set is a safe place to start and stays close to current LineageOS guidance:
sudo apt update
sudo apt install -y \
bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs \
gnupg gperf imagemagick protobuf-compiler python3-protobuf \
lib32ncurses5-dev lib32readline-dev lib32z1-dev libdw-dev libelf-dev \
lz4 libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush \
rsync schedtool squashfs-tools xsltproc zip zlib1g-dev python3
Then initialize Git LFS:
git lfs install
For this machine, those packages are now in place and git-lfs is available too. That matters more than it sounds. Missing one or two of these is how people end up thinking the Android tree is broken when really the host is the thing that is incomplete.
Two small but important notes here.
First, do not read this as "Java never matters anymore." Newer Android and LineageOS branches often bring more prebuilt tooling, and some modern LineageOS branches also include the expected OpenJDK in the source download. But JDK requirements are still branch-dependent. If a branch-specific Java requirement matters later, we will call it out there instead of pretending one rule lives forever.
Second, I am still not configuring ccache here yet. It is useful, yes, and the upstream docs still include it in the package list. But right now the goal is a correct machine, not optimization cosplay. We can talk about using it properly after the basic flow is stable.
Set up Git before the tree exists
This sounds boring. It is also exactly the kind of thing that becomes irritating later if you ignore it.
Set your global Git identity if you have not done it already:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global --get user.name
git config --global --get user.email
Why now?
Because from the next article onward, we will start building a real workspace. Not a throwaway folder. A real workspace with a manifest, local changes, and eventually ArjunaOS-specific commits. If your Git identity is wrong or missing, every commit you make later becomes cleanup work.
Also create a local bin directory now:
mkdir -p ~/.local/bin
And make sure it is in your shell PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
If your shell config already exports ~/.local/bin, good. Do not duplicate it just for fun.
Install the repo launcher
This is the small tool that makes the big Android workspace possible.
Normal Git is great when one repository is one project. Android platform work is not shaped like that. We already saw that in Article 2. repo is the layer that reads a manifest, pulls many repositories, and assembles one working tree.
The official LineageOS docs usually put this launcher in ~/bin. For this series, I prefer ~/.local/bin instead. It is still a user-owned path, it stays easy to inspect, and on modern Ubuntu it fits more naturally with other local user tools.
Run:
curl -o ~/.local/bin/repo https://storage.googleapis.com/git-repo-downloads/repo
chmod a+x ~/.local/bin/repo
repo version
If repo version prints correctly, that is the main success checkpoint for this article.
And yes, that is already true on the machine used for this tutorial. The launcher is sitting in ~/.local/bin/repo and is callable from a normal shell, which is exactly what we want before touching manifests or sync.
One detail in the screenshot is worth explaining so nobody gets the wrong idea. The line <repo not installed> is expected here. It does not mean the launcher failed. It means there is no initialized Android checkout yet. At this stage, that is correct. We only care that the launcher itself runs.
<repo not installed> is normal. The success condition is that repo version runs from a normal shell.
The official Android docs also show a stricter path with GPG verification for the launcher. That is the right thing to know about, especially on production or shared systems. For this tutorial, I want to keep the first install path simple and visible so you understand where the tool lives and why the shell can find it.
repo install, and one clean verification point before the real source workflow begins.
If
repostill says command not found, open a new shell or runsource ~/.bashrcagain. Most of the time this is just aPATHissue, not a broken install.
What success looks like here
By the end of this article, you should be able to say all of this:
- Ubuntu is confirmed
- CPU, RAM, and disk look reasonable
- required packages are installed
- Git identity is set
- Git LFS is available
repo versionworks from a normal shell
That is enough.
Notice what we still have not done yet:
- no
repo init - no
.repo/directory - no source checkout
- no sync
- no build
That is on purpose.
This article is only about making the machine ready. Once we start mixing host setup, manifest initialization, source sync, and first-build workflow into the same post, the whole thing becomes harder to follow. It is better to stop here with a machine that is actually ready, then let the next article fully own workspace creation and the first real sync.
Coming up next
In the next article, we finally create the workspace, initialize the manifest, and let the first real repo sync begin.
That is the moment when the tree stops being conceptual and starts eating disk space for real.
If Article 2 was the map, and this article was preparing the machine, then Article 4 is where ArjunaOS actually touches the source.