[ROM][Huawei][13] LeaOS - Lineage 20.0 for Huawei device (EMUI 9.1 version)

Search This thread

InFTord

New member
May 27, 2021
1
0
Hello, I have been trying to install this with no luck. I have an FIG-LX1 (bootloader & FRP unlocked) with TWRP already installed.

I'm stuck on the second step, where I need to flash the .img file I downloaded. This is the output I get from fastboot flash system LeaOS-20.0-20230331-iceows-google-fig.img: (the same also happens with the image that doesn't have gapps)

Code:
Sending sparse 'system' 1/7 (460796 KB)            OKAY [ 13.743s]
Writing 'system'                                   FAILED (remote: 'sparse flash write failure')
fastboot: error: Command failed

Can someone point me in a direction to go? I've been googling for hours with no avail.

(the phone currently cannot boot into any OS. only TWRP I got from this post)
a quick question: why did you decided to use this ROM?
i wanna install custom ROM on my phone, can't decide which one
 

seb7o

Senior Member
Feb 18, 2012
65
8
As Skole previously, and according to the official Magisk procedure, I should have the "recovery.img" file to patch with Magisk. Unfortunately, this file is nowhere ?

-----------------------
EDIT: after discussing with @Skole yesterday (thank you again!), I finally got the point. If you want to root your FIG-LX1, you should download the official Huawei's stock ROM and then extract the RECOVERY_RAMDIS.img from it (you can use tools like Huawei Update Extractor to do so).
Then, use Magisk to patch the RECOVERY_RAMDIS.img file. At last, you should flash it in fastboot mode with the command
Bash:
fastboot flash recovery_ramdisk /path/to/magisk_patched.img
Note that the command below doesn't work
Bash:
fastboot flash recovery /path/to/magisk_patched.img
Next, when your phone is off, press Power + Vol+ buttons ; realease them when you see the splash screen Huawei.

You can follow this popular tutorial to root your phone, but keep in mind the advices above ;)

If something went wrong (like me yesterday 😱), look at the "dload" method to unbrick your phone thanks to EMUI !

Merci beaucoup AltairFR for LeaOS ! You and Skole give my huawei a new life !
Could you or anyone help me?

I feel like I followed all the steps but still don't get either the recovery_ramdisk nor the recovery to be altered.
I extraced the RECOVERY_RAMDIS.img from the original stock rom and used the Magisk app to create the magisk_patched.im and with an elevated console on Windows I get these results.
Tried also to get TWRP. I never had so many issues to flash devices, HUAWEI seems far mor compicated than Samsung/Motorola/HTC etc.

1683313769368.png

Always 'Command not allowed'.

My bootloader looks as this:
1683313953184.jpeg


Anyone has an idea, what I am doing wrong?
 
  • Like
Reactions: AltairFR

AltairFR

Senior Member
Apr 22, 2021
721
379
Huawei P8lite/P8 Lite
Honor 9
Could you or anyone help me?

I feel like I followed all the steps but still don't get either the recovery_ramdisk nor the recovery to be altered.
I extraced the RECOVERY_RAMDIS.img from the original stock rom and used the Magisk app to create the magisk_patched.im and with an elevated console on Windows I get these results.
Tried also to get TWRP. I never had so many issues to flash devices, HUAWEI seems far mor compicated than Samsung/Motorola/HTC etc.

View attachment 5904611
Always 'Command not allowed'.

My bootloader looks as this:
View attachment 5904617

Anyone has an idea, what I am doing wrong?
Yes just unlock phone 😀
In developer options
 

Attachments

  • 20230505_212706.jpg
    20230505_212706.jpg
    621 KB · Views: 33
  • Like
Reactions: seb7o

seb7o

Senior Member
Feb 18, 2012
65
8
Yes just unlock phone 😀
In developer options

Ok good news. I managed to unlock the bootloader.

Then I tried to flash the OS but had the problem with the partition being too small.
So I flashed the other smaller version of the OS suggested.
I also flashed the TWRP as in the picture of my last post.
But every time I enter TWRP the phone is vibrating permanently for a few seconds and switching to fastboot mode. So I can't resize the partition, as all the guides I find tell me that TWRP is needed.

What can I do now?
What are the exact steps to get TWRP correctly to my device? Or how can I fix the vibrating/switching-to-fastboot issue?

@AltairFR à propos, merci beaucoup pour ton travail!
 
  • Like
Reactions: AltairFR

