• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[OFFICIAL&TESTS]TWRP for the LeEco Le Max 2

Search This thread

ThE_MarD

Senior Member
Dec 10, 2014
2,911
3,436
Grande Prairie
LeEco Le Max 2
Moto X4
TWRP-Feature-Image-810x298_c.png
Code:
#include <std_disclaimer.h>
/*
* 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 doing this to your device
* 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.
*/

This is for OFFICIAL and BETA builds of TWRP for the LeEco Le Max 2

Stable Downloads:
[url]https://twrp.me/leeco/leecolemax2.html[/URL]

Test Downloads:
https://osdn.net/projects/twrp-for-x2/releases/

Sources:
Official: https://github.com/TeamWin/android_device_leeco_x2
Tests: https://github.com/ThEMarD/android_device_leeco_x2-twrp

Platform Tools (adb/fastboot):
https://developer.android.com/studio/releases/platform-tools.html#download

Installation:
  1. Make sure your bootloader is unlocked
  2. Download the recovery image from above
  3. Reboot into fastboot
  4. Run this command (Change the .img to whatever the name of file is you downloaded):
    Code:
    fastboot flash recovery twrp-3.5.0_9-0-x2.img
  5. Once it is flashed, please force a reboot to recovery by holding down the Power and Volume Up buttons at the same time until the phone reboots and you see the LeEco logo and the word "recovery" underneath it. (This is because if you allow normal boot after flashing TWRP and you are using EUI ROM and your phone reboots to EUI ROM? It will overwrite recovery with stock EUI ROM recovery. Forcing a reboot from bootloader to recovery prevents this issue)

Upgrade instructions
  1. Download desired TWRP version
  2. Reboot to recovery
  3. Select Install
  4. tap on "install image" and select the TWRP.img you downloaded from step one
  5. select the recovery partition and install the TWRP.img to it
  6. Reboot to recovery and confirm that the updated TWRP image is installed

For the TEST builds of TWRP? Please let me know if this works. If so? I will submit it to Gerrit for official updates.

