yashsingh1/xdaforums huggingface dataset:
[Huawei P20 Lite Guides, News, & Discussion] apexashwin:
Hi I'm unable to flash the twrp 9.1 since it shows the same except error, i managed to install losq with your guide. Now is there any way to install magisk without installing twrp? Will flashing the patched stock ram disk in fastboot with "fastboot flash ramdisk_recovery name.img do the job
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Really strange, I hear something like this for the first time...

Yes.
[Huawei P20 Lite Guides, News, & Discussion] apexashwin:
Hey just here to inform i was able to flash twrp with the command "fastboot flash recovery_ramdisk name.img". I was doing it the other way around at first, i managed to flash twrp as erecovery using the tools section in twrp then "fastboot flash ramdisk_recovery patched stock recovery.img" to flash patched ramdisk as recovery (my sd/sim slot 2 doesn't pickup anything for some reason and otg didn't work in twrp) now i have los q with magisk root, Thank you for your guidance.
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Hello, why the rom link doesn't work anymore?

Thank you for your post
[Huawei P20 Lite Guides, News, & Discussion] whitetigerdk:
Alf.. you beat me to it.. Was just about to reference to post #18... New version 301 just out about 3 hours ago.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Sorry bro...I can delete my post, no problem...
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Thank you.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
With built-in NFC Service :)
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
In the latest version I can't install anything on play store, it says that I have to free up space. Any help?

Edit: strange because I have 17 GB free according to the OS.

EDIT 2: Testing version 300m
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
IMO v300 is better, there's strange problem with SuperUser in the latest version (depends on SELinux status :oops: :unsure:) , hmm...
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Just tested v300m, same problem, My model is ANE-LX3 and had EMUI 9.1, any help?

Edit: Confirming this only happens in google play. I can Install apks.

Trying installing BvZ version and installing unnoficcial GAPPS.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
I've tested Google play on v301, I have installed apks without problem.

It might be due to your vendor/version, but I'm not sure...
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Hi, I followed your guide to the letter but cannot install anything with Playstore, says I have no space but I have.

Started with EMUI 9.1.0.370

Installed TWRP,

followed your install instructions exactly.

But once booted and opening playstore and conneting account i cannot install any app. says insufficient storage.

I've checked space on internal, theres obviously loads.

I've deleted cache and data from playstore.

Any help would be great.

Else looks like i'll just go back to EMUI

Many thanks
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Hi, flash the ROM from fastboot, (or downgrade to the lower build number):

IMPORTANT! Before booting up the ROM, you will need to perform a factory reset in stock recovery!

- Extract the ROM .img file from the compressed file.

- Flash extracted (file).img from fastboot , use command

fastboot flash system (file_name).img

- Run command fastboot reboot, unplug your phone, when the yellow warning appears on the screen, press and hold for 3 sec Volume Up .

- In eRecovery select 'Wipe data/factory reset'.

- Reboot .
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Thanks, That worked!

Appreciate your help!
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Another question,

If another update comes out for this is there a way to install without having to factory reset?

Can i just flash the update ontop?

Many thanks
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Yes, simply flash new system.img .

So advice: Never do wipe data / factory reset from TWRP on Huawei devices. When you did factory reset / wipe data from TWRP, phone may not boot anymore .

TWRP clears whole data partition. Huawei links additional things (hw_init, custom.bin, RIL and etc...) to /data partition, which stock Recovery does not clear.
[Huawei P20 Lite Guides, News, & Discussion] luka_bubi:
Thank you, will try today.

This is the info that should be 📌📌pinned📌📌 on all p20lite forums. With other phones it was "simple": just install TWRP, from TWRP install system and additional apps, from TWRP wipe data, cache, ... do a factory reset, reboot and you are good to go. But with Huawei you have TWRP, eRecovery, stock recovery, ... It is easy for a first timer and one that does this just a couple of times in a phones lifetime to be confused and ... well ... there is almost every other post about it :)
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Thanks @-Alf-

All seems working fine now, other than NFC

great advice on the what not to do in TWRP.

