[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Joker1716:
Build LineageOS 14.1 for the AT&T Samsung Galaxy SIII (d2att)

on Windows with VirtualBox and Ubuntu 16.04

VirtualBox and Ubuntu 16.04 Desktop

Download and install VirtualBox from their website for your computer.

Download Ubuntu 16.04 Desktop from their website

(Make sure you have hundreds of gbs free storage space on your computer)

Run VirtualBox and click on the new button

Click on expert mode

Type a name into the space provided

Choose linux for type

Make memory size about 4600 mbs

Tic Make a virtual hard drive now

Make file size about 320GB

Tic vdi and tic Dynamically allocated

Click create

Click on the start button

Browse to the save location of the ubuntu 16.04 .iso when it pops up

Click on it and then click open

Follow all the on screen installation instructions

After installation move on to setting up the build environment

Setting up the build environment, Getting the Proprietary files, and compiling the ROM

Right click mouse on the desktop and highlight Open terminal left click

type in

sudo apt-get install android-sdk-platform-tools bc build-essential ccache curl g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-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 (press enter)

(Type your password when prompted and press enter)

type in

sudo add-apt-repository ppa:openjdk-r/ppa (press enter)

(smiley face is a comma and an o no spaces)

type in

sudo apt-get update && sudo apt-get install openjdk-8-jdk (press enter)

type in

mkdir -p ~/bin (press enter)

type in

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo (press enter)

type in

mkdir -p ~/android/lineage && cd android/lineage (press enter)

type in

repo init -u https://github.com/LineageOS/android.git -b cm-14.1 (press enter)

type in

repo sync (press enter)

(this takes a long time)

(Errors can be met with repo sync --force-sync, repo sync -f, repo sync --force-broken, repo sync -j1 -f --force-sync, repo sync -l )

when it finishes

type in

source build/envsetup.sh (press enter)

type in

breakfast d2att (press enter)

when it finishes close and reopen terminal

Extract the proprietary blobs

(get .zip of a rom that is for the phone put it in the downloads folder and rename it blobs.zip)

type in

mkdir ~/android/system_dump/ (press enter)

type in

cd ~/android/system_dump/ (press enter)

type in

unzip ~/Downloads/blobs.zip system.transfer.list system.new.dat (press enter)

type in

git clone https://github.com/xpirt/sdat2img (press enter)

type in

python sdat2img/sdat2img.py system.transfer.list system.new.dat system.img (press enter)

type in

mkdir system/ (press enter)

type in

sudo mount system.img system/ (press enter)

(type in your password when prompted and press enter)

close terminal and open again

type in

cd ~/android/lineage/device/samsung/d2att (press enter)

type in

./extract-files.sh ~/android/system_dump/ (press enter)

type in

sudo umount ~/android/system_dump/system (press enter)

(type in password when prompted and press enter)

close terminal and reopen

type in

rm -rf ~/android/system_dump/ (press enter)

type in

cd ~/android/lineage (press enter)

type in

gedit ~/.bashrc (press enter)

Add this to the bottom of the file

export USE_CCACHE=1

export USE_NINJA=false

export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"

export CCACHE_COMPRESS=1

save and close the file (The save button is in the upper right hand corner)

type in

export USE_CCACHE=1 (press enter)

type in

ccache -M 50G (press enter)

type in

export CCACHE_COMPRESS=1 (press enter)

type in

source ~/.bashrc (press enter)

type in

source build/envsetup.sh (press enter)

type in

breakfast d2att (press enter)

type in

croot (press enter)

type in

brunch d2att (press enter)

The build takes a while to compile. My experience was 12 hours.

When the build does finnish the new ROM .zip will be in your ~/android/lineage/out/target/product/d2att folder (I uploaded mine to dropbox so i could retrieve it from Ubuntu onto the device. I've not been able to get adb working) All thats left is to flash the ROM.