AltairFR

Senior Member
Apr 22, 2021
721
379
Huawei P8lite/P8 Lite
Honor 9
Ok good news. I managed to unlock the bootloader.

Then I tried to flash the OS but had the problem with the partition being too small.
So I flashed the other smaller version of the OS suggested.
I also flashed the TWRP as in the picture of my last post.
But every time I enter TWRP the phone is vibrating permanently for a few seconds and switching to fastboot mode. So I can't resize the partition, as all the guides I find tell me that TWRP is needed.

What can I do now?
What are the exact steps to get TWRP correctly to my device? Or how can I fix the vibrating/switching-to-fastboot issue?

@AltairFR à propos, merci beaucoup pour ton travail!
Send me a private msg please
 
  • Like
Reactions: seb7o
For root, you need first boot the ROM, after install magisk and then patch the recovery stock from here on install option. After that, transfer the patched image to your PC and reboot to fastboot:

fastboot flash recovery_ramdisk magisk_patched-12345_example.img

  • Type fastboot reboot in cmd, don't enter yet.
  • Hold your phone in one hand pressing volume up and power at the same time.
  • Press enter on the keyboard, phone will reboot.
  • Instantly disconnect the usb cable from the phone while holding the buttons volume up and power.
  • Phone will reboot one more time. Hold the buttons until bootloader warning appears. Remove your fingers from the buttons. Phone will boot.
As a summary, after installing Magisk in recovery (starting from power off):

  • (Power up normally) → (System with NO Magisk)
  • (Power + Volume Up) → (Splash screen) → (Release all buttons) → (System with Magisk)
  • (Power+ Volume Up) → (Splash screen) → (Long press volume up) → (Recovery Mode)
(Note: You CANNOT use custom recoveries to install or upgrade Magisk in this case!!)

This is required because our figo doesn't have ramdisk on boot.img, there is no other alternative than this to get Magisk.
 

alperasz

New member
Sep 11, 2019
2
0
Thanks, it runs good on FIG-LX1 but i got a little problem with bluetooth.

When I try to pair my Huawei Band 6 it shows up on Huawei Health scan and I click pair button, it says "Please confirm pairing on your wearable device" but there is nothing on Band 6, after few seconds Huawei Health says failed to pair. I double-checked every permission it needs.
I tried other BLE apps on Play Store. They found it but couldn't connect. Other ROMs (GSIs and ROMs made for this device) have the same problem. Only Stock ROM worked normally and paired without any issues.

Here is the logcat from the time i start the scan from Huawei Health to the time it says failed to pair.
 

Attachments

  • logcat_ble.txt
    20.8 MB · Views: 8

Alfaro0112

New member
Oct 16, 2023
1
1
Non-Official Lineage 20.0 for EMUI 9 Huawei (ANE, FIG, POT, VTR, STF)

yUIn6TF.png


LeaOS is a project which based on LineageOS 20.1 with Andy Yan's and TrebleDroid GSI patches. I have added my personnals patches for Huawei devices : Encryption, Signal Strengh, Speed Boot, Assisted GPS, NFC, CAST/Miracast, Media App fixes, Camera HDR, SafetyNet etc..)


Changelog :


LeaOS Maarch 2023 version

  • Move to Android r35 (SPL Maarch)
  • Add offline charging
  • Add spoof model to pass safetynet
LeaOS February 2023 version
  • First release

Pre-requisite :

You must have TWRP installed if you want install patch. and a phone with unlock bootloader

Installation (crypt or uncrypt)

  • Download the version that corresponds to your Huawei phone model here and extract img file. You can choose with ou without GoogleApps
  • Flash system image : fastboot flash system <drag system.img here>
  • Flash twrp image: fastboot flash recovery_ramdisk <drag twrp img here>
  • Boot into twrp: power + vol+ while NOT connected to pc
  • Resize system: Wipe > Advanced Wipe > System > Repair or Change File System > Resize File System > Swipe
  • Wipe cache, dalvik/art cache, internal storage
  • Wipe data
  • (option) Install DRM patch for EMUI 9.1 to support DRM : 8-Huawei-FixPreav-AB-v1.3-signed.zip
  • (option) Install single modem patch for multi-sim device : 11-Huawei-MonoSim-AB-v1.1-signed.zip
  • reboot to System and set up the phone with Lineage first start assistant.
  • Enjoy !!!

Source Code:


