[root@rhce-ryanrudolf]# rm -rf / 2> /dev/null

things I break/fix for fun and learning

Sep 3, 2018 - 2 minute read - Comments

Building Android from Source

I’ve always wanted to build Android from source, and yesterday I was able to do so! It’s a complicated process, requires a lot of reading, patience, fast internet connection, a decent computer and lots of hours.

But why do all of this? I use my smartphone much like a portable computer nowadays. Connect to my voip server, make online purchases, do online banking, buy stocks, check emails, access social media, watch videos, listen to music, take photos, store lots of information, and send / receive calls and SMS.

Due to my usage pattern, it just makes sense that the smartphone I am using is updated in terms of security patches / updates, and if possible the main OS to be updated too. The vendor ASUS has stopped providing updates since 2017, and the latest update they have provided is Android M (and now we are at Android P).

By building Android from sources, I was able to build Anroid O using LineageOS 15.1 with Aug2018 security patches! LineageOS was formerly CyanogenMod, my favorite custom ROM since Gingerbread days!

I used my spare PowerEdge T300 from my homelab in making this build -

Xeon X3323


4pcs 146GB 7.2K RPM SATA HDD (configured as RAID 0)

SAS RAID Controller

2pcs GB NIC

It takes a while to sync the repos (~50GB, depends on speed of internet connectio) and once that is done, it takes another 6hrs to compile! Subsequent compiles takes shorter – about 1hr or so. I’m using a 10yr old server and for sure on modern computers it will be much faster.

Syncing repos syncing repos

Build in progress at 39% build in progress

Build finished after 5hrs 53mins! build finished

Android Oreo installed on my phone with Aug 2018 security patches / updates. Good job!

It’s also cool that the username and hostname of the Linux box I used for the build is shown!

Next build will be when the September patches for Android are released.

Like this page? Share it!