[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] miffymiffy:
So, I managed to build a rom using a few online methods I found. I couldnt build on my own computer as it kept bugging out due to lack of ram.

So.

Step 1:

https://xdaforums.com/chef-central/android/guide-how-to-build-rom-google-cloud-t3360430

Set up a VM through Google Cloud. It is free for one year and SUPER FAST! I set mine up according to instructions.

Step 2: First I typed:

sudo apt-get update

Step 2a: Then I installed the build packages:

sudo apt-get install bc bison build-essential ccache curl flex 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 pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev unzip

Step 3: Then i downloaded the platform tools:

wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip

Step 3a: Unzip them:

unzip platform-tools-latest-linux.zip -d ~

Step 3b: Now you have to add adb and fastboot to your PATH. To open ~/.profile and add the following type:

vi .profile

press i to insert:

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

press ctrl c (ESC didnt work for me) and type :wq to save

Step 4: Then I Set a Git username: git config --global user.name "Mona Lisa" and then set a Git email: git config --global user.email "email@example.com"

Step 5: Install repo

mkdir -p ~/bin

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

If this doesnt work, sudo apt-get install repo or snap install git-repo

Step 6: Create your directories

mkdir -p ~/android/lineage

Step 7: Initialise the repo

cd ~/android/lineage
repo init -u https://github.com/LineageOS/android.git -b lineage-16.0

This will take a while.

Step 7: adding tomascus manifest

type

cd .repo

mkdir local_manifests

cd local_manifests

cat > mymanifest.xml

and paste

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="tomascus/android_device_htc_ocn" path="device/htc/ocn" remote="github" revision="development" />
<project name="tomascus/android_kernel_htc_msm8998" path="kernel/htc/msm8998" remote="github" revision="development" />
<project name="tomascus/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="lineage-16.0"/>
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
</manifest>

Ctrl C to end

Step 8: Sync LineageOS sources

cd ~/android/lineage
repo sync -c --no-clone-bundle

this will also take a while.

Step 9:

Follow tomascus steps

5. Build the ROM

- Have a look at the section "Turn on caching to speed up build" at https://wiki.lineageos.org/devices/dumpling/build

- Run the commands to get variables and everything together to ready to build:

Code:

. build/envsetup.sh
lunch lineage_ocn-userdebug

To commerce building, run:

Code:

mka bacon

- Wait for it to build, output will be located at out/target/product/ocn/lineage-xxxxxx.zip

It should build and complete.

Step 10: To upload it somewhere I could get, I followed

https://olivermarshall.net/how-to-upload-a-file-to-google-drive-from-the-command-line/

which was to upload to google drive.

cd ~
wget https://docs.google.com/uc?id=0B3X9GlR6EmbnWksyTEtCM0VfaFE&export=download

Type

dir

and find a file similar to uc\?id\=0B3X9GlR6EmbnWksyTEtCM0VfaFE Copy that file name

type

mv uc\?id\=0B3X9GlR6EmbnWksyTEtCM0VfaFE gdrive

then give it rights

chmod +x gdrive

then install the usr folder for gdrive

sudo install gdrive /usr/local/bin/gdrive

You’ll need to tell Google Drive to allow this program to connect to your account. To do this, run the gdrive program with any parameter and copy the text it gives you to your browser. Run the following.

gdrive list

it will return with a link. Go to the link and copy the key into the terminal window.

Step 11: To upload

cd ~/android/lineage/out/target/product/ocn

gdrive upload lineage-16.0-XXXXXX-UNOFFICIAL-ocn.zip

It will then upload to your gdrive account and you can download from there.

Hope it helps.

PS: I may have missed steps as I did it from memory. It will tell you what is wrong if it fails. If I could do it, anyone can!