Credits:
  • bigbiff for helping me get setup on on gerrit.twrp.me for official status and updating official TWRP for the Le Max 2
  • Varzag, LEvvvEL, harryohh, kayyappan, bilausdaniel and anyone else I missed who tested my builds of TWRP
  • Ncrypt3d : He had a original base that did not boot but we ping ponged and got it working.
  • AndroPlus-org Fixing Decryption and getting OTG working with some cables
  • deadman96385 for the work he has done on for the Le Max 2
  • jrior001 for his work on TWRP for the Le Max 2 and in general for msm8996-common stuff too
  • codeworkx for his tweaks I implemented into my TWRP commit and everything he has done for LeEco devices
  • andr68rus for everything he has done for the LeEco Le Max 2
  • infrag as well for everything he has done for the Le Max 2
  • shivatejapeddi as well for his work on the Le Max 2
  • GalaticStryder for helping resolve the f2fs issue and his contributions to the kernel and x2's truly panel fix
  • Dianlujitao for his continued work on TWRP and fixing encryption footers for TWRP based on 8.1 and above
  • ok I could literally be here all day typing so essentially anyone who has worked on the msm8996 common kernel for LineageOS (note: will take forever to generate the list https://github.com/LineageOS/android_kernel_leeco_msm8996/graphs/contributors)

XDA:DevDB Information
[OFFICIAL&TESTS]TWRP for the LeEco Le Max 2, Tool/Utility for the LeEco Le Max 2

Contributors
ThE_MarD, deadman96385, jrior001, Ncrypt3d, AndroPlus-org, codeworkx, andr68rus, infrag, shivatejapeddi
 
Last edited:

ThE_MarD

Senior Member
Dec 10, 2014
2,911
3,436
Grande Prairie
LeEco Le Max 2
Moto X4
Official Builds Changelog

TWRP-3.3.1-0
x2: README: improve device configuration table
x2: remove lineage makefiles
x2: fstab: clean up formatting
x2: fstab: add efsc modem partition

TWRP-3.3.0-1
x2: Use toolbox instead of busybox
x2: Add persist entry to fstab
x2: remove mounting of persist in init
x2: remove firmware mounting in init
x2: remove unused system.prop
x2: allow vendor partition to be backed up
x2: Set TARGET_2ND_ARCH_VARIANT as armv8-a
x2: Fix HW FDE when building with Pie tree
x2: BoardConfig: remove wait for qsee cflag
x2: update kernel, fstab and init
x2: Update QSEE stack from OP3 OOS 9.0
x2: Use libcryptfs_hw from commonsys repo
x2: update init for pie qsee blobs
x2: Update README for TWRP Pie

TWRP-3.3.0-0
x2: kernel: add pstore support
x2: fstab: allow vendor wipe in GUI

TWRP-3.2.3-1
x2: add vendor partition
x2: Update prebuilt kernel for treble and Pie compatibility

TWRP-3.2.1-2
x2: enable f2fs, quota & default brightness to 40%
(please note, converting to f2fs does not work on this build. Please use test build by GalaticStryder and report here if it works or not for you https://github.com/GalaticStryder/lineage_releases/releases/tag/recovery )

TWRP-3.2.1-1
x2: Rebase on zl1 android-8.1 TWRP device tree. We are now Oreo based with working data decryption and adb sideload. Major thanks to @codeworkx for his zl1 TWRP I used as my base.

TWRP-3.2.1-0
We are Official! :)
x2: prebuilt kernel and miscelaneous tweaks (TWRP-3.2.1-0 compatible)
* Prebuilt kernel and updated init and qseecomd from LineageOS (https://github.com/LineageOS/android_kernel_leeco_msm8996)
* Miscelaneous tweaks from leeco-devs/android_device_leeco_zl1 and omnirom/android_device_leeco_x2

TEST Builds Changelog

April11-2018
F2FS support and default brightness set to 40% (100% hurts my eyes haha)
https://gerrit.twrp.me/#/c/3066/

March30-2018
Rebased on official LineageOS 15.1 kernel with zl1 android-8.1 TWRP branch
This fixes adb sideload and data decryption

Feb23-2018
Ported the zl0 TWRP Oreo build by codeworkx to the x2.

Jan152018
Attempted fixes for encryption
unfortunately it seems the pulldecryptfiles.sh script doesn't always work and on some newer versions of EUI ROM can even fail to work at all... Importing the vendor/lib64 encryption files directly into the device tree for TWRP fixes this issue.

vendor/lib64 files pulled from 1512699115_LE_X2_X820-CN-FN-FEXCNFN5902812081S-5.9.028S

*** Please note, decryption fix isn't 100%!!! I think I need to use the Indian 5.8.019s decryption files as decryption fails when testing from indian 5.8.019s to custom Oreo ROM hmm... ***

Jan212018
Switched decryption to blobs from Indian EUI ROM 5.8.019s

unfortunately it seems the pulldecryptfiles.sh script doesn't always work and on some newer versions of EUI ROM can even fail to work at all... Importing the vendor/lib64 encryption files directly into the device tree for TWRP fixes this issue.

crypto files pulled from LE_X2_X820-OS-OP-FGXOSOP5801910121S-5.8.019S (Indian 5.8.019s) because it has encryption and it's forced encryption.

It seems Chinese EUI ROM doesn't have encryption capabilities only Indian EUI ROM which could be why switching from Indian EUI ROM to a custom ROM causes decryption to fail.

xxxhdpi screen density and support for extra languages (eg Chinese)
 
Last edited:

CrisBalGreece

Senior Member
Jul 2, 2016
2,195
2,162
Athens
Last edited:

ThE_MarD

Senior Member
Dec 10, 2014
2,911
3,436
Grande Prairie
LeEco Le Max 2
Moto X4
Hi excellent work.
Check this to if anything can help on development..

le_x2 Latest TWRP 3.2.1-1. Updated Firmware Recovery .. Kernel latest OREO-N-Support. f2fs support, more partitions for backup and restore. Extra tools inside.. Flash it through TWRP, like a regular zip . https://drive.google.com/open?id=1T3NQ_QQafWulIxtD9JT-yH0wYXZtK7Ye
SS
https://imgur.com/a/qHJWV
Heyyo, ah cool I didin't know someone else already had TWRP-3.2.1 up and going. :)

Are you going to submit it to https://gerrit.twrp.me/ ?

@ThE_MarD, i have install and it's ok, test backup ok, now test install rom
Sounds good! :)
 

CrisBalGreece

Senior Member
Jul 2, 2016
2,195
2,162
Athens
Last edited:

LEvvvEL

Senior Member
Dec 28, 2016
137
13

harryohh

Senior Member
Sep 19, 2015
52
9
Finally TWRP accepts my pattern to decrypt partition!! Thanks

Edit: spoke too soon. It only works sometimes. Worked the first time. Has now failed a few times. Just worked again now. Anybody know what the issues might be here?
 
Last edited:

ThE_MarD

Senior Member
Dec 10, 2014
2,911
3,436
Grande Prairie
LeEco Le Max 2
Moto X4
Finally TWRP accepts my pattern to decrypt partition!! Thanks

Edit: spoke too soon. It only works sometimes. Worked the first time. Has now failed a few times. Just worked again now. Anybody know what the issues might be here?
Hmm I can try and take a look at it sure. Can you please post the logs? It can be found under the advanced menu to copy logs and then just zip them up and post them here
 

ThE_MarD

Senior Member
Dec 10, 2014
2,911
3,436
Grande Prairie
LeEco Le Max 2
Moto X4
Finally TWRP accepts my pattern to decrypt partition!! Thanks

Edit: spoke too soon. It only works sometimes. Worked the first time. Has now failed a few times. Just worked again now. Anybody know what the issues might be here?
Heyyo harryohh wanna take an adventure with me? :)

