Rom Building
Rom Building
Hi, I’m a newbie to this world of making roms. I just completed building a rom. I will share what I did to
get it ready for the phone. Here I will tell the compilation process of Lineage OS 18.1 from source (as it’s
the easiest and basic) for my device Poco Phone F1 (Beryllium).
Things needed :
1. Basic git knowledge
2. Basic linux commands. Like: ls, cd, mkdir, mv etc.
3. A server or a computer.
Minimum Specs
i. 300GB of storage
ii. 16GB ram
iii. An unlimited internet connection (Faster better).
Unlimited because we’re we are gonna work with big data. So...
iv. Git installed and configured
4. Patience
cd scripts
ls
Link : https://github.com/LineageOS/android
Manifest is a place where necessary things for a rom are present. So now you have to sync the repo.
Syncing is just like getting a snapshot of the files and folders which are in the cloud. For that you have to
first initialize the repo. For this:
1. mkdir los
2. cd los
3. repo init --depth=1 -u git://github.com/LineageOS/android.git -b lineage-17.1
Here see, depth=1 means it will just pull the latest changes rather that pulling everything from the
cloud. It is a time saving procedure.
Syncing source will take some time. So, you can keep it syncing and do other things or if you do on night
and your internet is slow, keep it overnight.
D. Cloning stuffs :
Device Tree:
git clone -b lineage-18.1 https://github.com/LineageOS/android_device_xiaomi_beryllium device/xiaomi/beryllium
Common Tree:
Vendor:
https://github.com/ArrowOS-Devices/android_device_xiaomi_sdm845-
common/commit/de8670a555d9a2f81e0ce621059f255fd5dc4848
Building :
If you did everything correctly. Congrats. Now you are ready for compiling. For compiling...
1. cd los
2. . build/envsetup.sh
3. lunch lineage_”device_code_name”-userdebug (for me device code name = beryllium)
4. mka bacon | tee LOG.txt
Note : We put “lineage_” here because we have a file named lineage_beryllium.mk (Which is what
tells compiler the necessary stuff location and tags). Also, the build env searches for this in
AndroidProducts.mk, check the same in device tree.
Now seat back and relax. It should compile without any error. If you still get any error, you’ll have to
look for the solution.
After compilation is completed, you’ll see an “out” folder having a flashable zip. Just copy it to your
phone and flash.
Done