ROM OS Version: Android 13
ROM Kernel: Linux Huawei 4.9.148 or Phenix 4.9.319
ROM Firmware Required: EMUI 9.1
Based On: Lineage 20.0 and TrebleDroid

Credits:

And all the others who tested my patches and helped me improve this ROM

Support Group
Channel update
Disponible para POT-LX3?
 
  • Like
Reactions: AltairFR
I
As Skole previously, and according to the official Magisk procedure, I should have the "recovery.img" file to patch with Magisk. Unfortunately, this file is nowhere ?

-----------------------
EDIT: after discussing with @Skole yesterday (thank you again!), I finally got the point. If you want to root your FIG-LX1, you should download the official Huawei's stock ROM and then extract the RECOVERY_RAMDIS.img from it (you can use tools like Huawei Update Extractor to do so).
Then, use Magisk to patch the RECOVERY_RAMDIS.img file. At last, you should flash it in fastboot mode with the command
Bash:
fastboot flash recovery_ramdisk /path/to/magisk_patched.img
Note that the command below doesn't work
Bash:
fastboot flash recovery /path/to/magisk_patched.img
Next, when your phone is off, press Power + Vol+ buttons ; realease them when you see the splash screen Huawei.

You can follow this popular tutorial to root your phone, but keep in mind the advices above ;)

If something went wrong (like me yesterday 😱), look at the "dload" method to unbrick your phone thanks to EMUI !

Merci beaucoup AltairFR for LeaOS ! You and Skole give my huawei a new life !
I tried it, it just booted into some other version of erecovery,is it maybe because I'm on EMUI 8? I checked magisk, there's no root, I released the buttons when the splash screen appeared, I even tried at the vibrating, it just booted normally into EMUI without root.
 

Attachments

  • IMG_20231127_192850.jpg
    IMG_20231127_192850.jpg
    1.9 MB · Views: 19

snooz_

New member
Hi, a couple of questions (I suspect both are as a result of my limited grammar skills):

Regarding the "Pre-requisite": "You must have TWRP installed if you want install patch. and a phone with unlock bootloader."

Q1: The installation steps include installing the TWRP image. So it TWRP actually a pre-requisite, or does it mean the "flash twrp image" step of the installation is optional? (Basically, seems weird [to me] to require TWRP to be installed already if flashing it is one of the install steps.)
Q2: Is the unlocked bootloader only required "if you want install patch", or is it strictly required (in order to do either of the flashing steps).
 

kracc

Member
Nov 8, 2022
11
4
Huawei P Smart
Hi I am testing the version "LeaOS-20.0-20240323-iceows-google-fig.img.xz" on fig-lx3, it seems that everything works, I will be reporting bugs. Will there be more updates? and what version of magisk is used to root?
 
  • Like
Reactions: anil456

kracc

Member
Nov 8, 2022
11
4
Huawei P Smart
Hi I am testing the version "LeaOS-20.0-20240323-iceows-google-fig.img.xz" on fig-lx3, it seems that everything works, I will be reporting bugs. Will there be more updates? and what version of magisk is used to root?
the only bug i found was that when i put my sd card as main storage, it crashes the system with ramdoms reboots, it doesn't turn on sometimes. For my FIG-LX3 I have the sd as portable storage there nothing happens and from there no bugs and fluid.
 
  • Like
