repo. The primary function of
repois to read a manifest file located in BlissRoms GitHub organization, and find what repositories you need to actually build Android.
mkdirto only create the directory if it does not exist in the first place. Now download the
bashcommand to read aliases, functions, and commands from the specified file. Typically, you'll supply
bashwith a configuration file such as
.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
lunch. Without those commands building would be significantly harder as you would have to memorize the long command to invoke a build manually!
bashcannot automatically detect changes in our files. To solve this, we either
sourceit or log out and log back in, forcing
bashto reload configuration files. Keep this in mind, because unlike configuration files, if you forget to
sourceinitialization files, build commands will not function!
gitwho we are. Run the following commands, substituting your information:
repowhich manifest to read:
-bis for the branch, and we’re on
q, Android 10. It’ll take a couple of seconds. You may need to type
yfor the color prompt.
repowill 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.
sourcethis file every time you log out and log back in, or launch a new
sunfish. You can check your specific device's codename on GitHub or on Google. Execute:
breakfastsearches 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.
breakfastwill automatically search in the
BlissRoms-DevicesGitHub repository, and grab your device tree for you.
vendor/. A shortcut:
lunchinitializes the proper environmental variables required for the build tools to build your specific device. Things like
BLISS_DEVICEand 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.
sunfishis the specific device we are building - in this case, the Pixel 4A. Finally,
userdebugmeans that we will build a user-debuggable variant. This is usually what most ROMs use for publishing their builds. Manufacturers typically use
userwhich disables most of the useful Android Logcats.
userdebugwon't print any
adb logcats. What gives?
eng, short for engineering builds. These builds will activate
adb logcatduring 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
makeonly runs with 1 thread.
mkais properly aliased to use all of your threads by checking
make blissify -j#, replacing the hash with the number of threads (example of
make blissify -j4).
blissifytargets 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
bacontarget 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/Makefileto 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.
.zipthat goes along the lines of
Bliss-v14.4-sunfish-UNOFFICIAL-vanilla-20210615.zip. Install TWRP, flash the build to your device, and enjoy!