yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 4 General] _mone:
If you like to have the keyboard with the extra numbers row add this (before "</manifest>") to your roomservice.xml:

<remove-project name="LineageOS/android_packages_inputmethods_LatinIME" />
<project name="underscoremone/android_packages_inputmethods_LatinIME" path="packages/inputmethods/LatinIME" remote="github" revision="_cm-14.1" />

-----------------------------------------------------------------------------------------

If you want to include su to your builds you have to run

export WITH_SU=true

before starting the build.

If you want to always include it you can add the same line to your .bashrc (remember to run "source ~/.bashrc" after you modify .bashrc)
[Galaxy Note 4 General] Diload:
Hello,

First of all thank you for sharing this guide.

I haven't yet compiled with success but so far one of the errors I've encountered is that i need to include the following in my local manifest:

<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-14.1" />

or else I'm getting an error about missing macloader.h

Running a compile now so i will return once that finished :)
[Galaxy Note 4 General] _mone:
Yep, you're right; I've missed it. I've updated the op.

Edit:

Actually I thought it was going to be downloaded automatically because it is included in the dependencies of "android_device_samsung_qcom-common".. maybe I'm wrong. Anyway I've added it to the guide's trltexx.xml, you may want to be aware that we still need "android_packages_resources_devicesettings" "android_packages_apps_FlipFlap" and "android_hardware_sony_timekeep", they should be automatically added to your roomservice.xml (because they are included in our lineage.dependencies) but if it doesn't happen you probably want to add it to your trltexx.xml.
[Galaxy Note 4 General] rob_z11:
How are things different if I want to build for TMO? How much disk space you need?
[Galaxy Note 4 General] _mone:
I've updated the op with the changes needed for trltetmo/trltecan.

You need approximately 60gb, but I would go with more if you can.
[Galaxy Note 4 General] elitedz:
hi can you show me how to build for the n910w8 ?
[Galaxy Note 4 General] 9h0s7:
outstanding
[Galaxy Note 4 General] Diload:
Okay so i finally got a working build compiled, got a lot of issues with java compiler and javadoc using too much memory,

if anyone is interested it is fixed by setting

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

Just edit the 4G in the end to the amount of ram you would allow the java compiler to run, be aware that you would still need about an additional of 4,5 gigs of ram available other than what you specify here, at least that was the case for me, since the java compiler doesn't clear out when other stuff is processed during the compile (like c, c++ and javadoc compilation)

I don't know, when I run brunch it doesn't create the roomservice.xml file, i think that it gets done with the breakfast command, but that would create instances in my roomservice.xml that conflicted with the trltexx repos pulled from another source from the other local manifest.

So i ended up with this local manifest (i.e. trltexx.xml)

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<project path="device/samsung/trlte-common" name="Diload/android_device_samsung_trlte-common" remote="github" revision="cm-14.1" />

<project path="kernel/samsung/trlte" name="Diload/android_kernel_samsung_trlte" remote="github" revision="cm-14.1" />

<project path="device/samsung/trltexx" name="Diload/android_device_samsung_trltexx" remote="github" revision="cm-14.1" />

<project path="vendor/samsung" name="Diload/proprietary_vendor_samsung_trlte" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_packages_apps_FlipFlap" path="packages/apps/FlipFlap" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="cm-14.1" />

</manifest>

And it is now running on my phone ;)
[Galaxy Note 4 General] _mone:
Well done [MENTION=4635626]Diload[/MENTION] :good:
[Galaxy Note 4 General] _mone:
If you want build for trltecan (N910W8) follow this guide and make the changes described for trltetmo. trltetmo and trltecan, like trltexx and trltedt can share the same ROM.
[Galaxy Note 4 General] elitedz:
thank you :)
[Galaxy Note 4 General] happy2472:
how about some love for the N910V ???
[Galaxy Note 4 General] dalincn:
hi! I how about NOTE 4 DUOS N9100 which has two sim? Now only one sim works，wifi and another sim donot work. how solve it？Thanks!:)
[Galaxy Note 4 General] aaron74:
Nice clear info!

