FORUMS

[REFERENCE] LineageOS with full Substratum support - Closed until Oreo

13,739 posts
Thanks Meter: 50,822
 
By nathanchance, Recognized Developer / Recognized Contributor on 28th March 2017, 08:24 AM
Thread Closed Email Thread
Introduction

Hello everyone! I am one of the members of the Substratum team and we constantly have people asking how to add support to ROMs. I have made a repo regarding all of our documentation here, in which I include steps to add support. Normally, it is easy to add support to most ROMs; however, Lineage has made some underlying changes to AssetManager and PackageManager that makes adding the patches a little difficult if you do not have some solid programming background. To help people who are familiar with building and git but not necessarily Java and C, I have created a series of reference repos that you can use to cherry pick the commits into your forks or local builds to easily have theme support! Please read this entire thread, I go over a lot of info and I will be upset if you do not read it all enjoy!

Information

Substratum currently uses OMS (Overlay Manager Service), Sony's theming framework, that allows for real time swapping of resources via overlays. This is accomplished through a series of commits, which include the core OMS framework, exposures so themes can overlay hardcoded resources, and a second set of framework commits to allow Substratum to do all of its operations without root access. You can read more about this in the main Substratum thread. We have made it so that it is easy to merge OMS and all of our exposures on AOSP or close to AOSP ROMs. Lineage is not one of those ROMs as they have based on CAF, which modifies AOSP to suit a large range of devices. Lineage has also modified core components like Package Manager for security reasons and some of those changes will conflict with OMS changes. I have merged the changes on top of Lineage and verified everything has worked properly. I will continue to maintain this as long as time permits. I plan to try and rebase the changes every day on Lineage updates but I may need to do it weekly depending on how much free time I have.

What do I have to do?

All you need to do is merge the changes from our repos into yours! Link: https://github.com/LineageOMS

This can be done in one of four ways (ONLY ONE):

1. Cherry-pick our changes

This will be the best option if you have forked Lineage and made any changes (basically basing a ROM on Lineage). Once you have merged these changes, you can track our progress on Gerrit and merge patches as they come down. The patches you need to pick will be either "committed with nathanchance" or "nathanchance committed".

Code:
git fetch <url> cm-14.1
git cherry-pick <first_sha1>^..<second_sha1>
Example:
Code:
git fetch https://github.com/LineageOMS/android_frameworks_base cm-14.1
git cherry-pick d6b3f93bec61769fab7ebf31e78bf0acb42bb2e6^..1e00bba63c5b6facec5a8beef1bb39863b251183
2. Pull our changes

This will be a good option if you have either forked Lineage and made no changes or do straight builds from their repos, as this will fetch and merge automatically. You can still cherry-pick if you want but this should result in no conflicts (basically a clean merge).

Code:
git pull <url> cm-14.1
Example:
Code:
git pull https://github.com/LineageOMS/android_frameworks_base cm-14.1
3. Sync using our manifest

This is good if you are just building straight from Lineage's sources. The one issue with this is you will be fully reliant on me for updates; Lineage often merges patches across a few repos and you may run into errors if ALL repos are not up to date.

From the top of your Lineage repo folder:
Code:
mkdir LineageOMS && cd LineageOMS
repo init -u https://github.com/LineageOMS/android -b cm-14.1 --no-clone-bundle --depth=1
repo sync -j$( nproc --all ) --force-sync -c --no-clone-bundle --no-tags --optimized-fetch --prune

4. Use the provided local manifest

This is good if you are just building straight from Lineage's sources. As with the above option, you MAY run into errors if a patch is merged across several repos and I have not update my repos with the proper changes.

From the top of your Lineage repo folder:
Code:
cd .repo
mkdir -p local_manifests
cd local_manifests
wget https://raw.githubusercontent.com/LineageOMS/local_manifest/master/substratum.xml
cd ../..
repo sync --force-sync

4. Use the provided local manifest

I would only recommend doing this if you are building straight from Lineage's sources and willing to build only when I rebase my changes. Lineage often merges patches across several repos and without every repo being up to date, you may get build errors.

From the top of your Lineage repo folder:
Code:
cd .repo
mkdir -p local_manifests
cd local_manifests
wget https://raw.githubusercontent.com/LineageOMS/local_manifest/master/substratum.xml
cd ../..
repo sync --force-sync
That's it! Super easy as it should be.

Support

If you run into any issues with merging patches, ask in this thread.

If you PM me on XDA... I will ignore you.
If you PM me on Hangouts... I will ignore you.
If you PM me on Telegram... I will ignore you.

See a pattern? This thread is the place for support, nowhere else.

If you run into issues with using Substratum itself, ask in the main thread.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20170328-004553.png
Views:	22668
Size:	209.2 KB
ID:	4091632   Click image for larger version

Name:	Screenshot_20170328-004618.png
Views:	22066
Size:	157.4 KB
ID:	4091633   Click image for larger version

Name:	Screenshot_20170328-004601.png
Views:	21542
Size:	132.8 KB
ID:	4091634   Click image for larger version

Name:	Screenshot_20170328-004608.png
Views:	18550
Size:	133.1 KB
ID:	4091635  
The Following 97 Users Say Thank You to nathanchance For This Useful Post: [ View ]
28th March 2017, 09:42 AM |#5  
Senior Member
Shanghai
Thanks Meter: 60
 
More
This is great!
28th March 2017, 09:42 AM |#6  
Okeys's Avatar
Senior Member
Flag Moscow
Thanks Meter: 533
 
Donate to Me
More
Wow, great
28th March 2017, 11:03 AM |#7  
wingedpanther's Avatar
Senior Member
Flag Kerala(Home)//Riyadh(Present)
Thanks Meter: 387
 
More
Awesome!
28th March 2017, 02:22 PM |#8  
Senior Member
Shanghai
Thanks Meter: 60
 
More
Awesome, build successfully. Thx.

Finding beautiful themes now.

通过我的 Mi 5s Plus 上的 Tapatalk发言
29th March 2017, 06:56 AM |#10  
nareshnani142's Avatar
Member
Thanks Meter: 2
 
More

Is it possible to do for this build. Can anyone HELP me with video tutorial plz..

---------- Post added at 06:56 AM ---------- Previous post was at 06:41 AM ----------

Quote:
Originally Posted by akhilnarang

Great!

Iam using HTC desire 816.i have flash this build cm14.1-20161120-unofficial-a5dwg can u plz help me to how to do this.
29th March 2017, 07:15 AM |#11  
Sachin ET's Avatar
Senior Member
Thanks Meter: 52
 
More
actually i didn't understand......can anyone explain it in simple words.......am not a tech guy, am just a beginner in this world of custom ROM.
Thread Closed Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes