• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Development [KERNEL] [OFFICIAL] [MIUI/AOSP] [UNIFIED] LegionX V2.0 - By Venom_Stark

Search This thread

Zirila

Senior Member
Jul 31, 2015
169
65
I can't flash stock now at all... I get this error in mi flash:

error: Writing 'metadata'
FAILED (remote: 'Flashing of metadata is not allowed in snapshotted state')

so phone is bricked, not sure what to do. I can only get to fastboot currently
you could read my excellent howto: install post, which also covers the snapshotted state error.


it's for lineageOS but it is very much the same for CrDroid.
 
  • Like
Reactions: Pachunko

Pachunko

Member
Jul 19, 2021
46
17
Xiaomi Redmi Note 5A
Redmi Note 10
Thank you for the reply, couldn't find snapshotted error anywhere on the web. I'll post update in this post after I try.

Update 1: Snapshotted state finally solved, flashing stock MIUI. Big thank you @Zirila flashing in progress...

Update 2: flashed successfully stock ROM - enabled usb debugging - removed PIN/pattern - flashed crDroid via OTA fastboot (this always worked before) - rebooted to recovery - wipe - reboot - stuck at fastboot (but first redmi logo is looping, screen off then on, need to force fastboot)... what is going on :D
 
Last edited:

Abdullah.Csit

Senior Member
Feb 14, 2014
682
626
Iraq
Redmi Note 8 Pro
Redmi Note 9 Pro
Thank you for the reply, couldn't find snapshotted error anywhere on the web. I'll post update in this post after I try.

Update 1: Snapshotted state finally solved, flashing stock MIUI. Big thank you @Zirila flashing in progress...

Update 2: flashed successfully stock ROM - enabled usb debugging - removed PIN/pattern - flashed crDroid via OTA fastboot (this always worked before) - rebooted to recovery - wipe - reboot - stuck at fastboot (but first redmi logo is looping, screen off then on, need to force fastboot)... what is going on :D

Did you wiped after force to fastboot?
Do wipe data and try.
If no result.
Boot to recovery
Flash CRdroid with recovery

If booted then stuck with it.
It's seems your device not have a luck with custom Kernel.
I think CRdroid will included it in next update by default.

I'm sorry for this badluck❤️👋
 
Last edited:
  • Like
Reactions: Pachunko

Pachunko

Member
Jul 19, 2021
46
17
Xiaomi Redmi Note 5A
Redmi Note 10
Did you wiped after force to fastboot?
Do wipe data and try.
If no result.
Boot to recovery
Flash CRdroid with recovery

If booted then stuck with it.
It's seems your device not have a luck with custom Kernel.
I think CRdroid will included it in next update by default.

I'm sorry for this badluck❤️👋

I don't even care about kernel anymore... at this point I would be happy for crDroid to work. Not sure why it's not working via fastboot OTA method. I just tried flashing crDroid via TWRP and again stuck at bootloop... wtf. This literally worked an hour ago lol... I guess I'm stuck with stock rom now
 
  • Like
Reactions: Abdullah.Csit

Abdullah.Csit

Senior Member
Feb 14, 2014
682
626
Iraq
Redmi Note 8 Pro
Redmi Note 9 Pro
I don't even care about kernel anymore... at this point I would be happy for crDroid to work. Not sure why it's not working via fastboot OTA method. I just tried flashing crDroid via TWRP and again stuck at bootloop... wtf. This literally worked an hour ago lol... I guess I'm stuck with stock rom now

If it stuck on CRdroid logo. Just wipe data and it will work.

If nothing happens.
Flash lineage os recovery & flash rom with it.

I would be happy if it booted
 
  • Like
Reactions: Pachunko

Pachunko

Member
Jul 19, 2021
46
17
Xiaomi Redmi Note 5A
Redmi Note 10
Nah it's getting stuck at redmi logo, then reboots, then redmi logo again. Until I break it with vol down + power to get to fastboot... at that point I can only flash stock MIUI. If I try to go to recovery my data is no longer there, cannot mount.
 

Abdullah.Csit

Senior Member
Feb 14, 2014
682
626
Iraq
Redmi Note 8 Pro
Redmi Note 9 Pro
Nah it's getting stuck at redmi logo, then reboots, then redmi logo again. Until I break it with vol down + power to get to fastboot... at that point I can only flash stock MIUI. If I try to go to recovery my data is no longer there, cannot mount.

I won't giveup till everything will be fine.

Are you have Fastboot miui ?
Flash it with lock !
Don't worry you don't need to wait another week.