Thanks!

Especially the part about local manifest, other guides I've read in past never touch on that part. Thank you.
[Galaxy Note 4 General] happy2472:
N910V never gets any love

ok so what would I have to do to make one strictly for the N910V ? id just change it to trltevzw ?
[Galaxy Note 4 General] _mone:
For trltevzw you may want to have a look at the verzion forum and ask the recognized developers that are building LineageOS to share their source. Good luck with that!
[Galaxy Note 4 General] happy2472:
Im guessing thats like gold??
[Galaxy Note 4 General] bat0nas:
What's the point installing lineageos on note4?

Not trolling... Just curious.

I bet we will lose everything this phone is great about (s pen menu etc.).

Thanks!
[Galaxy Note 4 General] Incarniac:
This is probably not the right place for such a discussion as this is about building LineageOS yourself, based on the the guide that _mone has very kindly provided. I suggest opening a new thread yourself inviting discussion/advice, or maybe look around the various LineageOS dev threads to see what people are saying. The known issues / missing functionality is pretty well documented, but I'm sure people will be happy let you know in a thread where it is appropriate :)
[Galaxy Note 4 General] ripee:
Anyone else encounter this error?

FAILED: /bin/bash /home/ubuntu/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp
Out of memory error (version 1.2-rc4 'Carnac' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by android-jack-team@google.com)).
GC overhead limit exceeded.
Try increasing heap size with java option '-Xmx<size>'.
Warning: This may have produced partial or corrupted output.
[ 39% 13783/34641] Building with Jack:...-java-micro_intermediates/classes.jack
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/ubuntu'

#### make failed to build some targets (01:35:13 (hh:mm:ss)) ####

I set virtual memory to 8GB out of my 16 and virtual storage to 100GB.
[Galaxy Note 4 General] _mone:
See post#9
[Galaxy Note 4 General] ripee:
Ahh, I wasn't entirely sure if that was the same issue. Thank you!
[Galaxy Note 4 General] happy2472:
I first need the source for my n910v and im going try and compile it tomorrow
[Galaxy Note 4 General] Incarniac:
An utterly tiny thing, but the 'sudo' here shouldn't be necessary, right? Because you're editing the file in your home folder; unless there's something I'm missing, which is very possible.
[Galaxy Note 4 General] aaron74:
OK. So i ventured into trying building from source, again!

I'm trying to build Lineage for trltespr.

I synced lineage os. I cloned my device files from emotion. I'm pretty sure i edited all the files needed to get rid of emotion specific. I put my files referred into the local manifest.

My problem is when i sync it goes all the way to 99%and sticks there at "android_hardware_qcom_media"

Is this enough info for you to tell me where to look into what i missed?

Thanks.
[Galaxy Note 4 General] ripee:
As soon as you launch your terminal app, run this command to enter root mode. Then you can run all root commands without sudo in front.

sudo -s
[Galaxy Note 4 General] Incarniac:
Thanks, yeah I am familiar with Linux and general development (just not Android ROM dev) - my question was about this 'sudo' in particular. The others are needed. As I said, a very minor and really out of curiosity than anything :)

