repo
. The primary function of repo
is to read a manifest file located in BlissRoms GitHub organization, and find what repositories you need to actually build Android.~/bin
directory for repo
:-p
flag instructs mkdir
to only create the directory if it does not exist in the first place. Now download the repo
tool into ~/bin
:repo
executable:source
the file:source
?source
is a bash
command to read aliases, functions, and commands from the specified file. Typically, you'll supply bash
with a configuration file such as .bashrc
or .bash_profile
, or an initialization file such as envsetup.sh
. The difference is that while the configuration file lists configuration and user-defined aliases and functions, initialization files typically hold build commands such as breakfast
, brunch
, and lunch
. Without those commands building would be significantly harder as you would have to memorize the long command to invoke a build manually!bash
cannot automatically detect changes in our files. To solve this, we either source
it or log out and log back in, forcing bash
to reload configuration files. Keep this in mind, because unlike configuration files, if you forget to source
initialization files, build commands will not function!repo
and git
who we are. Run the following commands, substituting your information:repo
which manifest to read:-b
is for the branch, and we’re on q
, Android 10. It’ll take a couple of seconds. You may need to type y
for the color prompt.repo
tool, visit the Build Tips guide to learn more about the repo flags.repo
will start downloading all the code. That’s going to be slow, even on a fiber network. Expect downloads to take more than a couple hours.source
this file every time you log out and log back in, or launch a new bash
/Terminal instance.sunfish
. You can check your specific device's codename on GitHub or on Google. Execute:breakfast
searches repositories for your device "tree", which contains all the details needed to make the build suitable for your device. CPU, kernel info, device screen size, whether the board has Bluetooth, NFC, what frequencies the build needs for Wi-Fi, and a bunch of other things. breakfast
will automatically search in the BlissRoms-Devices
GitHub repository, and grab your device tree for you.device/
, kernel/
and vendor/
. A shortcut:source
d build/envsetup.sh
earlier.lunch
initializes the proper environmental variables required for the build tools to build your specific device. Things like BLISS_DEVICE
and other variables are set in this stage, and the changed variables will be shown as output. bliss_
is the ROM that we are building. As convention, all devices will have this prefix. sunfish
is the specific device we are building - in this case, the Pixel 4A. Finally, userdebug
means that we will build a user-debuggable variant. This is usually what most ROMs use for publishing their builds. Manufacturers typically use user
which disables most of the useful Android Logcats.userdebug
won't print any adb logcat
s. What gives?eng
, short for engineering builds. These builds will activate adb logcat
during boot, and will show you exactly what is going wrong, where, and why. However, these builds are NOT recommended for normal usage as they are not securely hardened, have log spam that will slow down your device, and other unexpected problems like userspace utilities crashing during runtime. If you want to submit your device for mainline, do NOT submit an eng
build!mka blissify
mka
and not make
?make
only runs with 1 thread. mka
is properly aliased to use all of your threads by checking nproc
.make blissify -j#
, replacing the hash with the number of threads (example of make blissify -j4
).blissify
targets to build against, what's wrong?make bacon
. For BlissRoms, we chose the build target of blissify
. If that doesn't work, sometimes there is a bug, or the ROM developers do not implement a bacon
target to build against. In this case, you will need to find what name they use to initialize a full build of the ROM. Conventionally, it is supposed to be bacon
, but some ROM developers change this name inadvertently, or actually have a bug that causes the build target to never be found. If you cannot locate the build target, ask the developers of the ROM. Alternatively, you can try poking around in build/make/core/Makefile
to see what the build target name is. But this is out of the scope of this article as you're not supposed to be building other ROMs (that's not what this tutorial is for, sorry!)blissify
? It is a compact form of these commands:make
, or it succeeds and you see the Bliss logo in ASCII. If you encounter the former, you need to go back and fix whatever it's complaining about. Typically, 90% of the time the problem will be in your device tree. For the other 10%, submit a bug report to the ROM developers. Be sure to include the full log of your build to help diagnose the problem, and your device tree..zip
that goes along the lines of Bliss-v14.4-sunfish-UNOFFICIAL-vanilla-20210615.zip
. Install TWRP, flash the build to your device, and enjoy!