Flash clear all data with lock.

Then unlock your device again with mi unlock.

Flash CRdroid wirh ota fastboot Tool.

Hope this will solve.

I'm really wanna help you bro
 
  • Like
Reactions: Pachunko

Pachunko

Member
Jul 19, 2021
46
17
Xiaomi Redmi Note 5A
Redmi Note 10
Thanks for the help and everything... I just managed to get to crDroid logo. I flashed crDroid in TWRP and Flame Gapps... but it's loading 5 minutes already :( And I already wiped data after flashing, before reboot.

EDIT: Forgot to mention that if I run TWRP for the first time I can mount data normally and everything works. But as soon as I reboot to recovery (from crDroid logo right now for example) I can't access data. I hate TWRP so much :D
 

StaryMuz

Senior Member
Dec 27, 2012
434
141
Reported to developer

Developer answer : “Ok I will flash PE+ now and test camera.”

Tested : Camera working perfectly on PE+.



At less test flashing Latest firmware it won't be hard and it's good for your device anyway.
At first I thought so too. But only the time it works has been extended. The error will manifest itself after a longer period of time. If the error is associated with deep sleep mode, it will probably trigger after a longer period of device inactivity.

Despite these facts, another change has occurred. Where the app crashed after recording the camera, this no longer happens and the recording without sound is saved.

Pachunko + etc:
If you are going to modify the system, I recommend that you first cancel all screen locks while the system is running (settings>security>screen lock>set none).
This will avoid many potential problems. When you have successfully completed the adjustments, you will turn security back on.
 
Last edited:
  • Like
Reactions: Abdullah.Csit

venom_stark

New member
Jul 19, 2021
4
6
I can't flash stock now at all... I get this error in mi flash:

error: Writing 'metadata'
FAILED (remote: 'Flashing of metadata is not allowed in snapshotted state')

so phone is bricked, not sure what to do. I can only get to fastboot currently

At first I thought so too. But only the time it works has been extended. The error will manifest itself after a longer period of time. If the error is associated with deep sleep mode, it will probably trigger after a longer period of device inactivity.

Despite these facts, another change has occurred. Where the app crashed after recording the camera, this no longer happens and the recording without sound is saved.

Pachunko + etc:
If you are going to modify the system, I recommend that you first cancel all screen locks while the system is running (settings>security>screen lock>set none).
This will avoid many potential problems. When you have successfully completed the adjustments, you will turn security back on.
I am currently using PE+ right now for testing. Let's see when these error will manifest. If it happen probably I will fix it in next build and this is a initial build everything will be fixed gradually Thanks for using 😍. And I will be happy if you could attach a log with dmesg in reply.
 
  • Like
Reactions: Abdullah.Csit

Pachunko

Member
Jul 19, 2021
46
17
Xiaomi Redmi Note 5A
Redmi Note 10
...

Pachunko + etc:
If you are going to modify the system, I recommend that you first cancel all screen locks while the system is running (settings>security>screen lock>set none).
This will avoid many potential problems. When you have successfully completed the adjustments, you will turn security back on.
I understand how the encryption happens, but at that point crDroid is already booted to logo, encryption is done and can't see anything in TWRP... and I cannot disable PIN/Pattern since I'm stuck at logo.