For NFC, not present even in latest version, if I flash the NFC Patch will I need to do a wipe in Stock Recovery?
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
it probably won't be so easy :) . Tried it, "permissions controller" doesn't work etc. So I'm not sure, sorry...
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
As I said before

I have NFC in v301 version pre-installed .( ANE-LX1 C432 9.1.0.132)

Unfortunately yes.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
https://xdaforums.com/t/my-experience-caos-r-300l-android-11-stable-so-far.4222155/post-84620317
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
I started with ANE-LX1 C432 9.1.0.170

Thats the only thing that is different from you. Perhaps, as with other Roms an issue with coming from to new base firmware
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
I apologize for the misinformation about buil-in NFC in v301 version. It happened due to dirty flashing from LOS 17. Pardon my mistake :( .
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
No worries, I'll install the NFC Patch and do factory reset in eRecovery.

Thank you again @-Alf-
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Ok, with the new posts I have new questions about this.

- Right now it's necesary to install TWRP? I don't think so because you can do it in fastboot.

- What are the real and complete installation instructions now? OP said that I have to wipe data and factory reset via TWRP, I want the full guide to avoid more problems, I almost bricked my phone trying to get to stock OS again.

- This OS has a while off charging function? because I wanted to charge my phone with CAOS when it was turned off but instead it turned on, I don't want to kill my battery life.

Edit: I have EMUI 9.1.0.332, ANE-LX3, it can be any problem installing this OS?

Thank you so much for your contributions.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Bingo! :)

I will not comment on that, it would be rude, IMO :) . I can just recommend the fastboot method. GSI ROMs are usually only compressed img files. You only need TWRP to install flashable ZIP (compressed package contains META-INF and other files).

Offline charging is not supported, known issue on GSI ROMs...

don't worry :)
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
And how do I stock factory reset if I have TWRP installed? Do I have to uninstall TWRP?

Caution: If you install this rom from EMUI through fastboot I think you have to wipe system partition, or you will end loop booting.
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Didnt have any luck fixing the NFC, wondering if you know of a magisk module that might help?
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
n/m, got it working, was using the wrong TWRP
[Huawei P20 Lite Guides, News, & Discussion] whitetigerdk:
Just found one issue on 301 upgrade.. Cannot connect to my 5GHz wifi.. 2.4GHz it will.. but not the 5 GHz.. Will try to reinstall first before downgrading. reinstalling helped this..

Also.. in settings - if I search for Volte i get some results.. but cannot seem to find where to change the settings.. The results leads to Settings->Network and Interent -> Cellular network (dunno if this is correct as my phone is in Danish)
[Huawei P20 Lite Guides, News, & Discussion] Fjord1:
Hello, Magisk runs on CAOS ?

Thanks.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
...like a charm :)
[Huawei P20 Lite Guides, News, & Discussion] luka_bubi:
It looks like v301 got canceled as it is removed from sourceforge.
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Can someone test this?

This is an offline charging fix for any Huawei phones.
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
I can't make this to work with these steps from stock EMUI to CAOS, I also wiped system partition with no sucess, ends up rebooting infinitely, any help?
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
No comment ... 🙂
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
I'm saying because the instructions are unclear, not everybody is a pro or reads minds, and I'm telling that method is not working, it restarts after the yellow text appears.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
If you have followed this guide to the letter and it didn't work, i'm afraid I cant help you.

Read the instructions carefully and completely, check unfamiliar terminology by google or xda.

P.S.: You can choose to not do what i suggest, it's your choice :)
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
I can confirm that for ANE-LX3 with EMUI 9.1.0.332 doesn't even boot with fastboot, with twrp I can't install any google play applications, can't transfer files with usb to pc, and I don't know if many more bugs.
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
@-Alf- Has made his instructions in this thread very clear, worked for me.

I'll lay it out for you...

Start with EMUI - I used EMUI 9.1.0.274

MAKE SURE YOU HAVE DEFAULT RECOVERY AND ERECOVERY

Extract the ROM .img file from the compressed file.

Flash the image in Fastboot, to enter fastboot; from power off; hold down on volume while attaching usb.

Flash extracted [IMAGE FILE].img from fastboot , use command:

fastboot flash system [IMAGE FILE].img

If you want NFC fix flash NFC - IF NOT, Skip to 6

Download NFC fix

https://mega.nz/#!1kM3RIZR!dFkTULyfbNuKD9vX-q56h4RrFYqAqFSBMcFMe9dq4ng

Follow these steps clearly

Install TWRP-9.1 https://mega.nz/#!tkcTlATI!A8UJGPBGtxJbLcUOJoxCGJj5PFZXzCnjbb3OkwqKTP8

fastboot flash recovery_ramdisk [TWRP-91].img

boot to TWRP

in TWRP unmount all except SD Card , Vendor and System (unmount and mount again)

flash nfc_hotspot_universal.zip

Reboot > hold Volume Up > eRecovery > Shutdown.

Flash stock recovery_ramdisk

Install Stock Recovery https://mega.nz/#!M0FHlYhb!4yWz8Onr3D1NATel4mZSK4SNdd5B3p6dnPg6oXPGWl8

fastboot flash recovery_ramdisk [STOCK RECOVERY].img

Run command fastboot reboot, unplug your phone

When yellow text appears hold Up for 3 seconds (2nd option in yellow text)

In eRecovery select 'Wipe data/factory reset'.

Reboot

Boot phone and do all installs.

If you want MAGISK, boot to fastboot and flash patched recovery ramdisk from the original EMUI you came from.

Install patched recovery https://mega.nz/#!Z9NBVYSZ!NAd-h_VtRecyl28UX5E5z6KMa3cw56KCbQN-P6yxPMY

fastboot flash recovery_ramdisk [PATCHED RECOVERY].img

fastboot reboot

on yellow screen HOLD POWER and UP until reboot, release power when you see HUAWEI logo but keep holding up, you'll see yellow text but only 1 line if right.

Install Magsik Manager from usual sources

Now, with Magisk root you can do the steps layed out by @whitetigerdk but its not necessary.

Install 'Treble Info' from PlayStore (just search it)

Look in the app to what kind of "Treble and VNDK" used by your phone - Mine was using VNDK version 28.

In a root file manager (your choice)

Now go to system -> system -> system_eks -> apex

You will most likely find som folders named (xxx=something):

xxxx.vndk.27

xxxx.vndk.28

xxxx.vndk.29

xxxx.vndk.curren

