• If you are experiencing issues logging in, we moved to a new and more secure software and older account passwords were not able to be migrated. We recommend trying to reset your password, then contacting us if there are issues.
  • Nearly done! Migration cleanup is mostly done. There are a small number of issues left that we continue to work on, but all the heavy lifting is done. We still would love to hear feedback over at this thread and also check out the new XDA app! Thanks and we hope you enjoy the new forums, and thanks for your support of XDA <3

[ROM][TREBLE][8.1][03/06/2018]RESURRECTION REMIX v6.0-UNOFFICIAL FOR LENOVO P2

CodeElixir

Senior Member
Jul 11, 2016
99
711
0
Hyderabad

Warnings:-
Code:
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards, dead cats,
 * thermonuclear war, or you getting fired because the alarm app failed.  
 * YOU are choosing to make these modifications, and no point
 * in pointing the finger at me for messing up your device
 */
Resurrection Remix the ROM has been based on CM,slim.omni and original Remix ROM builds, this creates an awesome combination of performance, customization, power and the most new features, brought directly to your Device
Many things that in previous versions were tweaked with mods, are now included by default in the ROM so, please enjoy!

Special thanks to, the CM team,OMNI team ,SLIMROMS and of course to all the supporters.

BRIEF INRODUCTION
I started working on treble for almost about a month, after developing beta builds of Lineage OS. At the initial development, I keep developing those builds in the view of project treble, using latest blobs from other devices, move HAL's to /system/vendor(no /vendor at that time), binderize everything etc. Those experiments arose some issues and I managed to fix few issues and few are left. I dont think I know everything, but its quite challenging as it is my first development on qcom. I am constantly learning by doing.

USING /PRELOAD AS /VENDOR?
Initially, I thought of using preload partition as /vendor and it was only 400M. I thought it wouldn't be sufficient. There was about 50M unallocated space after /preload. We can append 50M to preload to increase its size. I started looking the size of vendor image from other devices. I noticed that vendor images of some devices was less than 400M. So 400M would work if I remove some unused 32 and 64 bit blobs. I cleaned up some useless blobs and build twrp. It was successful:)

EXISTING ISSUES
After having a seperate /vendor, I changed everything to /vendor from /system/vendor. Haxxx blobs using sed to solve dependencies and added VNDK-SP HALS. I got stuck at two major issues, NFC and sensors. I noticed that mike started working on official lineage build. I got a fix for sensor service. Thanks to @mikeioannina. Regarding NFC, I have used Stock HAL in my previous builds as passthrough HAL. OSS HAL is not working for some unknown issue(need to look at it later). NFC is not working after treble is implemented. I noticed that the stock HAL depends on libhardware_legacy.so and [email protected]. And those are expected to be present at /vendor in sphal namespace(as dynamic linker search at /vendor in sphal namespace). I added those two to EXTRA_VENDOR_LIBRARIES so that they will be shipped to /vendor. NFC is working now. But the problem is that the HAL load nfc configs from /system. I guess we cant haxx using as sed only work for the same size of string replacement. Replacing /etc with /vendor/etc will cause issues as address references will shift. I flashed phhusson GSI(Vanilla without Gapps) and it worked fine. Altogether current issues are

1. NFC HAL loads configs from /system.
2. Versioned VNDK using BOARD_VNDK_VERSION := current is not yet implemented. That means framework and vendor is not strictly isolated. Enabling the flag in BoardConfig enables the full VNDK support and restricts global headers. Android Oreo not strictly enforces isolation between /vendor and framework. This is strictly enforced in Android P and above. Vendor HAL dependencies on framework must be resolved.
3. Selinux is still in permissive mode.

INSTALLATION INSTRUCTIONS
  • Make a BACKUP of current /boot, /data and /system partition first partition using TWRP.
  • Flash the treble enabled TWRP located here.
  • Do a factory reset (wipe /data , /system, /vendor and /cache).
  • Flash the ROM.
  • Flash the Gapps.
  • Flash the custom magisk
  • NFC configuration files requires if any GSI is flashed.

Note : It is highly recommended to clean flash the ROM(Wipe /data, /system, /vendor /cache)

INSTALLATION FILES
RESURRECTION REMIX - BETA v1

CREDITS

Donations:
Help Supporting me. Any donations are highly appreciated.


Donate via PayTM



Sources:
Resurrection Remix
Kernel

XDA:DevDB Information
RESSURECTION REMIX-TREBLE, ROM for the Lenovo P2

Contributors
CodeElixir
ROM OS Version: 8.x Oreo
ROM Kernel: Linux 3.x
Based On: Lineage

