[OFFICIAL][X82X][10.x][TREBLE] LineageOS 17.1 (Android 10) for LeEco Le Max 2

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
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 restores 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 our Gerrit Code Review.

Code:
#include
/*
* Your warranty is now void.
*
* 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
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

SUPPORTED DEVICES
- LEX820 (X2_CN)
- LEX821 (X2_WW)
- LEX822 (X2_CN)
- LEX829 (X2_NA)
- LEX910 (MAX_PLUS. Currently only supported on unofficial test builds)

HOW TO INSTALL LINEAGEOS WITH LINEAGE RECOVERY
- Make sure your phone is running firmware from at least 466d for x2 and pseudo 466d for max_plus. If not? Please either the minimum recommended version below (or optional updated versions) and install it via Lineage Recovery. It can be flashed before or after the ROM
Please follow the official LineageOS Wiki instructions for our device
https://wiki.lineageos.org/devices/x2/install


HOW TO INSTALL LINEAGEOS WITH TWRP
- Make sure your phone is running firmware from at least 466d for x2 and pseudo 466d for max_plus. If not? Please either the minimum recommended version below (or optional updated versions) and install it via TWRP. It can be flashed before or after the ROM
- Unlock bootloader and install TWRP 3.5.0-0 (designed for Pie and above and for treble) or higher. TWRP instructions are here.
- Download the LineageOS and firmware zips. (see Downloads)
- Boot into TWRP.
- Copy the downloaded zip files to internal sdcard.
- Perform a backup of your current ROM. (Optional)
- RECOMMENDED: Do a factory reset (clean wipe)! No support if you didn't! (Wipe Dalvik, system, cache and data)
- Flash firmware and LineageOS zips.
- Optional: Install the Google Apps addon package. (see Downloads)
- Reboot to system.

HOW TO UPGRADE LINEAGEOS FROM 16.0
Please follow the official LineageOS Wiki instructions for our device. You can use either TWRP or Lineage Recovery.
https://wiki.lineageos.org/devices/x2/upgrade

HOW TO UPDATE LINEAGEOS WITH LINEAGE RECOVERY
Please follow the official LineageOS Wiki instructions for our device
https://wiki.lineageos.org/devices/x2/upgrade

HOW TO UPDATE LINEAGEOS WITH TWRP
- Download the LineageOS zip(s). (see Downloads)
- Copy the LineageOS zip to internal sdcard.
- Reboot to TWRP.
- Flash LineageOS. (Wiping Dalvik and Cache is optional, but recommended)
- Reboot to system.


MAIN DOWNLOADS
Lineage Recovery for x2:
- Official https://download.lineageos.org/x2
- Unofficial https://osdn.net/projects/lineageos-for-x2/releases/p16588

TWRP for x2: Official https://twrp.me/leeco/leecolemax2.html
TWRP for max_plus: Official https://twrp.me/leeco/leecolemaxpro.html

Lineage:
- Official: https://download.lineageos.org/x2
- Unofficial 17.1: https://osdn.net/projects/lineageos-for-x2/releases/p16562
- Unofficial 17.0: https://osdn.net/projects/lineageos-for-x2/releases/p16488


GOOGLE APPS (GAPPS) DOWNLOADS
- Open GApps:
Please note! Open GApps ARM64 Pico and Nano are the only recommended ones.
Official: https://opengapps.org/


GOOGLE CAMERA (GCAM) DOWNLOADS
Google Camera:
https://www.celsoazevedo.com/files/android/google-camera/f/changelog1075/
Enable "Fix tint on front camera" and set it to "Fix green tint." Found inside Settings > Advanced > Experimental settings.


MISC DOWNLOADS
ThE_MarD's LineageOS for x2 Sourceforge, directory: (also contains some mods and tweaks) https://sourceforge.net/projects/lineageos-for-x2/


FIRMWARE DOWNLOADS
Minimum required versions:
- LEX820 (X2_CN) 466D
- LEX821 (X2_WW) 466D
- LEX829 (X2_NA) 466D
- LEX910 (MAX_PLUS) 13s

Link for x2 firmware: https://sourceforge.net/projects/lineageos-for-x2/files/Firmware Updates/
Link for max_plus firmware: https://sourceforge.net/projects/lineageos-for-max-plus/files/firmware/


DEVELOPER RESOURCES
https://github.com/lineage-x2-devs
https://github.com/LineageOsMaxPlus/
https://github.com/lineageos/android_device_leeco_msm8996-common
https://github.com/lineageos/android_device_leeco_x2
https://github.com/lineageos/android_kernel_leeco_msm8996


HOW TO CONTRIBUTE?
Send your patches up for review: https://review.lineageos.org/
Read the guides on the LineageOS Wiki: https://wiki.lineageos.org/

XDA:DevDB Information
[OFFICIAL][X82X][10.x][TREBLE] LineageOS 17.1 (Android 10) for LeEco Le Max 2, ROM for the LeEco Le Max 2

Contributors
ThE_MarD, mosimchah, Lucchetto00, codeworkx,moto999999,1nfrag,shivatejapeddi,KuranKaname,GalaticStryder,andr68rus,Tortel1210,visionary,zhaoguomanong
Source Code: https://github.com/LineageOS

ROM OS Version: Android 10
ROM Kernel: Linux 3.x
ROM Firmware Required: X820, X821, X822 and x829 466d. x910 13s.
Based On: AOSP

Version Information
Status:
Nightly

Created 2019-11-16
Last Updated 2020-09-15
 
Last edited:

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
Reserved

Frequently Asked Questions

  • I've been asked to provide logcat, how do I do that?
    You can either root and use an app like MatLog, or if boot logcat is required? You will need adb logcat from a PC. Here's a simple guide from the LineageOS Wiki https://wiki.lineageos.org/logcat.html
  • My lock screen crashes after reboot, what should I do to fix it?
    https://forum.xda-developers.com/le-max-2/how-to/guide-to-fixing-x2-lockscreen-crash-t3918911
  • I don't see an option for call recording, what's going on?
    Only the stock dialer app supports it. If you install a Gapps package that overwrites the stock dialer app? It won't have call recording as well. Only the included dialer app of LineageOS is compatible to call recording since it needs to be a ROM implementation and I haven't seen a Play store app that adds support for custom ROM call recording. Please also note that call recording is blocked for countries and carriers that have laws against any form of call recording.
  • What is Power-off Alarm?
    This feature allows you to set an alarm clock with the stock clock app included with LineageOS and then turn off the phone, and it will boot up a minute before the designated alarm time and then properly alarm. It works with the device either powered off and also offline charging. :)
    Using a clock app from OpenGapps Stock or from the Play store is not compatible with custom ROM implementations of power-off alarm... So consider this your heads up if you didn't know that already... As I am not responsible for anyone being late for their wedding/work/school/vacation if you tried a non-stock clock app with your LeEco msm8996 device powered off. :silly:
  • What apps are recommended with the Open Source ConsumerIR?
    Zaza Remote (only with selinux enforcing) and Mi Remote work great. Smart Remote for Sharp TV also works. I'd recommend avoiding Peel Universal Smart Remote as it hijacks the lock screen with ads...
  • Pls sir, I can't connect to my network or IMS/VoLTE doesn't work! What can I try?
    Please look below at the "APNS Update from Google" section and try that. I can't offer much else for help sorry as I have zero experience with IMS/VoLTE as Canada blacklists BYOD from that feature... Otherwise, if you need extra help? Hopefully, someone else in the x2 community can give you advice.
  • What is the difference between the official LineageOS builds and unofficial?
    Unofficial test builds are builds I put out to test changes before I push them to the Official builds... So please stick with Official builds if you want to play it safe... But if you wish to help test and provide feedback on changes before they go official? Unofficial test builds are the best way to do so.
  • Where is the QuickCharge toggle?
    Settings > System > Advanced > LeEco Settings
  • The rear-facing camera won't focus, what should I try?
    Please go into Settings > System > Advanced > LeEco Settings, and then enable the focus fix. You may need to restart any open camera app or potentially reboot the system in order for the focus fix values to work... If that doesn't resolve it? Please try EUI ROM... If it still won't focus? I'm sorry, but your hardware camera actuator is defective and you either need to try the Le Max 2 rear camera magnet trick (please Google it) or replace the rear camera hardware.
  • Why is our Widevine level only L3?
    Unfortunately, Widevine L1 failed to work correctly on X2 and zl1/0... It would report we have L1 hardware support but vp9.secure and avc.secure codecs were failing to render, thus apps that used L1 like Amazon Prime would error out and revert to L3 and worst-case scenario apps like Vudu would crash.
    I haven't seen any fixes for those codec issues, so I gave up on it as L3 works fine.
    Also, Netflix HD will never work on LeEco devices as they never got them "Netflix certified" which sounds like a money-grab move since L1 is all they should need. For example, Asus Zenfone 5z is L1 certified but not "Netflix certified" just like we are and they don't get the option to stream in HD.
    This explains it a lot better
    https://androidpcreview.com/netflix-hd-android-tv-box/
  • My device doesn't show any apps in the Play Store what should I do?
    https://lineageos.org/Google-Play-Certification/
  • exfat does not work on LineageOS, what is up with that?
    LeEco Le Max 2 does not ship with exFAT licensing so we are not allowed to incorporate it in LineageOS Le Max 2 builds. This was tested by both CrisBalGreece and I. If by chance there is an OFFICIAL EUI ROM build that includes exfat? Please let me know so I can test it as well... Here are the LineageOS device charter requirements on exfat
    https://github.com/LineageOS/charter/blob/master/device-support-requirements.md#exfat-support

KNOWN BUGS for x2 and max_plus
  • WiFi randomly disconnects when the device is asleep
  • Lockscreen may sometimes fail to unlock after a reboot (seems to mainly happen when the battery is low and power-saving mode is on. The workaround is to reboot again and it will unlock. Please note, this is NOT related to the lock screen crash bug where it always fails to unlock due to the encryption footer getting corrupted by an old beta build of TWRP. The fix for that is still in the lock screen crash fix thread I have linked up in the FAQ.)
  • There is random performance hangs where apps may not be responsive for a few seconds (Android 10 issue???)
  • Updating using the built-in LineageOS updater with TWRP as your recovery when encrypted causes Google Play Services to crash repeatedly (Lineage Recovery works without issue or updating manually via TWRP is fine though)
  • Microphone and button on 3.5mm headsets using the 3.5mm to Type-C adaptor only works with reversed orientation (IE, official LeEco adaptor with the logo facing downwards)
  • Dual-role USB does not work (our Type-C port can't detect if it should offer the option to host data transfer, charge the other device, or charge while using Aux out).
  • Taking a photo during 4K UHD video recording produces a photo with green static instead of a photo. This bug only happens in Snap camera... Google Camera Mod and Open Camera (with Camera API v2 enabled) produces pictures without issue.
  • Infinity focus not working (for panoramas, AR and some QR code scanners. Infinity focus also doesn't work in EUI ROM hmm... oddly enough some imx230_lg modules infinity focus can work if you don't need focus fix... so I blame LeEco for the messed up camera haxxs they did since s2 and zl1 have the same issues.)

KNOWN BUGS for max_plus
  • ES9018 Hi-Fi Audio DAC for 3.5mm headsets to Type-C adaptors does not work (this is the bug that is preventing official unified builds of LineageOS of x2 and max_plus...)
  • Fingerprint does not work when the device is asleep (this is due to the ancient device firmware on max_plus being officially stuck on 13s... there is a pseudo 466d modem firmware fix attempt I made but have not received feedback on yet)
  • Boot animation does not work unless you tap the power button twice to turn the display off and on again (this is due to a fix for screen tearing... maybe one day I'll figure out a fix for boot animation to work with the screen tearing fix)
  • When launching a camera app, viewfinder goes green for a second and then works normally
  • After using the USB port with Type-C headset or OTG with a flash drive, the device cannot charge until a reboot is performed (known bug even on EUI ROM)

APNs Update from Google
Latest update: 2020-05-04 (May 4, 2020)

This is an optional update if the current APN settings from LineageOS might not be up to date for your carrier and you need newer ones. This is the official APNs list from Google.

After flashing it? Please reboot to system and then go into Settings > Network & Internet > Mobile Internet > Advanced > Access Point Names > "..." menu button > reset to default.

https://sourceforge.net/projects/lineageos-for-x2/files/Mods and Tweaks/APNs Update from Google/

The official Google source git for this file can be found here:
https://android.googlesource.com/device/sample/+/refs/heads/master/etc/apns-full-conf.xml

Please note! This APNs list WILL get overwritten by the ROM on any ROM update and will need to be reinstalled.
 
Last edited:

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
Reserved

Special Thanks
@codeworkx for his major contributions to the LeEco msm8996-common code and kernel and the awesome open-source camera HAL
@mosimchah for his contributions to the LeEco msm8996-common code and kernel
@moto999999 for helping the x2 get LAOS 15.1 working. When others left LAOS he helped get the momentum started again.
@infrag for his contributions to x2 such as the multiple audio fixes, LEDs and sorting out the open-source camera HAL blobs and assisting with QS Torch
@shivatejapeddi for his contributions to x2 such as finding the fix for QS Torch and the regularly requested VoLTE support XD
@KuranKaname for his contributions to x2 such as helping get Dalvik VM and HWUI sorted out when 14.1 settings didn't work on 15.1, plus his never-ending mission to finding the most optimized code.
@Tortel1210 for his contributions to x2 and helping out with gerrit.
@andr68rus for everything he has contributed to x2. He may have moved to the Xiaomi Mi Mix 2 (sexy device!) but will be fondly remembered for everything he did for the x2 to make Nougat great. We will finish what you started.
@GalaticStryder for his fix for truly display panel that is better than my fix and his other awesome kernel improvements.
ViSi0Naryy for his contributions to LeEco msm9996-common with testing and contributions with Gerrit
@jabashque for helping fine-tune the performance for LeEco msm8996-common devices! LeEco has never been so smooth! ;)
@Lucchetto00 for converting Tortel's devicesettings into LeEco settings and adding QC toggle, plus his method of detecting if a setting exists and whether to display it or not. He also did the initial bring up for x2 on Q so super special thanks on that too!
@DD3Boh for helping with msm8996 in general and also for helping out us LeEco devs
cristiansilaghi (no idea if he has XDA as he communicates with me on Telegram) for helping diagnose the battery percentage issues and finding some extra commits to help make it as accurate as possible and a selinux fix for offline charging animation.

...and finally the community. This is for the community, by the community. Give yourselves a pat on the back.

If I missed anyone? Please let me know and I can add them.


Donations
DonMomente (not sure if he's on XDA forums or not) for his very generous donation. Thank you and your family too! :)
@popeye13 for helping cover my replacement motherboard costs
@Bollex for also helping cover my replacement motherboard costs
@kurtn for also also helping cover my replacement motherboard costs
@xlcashlx for also also also helping cover my replacement motherboard costs
Robin Vd Berg since I'm unsure on username for also also also also helping cover my replacement motherboard costs
 
Last edited:

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
Donations
DonMomente (not sure if he's on XDA forums or not) for his very generous donation. Thank you and your family too! :)

@popeye13 for helping cover my replacement motherboard costs
@Bollex for also helping cover my replacement motherboard costs
@kurtn for also also helping cover my replacement motherboard costs
@xlcashlx for also also also helping cover my replacement motherboard costs
@rberg (Robin Vd Berg since I'm unsure on username) for also also also also helping cover my replacement motherboard costs
@CrisBalGreece for his donation
@erwan574 for his donation
@txekalzen for his donation

I did receive some donations from individuals that wish to remain anonymous, so you know who you are and thank you fine LeEco community members too

(If I got your XDA forum usernames wrong please let me know)
 
Last edited:

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
Heyyo @Neutralite, thanks for the kind words. I do what I can, but for Android 10 special thanks definitely goes to @Lucchetto00 and @moshimchah for doing the initial bring up for x2 and zl1/0. I merely added onto the work they have already done and other msm8996 devs such as dd3boh on Zuk Z2 Plus and dianlujitao for the OnePlus 3 and Bruno Martins and LuK1337 on Xiaomi. :good:

Also, I fixed vulkan with our Q graphics stack. Luckily kanging from msm8953 CAF Q blobs and renaming and sed to msm8996 works perfectly fine for us. Slight improvement to vulkan, nothing major, maybe 1-2 frames per second or something as it is only minor upgrades for us.
http://vulkan.gpuinfo.org/compare.php?compare=compare&id%5B7313%5D=on&id%5B5019%5D=on
 
Last edited:
  • Like
Reactions: monleylord

Reetesh54

Senior Member
Sep 10, 2017
164
27
28
Thanks man it means a lot for us.
I was using lineage os 16 and was eagerly waiting for 17 and you and other developers hard work made it possible for us.
I am grateful to you guys.
( PS - Now i use my x2 as a secondary device ie that i can do some beta testing for ROMs if needed. I will be so happy to get any opportunity to help for further development of our x2 and for our community. )

Thanks And Regards
Reetesh54
 
  • Like
Reactions: ThE_MarD

kayyappan

Senior Member
Mar 10, 2011
542
133
63
:D
[X82X][9.x][TREBLE] LineageOS 17.0 (Android 10) for LeEco Le Max 2, ROM for the LeEco Le Max 2
Fantastic. I was looking for this yesterday evening having an inkling but did not find. Now I saw....

Thanks @ThE_MarD. BT in-call audio resolved?

Edit: Is it possible to "enable" disable :D option in cam app until crash issue is resolved?
 
Last edited:
  • Like
Reactions: ThE_MarD

fer198309

Senior Member
May 20, 2018
109
14
18
the rom is perfect, vulkan makes the rom look great with the incredible fluidity in pub games, feet 2020, nba and others and runs the ppsspp gold emulator games very well with the gpu vulkan, really amazing, i used the black rom nougat 7.1.2 exactly because of vulkan, now I can use it on android 10, thanks. To say that I did not find any bugs, I found 1, which percentage of the battery that does not appear, the rest is perfect.
 
  • Like
Reactions: ThE_MarD

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
Heyyo @monleylord @Reetesh54 @fer198309 ! Thanks guys, yeah super stoked at how good LineageOS 17.0 is meow. :good:
@kayyappan , yes bluetooth audio HAL is fixed and that's why I made the thread. ;)

I think you'd need a root app that scrubs system apps to disable it... that or a launcher that lets you hide the app.


New build is going up! lineage-17.0-20191117-UNOFFICIAL-x2 is only a minor update as the only fix is offline charging animation.
 

kayyappan

Senior Member
Mar 10, 2011
542
133
63
Heyyo
@kayyappan , yes bluetooth audio HAL is fixed and that's why I made the thread. ;)
I think you'd need a root app that scrubs system apps to disable it... that or a launcher that lets you hide the app.
New build is going up! lineage-17.0-20191117-UNOFFICIAL-x2 is only a minor update as the only fix is offline charging animation.
You forgot your training for 17.0!?. Update next day? Thank you. No, I'll wait for you to resolve the cam issue. Glad BT fixed. QS battery settings doesn't change but that can wait. No emergency per se.
 
  • Like
Reactions: ThE_MarD

kayyappan

Senior Member
Mar 10, 2011
542
133
63
@ThE_MarD - landed in trouble with 11/17 update. Dirty install over 11/16 resulted in a different kind of boot loop. The device will boot up to unlock screen, swipe up and it will start all over with boot animation. Never comes out of that. Moving back 11/16 build now.

Edit: TWRP restore of 11/16 resulted in same status. No idea if 11/17 downloaded file is corrupt. I had to do a clean install including format data.
 
Last edited:

erwan574

Senior Member
Sep 15, 2016
58
13
8
Nice and smooth upgrade with clean wipe and latest official TWRP / latest 30S firmware on a X820.

I confirm bluetooth audio is ok. I did not find the "SBC high bitrate" setting that was in LOS 16.
I installed latest Magisk with no pb after setup and google account restore.
I used latest "PMGC" camera and it seems a nice improvement too in performance.
GPS is ok for me.

Now I will wait for the battery usage graph, but everything seems ok for my usage.

I expect this LOS version to be used a few more years on my phone if nobody breaks it before.
Thanks !
 

fer198309

Senior Member
May 20, 2018
109
14
18
@ThE_MarD - landed in trouble with 11/17 update. Dirty install over 11/16 resulted in a different kind of boot loop. The device will boot up to unlock screen, swipe up and it will start all over with boot animation. Never comes out of that. Moving back 11/16 build now.

Edit: TWRP restore of 11/16 resulted in same status. No idea if 11/17 downloaded file is corrupt. I had to do a clean install including format data.
This is an old problem of leeco max 2, you always have to remove the password before any update or restart, in which case you can delete the password by twrp no files, data, system and delete the lock, ready restarts without password there only register again.
 

kayyappan

Senior Member
Mar 10, 2011
542
133
63
This is an old problem of leeco max 2, you always have to remove the password before any update or restart, in which case you can delete the password by twrp no files, data, system and delete the lock, ready restarts without password there only register again.
That was one of the first things I did after installing 11/16. I had a pin, no fp. Removed soon. It was only swipe up. Anyway back on 11/16. Will try later 11/17. Now too on just swipe up. Thank you.
 
Last edited:

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
@kayyappan , hmm to be safe I did take that build down. Sorry if it didn't boot for you for some odd reason I guess as I was working for me. I haven't tested Quick Charge toggle yet and I don't have a QC 3.0 block with me as I'm out of town training still oops, so I guess I will try to look at that again later on I guess.

Heyyo @erwan574 , glad to hear you like it! Yeah SBC high bitrate isn't ready yet on LineageOS 17.0 so it is missing. GPS seems to be just as good as Pie which is nice since Pie was pretty snappy most of the time and a lot more accurate than it was on LineageOS 15.1.

Anywho, a new build is going up in 30 minutes from this post! lineage-17.0-20191118-UNOFFICIAL-x2 is with a fresh repo sync and some repopicks of LineageOS 17.0 with a bunch more changes merged (I'm not sure if they'll all be noticeable to us right away or not). Some stuff I was waiting on for libinit was merged on system/core so meow I've also started to merge more stuff on our LeEco msm8996 trees yay. I'm still waiting just a little bit longer on the CAF Q blobs we have right meow just in case there's still something that needs to be fixed there...

This build still has snap camera app crashes and doesn't work and selinux permissive. I might try to next work on some of our selinux denials to see what comes up and what I can fix to start working towards selinux enforcing again. Moshe said he will start working on a kernel rebase for Q CAF tag so that will be nice for us too. :good:
 
  • Like
Reactions: xuser_

erwan574

Senior Member
Sep 15, 2016
58
13
8
Just updated to lineage-17.0-20191118-UNOFFICIAL-x2 using TWRP, with magisk 20.1 installed.
no issue so far. The zip image is 66mb larger but for now I see no visible changes.

Battery usage of previous version seemed very good for me (deep sleep ok).