Sunday 25 November 2018

How to build LineageOS 16.0 on Windows 10 (via WSL)

Requirements
  • Windows 10 (64-bit) installed on a drive (256GB or bigger) (SSD 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:
    Code:
    sudo apt update && sudo apt full-upgrade -y && sudo apt install -y 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
  6. Make a directory for the source code (and go to it):
    Code:
    mkdir -p ~/android/lineage && cd android/lineage
  7. Initialize the LineageOS source repository:
    Code:
    repo init -u https://github.com/LineageOS/android.git -b lineage-16.0
  8. Sync the sources:
    Code:
    repo sync
  9. (Optional; Recommended) https://wiki.lineageos.org/devices/k...speed-up-build
  10. Run
    Code:
    source build/envsetup.sh
  11. Prepare the device-specific code:
    Code:
    breakfast your device codename
  12. Add the following to .repo/local_manifests/roomservice.xml:
    Code:
    <project name="TheMuppets/proprietary_vendor_your device brand" path="vendor/your device brand" remote="github" />
  13. Sync the sources again:
    Code:
    repo sync
  14. Start the build:
    Code:
    brunch your device codename

For future builds, you need to repeat steps 13 -> 10 -> 14 at the root of the tree

For those still insterested in building 15.1 (ignore the repopick step): https://web.archive.org/web/20180617...-15-1-t3750175 (do not report any errors if you sync this branch, I will ignore them since I do not have the means to maintain more than one branch on wsl)

No comments:

Post a Comment