[Huawei P20 Lite Questions & Answers] madalone:
hello everybody,

well as the title says, i've bricked it. i've had TWRP installed (it doesn't boot past the loading screen now) and working with magisk. all good until i decided to be my ol'dumb self and formatted /system before reflashing and even before that, to enable the OEM unlock. so after attempting a reboot to recovery, it just got stuck at TWRP's logo.

then, i booted into fastboot and the phone displayed the Phone unlocked FRP lock screen. so i couldn't flash AOSP 8.1 because of the OEM unlock thing. then i used DC unlocker in an attempt to get around the OEM lock and after rebooting i can't even put the phone in fastboot. it just goes into the TWRP logo and stays there. can't boot into fastboot through adb either.. i tried sticking UPDATE.APP into a folder called dload in my sdcard and pressing vol+&vol- while booting as i read somewhere but no dice..

i did make a backup with TWRP and if i could get write access to /system i could push the files from the backed up /system, which i've tried (adb push system /) but it's read-only.. so wah-wah.. any way of getting write access? i've tried running su in a shell (adb shell) and i get /sbin/sh: su: not found

edit: funny enough, i'm able to push some files into /system (see below)

D:\Downloads\_LIUGIGB>adb push --sync system /
adb: warning: skipping empty directory 'system\app\Bluetooth\lib\arm64\'
adb: warning: skipping empty directory 'system\app\BuiltInPrintService\lib\arm64\'
adb: warning: skipping empty directory 'system\app\HwIAware\lib\arm64\'
adb: warning: skipping empty directory 'system\app\HwPowerGenieEngine3\lib\arm\'
adb: warning: skipping empty directory 'system\app\HwPowerGenieEngine3\lib\arm64\'
adb: warning: skipping empty directory 'system\app\HwSoundRecorder\lib\arm64\'
adb: warning: skipping empty directory 'system\app\HwVideoEditor\lib\arm\'
adb: warning: skipping empty directory 'system\app\NfcNci_45\lib\arm64\'
adb: warning: skipping empty directory 'system\app\PacProcessor\lib\arm64\'
adb: warning: skipping empty directory 'system\app\PrintSpooler\lib\arm64\'
adb: warning: skipping empty directory 'system\app\SwiftKey\lib\arm64\'
system\: 4950 files pushed. 1040 files s.... 5.5 MB/s (576383367 bytes in 100.358s)

D:\Downloads\_LIUGIGB>adb shell
~ # su
/sbin/sh: su: not found
~ # cd system
/system # ls
app delapp framework
asr emui lib
bin etc lib64
build.prop fake-libs lost+found
cameraplugins fake-libs64
compatibility_matrix.xml fonts

after pushing the files, the phone still won't go into fastboot, when i run adb reboot fastboot, the phone shuts down and if i press power&vol+ or power&vol- the phone does nothing. also plugging the cable while pressing vol- has the same effect: nothing..

edit2: could the fact that my phone is encrypted be an issue too? (this took me here which took me to edit3)

edit3: i formatted userdata through adb shell (/dev/block/platform/hi_mci.0/by-name # make_ext4fs userdata) TWRP and fastboot are back! went into eRecovery and the stock rom is downloading. i hope this solves the issue..

edit4: after downloading & flashing the stock rom my phone is back to life. i'm not sure where i messed up, but i'm sure i did somewhere along the way.. i'll leave this here, maybe someone will find it handy..