(Also, prefer not to run a shell as root, that's a recipe for disaster :) )
[Galaxy Note 4 General] _mone:
You are right.. My bad. OP updated.
[Galaxy Note 4 General] happy2472:
so anyone have info to do this for n910v ?? been asking around and got NO help
[Galaxy Note 4 General] _mone:
Sorry happy2472 but I own a trltexx and I work only on it.. I've created this guide because I don't mind if other people use and modify my source.. actually I'm quite happy about it.. I've added instruction for trltetmo because I work with other people happy to share their source. For now nobody with trltevzw made public their source so I can't help you.
[Galaxy Note 4 General] happy2472:
So if someone added their "source" in their OP .. is that the source needed?
[Galaxy Note 4 General] _mone:
If someone that is successfully building lineageos for trltevzw share their source on github or wherever you can follow this guide but using their source to build it for yourself.
[Galaxy Note 4 General] happy2472:
Sending you a pm if thats ok
[Galaxy Note 4 General] happy2472:
damnit to heck .... did this twice took several hours and then i get this error

est-merger-23.0.1.pom.sha1

fatal: cannot create directory at 'com/android/tools/build/manifest-merger/23.0.2': No space left on device

Traceback (most recent call last):

File "/home/matt/lineageos/.repo/repo/main.py", line 531, in <module>

_Main(sys.argv[1:])

File "/home/matt/lineageos/.repo/repo/main.py", line 507, in _Main

result = repo._Run(argv) or 0

File "/home/matt/lineageos/.repo/repo/main.py", line 180, in _Run

result = cmd.Execute(copts, cargs)

File "/home/matt/lineageos/.repo/repo/subcmds/sync.py", line 821, in Execute

project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)

File "/home/matt/lineageos/.repo/repo/project.py", line 1327, in Sync_LocalHalf

self._InitWorkTree(force_sync=force_sync)

File "/home/matt/lineageos/.repo/repo/project.py", line 2486, in _InitWorkTree

raise GitError("cannot initialize work tree")

error.GitError: cannot initialize work tree

guess i ran out of space on this step "" repo sync --force-sync ""
[Galaxy Note 4 General] rob_z11:
javac: file not found: /home/ravi/android/lineageos/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java

Usage: javac <options> <source files>

use -help for a list of possible options

ninja: build stopped: subcommand failed.

build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed

make: *** [ninja_wrapper] Error 1

make: Leaving directory '/home/ravi/android/lineageos'

#### make failed to build some targets (17:59 (mm:ss)) ####