changes commit I made to fix decryption
https://github.com/ThEMarD/android_...mmit/17eda0f901917edcf351da55b078b70df2256b0a

download here to try it out
https://www.androidfilehost.com/?fid=817906626617958526

I'll update the OP with this link
 

Attachments

  • Screenshot_2018-01-15-16-39-46.png
    Screenshot_2018-01-15-16-39-46.png
    89.4 KB · Views: 577
Last edited:

x3mmAnuelx

Member
Jan 16, 2018
5
4
i tried to flash the recovery but when i flash it in fastboot mode everything says ok but when i try to boot into it it boots into the previous recovery that i had installed on the phone dont know why
 

Top Liked Posts

  • There are no posts matching your filters.
  • 37
    TWRP-Feature-Image-810x298_c.png
    Code:
    #include <std_disclaimer.h>
    /*
    * 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 doing this to your device
    * 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.
    */

    This is for OFFICIAL and BETA builds of TWRP for the LeEco Le Max 2

    Stable Downloads:
    [url]https://twrp.me/leeco/leecolemax2.html[/URL]

    Test Downloads:
    https://osdn.net/projects/twrp-for-x2/releases/

    Sources:
    Official: https://github.com/TeamWin/android_device_leeco_x2
    Tests: https://github.com/ThEMarD/android_device_leeco_x2-twrp

    Platform Tools (adb/fastboot):
    https://developer.android.com/studio/releases/platform-tools.html#download

    Installation:
    1. Make sure your bootloader is unlocked
    2. Download the recovery image from above
    3. Reboot into fastboot
    4. Run this command (Change the .img to whatever the name of file is you downloaded):
      Code:
      fastboot flash recovery twrp-3.5.0_9-0-x2.img
    5. Once it is flashed, please force a reboot to recovery by holding down the Power and Volume Up buttons at the same time until the phone reboots and you see the LeEco logo and the word "recovery" underneath it. (This is because if you allow normal boot after flashing TWRP and you are using EUI ROM and your phone reboots to EUI ROM? It will overwrite recovery with stock EUI ROM recovery. Forcing a reboot from bootloader to recovery prevents this issue)

    Upgrade instructions
    1. Download desired TWRP version
    2. Reboot to recovery
    3. Select Install
    4. tap on "install image" and select the TWRP.img you downloaded from step one
    5. select the recovery partition and install the TWRP.img to it
    6. Reboot to recovery and confirm that the updated TWRP image is installed

    For the TEST builds of TWRP? Please let me know if this works. If so? I will submit it to Gerrit for official updates.

    Credits:
    • bigbiff for helping me get setup on on gerrit.twrp.me for official status and updating official TWRP for the Le Max 2
    • Varzag, LEvvvEL, harryohh, kayyappan, bilausdaniel and anyone else I missed who tested my builds of TWRP
    • Ncrypt3d : He had a original base that did not boot but we ping ponged and got it working.
    • AndroPlus-org Fixing Decryption and getting OTG working with some cables
    • deadman96385 for the work he has done on for the Le Max 2
    • jrior001 for his work on TWRP for the Le Max 2 and in general for msm8996-common stuff too
    • codeworkx for his tweaks I implemented into my TWRP commit and everything he has done for LeEco devices
    • andr68rus for everything he has done for the LeEco Le Max 2
    • infrag as well for everything he has done for the Le Max 2
    • shivatejapeddi as well for his work on the Le Max 2
    • GalaticStryder for helping resolve the f2fs issue and his contributions to the kernel and x2's truly panel fix
    • Dianlujitao for his continued work on TWRP and fixing encryption footers for TWRP based on 8.1 and above
    • ok I could literally be here all day typing so essentially anyone who has worked on the msm8996 common kernel for LineageOS (note: will take forever to generate the list https://github.com/LineageOS/android_kernel_leeco_msm8996/graphs/contributors)

    XDA:DevDB Information
    [OFFICIAL&TESTS]TWRP for the LeEco Le Max 2, Tool/Utility for the LeEco Le Max 2

    Contributors
    ThE_MarD, deadman96385, jrior001, Ncrypt3d, AndroPlus-org, codeworkx, andr68rus, infrag, shivatejapeddi
    9
    Hi excellent work.
    Check this to if anything can help on development..

    le_x2 Latest TWRP 3.2.1-1. Updated Firmware Recovery .. Kernel latest OREO-N-Support. f2fs support, more partitions for backup and restore. Extra tools inside.. Flash it through TWRP, like a regular zip . https://drive.google.com/open?id=1T3NQ_QQafWulIxtD9JT-yH0wYXZtK7Ye
    SS
    https://imgur.com/a/qHJWV
    9
    Heyyo, new test build up! "twrp-x2-3.2.3-unofficial-pstore-fde-vendorwipe" has a kernel update for pstore support, the pending Full Disk Encryption fixes (current official 3.2.3-1 build of TWRP has a bug with wipe / format that prevents FDE from working correctly).

    The fixes for FDE also includes a patch that allows to and from f2fs on data with our encrypted footer.

    Also, as requested by users the ability to wipe vendor (be VERY careful about this! I don't recommend wiping vendor since ROM installs flash an image to vendor partition, but here's the option to wipe it anyways since it's what users have requested. Wiping vendor without flashing a new ROM immediately after will cause the device to not boot).

    I also have no plans to update my guide to include vendor wiping since I don't recommend it.

    EUI ROM doesn't use the vendor partition as well, so it doesn't care we renamed last_parti to vendor, thus there's no need to wipe in order to install EUI ROM.

    Please also note, once installed it'll show TWRP version 3.2.3-0... that is fine. That "-1" on official only means device patched version and doesn't reflect any major TWRP patch version... That, and I'm too lazy to manually change device patch version number on my unofficial builds lol...


    OH! I totally forgot to request feedback for encryption on both ext4 and f2fs on Oreo or earlier ROMs after wiping or formatting data!!! Pie ROMs might still have unreliable FDE, so the best test ROMs would be earlier versions of Android with confirmed working FDE. :good:
    8
    Heyyo, new test build is up! (link to my unofficial test builds in the first post) twrp-x2-3.3.0-unofficial-encryptionfooterfix is synced to the latest TWRP sources (I'm guessing the TWRP team is gearing up for a new version, hence it built as 3.3.0). This version contains the merged commit for fixing the bugged format data function for devices with encryption footers (which LeEco devices use).
    8
    Heyyo, Updated unofficial TWRP for Project Treble Vendor partition mounting (if the device is "treblized" already) and updated kernel for Pie support as well!

    https://www.androidfilehost.com/?fid=1322778262904020817

    (Will try to push to TWRP Gerrit once they fix android_device_leeco_x2 branch... I think a recent upgrade to TWRP's Gerrit accidentally removed our branch)