If you plan to install lineage OS 18.1 on your Android device, why not build lineage OS 18.1 on Windows 10 computer with help of Windows Subsystem Linux. Excited? This guide will help you do the exact without any hassle.
The latest version of Lineage OS is 18.1 which is based on Android 10 (code-name Q). It’s a custom ROM that you need to flash/install through a custom recovery. This requires you to learn a couple of things. If you plan to install Lineage OS on your phone, you can visit the download section on the Lineage OS site. It’s very easy to download Lineage OS ROM and flash on an android smartphone.
You can manually build lineage OS for your Android device; this tutorial will help you set up the Ubuntu environment on Windows 10 and create lineage OS for your android. Since what you are doing is entirely manual it requires at least 256 GB of free space on your Windows installation drive. Moreover, 16 GB RAM is needed for the process, and storage should be solid-state hard drive. And not to forget a high-speed internet connection because in the process you will be downloading lots of GB.
Requirements for building LineageOS on Windows 10.
- Windows 10 (64-bit) on a drive with 256GB SSD storage is recommended.
- 16GB RAM or more.
- Supported device.
Warnings to read before you go ahead.
- Do NOT add/edit your Linux files from Windows. The files will most likely be broken in bash.
Instead, add/edit the files from within the Linux subsystem.
- Make sure there is no power cut, the process takes hours.
- Using mnt to download the source code to other drives and then attempting to follow this guide will probably result in failures. Download the source to folders only within the subsystem
Setting up a Windows Subsystem for Linux (WSL) build environment
Open Windows store.
Install the app.
Build Lineage OS 18 ROM for any android.
Update and install the following.
Simply open the Ubuntu app after installing and copy-paste the following code. This step is required and will need an active internet connection. If you see some errors, make sure to rerun the code until all the tools are installed properly.
sudo apt update && sudo apt full-upgrade -y && sudo apt install -y build-essential ccache libncurses5 libssl-dev m4 unzip zip
At last, see the output message. After installing make a new directory and move there.
Make a directory for the source code (and go to it). 👍
mkdir -p ~/android/lineage && cd android/lineage
Here mkdir command creates a directory, and cd command will take you to a directory where you’ll be fetching source code.
Initialize the LineageOS source repository.
The below code will fetch the source from the official Lineage OS GitHub repository.
repo init -u git://github.com/LineageOS/android.git -b lineage-18.1
Having issues, try https instead of git command.
Sync the sources. 👍
Sync the source, or better use device-specific command
(Optional; Recommended) https://wiki.lineageos.org/devices/klte/build#turn-on-caching-to-speed-up-build
It’s time to start the setup, connect your phone to the PC while turning USB debugging/ADB on. Make sure to install fastboot and ADB drivers, run fastboot devices to check the connection.
Run the code:
If you see some vendor information error, follow these steps and type rerun breakfast.
Prepare the device-specific code.
breakfast your device codename
Here dumpling is the codename of Oneplus 5T, learn your device codename by a simple search on Google. When you’re building Lineage OS ROM for your mobile, it is essential to know device codename because codename will fetch device-specific files and kernel. Otherwise, you’ll end up wasting time and bandwidth.
Add the info to roomservice.xml file.
Add the following to .repo/local_manifests/roomservice.xml (you can create the file if it doesn’t exist):
Code: <project name=”TheMuppets/proprietary_vendor_your device brand” path=”vendor/your device brand” remote=”github” />
Replace your device brand with device vendor. Visit https://github.com/TheMuppets and use the search bar to find your device vendor.
Example: <project name=”TheMuppets/proprietary_vendor_oneplus” path=”vendor/oneplus” remote=”github” />
Sync the sources again:
Run the repo sync command again to make everything saved.
Start the build:
This command will start compiling Lineage OS ROM for your device, trust me it will take a lot of time. Simply set your PC not to go into sleep and do other work meanwhile.
Type cd $OUT and you’ll find all the files created during the process. Look for these two files.
1. recovery.img, which is the LineageOS recovery image.
The ZIP file is the Lineage OS 16 ROM, flash it to your devices using a custom recovery like TWRP.
Instructions for future builds.
Now that you have Lineage OS 16 ROM, with time it gets updated and when it does you can compile new ROM applying these steps.
- Run Code:
brunch your device codename
Steps #8 then #5 then #9.
Now let’s assume that the process was completed without any error, this will result in two important files, one important file if you’re already using a custom recovery. The lineage-16xx…zip file is all you need. Frankly, this is not a beginners guide, and there are some aspects that I’ve not mentioned assuming you know them.
Few Windows 10 articles.
Navigate the article