I am getting this error message. Tried to serach on google, and was given cherry picking another commit, but it didn't help.
[Galaxy Note 4 General] Neuken69:
you have a working """"roomservice.xml""?
[Galaxy Note 4 General] rob_z11:
I do, and here it is.

<manifest>

<project name="underscoremone/android_kernel_samsung_trlte" path="kernel/samsung/trlte" remote="github" revision="cm-14.1" />

<project name="underscoremone/android_device_samsung_trlte-common" path="device/samsung/trlte-common" remote="github" revision="cm-14.1" />

<project name="fat-tire/android_device_samsung_trltetmo" path="device/samsung/trltetmo" remote="github" revision="cm-14.1" />

<project name="underscoremone/proprietary_vendor_samsung_trlte" path="vendor/samsung" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-14.1" />

</manifest>
[Galaxy Note 4 General] ripee:
[MENTION=2973274]rob_z11[/MENTION], but that's for T-Mobile. We're all looking for the mythical trltevzw source. If anyone finds one, I'll happily compile a build.
[Galaxy Note 4 General] rob_z11:
I am trying to compile for TMO, and keep running into same error. Any idea? Do you mind sharing your roomservice.xml for tmo? I am missing entire folder structure on my source.

javac: file not found: /home/ravi/android/lineageos/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java

I don't have this folder at all on my source.
[Galaxy Note 4 General] ripee:
See post #9 in this thread. I had the same problem, you need to add that line to your bashrc. I kept mine at 4G.

I'm using _mone's roomservice.xml from the OP, no changes.
[Galaxy Note 4 General] rob_z11:
I have actually add 6G from what Post #9 recommends, and keep getting same erros.
[Galaxy Note 4 General] _mone:
do this:

. build/envsetup.sh
lunch lineage_trltetmo-userdebug
repo sync --force-sync

Your roomservice should have been updated (something that was suppost to happen automatically already), have a look at it, you should have more stuff in there. If it doesn't change (strange) let us know.
[Galaxy Note 4 General] rob_z11:
Yes, I will try that. It is trying to find a file which is not there to compile.

This is the file it is trying to find, and I don't have it even when I was able to repo sync --force-sync.

/home/ravi/android/lineageos/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java
[Galaxy Note 4 General] _mone:
Have you tried what I told you in the previous post?
[Galaxy Note 4 General] rob_z11:
Yes.
[Galaxy Note 4 General] _mone:
So is your roomservice changed?
[Galaxy Note 4 General] rob_z11:
This is my roomservice.xml.

<manifest>

<project name="underscoremone/android_kernel_samsung_trlte" path="kernel/samsung/trlte" remote="github" revision="cm-14.1" />

<project name="underscoremone/android_device_samsung_trlte-common" path="device/samsung/trlte-common" remote="github" revision="cm-14.1" />

<project name="fat-tire/android_device_samsung_trltetmo" path="device/samsung/trltetmo" remote="github" revision="cm-14.1" />

<project name="underscoremone/proprietary_vendor_samsung_trlte" path="vendor/samsung" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-14.1" />

</manifest>
[Galaxy Note 4 General] ripee:
trltespr roomservice.xml

Courtesy of lilferraro:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="https://github.com" name="lilferraro" />
<project name="underscoremone/android_kernel_samsung_trlte" path="kernel/samsung/trlte" remote="github" revision="cm-14.1" />
<project name="underscoremone/android_device_samsung_trlte-common" path="device/samsung/trlte-common" remote="github" revision="cm-14.1" />
<project name="lilferraro/android_device_samsung_trltespr" path="device/samsung/trltespr" remote="lilferraro" revision="cm-14.1" />
<project name="EmotionOS/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="nougat" />
<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />
</manifest>

The command to run the build is of course:

. build/envsetup.sh && brunch trltespr
[Galaxy Note 4 General] diseezneal:
guys any source for n9106w?
[Galaxy Note 4 General] aaron74:
Dev Help?

Ok, Ive finally succeeded in getting my 1st build to work, with all the help here on XDA. Now that I know a little more about editing local manifest and adding projects. I want to attempt to take this a step forward.

Since there are already plenty of Devs here building Lineage OS, It was a little easier for me getting help to get this Lineage build to actually build! So what Id like to do, to further my knowledge on this matter, is to build vanilla AOSP. From what Ive managed to read so far, I understand there would be a lot more further editing to get this to work!

So are there any Devs here that could give me some advice and point me into the right direction to get this started!

Thank you!

PS

I already have all aosp source synced!

And I am building for N910P Sprint device!
[Galaxy Note 4 General] ripee:
[MENTION=6847876]_mone[/MENTION], any chance you could put together a guide to building TWRP? It need not be as detailed as this one, unless absolutely necessary. I'd just like to learn how you did it to gain more insight into what's involved in building Android :)

Edit: nevermind, found it!

https://github.com/underscoremone/android_device_samsung_trlte
[Galaxy Note 4 General] rob_z11:
how do you add features such as Network Bandwidth counter which shows download and upload traffic? How do you add more features in the existing Lineage OS?
[Galaxy Note 4 General] rob_z11:
here is my roomservice.xml.

<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<project name="underscoremone/android_kernel_samsung_trlte" path="kernel/samsung/trlte" remote="github" revision="cm-14.1" />

<project name="underscoremone/android_device_samsung_trlte-common" path="device/samsung/trlte-common" remote="github" revision="cm-14.1" />

<project name="fat-tire/android_device_samsung_trltetmo" path="device/samsung/trltetmo" remote="github" revision="cm-14.1" />

<project name="underscoremone/proprietary_vendor_samsung_trlte" path="vendor/samsung" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />

<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />

<project name="LineageOS/android_packages_apps_FlipFlap" path="packages/apps/FlipFlap" remote="github" />

<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" />

<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" />

<project name="ResurrectionRemix/android_packages_apps_OmniSwitch" path="packages/apps" remote="github" revision="nougat" />

</manifest>
[Galaxy Note 4 General] aaron74:
Do I want to clone or fork someones git file? I want to make changes to it without passing them changes on.
[Galaxy Note 4 General] ripee:
Cloning repos copies them to your profile and they appear as independently created. Forks can't sync up to the source repo unless its owner give you permission, but source repo changes can sync down to your fork if you're not careful unless you only make changes to your fork manually.
[Galaxy Note 4 General] aaron74:
Thanks, I'm starting to get the hang of it. A little. Finally got local manifest figured out. And editing device tree. Trying to build slim to try something different. Got it to lunch. Tried making bacon but keep getting missing lib files. Just haven't had time to investigate, with work.

Thanks all you!
[Galaxy Note 4 General] ahmed.xid:
I tried the exact procedure as above , increased the heap size as mentioned in post 9 , but it crashses with log ...

CC net/netfilter/interceptor/debug_linux.o

CC net/netfilter/interceptor/debug_strbuf_stack.o

CC net/wireless/wext-compat.o

LD net/netfilter/interceptor/vpnclient.o

LD net/netfilter/interceptor/built-in.o

LD net/netfilter/built-in.o

CC net/wireless/wext-sme.o

CC net/wireless/wext-core.o

CC net/wireless/wext-proc.o

CC net/wireless/wext-spy.o

CC net/wireless/wext-priv.o

LD net/wireless/cfg80211.o

LD net/wireless/built-in.o

LD net/built-in.o

Makefile:130: recipe for target 'sub-make' failed

make: *** [sub-make] Error

My system is also ubuntu 16.04 16GB RAM , 4th Gen i5

I
[Galaxy Note 4 General] ripee:
Here's a Lineage-14.1 repo initiation script I made from _mone's instructions in the OP. Take note of the lines it adds to bashrc, as I've allocated 12 out of my system's 16GB of RAM to my Ubuntu virtual machine. Since I run 6 builds each night, I set my ccache to 12GB as well:

#!/bin/bash

apt-get update
apt-get -y dist-upgrade
apt-get remove -y openjdk-* icedtea-* icedtea6-*
echo | add-apt-repository ppa:openjdk-r/ppa
apt-get update -y
apt-get install -y openjdk-8-jdk
apt-get install -y git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng maven
mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
echo 'export PATH=~/bin:$PATH' >> ~/.bashrc
echo 'export USE_CCACHE=1' >> ~/.bashrc
echo 'export ANDROID_CCACHE_SIZE="100G"' >> ~/.bashrc
echo 'export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx12G"' >> ~/.bashrc
echo 'export WITH_SU=true' >> ~/.bashrc
. ~/.bashrc
mkdir ~/android
cd ~/android
mkdir lineageos
cd lineageos
repo init -u git://github.com/LineageOS/android.git -b cm-14.1
repo sync --force-sync
cd .repo
mkdir local_manifests
cd ../../..
[Galaxy Note 4 General] LenAsh:
Hmmm... clearly I'm doing something wrong...

javac: file not found: /home/osboxes/android/lineageos/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java

Usage: javac <options> <source files>

use -help for a list of possible options

ninja: build stopped: subcommand failed.

build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed

make: *** [ninja_wrapper] Error 1

make: Leaving directory '/home/osboxes/android/lineageos'

#### make failed to build some targets (29:23 (mm:ss)) ####

Additionally, the "add number line to keyboard" option in roomservice.xml fails if I try that, which is not in the above build attempt.
[Galaxy Note 4 General] _mone:
To fix this you should have this line in your roomservice:

<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />

Yes, that line should automatically be added to your roomservice.. you may want to add this too:

<project name="LineageOS/android_packages_apps_FlipFlap" path="packages/apps/FlipFlap" remote="github" />
<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" />

Make sure you're adding those lines between "<manifest>" and "</manifest>".

If you share your current roomservice.xml we may find out what's wrong with it.