How To Build LineageOS 15.1 On Windows 10

0 25,773

Get real time updates directly on you device, subscribe now.

Bytes: Following the demise of CyanogenMod at the end of 2016, its successor, LineageOS, has seen a meteoric rise in popularity. The project grew to support over 180 devices reaching over 1.8 million users thanks to the help of 700+ contributors.With the addtion of Linux sub system in Windows now its possible to build you own lineage OS in Windows 10.

How To Build LineageOS 15.1 On Windows 10:

Requirements

  • Windows 10 (64-bit) installed on a drive (256GB or bigger) (SSD recommended)
    (Skip Ahead Insider Preview builds recommended)
  • 16GB RAM or more

Warnings

  • 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
  • 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

  1. Open Microsoft Store
  2. Search for the Ubuntu 18.04 app
  3. Install the app
  4. Open the app and follow the first-time setup steps
  5. Update packages and install the following:
 sudo apt update && sudo apt full-upgrade -y && sudo apt install -y android-sdk-platform-tools bc build-essential ccache curl g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop m4 openjdk-8-jdk pngcrush repo rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
  1. Make a directory for the source code (and go to it):
mkdir -p ~/android/lineage && cd android/lineage
  1. Initialize the LineageOS source repository:
repo init -u https://github.com/LineageOS/android.git -b lineage-15.1
  1. Add the following to .repo/local_manifests/roomservice.xml (you can create the file if it doesn’t exist):
<project name="TheMuppets/proprietary_vendor_your device brand" path="vendor/your device brand" remote="github" />
  1. Download the source code:
repo sync
  1. (Optional; Recommended) https://wiki.lineageos.org/devices/k…speed-up-build
  2. Cherrypick the following commit:
source build/envsetup.sh && repopick -t wsl-compile

(https://review.lineageos.org/q/wsl-compile)

  12. Prepare the device-specific code:

breakfast your device codename

 13.Make 64-bit bison and ijar:

make bison && make ijar

 14. Set BISON_EXEC to run the 64-bit bison and IJAR_EXEC to run the adapted ijar:

export BISON_EXEC=~/android/lineage/out/host/linux-x86/bin/bison

export IJAR_EXEC=~/android/lineage/out/host/linux-x86/bin/ijar

(add the commands to ~/.bashrc if you don’t want to have to execute the commands every time you reopen a command line)

 15. Start the build:

brunch your device codename

For future builds, you need to repeat steps 9, 11, and 15 in the source code folder
Repeat step 13 every time you clean the out directory

Useful resources

Installing a desktop environment on WSL:
https://solarianprogrammer.com/2017/…-linux-xfce-4/

Linux common commands cheat sheet:
https://www.cheatography.com/davechi…-command-line/

Navigating to C: or other partitions:
check /mnt folder

Source XDA

Get real time updates directly on you device, subscribe now.

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time