[OREO][MI5s]Project Treble for capricorn

MZO

Senior Member
Jan 5, 2015
1,883
2,192
0
Hello guys! You know I've been out of development for capricorn for a bit! I've been working on this port for a bit, this is for all xiaomi/msm8996-common devices. Project Treble for our phone is here!

Before anything, let's get into it!

/* *** Disclaimer
* I am not responsible for bricked devices, dead SD cards, thermonuclear war,
* or you getting fired because the alarm app failed. Please do some research
* if you have any concerns about features included in this ROM/KERNEL
* before flashing it! YOU are choosing to make these modifications, and if
* you point your finger at me for messing up your device, I will laugh at you.
* BOOM! goes the dynamite
*/



What is Project Treble:
Project Treble basically partitions your device into two separate partitions, a system and a vendor: system contains your generic system image, while vendor partition has your device specific files required for booting and running your phone. This way we can easily change the system image and be able to run our device on different system images with the same kernel and vendor partition
Read more about Project Treble]

HOW TO:
Download the zip provided here: AndroidFileHost
Extract the zip on your system
Run the script based on your system (sh for linux, bat for windows)
Flash the GSI system image you wish to use

What's Working:
RIL (both SIMs)
Data
Camera
Video
Text
Audio
Bluetooth
Torch
WiFi
Hotspot
Vibrator
Fingerprint
240fps slowmo
GPS
Calls (Mic and Sound)
Camcorder
Fingerprint to wake
Double tap to wake
Display color calibration (KCAL)
Hardware buttons lights

What's NOT Working:
I've tried my best to ensure that everything is working (been testing for about a week)
SELinux status is permissive
Let me know

How to report bugs:
Logcat, a simple description of the bug, kmsg or dmseg depending on the bug

What's Packaged in the zip:
A boot image (kernel)
A vendor image (cust partition)

What's a GSI?
A GSI literally means Generic System Image. It is the a general system image meant for no specific device. Treble enabled devices have the capability to run a GSI. You can find a GSI here: Phh-Treble

Our device's config:
Treble-aonly system image. Our phone only has one system image so it is A-only

Source Code:
Kernel
Vendor blobs
MSM8996-COMMON configuration
capricorn configuration


XDA:DevDB Information
Treble, Tool/Utility for the Xiaomi Mi 5s

Contributors
MZO, LineageOS Maintainers (for Oreo)
Source Code: https://github.com/MZO9400


Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2018-03-12
Current Beta Version: 1.5 Beta
Beta Release Date: 2018-02-28

Created 2018-02-27
Last Updated 2018-03-12
 

MZO

Senior Member
Jan 5, 2015
1,883
2,192
0
Screenshots!

Hey guys, humble request. Please don't bug lineage maintainers over Treble. As our HALs are built for non treble device, and treble requires a different structure of HALs which must connect to system only through hwbinder, I bypassed this right now by putting the system on permissive selinux and removing those policies. But LineageOS doesn't allow that. So unless we get binderized HALs from Xiaomi! Don't complain on Lineage thread. And don't ask them to merge in my changes lol.


As for unofficial guys who want treble. Yes you can use my device and vendor trees on any msm8996-common device (natrium, gemini, capricorn, etc etc) and boot full treble builds on it with ease. Thanks!
 

Attachments

Last edited:

MZO

Senior Member
Jan 5, 2015
1,883
2,192
0
What works on Treble?
Any GSI
My AOSiP builds (since I build vendor images on that build)
Any builds using my source code. (yes their system.img will work)

Why doesn't MIUI work on Treble?
Because it wasn't shipped on a treble enabled device

Will custom kernels work on Treble?
Yes, as long as they are updated with source code on my github

LineageOS? No it won't work, explained in the post above.

How does Treble affect custom ROMs?
Peeps over XDA portal summed it up perfectly: Read here

How to fix Google Camera FC?
Flash PHH-TREBLE Vanilla build (latest)
Flash GApps zip
//Currently build with su and gapps causes gcam crash//

GApps won't flash? Not enough space in system
Flash this zip https://goo.gl/MSbGK5
 
Last edited:

BajinganTengik

Senior Member
Jan 12, 2017
232
87
28
What works on Treble?
Any GSI
My AOSiP builds (since I build vendor images on that build)
Any builds using my source code. (yes their system.img will work)

Why doesn't MIUI work on Treble?
Because it wasn't shipped on a treble enabled device

Will custom kernels work on Treble?
Yes, as long as they are updated with source code on my github

LineageOS? No it won't work, explained in the post above.

How does Treble affect custom ROMs?
Peeps over XDA portal summed it up perfectly: Read here
Did you build AOSiP for Mi5s? Where can i get it? I look at your AFH folder and found nothing.
 

Dark Stranger

Senior Member
Apr 20, 2008
318
68
28
You can extract the zip and flash .img files through TWRP. But I wouldn't recommend.
Then clarify some things.
I just need to run the script contained in the file to have the basic system or need to install anything else?
And then flash the system GSI image?
I am currently using the Lineage 15.1 rom, is there any problem in running this script on top of it ??
 

_m4yd4y_

Member
Sep 2, 2017
35
6
0
Moscow
Nice.
Faster ROM than LOS. IMHO.
But I have a bug to ask the manufacturer. But it does not affect the further functioning. Also I need a double tap to sleep, because I have problems with the power button. And also the point of swap buttons is necessary for me.
Standart apps are very ugly eg music and SMS.
My phone have strange name.
In connection with these problems, I will return to LOS.
It would be good if smb told me where I can find some information how I can change img system as I want...
Thank you for work.
 
Last edited:

MZO

Senior Member
Jan 5, 2015
1,883
2,192
0
Then clarify some things.
I just need to run the script contained in the file to have the basic system or need to install anything else?
And then flash the system GSI image?
I am currently using the Lineage 15.1 rom, is there any problem in running this script on top of it ??
You're correct. You can flash the script but not sure if it will boot.