[Samsung Galaxy S9 & S9+ Cross Device Development] Neurotical:
INITIAL STEPS FOR BUILDING ON WINDOWS

// Enable Virtual Machine support in your PC BIOS

// INSTALL WSL2: https://docs.microsoft.com/en-us/windows/wsl/install-win10

// ENABLE Features: Windows Linux Subsystem, Hyper-V, Virtual Machine Platform, Hypervisor Platform

// INSTALL Ubuntu from windows store

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get install bc binutils-aarch64-linux-gnu bison build-essential ccache curl flex g++-multilib gcc-multilib git git-core gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z-dev lib32z1-dev libc6-dev-i386 libgl1-mesa-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libx11-dev libxml2 libxml2-utils lzop ncdu pngcrush rsync schedtool squashfs-tools unzip x11proto-core-dev xsltproc zip zlib1g-dev && wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip && unzip platform-tools-latest-linux.zip -d ~ && nano .profile && source ~/.profile && mkdir -p ~/bin && mkdir -p ~/android/lineage && nano .bashrc && source ~/.bashrc && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo && git config --global user.email "anon@anon.com" && git config --global user.name "Repository44" && export PATH="~/bin:$PATH" && sudo ln -s /usr/bin/python3 /usr/bin/python && cd ~/android/lineage && sudo sysctl -w net.ipv4.tcp_window_scaling=0 && repo init -u https://github.com/LineageOS/android.git -b lineage-19.1 && repo sync --no-clone-bundle -j24 && mkdir -p ~/android/lineage/.repo/local_manifests && cd ~/android/lineage/.repo/local_manifests && wget https://github.com/Repository44/local_manifests/blob/main/roomservice.xml && nano roomservice.xml

// note the command repo sync --no-clone-bundle -j24 utilizes 24 cores. If your CPU only has 12 cores, set the appropriate number.

// append following text to end of .profile file:

# add Android SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
PATH="$HOME/platform-tools:$PATH"
fi

// append following text to end of .bash file:

# enable and set ccache size and compression status.
export USE_CCACHE=1
export CCACHE_EXEC=/usr/bin/ccache
ccache -M 50G

# allocate Jack enough memory to complete the build process by running
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"

// replace all text in roomservice.xml with the following:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="Repository44/android_kernel_samsung_universal9810" path="kernel/samsung/exynos9810" remote="github" revision="4.9y" />
<project name="Repository44/android_device_samsung_exynos9810-common" path="device/samsung/exynos9810-common" remote="github" revision="LOS19.1" />
<project name="Repository44/android_device_samsung_starlte" path="device/samsung/starlte" remote="github" revision="LOS19.1" />
<project name="Repository44/proprietary_vendor_samsung_exynos9810-common" path="vendor/samsung/exynos9810-common" remote="github" revision="LOS19.1" />
<project name="Repository44/proprietary_vendor_samsung_starlte" path="vendor/samsung/starlte" remote="github" revision="LOS19.1" />
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="lineage-19.1" />
<project name="LineageOS/android_device_samsung_slsi_sepolicy" path="device/samsung_slsi/sepolicy" remote="github" revision="lineage-19.1" />
</manifest>

// (modifications): you can replace sections of the above text with other 'project names', 'paths', 'remotes', or 'revisions'

// upon doing so, re-run sync with 'cd ~/android/lineage && repo sync --no-clone-bundle --force-sync -j22'

// the --force-sync will delete whatever path the old project(s) pointed to locally and replace it with the new project files

EXPANDING DISK STORAGE​

// For disk space exploration, observe size of 'C:\Users\Desktop\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.xxxxxxxxxxxxxxxxxx\LocalState' during compile.

// if exceeding 250gb, the compile will error out and you must expand the size of your WSL2 Virtual Hard Disk: https://docs.microsoft.com/en-us/windows/wsl/vhd-size

Open Powershell as admin

-> wsl --shutdown
-> exit

Open Command Prompt as admin

-> diskpart
-> Select vdisk file= ”C:\Users\Desktop\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.xxxxxxxxxxxxxxxxxx\LocalState\ext4.vhdx”
-> detail vdisk
-> expand vdisk maximum=350000
-> exit

Open Ubuntu

-> sudo mount -t devtmpfs none /dev
-> mount | grep ext4
-> sudo resize2fs /dev/sdc 350000M
-> exit

STARLTE REGULAR COMPILE

cd ~/android/lineage && repo sync --no-clone-bundle --force-sync -j24
cd ~/android/lineage && source build/envsetup.sh && breakfast starlte && mka bacon -j24
cp -i /home/user/android/lineage/out/target/product/starlte/lineage-19.1-20220804-UNOFFICIAL-starlte.zip /mnt/c/LOS/starlte && cp -i /home/user/android/lineage/out/target/product/starlte/recovery.img /mnt/c/LOS/starlte

// Note the command mka bacon -j24 uses 24 cores for the compile. Remember to change the cores to the number your CPU supports.

// Note the cp command will copy the ROM from Ubuntu to your Windows drive where you can upload it easily to your device via ADB. Just make sure you have the directory on your Windows drive created so Ubuntu can find it.