Reactions: AltairFR

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    the only bug i found was that when i put my sd card as main storage, it crashes the system with ramdoms reboots, it doesn't turn on sometimes. For my FIG-LX3 I have the sd as portable storage there nothing happens and from there no bugs and fluid.
    LineageOS don't really support main storage on sdcard
    1
    Hi I am testing the version "LeaOS-20.0-20240323-iceows-google-fig.img.xz" on fig-lx3, it seems that everything works, I will be reporting bugs. Will there be more updates? and what version of magisk is used to root?
    1
    Hi I am testing the version "LeaOS-20.0-20240323-iceows-google-fig.img.xz" on fig-lx3, it seems that everything works, I will be reporting bugs. Will there be more updates? and what version of magisk is used to root?
    the only bug i found was that when i put my sd card as main storage, it crashes the system with ramdoms reboots, it doesn't turn on sometimes. For my FIG-LX3 I have the sd as portable storage there nothing happens and from there no bugs and fluid.
    1
    @kracc Could you tell us a little about your experience with this rom ?
    The rom is good, fluid and fast, everything works as it should. The only problem is that the SD cannot be put as internal storage. I am impressed that the PUGB is more fluid than the stock one, obviously with root booster and 8 GB of swap memory, you have to keep in mind that it is Android 13 wow. I don't know why nethunter doesn't install it, well I don't care, I have WPSapp there. Root with magisk through recovery. Youtube doesn't work well I don't know why, and revanced yes. I have free 1.6gb, 1.3gb ram. I use the rom as default, there are no more stable roms like this for this fig-lx3
    1
    I'm so bricked my phone followed everything on this post but couldn't make it working. I get no error whatsoever during installation but can't pass boot loop. I can't even flash a stock rom anymore where should I start troubleshooting.
    Do fastboot erase userdata, then with the cable inserted hold down power and volume up to go to erecovery which will tell you the partition is severely corrupted, so just type yes and format data and reboot.
  • 3
    Non-Official Lineage 20.0 for EMUI 9 Huawei (ANE, FIG, POT, VTR, STF, STK)

    yUIn6TF.png


    LeaOS is a project which based on LineageOS 20.1 with Andy Yan's and TrebleDroid GSI patches. I have added my personnals patches for Huawei devices : Encryption, Signal Strengh, Speed Boot, Assisted GPS, NFC, CAST/Miracast, Media App fixes, Camera HDR, SafetyNet etc..)


    Changelog :


    LeaOS Maarch 2024 version

    • Move to last Last Lineage 20.0 source (SPL Maarch 2024)
    • Fix Bluetooth call
    • Use last TrebledDroid patch
    • Add preset for hi6250, kirin 710 and hi3660
    • Add option to set the phone in mono-sim mode
    LeaOS Maarch 2023 version
    • Move to Android r35 (SPL Maarch)
    • Add offline charging
    • Add spoof model to pass safetynet
    LeaOS February 2023 version
    • First release

    Pre-requisite :

    You must have TWRP installed if you want install patch. and a phone with unlock bootloader

    Installation (crypt or uncrypt)

    • Download the version that corresponds to your Huawei phone model here and extract img file. You can choose with ou without GoogleApps
    • Flash system image : fastboot flash system <drag system.img here>
    • Flash twrp image: fastboot flash recovery_ramdisk <drag twrp img here>
    • Boot into twrp: power + vol+ while NOT connected to pc
    • Resize system: Wipe > Advanced Wipe > System > Repair or Change File System > Resize File System > Swipe
    • Wipe cache, dalvik/art cache, internal storage
    • Wipe data
    • (option) Install DRM patch for EMUI 9.1 to support DRM : 8-Huawei-FixPreav-AB-v1.3-signed.zip
    • (option) Install single modem patch for multi-sim device : 11-Huawei-MonoSim-AB-v1.1-signed.zip
    • reboot to System and set up the phone with Lineage first start assistant.
    • Enjoy !!!

    Source Code:


    ROM OS Version: Android 13
    ROM Kernel: Linux Huawei 4.9.148 or Phenix 4.9.319
    ROM Firmware Required: EMUI 9.1
    Based On: Lineage 20.0 and TrebleDroid

    Credits:

    And all the others who tested my patches and helped me improve this ROM

    Support Group
    Channel update
    2
    the only bug i found was that when i put my sd card as main storage, it crashes the system with ramdoms reboots, it doesn't turn on sometimes. For my FIG-LX3 I have the sd as portable storage there nothing happens and from there no bugs and fluid.
    LineageOS don't really support main storage on sdcard
    1
    Testting on FIG-XXX, will post results
    How did you manage to install it? I began with EMUI 9.1 .115, unlocked the bootloader flashed the system, flashed twrp, resized system partition, wiped cache, dalvik/art cache, internal storage, installed stock recovery but I can't wipe data. It says reset failed. As far as I remember not wiping data from stock recovery wont work, phone is just stuck in a TWRP loop

    EDIT: Well it just booted right in without formatting data. Guess it's fine
    1
    Everything works fine, I don't have any issue with my P Smart 2018 (FIG-LX1).

    However, I lost a huge amount of time to root my phone. And I don't succeed. Does anyone have tutorial/information to help ? 🙏
    1
    I'm so bricked my phone followed everything on this post but couldn't make it working. I get no error whatsoever during installation but can't pass boot loop. I can't even flash a stock rom anymore where should I start troubleshooting.
    Do fastboot erase userdata, then with the cable inserted hold down power and volume up to go to erecovery which will tell you the partition is severely corrupted, so just type yes and format data and reboot.