Version Information
Status: Beta
Beta Release Date: 2018-06-03

Created 2018-06-03
Last Updated 2018-06-03
 

Attachments

Last edited:

venu44

Senior Member
Nov 6, 2017
197
33
0
Chennai
No need to be rude.

And... let's get started with the stupid q what's treble and if any advantages, just search google!
Just a question. I ve heard of treble and I knw how it works for mainstream devices. I just dont understand how its being implemented in custom roms. If u cant give a proper answeru should just ignore and move on.
 
  • Like
Reactions: j.jeedz

Hnk1

Elite Member
Dec 23, 2012
1,463
1,542
0
Newcastle Upon Tyne
What works:
Hi mate
Great work. Hats off to you. This is great mate especially your explanation in the beginning, this is simply great news. I congratulate you for being the first to release treble for kuntao publicly.

I have heard firelord was working on treble as well but I'm not sure how much work has been done as I don't know his GitHub . Maybe that can result in some improvements??

For who aren't sure what this means : treble Or simply treble is a way of arranging blobs (which are responsible for camera , sensors etc) separately from system. Thus when you need to update to New version of Android, you need to work from scratch. That means you need to import blobs and make changes again in blobs to be compatible with newer Android version. Also you need to update Android system version as well. Thus it delays development.
Treble works by separating these two so once a fully functional blobs are made, you never need to update blobs again and only need to update system as blobs will be compatible with all new version of Android
Thus faster updates and better camera quality like stock rom if treble implementation is from vendor already.

This means we can have treble for all Oreo ROMs but for Android Phone we need some more work to have a fully working treble because Oreo doesn't have very clear sense of separating blobs and system but it gives concept and works on enforcing it in Android P. Thus, for fully functional treble , we need to address the issues by development community to completely separate blobs.

First to comment. I have a question. can someone explain whats the purpose of treble and why is there a custom twrp for it.
Get a lollipop. Grow up mate ! Already explained above. Discussion should be to the point and being first to post isn't an achievement unless you have something important to tell us.

Sounds like a fantastic project. Thanks very much.
Treble???? Superrr....thanks bro
 
Last edited:

venu44

Senior Member
Nov 6, 2017
197
33
0
Chennai
Hi mate
Great work. Hats off to you. This is great mate especially your explanation in the beginning, this is simply great news. I congratulate you for being the first to release treble for kuntao publicly.

I have heard firelord was working on treble as well but I'm not sure how much work has been done as I don't know his GitHub . Maybe that can result in some improvements??

For who aren't sure what this means : treble Or simply treble is a way of arranging blobs (which are responsible for camera , sensors etc) separately from system. Thus when you need to update to New version of Android, you need to work from scratch. That means you need to import blobs and make changes again in blobs to be compatible with newer Android version. Also you need to update Android system version as well. Thus it delays development.
Treble works by separating these two so once a fully functional blobs are made, you never need to update blobs again and only need to update system as blobs will be compatible with all new version of Android
Thus faster updates and better camera quality like stock rom if treble implementation is from vendor already.

This means we can have treble for all Oreo ROMs but for Android Phone we need some more work to have a fully working treble because Oreo doesn't have very clear sense of separating blobs and system but it gives concept and works on enforcing it in Android P. Thus, for fully functional treble , we need to address the issues by development community to completely separate blobs.


Get a lollipop. Grow up mate ! Already explained above. Discussion should be to the point and being first to post isn't an achievement unless you have something important to tell us.
Sorry if I ve offended someone. I hope its cool and I was just excited. I ve done a lot of researching and even this explanation helps a lot. Thanks guys. Sorry again.:(
 
  • Like
Reactions: Hnk1

manikantamahi

Member
Sep 8, 2017
20
7
0
I have a small doubt can flash the treble twrp Kuntao as the same way as normal twrp flashing form ADB and fastboot terminal and this treble enabled twrp can be used for flashing other ROMs
Great work by the developer :) thanks for p2 support:good: TQ very much
 

tanzeel.ahmed1306

Senior Member
Jan 16, 2015
363
71
0
I tried to understand the issues but couldn't understand them completely. And wanted to know suppose this issues get resolved now..and when new Android version comes.. then the developer only needs to compile that with the blobs(sensors n all) ..that's it? that's what project treble is about? Sounds really exciting. I would like someone to make video about it ...would be great ...
Great work CodeElixir ........hope you resolve issues ..Thanks for the hardwork !
 
  • Like
Reactions: aggarwaltuahar36