[GUIDE][HOW-TO][T819]Build your own LineageOS 15.1 for T819

emuandco

Senior Member
Aug 29, 2009
1,122
495
113
34
Steinfeld
www.dreimer.de
Hello and welcome to my first try to write an HOW-TO, don't kill me for my epic skillz in that ^^

After a nice chat with @LuK1337 that weekend I was able to build my own LineageOS ROM for our beloved Tablet. It works very nice and thus I think it should be fine to pass my information over to you, but first:

If your tablet eats your cat after that, you are on YOUR OWN! It is NOT my fault and even less the fault of @LuK1337!!

What works:
- Everything the T813 LineageOS can do + working Vibration + LTE

What does not work:
- Phone audio

So, let's start:

First you have this nice howto for the T813: https://wiki.lineageos.org/devices/gts210vewifi/build which you follow down to and including the "Download the source code" step with two lil modifications:
  • Install the build packages -> I had to "apt-get install python-minimal", too to make it work on Ubuntu 17.10.
  • Initialize the LineageOS source repository -> Well, we don't want LOS 14.1, so the command we use here is:
    Code:
    repo init -u https://github.com/LineageOS/android.git -b staging/lineage-15.1

After you finished the repo sync, which takes AGES on slower internet connections, you really should follow two optional steps below:

Next one is the following lines:
Code:
mkdir -p ./.repo/local_manifests
wget https://www.dropbox.com/s/72cb5jix08y9jkv/envsetup.sh?dl=1 -O ./picks
wget https://www.dropbox.com/s/0fknl8w7zl6buz2/roomservice.xml?dl=1 -O ./.repo/local_manifests/roomservice.xml
chmod +x ./picks

repo sync
This loads the device specific stuff you will need now and prepares a step we need later.

Some useful and badly needed pickings from @LuK1337 are added when you next run this command:
Code:
./picks
Now once you are done:
Code:
. build/envsetup.sh
ALLOW_MISSING_DEPENDENCIES=true brunch gts210velte
In theory we now can go to bed and check for a result in $OUT after it finished build after about 6-10 hours. There waits a nice install ZIP for TWRP in there.
Flash on a T819 with FORMATTED and thus useable /data partition. This can and HAS TO be done in TWRP, too. If the file laments about a wrong bootloader, you should update your tablet to most recent official 7.0 firmware first!

Maybe this is a first start for ppl trying to tinker with T819 and add even more things to it, like Phone audio. At least is was a nice odyssey and the result I got was perfect. Have fun with your track down to the crazy self builders ^^

P.S. If you want GAPPS, load em here: https://sourceforge.net/projects/unofficial-opengapps-8-1/

Wanna update? SURE ^^ But be sure your picks are the most recent above.
Code:
repo forall -c 'git am --abort ; git cherry-pick --abort ; git merge --abort ; git clean -fdx ; git reset --hard' ; repo sync -j30 --force-sync -f
./picks
Code:
. build/envsetup.sh
rm -rf out ; ALLOW_MISSING_DEPENDENCIES=true brunch gts210velte
Hello, new version ^^
 
Last edited:

emuandco

Senior Member
Aug 29, 2009
1,122
495
113
34
Steinfeld
www.dreimer.de
Updates will be added here:

15.01.18:
If you have funny build problems indicating compiler suite problems... Update the platform tools. Fixes some funny problems with newer LOS builds.
And always be sure you have the most recent picks and roomservice.xml

14.01.18:
Still wanna tinker with your own build? I updated the manual making it waay smaller thx to recent changes.

08.01.18:
https://forum.xda-developers.com/tab-s2/orig-development/rom-lineageos-15-1-t3732074
https://forum.xda-developers.com/tab-s2/orig-development/rom-lineageos-15-1-t3732070
Have fun, did go on LuK1337 and others nerves and this is the result. Don't expect a full featured ROM though. Calling is a bit silent when you don't hear ppl and they don't you ^^

25.12.17:
Updated the link to LuK1337's picks to a new one disabling stuff not working on new checkouts anymore. Source is LuK1337 again ^^
Completely removed the after build zip editing by modifying another file and keeping the line uncommented-out in BoardConfig.mk. This way the whole file correctly checks for the CORRECT bootloaders. This way the build.prop file in /system on the device is correct, too.
Added link to unofficial GAPPS for ppl who don't want to tinker inside GAPPS zip files.
Started some tinkering with RIL. Results up to now: ZIP file +30 MB aka LOS has all stuff built needed for telephony. Working? Naaah ^^
 
Last edited:
  • Like
Reactions: RagingHarry

ivanox1972

Senior Member
Sep 26, 2011
2,021
211
133
No need to build it at all. It is enough to just edit installer script. Change gts210wifi to gts20lte and delete assert for BL. It works perfect, I tried, I use it. And of courese to use newset twrp 3.2.
 

