[Xiaomi Mi 4i] Shrukul:
LineageOS is a free, community built, aftermarket firmware distribution of Android 8.0 (Oreo), which is designed to increase performance and reliability over stock Android for your device.

LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

What's working :

Boots

RIL (Calls, SMS, Data)

Wifi

Bluetooth

Camera

Video Playback

Audio ( Record and Playback )

Sensors

Flash

Led

GPS

Video recording

Hardware Buttons

What's not working :

Hotspot

SELinux is permissive

Workarounds for battery drain, lag and heat (optional):

Install Kernel Auditor and go to cpu tab and set cpu governor to interactive for both cluster and go to io sched tab and set io scheduler to bfq.

Instructions :

Download the latest build and gapps

You need to be on firmware 8.1.5.0. If you're not, download the firmware from the downloads section.

Reboot to recovery

Flash the latest build and gapps

Reboot

Downloads :

Builds : https://www.androidfilehost.com/?w=files&flid=214784

Google Apps : https://androidfilehost.com/?fid=745425885120760217

8.1.5.0 Firmware : https://basketbuild.com/filedl/devs?dev=thewisenerd&dl=thewisenerd/ferrari/firmware-lp-8.1.5.0.zip (thanks to thewisenerd)

Reporting Bugs

DO NOT Report bugs if you're running a custom kernel or you installed Xposed

Grab a logcat right after the problem has occurred. (Please include at least a few pages of the log, not just the last few lines, unless you know what you're doing.)

If it is a random reboot, grab /sys/fs/pstore/console-ramoops. (Do not bother getting a logcat unless you can get it just before the reboot. A logcat after a reboot is useless)

If the problem disappears after running "setenforce 0" from a root shell, grab /data/misc/audit/audit.log

Remember to provide as much info as possible. The more info you provide, the more likely that the bug will be solved. Please also do not report known issues. Any bug not reported in the bug report format below may be ignored.

What is your--
Phone model:
Lineage version:
Lineaage Download url:
Gapps version:

Did you--
wipe:
restore with titanium backup:
reboot after having the issue:

Are you using--
a task killer:
a non-stock kernel:
CMSettings/Performance settings (other than stock):
other modifications:

Provide any additional information (observations/frequency of problem/last version it worked on/etc) as needed:

Source :

Device Tree: https://github.com/shrukul/android_device_xiaomi_ferrari

Common Tree: https://github.com/shrukul/android_device_cyanogen_msm8916-common

Vendor Tree: https://github.com/shrukul/proprietary_vendor_xiaomi

Kernel: https://github.com/shrukul/android_kernel_xiaomi_ferrari

Credits :

[MENTION=4869275]thewisenerd[/MENTION]

[MENTION=5689422]faizauthar12[/MENTION]

[MENTION=5012305]ƒεηιx[/MENTION]

[MENTION=7009240]Nihhaar[/MENTION]

Xiaomi: For providing the Kernel Source Code

Lineage Team

XDA:DevDB Information

LineageOS 15 for Xiaomi Mi 4i

Contributors

Shrukul

ROM OS Version: 7.x Nougat

ROM Kernel: Linux 3.10.x

ROM Firmware Required: 8.1.5.0

Based On: LineageOS

Version Information

Status: Stable

Current Stable Version: 1

Stable Release Date: 2017-09-12

Created 2017-09-12

Last Updated 2017-09-12