Delete the folder before what you saw in TrebleInfo (as my example i could delete VNDK version 27

If YOU messed up, try again from base EMUI (dload method or Erecovery restore or install stock system.img extracted from Service ROM via fastboot)
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
these steps are unnecessary...
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Cheers, updated. I did say 'can' but added that 'its not necessary'
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Better use .200 or older builds, but it might be due to vendor spec., you can also rebrand your phone to ane-lx1...
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
v302 changelog:

- March SPL

• phh v302 patches

• reworked dynamic root to avoid any conflicts with Magisk and other system modding apps

• included Magisk sbin PATH support

• added option to disable notification headers

• added options to the control DT2S on lockscreen and statusbar

• included patch to the allow audio for external screen recorders

• in stock Dialer added option to set fullscreen photo

• added QS tiles 5x3 overlay

• interface speed up
[Huawei P20 Lite Guides, News, & Discussion] Incomtus:
In my case nfc patch seems not working.. I have a disabled NFC service system app but i dont find any way to enable it there is no NFC options in settings. if it works for someone, can you help?
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
If you have followed this tutorial to the letter it should work. And look here (about TWRP).
[Huawei P20 Lite Guides, News, & Discussion] Incomtus:
Waw you mean that it depends on TWRP version? I did not expect that.. thank you. as i have to wipe every thing i ll tried later lol
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Of course... Recomm. TWRP
[Huawei P20 Lite Guides, News, & Discussion] Incomtus:
Anaother question, does it changes something if twrp is installed on recovery or erecovery?
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
it is useful to install it over eRecovery (having stock recovery you can do wipe cache or factory reset, if needed, flash Service ROM etc...), but not necessary. You must flash TWRP over eRecovery (running EMUI 9.1) only if you want to install Magisk root.
[Huawei P20 Lite Guides, News, & Discussion] Incomtus:
Thanks a lot you rock
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
It is normal that you can't transfer files even if the "Transfer files" option is enabled once you connect it to PC?
[Huawei P20 Lite Guides, News, & Discussion] whitetigerdk:
Nope.. it works just fine for me..
[Huawei P20 Lite Guides, News, & Discussion] Fjord1:
Hi there,

I have just updated to CAOS and tried to install Magisk 21.0 but no luck , (magisk manager says Installed: N/A).

And next question - can I use Magisk root & GPay (NFC) ? Is there any chance to pass the safetynet ?

I would really appreciate help...
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
1. In Phh treble settings disable SuperUser

2. Remove Magisk (replace patched recovery with the stock recovery)

3. Install Magisk manager 22.0 (!)

3. Reboot into TWRP, flash Fix , reboot and install Magisk v21.0 again. It should work .

Note: use this TWRP .

- Uninstall GPay appk, do wipe cache in stock recovery

- in Magisk Manager select Modules, find the "SQLite for ARM aarch64 devices" module in repository and install it. (Each restart to recovery after installing the module must be completed manually).

- Then install in Magisk Manager from storage Module 1 (follow instructions on the screen) , reboot.

- install from storage Module 2 , reboot.

- install GPay appk .
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
I'm trying the following, is it fine?:

- Downgrading to 9.1.0.142

- Intalling TWRP over Erecovery, repatch stock recovery.

- In TWRP wipe cache, dalvik and system, reboot to twrp again.

- Install this image, turn off and turn on stock recovery.

- Stock Wipe Data/Factory Reset.

- Boot.

With this I hope it starts without bugs, sorry for insisting but I haven't did this like 5 years ago, and worse with EMUI. Thank you.
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Try following my instructions HERE I've been running with no issues. All functions, NFC, usb transfer all working.

Installing with fastboot recommend. If you flash with twrp expect issues.
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Installing through fastboot for some reason soft-bricks the phone, with TWRP works normal except MTP. I guess that's because I have ANE-LX3 model...

Edit: I'm using dload version now (9.1.0.142), I'll try it tomorrow
[Huawei P20 Lite Guides, News, & Discussion] luka_bubi:
After just installing the v302 after previous v301 I encountered a couple of errors. The most significant were problems with permissions, errors with SafetyNet and that new Gboard's settings keeped crashing. So I did a new fastboot flash of the v302, installed NFC patch and factory reset. I followed instruction in #116 to the letter and now have a working system once again.

A couple of errors in the @Videophile's instructions:

should be

fastboot flash recovery_ramdisk [TWRP-91].img

and the same with

that should be

fastboot flash recovery_ramdisk [YOUR STOCK RECOVERY].img

Now (for now) everything works. So thank you @Videophile and @-Alf- for your work.
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Thanks for pointing out the errors. I've amended my post.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Stock Recovery/eRecovery is the same for all ANE, LLD and BND models and build numbers (with the same EMUI version on board).

Logically, patched-recovery is also the same.

recovery_ramdisk

Patched rec._ramdisk

there is another option -

install stock system.img extracted from Service ROM .
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Thanks, added to guide #116
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Ok, finally got it working without bugs, wiped system in twrp (in Erecovery) and installed the img as System Image, then I rebooted to stock recovery, factory reset, and done.

Now, I'm trying so hard to bring back the offline-charging problem, I've searched this and this, first post didn't work BUT it displays the charging logo -> yellow text -> black screen for 1 min -> boots.

I've been searching the /system/etc/charger files from stock rom and it's different files from the post, so I used them and it didn't work.

Also I've seen that it's a kernel problem and patching it makes offline charging working again.

Any help?

EDIT: Noticed that flashing patched recovery_ramdisk for magisk removes offline charging too in stock rom, so I don't know what to do to fix it.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
I know you won't believe me because my instructions are unclear and don't work :p , but that is A9 bug (SaR) - Google (or Huawei) decided that the ramdisk was not needed in the boot partition and was pushed into the system. Before that, offline charging was excellently started from the boot partition. (With A10 was ramdisk returned back to the boot partition). AFAIK there are no specific solutions for devices running EMUI 9.1.

But maybe I'm wrong, I'm not a developer.
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Nah bro I wasn't trying to say that, sorry if I misunderstood.

Damn I feel a bit unlucky to have bought this phone 1 year ago rn lol.

So sad, I hope we find a solution to patch recovery or something, getting offline charging removed decrease even more battery life.

And thank you for clearing out :) .
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Where did you get this information??? It's just a myth.