@Abdullah.Csit I flashed stock ROM again with lock. Booted, set up everything, removed encryption. Unlocked the phone, enabled debugging again, made sure no encryption is present. Flashed crDroid via fastboot OTA method - success. Booted to recovery, flashed Gapps (this is how I've done it before and everything worked btw), wiped data (factory reset), rebooted - stuck in bootloop. Now there's no encryption but there's not much I can do. I'm flashing stock now and sticking with it. Thanks for trying to help.
 

StaryMuz

Senior Member
Dec 27, 2012
434
141
Test the procedure without flash GAPPS.
Now just "claer all" without "lock".
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    IMG_20210903_150946_068.jpg


    « Disclaimer & INFO »​

    Code:
    # include <std_disclaimer.h>
    /*
    * Your warranty is... Still valid??.
    *
    * 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 KERNEL
    * 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.
    */

    Note: I'm just a library man all works saved to their owners this kernels made by love check credits. All copyright saved here with developer premison 😊👍
    Name of Kernel: LegionX

    Version of kernel: 2.0 NEW

    Lates stable Update: 2021/sep/03

    Supported Roms: MIUI & AOSP

    Status: Stable




    UNIFIED = MOJITO / SUNNY



    « Changelogs »

    [ Latest Release Changelog ]


    Check Post #2 (click number) for changelogs

    « NOTES »
    In MIUI / MIUI based ROMs, kernel version will show "Unavailable" because MIUI doesn't support long names (because I used proton clang and lld) but kernel working perfectly you can see name in FKM tough.
    • It's AIMING on Performance, stability,..
    • If you can't flash with TWRP , use FK manager to flash it "root required".

    KCAL works fine .Everytime you changed value in KCAL just screen off (Don't power off) and open screen .
    New value will apply.

    • If your device not booting to system just bootloop or fastboot only. Don't panic. re-flash your rom file without wiping data. And please report here with the name of rom and any details.

    • If you update TWRP recovery, reflash the kernel again too.

    • You don't need to Wipe data ! Only cashe and Dalvik.

    • Report for any bugs/issues with logs if available.

    « DOWNLOADS »
    Latest Stable Build (LegionX V2.0):

    Click here to download LegionX V2.0 (MIUI/AOSP)
    Previous Stable build:

    Click here to download V 1.0-LTO (AOSP Only) Build


    « INSTALLATION »
    1- Download Kernel & save it on internal storage.
    2- Boot to recovery (TWRP).
    3- Flash the kernel zip file.
    4- Wipe Cashe & Dalvik. “Don't Wipe Data
    5- Reboot to system.

    NOTE: For pixel experience rom, use this Guide:

    IT'S can safely installed on Pixel experience. Just follow this:

    1- Boot TWRP recovery with this command:

    Code:
    fastboot boot twrp.img

    2- Don't Install ramdisk or anything just go to LegionX Kernel on your storage and flash it.

    3- Wipe Cashe & Dalvik.

    4- Power Off then power on your device.

    Done.

    « CREDITS »
    • Kernel by: @venom_stark , Thanks 😊
    • Thanks to @ZIDAN44 , @CloudedQuartz ,@cyberknight777 & @Shararti1 .
    • Thanks @AnomYT for Banner
    • XDA-OP: @Abdullah.Csit
    • #All testers.
    • GitHub Source Link: https://github.com/venom-stark/mojito...
    SHOW YOUR SUPPORT BY HITTING LIKE 👍
    4
    I'll prolly look into eff freqs and cpuidle with lpm vals
    3
    #Kernel Changelogs 2021/9/03:

    Code:
    LegionX v2.0:
    -schedtune_assist: Cleanup and update
    -sched/tune: Only force UX tasks to big cores
    -f2fs: Enlarge min_fsync_blocks to 20
    -diag: Add timer to make sure wakelock no stuck
    -fs: Reduce cache pressure
    lib/string: optimized memcpy,memmove, memset
    -arm64: Import latest memcpy()/memmove() implementation
    -ARM64/dts: qcom: Disable CoreSight DT entries for sdmmagpie
    -scsi: ufs: Scrap Qualcomm's PM QoS implementation
    -scsi: ufs: Scrap Qualcomm's PM QoS implementation
    -msm: adreno: Relax CPU latency requirements to save power
    -sched/fair: fix misfit with PELT
    -qos: Don't allow userspace to impose restrictions on CPU idle
    -mmc: Disable SPI CRC
    -iommu: msm: Rewrite to improve clarity and performance
    -PM: sleep: Don't allow s2idle to be used
    -rcu: Speed up calling of RCU tasks callbacks
    -Enable JUMP_LABEL and added some jump lebel patches


    Code:
    ➡️ 2021/8/4 |
    
    • MIUI not supported in this update ( On V2.0 will get update)
    
    • Used LTO binary optimization
    
    • Complied using proton clang with lld linker.
    
    • Performance improvement
    
    • Battery backup improvement



    #Thread Changelog:

    🆕 // 2021.august.4 //

    - Introduce the new LOGO

    - Kernel Updated ! 2021/8/4

    - Added new note about MIUI in new update To «NOTES» section (IMPORTANT)



    //
    3
    Ok I wanted to test if fastbooting is the problem for my device. So I tried to fix my adb drivers so I can try sideloading for the first time. Managed to fix the driver (adb devices finally showed my device in PE recovery).
    What I did next:

    1. While in PE recovery - apply update - adb sideload crDroid.zip - installed
    2. Rebooted - crDroid WORKS!
    3. Set up debugging, copied FlameGapps.zip to "Download" folder (it was not displaying in root while in TWRP)
    4. Reboot to TWRP - open Download - Flashed Gapps

    Booted without issues, everything's working!