emuandco

Senior Member
Aug 29, 2009
1,122
495
113
34
Steinfeld
www.dreimer.de
No need to build it at all. It is enough to just edit installer script. Change gts210wifi to gts20lte and delete assert for BL. It works perfect, I tried, I use it. And of courese to use newset twrp 3.2.
You know that we are talking about the NON Exynos devices, so you? so it is gts210VEwifi.
And even if it does, lucky you. I don't like the idea to use defconfigs for another device on my tablet.

EDIT: Current status regarding RIL... After hours with LuK1337 and his skills and code source juggling... Daemon runs, SIM detected, IMEI detected, network sorta... runs? This means SMS receiving runs and not much more for now. Still investigating.
 
Last edited:
  • Like
Reactions: RagingHarry

ivanox1972

Senior Member
Sep 26, 2011
2,021
211
133
Of courese, I forget ve to write, my lapsus. Otherwise it works perfect. They use same board.
But, if you make RIL there, it diffferent story. Every credit to you, if you need someone to test those builds I am here
 

emuandco

Senior Member
Aug 29, 2009
1,122
495
113
34
Steinfeld
www.dreimer.de
Of courese, I forget ve to write, my lapsus. Otherwise it works perfect. They use same board.
But, if you make RIL there, it diffferent story. Every credit to you, if you need someone to test those builds I am here
Well, I would prefer someone knowing more of that stuff helping me to fix the remaining bugs. I even went down the pipe to try to disassemble the original libril.so but no big results from that... Right now you have all phone stuff included and thus for example can install WhatsApp again + GAPPS install the DialerFramework and Google Dialer. You get IMEI information, Baseband Information, SIM Phone Number Information and you can receive SMS, but no calling, no SMS sending and no data network works for now.

Current logcat: https://hastebin.com/iguvaxagas.xml
 
Last edited:

RagingHarry

