[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] CodeElixir:
​

Warnings:-

/*
* 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 [MENTION=3839575]mikeioannina[/MENTION]. 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 android.hardware.nfc@1.0.so. 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

mikeioannina for provinding fix for sensors.

abhishek987 for his custom magisk.

vovka36 for fp gestures.

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