The only possible advantage this gives is that it may charge the phone faster (10-15 min) - because network signals and background apps consumes little amount of charge.

So my advice: to prolong battery life, do not use fast charging.
[Huawei P20 Lite Guides, News, & Discussion] millerntorxda:
Did you resolve the issue - I face the same problem
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
@-Alf-

Just wondering if youve had issues with signal strength not being great on this or other Roms,

Might just be me where I am, but i've towers quite close to me and expected a bit better connection.

Perhaps an issue that can be solved?
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Do you mean Signal icon in Status bar?
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Yea pal
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Known bug, signal meter doesn't work on most custom ROMs (at least on Kirin-powered devices).

In Settings>About phone > SIM status> Signal strenght

shows me the same value for two weeks : 2147483647 dBm 99 asu (= nonsense ) :p

If you want check signal strength use a specialized app from Google Play.
[Huawei P20 Lite Guides, News, & Discussion] Videophile:
Cheers. Good to know it's a known bug n not actually my signal messed up
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
caos-v302-2021.03.25 changelog
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Can you test if the "offline charging fix" works in our model?
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Why don't you try it yourself? Test it and let us know :)

P.S.: This feature is not important to me, minor bug only.
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
How to transfer your apps, data, SMS etc. between various Custom ROMs (or between Stock and Custom ) look here
[Huawei P20 Lite Guides, News, & Discussion] pyro000:
Can't I am actually in exams stage, I don't have time to re-unlock bootloader, install the rom, dissapoint and revert to stock using dload.

If you can, would you check for me?
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
does not work, at least on ANE-LX1C432. Tried to edit plat_sepolicy.cil file in system/etc/selinux, change SELinux mode to permissive etc., no luck. It seems Offl. charging doesn't works on Kirin-SaR devices.
[Huawei P20 Lite Guides, News, & Discussion] Weissi_:
I've tried to install Magisk according to -Alf-'s instructions here, however, I'm not able to pass SafetyNet with the latest build of CAOS. It passes basicIntegrity but not ctsProfile. Changing the device fingerprint via the module MagiskHide Props Config also doesn't seem to work. With it, I can change the fingerprint just fine, but nothing changes in regards to SafetyNet.

Has anyone encountered that problem and was able to solve this somehow? Or is there another way to get Netflix running without getting an error telling me to restart the device when opening the app? I did not try to log into my banking apps yet, but I suppose those probably won't work either.

Thanks in advance for any ideas :)
[Huawei P20 Lite Guides, News, & Discussion] -Alf-:
Try this instruction .
[Huawei P20 Lite Guides, News, & Discussion] Weissi_:
This worked like a charm, I'm passing the SafetyNet test now (I only wiped the cache and installed Module 2, since i don't need GPay)! Thank you!

Netflix is still the same though (reinstalled it afterwards with the newest version from ApkPure), it must be something else which prevents it from working.
[Huawei P20 Lite Guides, News, & Discussion] millerntorxda:
I get full SafetyNet success with hide props model Huwaei P20 Lite and Version 8 (on LIR, not CAOS, should not make much of a difference)

But I don't use netflix and the app is not shown in play store for me, but a apk from apkmirror did start (did not try to login).

Maybe netflix wants safetynet check with hardware attestation (see this article): IMO this can't be done with an open bootloader. Magisk and HideProps just trick the check into thinking, the device is not capable of hardware attestation.