Senior Member
Jan 8, 2012
824
326
93
Havelte
Well I've been fiddling all day to get it to work, ubuntu 17.* have been removed from the main ubuntu site, and using the the cdimage.ubuntu locations gave me the install iso's but ended in not properly working install repos of the needed apps.
So went for 16.04 after several attempts, every installs fine, setted everything up according the tutorials in the OP and checking my old info for setting up ubuntu VM (or full pc's) what i did in the past, those where the same since my last succesfull setting up build machines.

but in the end I had to use a "repo sync -f --force-sync" instead of repo sync before ./picks, otherwise it ended up with a ton of errors in running ./picks.
After that that being running good, and finally comming to build I end up after 50 to 60 seconds in
Code:
[44/44] bootstrap /home/ragebuilder/android/lineage/out/soong/.minibootstrap/build.ninja.in
[4/4] /home/ragebuilder/android/lineage/out/soong/.bootstrap/bin/minibp /home/ragebuilder/android/lineage/out/soong/.bootstrap/build.ninja
[862/863] glob vendor/qcom/opensource/interfaces/display/config/1.0/Android.bp
[56/56] /home/ragebuilder/android/lineage/out/soong/.bootstrap/bin/soong_build /home/ragebuilder/android/lineage/out/soong/build.ninja
/home/ragebuilder/android/lineage/out/build-lineage_gts210vewifi.ninja is missing, regenerating...
[527/1117] including ./hardware/qcom/media-caf/msm8952/Android.mk ...
./hardware/qcom/media-caf/msm8952/Android.mk:4: warning: target list is : msm8952
[1117/1117] including ./vendor/samsung/zerofltexx/Android.mk ...
build/core/Makefile:34: warning: overriding commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libgps.utils.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libgps.utils.so'
build/core/Makefile:34: warning: overriding commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libloc_core.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libloc_core.so'
build/core/Makefile:34: warning: overriding commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libloc_eng.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libloc_eng.so'
[ 99% 1585/1586] glob vendor/qcom/opensource/interfaces/*/Android.bp
ninja: error: '/home/ragebuilder/android/lineage/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.internal_intermediates/classes.jack', needed by '/home/ragebuilder/android/lineage/out/target/common/obj/APPS/AdvancedDisplay_intermediates/with-local/classes.dex', missing and no known rule to make it
18:57:35 ninja failed with: exit status 1

#### failed to build some targets (54 seconds) ####
Tried resetting up the build VM now 6 times to find anything I could've done wrong, but cant find any, just end up at the same manner with this error.
Also made sure that Jack is setup properly ( https://forum.xda-developers.com/android/software/aosp-cm-los-how-to-fix-jack-server-t3575179 ) and jack starts and stops, shouldn't that also solve the ninja problem? Soz my last home build was nearly 2 years ago and a lot could have been changed, but normally google is my friend to fix it, not this time..

Has anyone some advice what to look at?
 

ronald_w.

Member
Dec 7, 2010
26
8
0
I have removed in hardware/samsung/AdvancedDisplay/Android.mk the line org.cyanogenmod.platform.internal and the directory /hardware/samsung/AdvancedDisplay/src/com/cyanogenmod/. (LineageOS 15.0)
Build is complete,

[100% 84744/84744] build bacon
Package Complete: /home/ronald/android/system/out/target/product/gts210velte/lineage-15.0-20180106_214317-UNOFFICIAL-gts210velte.zip
make: Verzeichnis „/home/ronald/android/system“ wird verlassen

#### make completed successfully (03:05:39 (hh:mm:ss)) ####
but for me this rom doesn't work properly --> boot stuck with sim card not detected
 
Last edited:
  • Like
Reactions: RagingHarry

RagingHarry

Senior Member
Jan 8, 2012
824
326
93
Havelte
I have removed in hardware/samsung/AdvancedDisplay/Android.mk the line org.cyanogenmod.platform.internal and the directory /hardware/samsung/AdvancedDisplay/src/com/cyanogenmod/. (LineageOS 15.0)
Build is complete,



but for me this rom doesn't work properly --> boot stuck with sim card not detected
That got me just a step furter
14:07:50 Build configuration changed: "" -> "lineage_gts210vewifi-userdebug", forcing installclean
ninja: warning: bad deps log signature or version; starting over
now it is waiting time agian....
But thanx for the tip!!!
 

RagingHarry

Senior Member
Jan 8, 2012
824
326
93
Havelte
I have no clue what you did wrong or why you tinker with LOS 15 with a manual for 15.1, but... check post #2 and load your ROM from there.
That 15.0 was the person I quoted ;) but that step was a test to see if it would hold further, but also then it ended up in errors and a crash of the build.

I did everything with copy pasting from the guide in OP and the linked pages, why it went wrong for me I still don't understand, have been making homebuilds since my Galaxy S2 and always got it to work.

But now you made the new LOS threads I will stick to that for now, and maybe try later again.

Thnx for your efforts and now the Unofficial support start for the T819!
 

emuandco

Senior Member
Aug 29, 2009
1,122
495
113
34
Steinfeld
www.dreimer.de
That 15.0 was the person I quoted ;) but that step was a test to see if it would hold further, but also then it ended up in errors and a crash of the build.

I did everything with copy pasting from the guide in OP and the linked pages, why it went wrong for me I still don't understand, have been making homebuilds since my Galaxy S2 and always got it to work.

But now you made the new LOS threads I will stick to that for now, and maybe try later again.

Thnx for your efforts and now the Unofficial support start for the T819!
Sure, but beware, we have now device repos for gts210velte and gts28velte ^^

So roomservicexml more should look like this now:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="gts210vewifi-dev/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="lineage-15.1" />
  <project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="staging/lineage-15.1" />
  <project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github"  revision="staging/lineage-15.1" />
  <project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-15.0" />
  <project name="gts210vewifi-dev/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-15.1" />
  <project name="gts210vewifi-dev/android_device_samsung_gts210velte" path="device/samsung/gts210velte" remote="github" revision="lineage-15.1" />
  <project name="gts210vewifi-dev/android_device_samsung_gts28velte" path="device/samsung/gts28velte" remote="github" revision="lineage-15.1" />
  <project name="gts210vewifi-dev/android_kernel_samsung_msm8976" path="kernel/samsung/msm8976" remote="github" revision="lineage-15.1" />
  <project name="LineageOS/android_packages_apps_Updater" path="packages/apps/Updater" remote="github" />
</manifest>
And brunch has to be started with that hw id, too:
Code:
ALLOW_MISSING_DEPENDENCIES=true brunch gts210velte
Code:
ALLOW_MISSING_DEPENDENCIES=true brunch gts28velte
Feel free to try it, if it works, tell me. Not much time these days.
 
Last edited:
  • Like
Reactions: RagingHarry

ronald_w.

Member
Dec 7, 2010
26
8
0
Feel free to try it, if it works, tell me. Not much time these days.
[ 90% 83198/92320] Building with Jack: /home/ronald/android/syst...mmon/obj/JAVA_LIBRARIES/services.core_intermediates/classes.jack
FAILED: /home/ronald/android/system/out/target/common/obj/JAVA_LIBRARIES/services.core_intermediates/classes.jack


ERROR: /home/ronald/android/system/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java:260.8: The import org.lineageos.internal.util.ActionUtils cannot be resolved
ERROR: /home/ronald/android/system/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java:2017.17: ActionUtils cannot be resolved
[ 91% 84356/92348] Building with Jack: /home/ronald/android/syst...get/common/obj/APPS/Updater_intermediates/with-local/classes.dex
ninja: build stopped: subcommand failed.
19:24:06 ninja failed with: exit status 1

#### failed to build some targets (02:35:28 (hh:mm:ss)) ####
 
Last edited: