[X82X&X910][TREBLE] LineageOS 18.1 (Android 11) 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






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.4.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 17.1

Please follow the official LineageOS Wiki instructions for our device. You can use either TWRP or Lineage Recovery.




HOW TO UPDATE LINEAGEOS WITH LINEAGE RECOVERY

Please follow the official LineageOS Wiki instructions for our device




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 (not yet for 18.1)
https://download.lineageos.org/x2

- Unofficial:
https://osdn.net/projects/lineageos-for-x2/releases/p17327


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 18.1:
https://osdn.net/projects/lineageos-for-x2/releases/p17328




GOOGLE APPS (GAPPS) DOWNLOADS

- MindTheGapps




GOOGLE CAMERA (GCAM) DOWNLOADS

Google Camera:


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










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 18.1 (Android 11) for LeEco Le Max 2, ROM for the LeEco Le Max 2



Contributors

ThE_MarD, mosimchah, Lucchetto00, CrisBalGreece,Tortel1210,codeworkx,moto999999,1nfrag,shivatejapeddi,KuranKaname,GalaticStryder,andr68rus,visionary,zhaoguomanong

Source Code: https://github.com/LineageOS



ROM OS Version: Android 11

ROM Kernel: Linux 3.x

ROM Firmware Required: X820, X821, X822 and x829 466d. x910 13s.

Based On: AOSP
 
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 hotspot does not work with WPA2, only no password
  • 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

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:
  • Like
Reactions: valsha

ThE_MarD

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

Special Thanks

@mosimchah for his contributions to the LeEco msm8996-common code and kernel. Especially on Android 11 for his clang kernel rebase and getting our trees started
@Tortel1210 for his contributions to x2 and helping out with gerrit. He did a lot of help during Android 11
@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! He also helped out a bunch with Android 11 trees
@codeworkx for his major contributions to the LeEco msm8996-common code and kernel and the awesome open-source camera HAL
@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.
@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! ;)
@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:
  • Like
Reactions: valsha

kayyappan

Senior Member
Mar 10, 2011
542
133
63
- Unofficial 18.1:
https://osdn.net/projects/lineageos-for-x2/releases/p17328

Contributors

ThE_MarD, mosimchah, Lucchetto00, CrisBalGreece,Tortel1210,codeworkx,moto999999,1nfrag,shivatejapeddi,KuranKaname,GalaticStryder,andr68rus,visionary,zhaoguomanong
Thank you. Did not expect 18.1 soon.... :). Boots without GApps too. Navigation buttons seem to stop working after sometime. Logcat attached. But keep in mind my X2 screen is broken but nav buttons continue to work on other ROMs. It could very well be sort of touch and go on my device.
Edit: forgot to add that I was referring to hw nav buttons. No probs with onscreen ones.
 
Last edited:
  • Like
Reactions: ThE_MarD

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
Heyyo @kayyappan , thanks man! Yeah it was pretty fast to bring up since we are a legacy device meow, so unfortunately we can't upgrade blobs and conform to Android 11... The only real negative to that with LineageOS is Wifi Display might have to be dropped for us if we can't find new blobs that aren't from CAF leaked bsp (since we don't have a public release license for Board Support Package like a stock ROM does) so hopefully a compatible device comes along that we can Kang blobs from for WFD on their stock ROM....

Also bro, unfortunately I can't see your attached logcat. Can you please PM it to me?
 
  • Like
Reactions: kayyappan

txekalzen

Member
Jun 2, 2007
7
5
23
Eibar - The Basque Country
Hi @ThE_MarD,
I tried to flash Lineageos 18.1 in my Le Max Pro X910 but I think I screwed it in a big way because by mistake I flashed the firmware of Le Max 2 instead of the proper one for X910 model. As a result, I bricked it and now it doesn't turn on, it doesn't charge, no fastboot , no recovery just a beautiful brick. Do you think it could be possible to unbrick it? Is there any guide step by step of how to do it ?
Regards!
 

txekalzen

Member
Jun 2, 2007
7
5
23
Eibar - The Basque Country
Heyyo @txekalzen , yikes! Afaik the only QFIL available for x910 is here. Tbh I tried to buy it myself but the guy didn't reply to me... Hopefully you will have better luck than I did.

https://www.needrom.com/download/le...ultilanguage-rom-unbrick-phone-qfil-fastboot/

Which recovery version were you using btw? The official TWRP for max_plus or something else?
Hi,
Thank you very much for the link. I will have a look at it.
I was using the last official TWRP for max_plus.

twrp-3.4.0-0-max_plus.img39.3M2020-06-22 15:56:11 EDT
 

txekalzen

Member
Jun 2, 2007
7
5
23
Eibar - The Basque Country

ThE_MarD

Senior Member
Dec 10, 2014
2,794
3,266
203
Grande Prairie
Heyyo, a new test build is going up! It will be done uploading within 30 minutes of this post, and as always the link will be in the first post. lineage-18.1-20210108-UNOFFICIAL-x2 has a bunch of small fixes and also fixes WiFi Hostspot with WPA2 on both 2.4GHz and 5GHz, which means the only remaining bug is WiFi Display which hopefully a good solution shows up that we can use.
 
  • Like
Reactions: sugnuf