NEVER EVER USE ROOT UNLESS STATED
In this post we are covering how to download your devices sources. You should have the ROM sources synced already and be in its directory in your terminal.
The best places to look are LineageOS’s github or PixelExperience’s github. If it isn’t there ask a ROM maintainer for your phone where they keep their device tree. The git repository you need will likely be labelled in the following format
Make sure you are in the ROMs directory in your terminal. Now run
git clone REPOURL device/OEM/CODENAME -b BRANCH. Do for all dependencies needed (such as kernel and vendor sources), replacing with the path required by them.
Enter the device tree’s directory and open the AndroidProducts.mk file. Replace the old ROMs name with the new one, for example
bliss_channel for bliss. You can find out which name you need by looking at the ROMs official device trees. Now move the
rom_codename.mk file to match and open it. Do the same here, and make sure you have the right vendor path. Again, look at other device trees for reference. Once this is done we are ready for the build!
If you made it this far congrats! You have downloaded the device sources and adapted them for your ROM. What you should do now is go look at my next tutorial for how to build the ROM. The commands you learnt today are:
git clone REPOURL device/OEM/CODENAME -b BRANCH