yashsingh1/xdaforums huggingface dataset:
[General Topics] adeii:
Problem with formating /data with TWRP is to apply patch that remove DM-Verity and Forced Encryption (in /vendor/etc/fstab.qcom and recovery.fstab) before reboot.

Or to use older TWRP (where /data is with flag "fileencryption=aes-256-xts:aes-256-cts").

I guess that you might need to restore folder /data/hw_init for normal working of stock rom.

Latest stock rom is LDN-L21C185CUSTC185D1B157 (8.0.0.157) according to pro-teammt.

Extracted stock recovery_ramdisk img, 27MB
[General Topics] adeii:
TWRP 3.3.1.0

TWRP with data+internal_SD
[General Topics] adeii:
Late switch from 142 to 144 (april 2019.) : stock ramdisk.img, recovery_ramdisk.img, kernel.img and (magisk-)patched_ramdisk.img and repacked permissive kernel (Thanks to [MENTION=8420194]EzzUsesAndroid[/MENTION] )

https://www.androidfilehost.com/?w=files&flid=298161
[General Topics] 47here:
Hi guys,i managed to unlock my bootloader,

can you give me step by step rooting my device huawei nova 2 lite(ldn-lx2). Im not a smart person so a little help would be appreciated.
[General Topics] adeii:
You had pass hard part (pay 4 eur, unlock BL, face deleting all user data, setup phone again). Now you had to download and install latest stable Magisk Manager 19.x.

https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

If not works, follow this manual. You would had to extract ramdisk.img from phone or downloaded stock rom and patch it manually in MM and flash it (via fastboot or TWRP).
[General Topics] 47here:
Thank you for your respond, how do i extract and patch manually in mm? Do you have reliable source where can i learn this? And can you give me link whre i can download twrp for huawei nova 2 lite?
[General Topics] adeii:
You are welcome. You are right, you can not use dd command to extract ramdisk before you got root. You can extract it with Huawei Firmware Extractor 0.9.9.5 (you had to uncheck Verify header checksum and Verify file chechsum, in Settings tab) from dowloaded stock rom or to back up ramdisk from TWRP. Last TWRP is 3.3.1.0 on this page, port #93.

After installing MM, it will say that Magisk is not installed and iti will offer you to download it from internet and install it.

Next, it will made you magisk(patched)_ramdisk.img on SDcard (I guess) to flash it via fastboot or TWRP. OR it will asking from stock boot.img (now it is ramdisk.img) to patch it.

Huawei Nova 2 Lite is coded as LonDoN-L22 or LX2, also named as Huawei Y7 Prime 2018, the same ramdisk should works. This is patched ramdisk.img for LDN-L21B, 8.0.0.144, C432 (for EU region).

There are some stock firmware for LDN-L22 and LX2. Not tested yet.
[General Topics] 47here:
if i understand correctly

1. install twrp.

2.install mm

3.backup ramdisk from twrp

4. mm will ask ramdisk(backup from twrp) to patch it.?

5.flash patched ramdisk in twrp?

am i missing anything.?
[General Topics] adeii:
Exactly! But TWRP save files as ...backup..IMEI....data....ramdisk.emmc.win,

4a) Copy it somewhere on SD card as ramdisk.img, MM read only *.zip (for plugins) and *.img (for patching)

4b) Got magisk_ramdisk.img in Download folder on SD card.
[General Topics] 47here:
thanks for your help.

there 2 twrp here, which one should i use?

and what different between these 2?

i install twrp but cannot backup bootramdisk.img

update>

i was using RAMDISK.IMG from huawei update extractor.

extract UPDATE.APP>>RAMDISK.IMG

then place ramdisk in my internal storage>

open magisk manager>Install → Install → Select and Patch a File> ramdisk.img

then copy patched ramdisk to my pc>

try to flash patched boot img using flash tool show me this error.

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash boot magisk_patched.img

target reported max download size of 535822336 bytes

sending 'boot' (11426 KB)...

OKAY [ 0.368s]

writing 'boot'...

FAILED (remote: partition table doesn't exist)

finished. total time: 0.385s
[General Topics] adeii:
It is fastboot flash ramdisk magisk_patched.img (/boot partition is for nougat and older systems. from oreo it is splitten to /ramdisk and /kernel )

TWRP normally backups, wipes and formats /data

without

internal storage.

2nd TWRP is patched to do the same

with

internal sd.
[General Topics] 47here:
Thank you, finally got myself magisk root. When I go to twrp backup there's so many stuff. Do you know which one important to backup incase I mess up.
[General Topics] adeii:
Essential for system, that could be messed up are: kernel, ramdisk, recovery_ramdisk, system and vendor. Just ramdisk and system would be enough.

For all user changes, data, settings and apps - you would like to back up also data (including internal storage). But you can do that only with decrypted user data/storage, for now.

In that case to had to: back up all data and apps during normal system boot and in TWRP change 2 files in vendor and format all data and internal storage and restore all data from start.

If you use custom/permissive kernel or upgrade system or try any GSI, you need also kernel and vendor.
[General Topics] 47here:
What happen if format my data do I lose anything?

Cuz right now I don't have anything important in my internal storage.
[General Topics] adeii:
Yes, anything that you had installed from day of buying phone till today, also any setting, sms, email, photo/video/sound/ringtone (if using internal storage as main, instead of sd card).

It is recommended to back up stuff to Google cloud, Huawei cloud or PC with any android or pc app before formatting data.
[General Topics] adeii:
New version of OEM-info changer for LDN-L21 :o

Something is wrong, do not use new changer, old is still good.

OEMinfo stock is at AFH.

Flash it via TWRP or fastboot as image to /oeminfo. Or restore via TWRP, but rename it as oeminfo.emmc.win.
[General Topics] t-mobile_mda:
hey guys..

can u pls share the oeminfo for this device..?

LDN-L21..

tia..
[General Topics] adeii:
Oeminfo is partition /dev/block/mmcblk0p30

2 pages before you could find this backup of oeminfo and modem(s), LDN-L21B C432 8.0.0.142

You just need mmcblk0p30 from FWdd backup if you will use "fastboot flash oeminfo mmcblk0p30.img" (not tested if works).

Or just oeminfo.emmc.win from TWRP backup if you restore oeminfo via TWRP 3.3.x.

Do not flash firmware backup (nor modem(s)), it is sufficient!! Could loose SIM detection.
[General Topics] adeii:
New update 8.0.0.146 for EU region (C432), appeared via eRecovery only, with december patches.
[General Topics] Ansshkki:
Is there any custom ROM for Y7 Prime (2018)?

I can't find one anywhere!!!
[General Topics] adeii:
There is no any compiled, since it is closedsource device. (No device and vendor sourcecode on GitHub/Lab).

There are custom recovery and custom (permissive) kernel for now.

BUT... some other MSM8937 device sourcecode could be used for our device(s) and other solution is to use precompiled GSI images of many custom ROMs and flash it over stock system. So you could have 8.1/9.0 rom with some bugs.

Also you need permissive kernel as pre-requirement. Example of custom roms, what works on Y6, will work on Y7.
[General Topics] Ansshkki:
Oh Great...

So, is this list works with it?

especially Android 10:

https://xdaforums.com/project-treble/trebleenabled-device-development/aosp-10-0-quack-phh-treble-t3992559
[General Topics] adeii:
I do not know for 10, but AOSP 9 by phhusson, 64bit, A-only was tested and it works. Read few pages rewind in this thread. Many roms could work, but you will need to flash phhusson's rom and after that flash favorite custom rom over it and reboot.

UPDATE: Some Russians (@ 4PDA) tested and confirm that AOSP 10 works on Y7 2018.
[General Topics] adeii:
What to try Night mode on stock EMUI 8.0 ?!

-Install MGC_6.1.013_MiMAX2_V1b_A8.1+.apk

-Accept all permissions, manually turn on Enable system changes in app properties

-Settings–>BSGMOD–>Input Model–>Pixel XL for rear and front.

-Now you need to restart the app.

-Settings–>BSGMOD–>Saturation–>Back Camera–> and Highlight Sat to 2.0 and Shadow Sat to 2.6 (better 1.8 and 2.5, cause color saturation is toooo high)

-Again restart the APP its required.

-Settings–>Advanced–>turn ON all the switches except HEVC/H.265 option.

-Restart the APP.

-Now use your Gcam for Portrait shots, Panorama, HDR+, Photosphere (not so good), Blur and SlowMotions (not works).
[General Topics] Arsam javed:
i am in a greate trouble. i have flashed wrong boot file in bootloader partition of my phone huawei y7 prime 2018 ldn-l21 custc185d1. phone show no display and notification led turned on. when i connect it to computer. computer produces connect sound but adb and fastboot show nothing. kindly guide me about this
[General Topics] Arsam javed:
emmc dongle showing empty DA file
[General Topics] ProgrammingPleb:
Something new is preventing GSIs to boot

Updated to the new update files for the LDN-LX2.

Something wrong is with the vendor files.

[MENTION=5540721]adeii[/MENTION] you might need to have a look on this:

01-14 13:09:40.287 1316 1316 F linker : CANNOT LINK EXECUTABLE "/vendor/bin/hw/vendor.huawei.hardware.biometrics.hwfacerecognize@1.0-service": cannot locate symbol "_ZN7android8hardware7details14gServiceSidMapE" referenced by "/vendor/lib64/vendor.huawei.hardware.biometrics.hwfacerecognize@1.0.so"...

All of the GSIs mentioned in the list you gave before had the same issue with the symbol "_ZN7android8hardware7details14gServiceSidMapE" not being found.

Any clues?

EDIT:

A quick search on Google shows that some of the people got this while flashing GSIs as well.
[General Topics] adeii:
Can you boot to eRecovery? What exactly you flashed to which partition (mmcblk0p....) ? Maybe to put stock rom update.app to dload folder on SD card and try to boot to download mode (both vol buttons and power) https://www.youtube.com/watch?v=IFfJ_Jq3Zrk

---------- Post added at 02:08 PM ---------- Previous post was at 02:04 PM ----------

Wait, you had updated stock rom, not GSI (9.0 or 10.0), and got linker problem? With stock kernel and stock recovery?

Xiaomi solved some GSI Pie boot error with some newer linker (arm and arm64) files. Or use linker from other GSI that works.
[General Topics] ProgrammingPleb:
No, it happens on GSIs on that list (tested OmniROM Treskmod, Descendant, and Havoc OS)

Currently back in stock ROM at EMUI 8.0.0.162(C636).

Not sure on why this happens though.

Should I downgrade?

EDIT:

Grabbed the logcat for these and got these in it.

Here is the crash dump for the error.

While here is the other vendor files having the same problem.

That means I have to rebuild it from source?

EDIT 2:

Looks like I might need to downgrade the vendor code I guess.

Will try and see.

Maybe Huawei changed something that is incompatible with the GSIs.
[General Topics] adeii:
I guess, try just to flash "/vendor/bin/hw/vendor.huawei.hardware.iawareperf@1.0-service"

from older update over new stock rom, does it work?

Does new stock rom works with "/system/bin/linker" and "linker64" from older update?
[General Topics] ProgrammingPleb:
How do I do that? Do I need to extract vendor.img from the old update files?

Will try this.

Although I will try patching the GSI with the EMUI linkers and see how that works out.
[General Topics] adeii:
Yes! This is example from 8.0.0.146 and 144 (C432) for LDN-L21B.
[General Topics] ProgrammingPleb:
Came back after going through a lot of Google Translated 4PDA pages and I might have an insight.

Gonna test the Android Q ones as well.

I think one of the starting points for me is to flash an older vendor file.

Will see what happens. Wish me luck!

EDIT: Just asking if anyone knows what "stock core" (Google Translate is seriously bad at these terms) in the sentence below:

EDIT 2: Oh my god. I got Lineage 17 (Android 10) working on this! That means a good GSI source would be the 4PDA forums.

Making this publicly accessible for those who don't know Russian after this.

Also, I used an older vendor version (8.0.0.154).

I'm going to test others and see how that works.
[General Topics] adeii:
Ставим сток ядро - I flash stock kernel.

Jadro (nucleus, core) is kernel on Russian.

Great news about working A10 on LDN-Lxx, Ezz !!!

What A9, A10 feature works on LDN ? Google Camera 7.x ?

Additional links:

ExpressLuke GSI Magisk A10

NFS injector module
[General Topics] ProgrammingPleb:
Oh, thank you for the explanation!

One issue on Android 9 that would not work is the hotspot issue, and it's fixed on Android 10.

Google Camera 7.x works fine when taking pictures but does not work when trying to use the video mode.

The standard Android 10 features are also working fine.

Although now offline charging does not work since it reboots to eRecovery.

Not sure why, but putting in in /system/etc/charger and symlinking /vendor/etc/charger -> /system/etc/charger, which is supposed to be the fix for it does not work.

Might need to check what's going on here.

Oops, forgot to put the links on that post, editing it now.
[General Topics] adeii:
Could be problem with recovery_ramdisk. Can you try offline charging with stock recovery?

Stock uses symlink charger -> \sbin\charger

TWRP uses symlink charger -> \sbin\healthd

update: error, offline charging animation (2 bmp) is inside /oeminfo.
[General Topics] ProgrammingPleb:
These two .bmp files do show up, however after the warning screen it just freezes up then reboots to eRecovery.
[General Topics] adeii:
Without charger or USB cable, phone boots normally? From eRecovery also boots normally?
[General Topics] adeii:
Well, I do not know full procedure, but you have to flash EDL stock rom with some program (Qualcom QDLoader, I guess).

There are rom for Y7 2019...procedure should be the same for Y7 2018.

According to this FB post,

You got to flash this https://androidhost.ru/1lyE in EDL mode.

Password is "https://www.gsmwan.com" without quoting marks.

update1: Maybe Android ToolBox could help https://ufixers.com/d/1-ufi-software-update-history-latest-v1-4-0-1464
[General Topics] Arsam javed:
i am using emmc dongle. on identify it shows that wrong DA file if you plz provide ma correct DA file i think problem can be solved
[General Topics] adeii:
Sorry, I can not boot to EDL via adb nor fastboot commands. Also do not know how to make DA file, but I can to RAW back up any partition if you need some.

In previous dump, there are rawprogram0.xml and patch0.xml which could work with QFil, as flatbuild cable.

update: Found this dump for Honor 7C on 4pda, almost similar as Y7.
[General Topics] idrawin24888:
MY LDN-LX2 AFTER FLASH THE VENDOR,REBOOT AND BLACK SCREEN,NOW CANT GOT TO FASTBOOT MODE AND TWRP MODE,CAN U HELP ME:crying:
[General Topics] adeii:
New official april fix* for LDN-L21B, 8.0.0.147. (I would not say update, since it is nothing new, just google security patches)

Full ROM 2.3GB
update.zip
/data/update/package_cache/update.zip
http://update.dbankcdn.com/TDS/data/files/p3/s15/G3004/g1650/v373690/f1/full/update.zip

update_data_full_public.zip
/data/update/package_cache/update_data_full_public.zip
http://update.dbankcdn.com/TDS/data/files/p3/s15/G3004/g1650/v373690/f1/full/public/update_data_full_public.zip

update_full_LDN-L21B_hw_eu.zip
/data/update/package_cache/update_full_LDN-L21B_hw_eu.zip
http://update.dbankcdn.com/TDS/data/files/p3/s15/G3004/g1650/v373690/f1/full/LDN-L21B_hw_eu/update_full_LDN-L21B_hw_eu.zip
[General Topics] adeii:
Can you boot to eRecovery to restore stock rom (hold power + vol+ till restart)?
[General Topics] adeii:
TWRP 3.4.0.0. for LDN-Lxx

Note: Seems the same as previous (3.3.1.0.); if touchscreen not works, disconnect phone from PC trough booting (from reboot cmd to twrp menu).

UPDATE: error with wipe /cache (e2fsdroid -e -S /file_contexts -a /cache /dev/block/mmcblk0p45).

Workaround> Mount /system than wipe /cache.

twrp3400London-InternalSD

twrp3400London
[General Topics] adeii:
- Pterondon Recovery for LDN-Lxx --- fail.

- Red Wolf Recovery for LDN-Lxx --- done. Has anti-piracy app check!

rw at mega.nz

- Sky Hawk Recovery for LDN-Lxx --- success!

shrp2.7z at mega.nz

Unpack, copy SHRP folder to /sdcard (internal sd), flash *.img to recovery_ramdisk. Enjoy in this eye-candy!

Note: This is port of Xiaomi Land (Redmi 3S) to Huawei London series.
[General Topics] adeii:
[MENTION=8420194]EzzUsesAndroid[/MENTION]

Long time not see you in this thread. I find it interesting you update your permissive kernel in future, even it is had not nothing good nor new feature on our devices. This is minor update from 3.18.66 to 3.18.67. Maybe till 3.18.140 would be some useful stuff.

permissive kernel for LDN 8.0.0.147.

Flash *.img via TWRP/SHRP/fastboot.

Update:

Permissive kernel 3.18.70

Permissive kernel 3.18.75

Permissive kernel 3.18.80

Permissive kernel 3.18.85

Permissive kernel 3.18.90

Permissive kernel 3.18. 100

Permissive kernel 3.18. 111

Permissive kernel 3.18. 120

Permissive kernel 3.18. 140
[General Topics] adeii:
- Orange Fox Recovery R10.1 (based upon TWRP 3.3.1) for LDN-Lxx --- success!

OF @ mega.nz

Unpack, copy Fox folder to /sdcard (internal sd), flash *.img to recovery_ramdisk. Enjoy in this eye-candy and useful twrp mod.

Note: This is port of Xiaomi Riva (Redmi Note 4) to Huawei London series.

Do not use Aroma File Manager (v2.0) - touch has not function, volume/power buttons work but nothing to do.
[General Topics] Arsam javed:
Is there any custom ROM that I can install on Huawei Y7 prime LDN-L21. I tried evaluation x (Twrp shows invalid zip file). I tried lineage os 17.1 (Stock recovery shows low-level format failed.). I tried google gsi (stock recovery shows factory reset and when I tried to reset it says failed. I don't flash vbmeta.img because I don't know where to flash it.). If there is any ROM which I can install please tell me.
[General Topics] adeii:
Yes! We can flash GSI of various custom ROMs. GSI is Generic System Image, good approach from Oreo and later: kernel and ramdisk (ex-boot.img), also vendor (ex part of system.img) remain stock. Just generic system files are changing. Excluding /vendor/etc/fstab.qcom and /vendor/etc/recovery.fstab, in those files userdata encription must be removed.

But you need custom recovery (TWRP/SHRP/OFRP) and permissive kernel (see previous posts)! This is mandatory for custom rom(s) to finish boot.

All you had to do is to wipe /system and /data and flash some GSI to /system partition.

Tested and working for phh-treble roms like this: https://github.com/phhusson/treble_experimentations/releases.

Remember - Y7 is A-only ARM64.

Also Ezz's tutorial for AOSP 10 on Y7 is here: https://xdaforums.com/showpost.php?p=82123931&postcount=125
[General Topics] Arsam javed:
at last i am able to install rom after 3 years. ROM is working well
[General Topics] Arsam javed:
I have installed l Phh AOSP Gsi but it has some problems like brightness is low and also speaker audio is low.

I tried same steps in sequence for Lineage is by andyyan. But it doesn't boot.

1st I flash system image

2nd I format data

3rd flash kernel

4th flash vendor

5th flash fstab

6th flash magisk provided at guide

Plz guide me
[General Topics] Arsam javed:
I followed your tutorial and be able to install AOSP by Phusson.

Now I want to install Lineage os 17 by andyyan.

I tried a lot but this Rom is not starting up.

Every time phone shows bootloader unlock page and then reboot and after some reboot it goes to stock recovery and ask for format.

Now plz guide me.

MY phone model Is huawei y7 Prime 2018 (LDN-L21 ) C185CUSTC185

PixelExperience is showing Blank Screen at boot.
[General Topics] anarxisco:
Very same here. Some hints?
[General Topics] adeii:
@Arsam javed @anarxisco

- Why do you still have stock recovery?

- Flash TWRP

- You need permissive kernel and also have to flash encryption remover / verity-check remover script.

- Now reboot again in TWRP.

- Then wipe /data.

- Now flash gsi to /system

- Update OpenGL and Vulkan drivers (see page 10)

- Reboot.
[General Topics] Arsam javed:
I have twrp flashed. But it seems that the phone hold both recoveries at the same time. If i press and hold power buttton + voulme up when phone is off then i boot into twrp. And if i press volume up button at bootloader unlock status page i boot into stock recovery.

In which partition i have to flash kernel? I always flash it in kernel partition ?
[General Topics] adeii:
OK. It is stock eRecovery (for emergency recover) that's ok.

Most of custom roms need permissive SE Linux to boot, just for that reason. Kernel.img flash to /kernel partition.
[General Topics] Arsam javed:
I did it.

I think the rom is for Ldn-l21 c432 and i have Ldn-l21 c185. Therefore it is causing problem. Ithink the issue is with vendor image.
[General Topics] anarxisco:
[MENTION=5540721]adeii[/MENTION] I think that the problem is that my Y7 Prime (LDN-L01) is not supported. Now I'm back to stock + root, is there any custom rom for it?
[General Topics] adeii:
But what is difference between LDN-L01 and LDN-L21, kernel is the same for both phones and both regions C185/C432. TWRP is also the same. Difference is just in some /vendor files and /version partition. Can you backup /ramdisk and /version and send me to analize (it is very small partition) ?

UPDATE:

If you had tried Lineage 17 according to EzzUsesAndroid tutorial, bypass step about flashing older vendor image. That is vendor for C432.

Latest stock rom for LDN-L01 and LDN-L21B for C185 is 8.0.0.153

http://update.dbankcdn.com/TDS/data/files/p3/s15/G2879/g1650/v354383/f1/full/update.zip

Previous 8.0.0.152 is at http://update.dbankcdn.com/TDS/data/files/p3/s15/G2879/g1650/v315719/f1/full/update.zip

Vendor.img could be extracted from UPDATE.APP with HuaweiUpdateExtractor_0.9.9.5 and unpacked with simg2img.exe.

UPDATE2: Kernel is almost the same. Some lines in config are different and it might be problem. I will compile kernel for LDN-L01 in future. So I need /proc/config.gz from stock rom to compare.
[General Topics] adeii:
ROM is universal for all android 8+ phones, no vendor or region target.

Yes, differences are in /vendor, as [MENTION=8420194]EzzUsesAndroid[/MENTION] said few pages before, some files for /vendor need to be from older stock rom.

Files /vendor/etc/fstab.qcom and recovery.fstab shoud be the same on c432 and c185. Example is in attachment.

Compare few lines from /vendor/build.prop to compare with mine:

ro.build.version.sdk=26

ro.build.version.preview_sdk=0

ro.build.version.codename=REL

ro.build.version.all_codenames=REL

ro.build.version.release=8.0.0

ro.build.version.security_patch=2020-02-01

ro.huawei.build.version.security_patch=2020-02-01

Only thing that should be changed in kernel is in "kernel.img-oslevel" where should be write the same year and month as it is in upper line "ro.build.version.security_patch".
[General Topics] anarxisco:
I've sent you a PM with the dump

I can't update stock, error 9 (unlocked bootloader + root)
[General Topics] adeii:
You can not flash update.zip via twrp nor stock recovery.

But you can

- restore stock kernel/ramdisk/recovery_ramdisk

- extract update.app and copy it to /sdcard/dload and boot to bootloader mode (or it should be download mode) to update

- restore TWRP and root system with Magisk.zip

or

- extract update.app and extract kernel/vendor/ramdisk/system.img with HuaweiUpdateExtractor

- flash any image with "fastboot flash <partition> <image.img>" from bootloader mode.

- boot to system to test it.

- restore TWRP and root system.
[General Topics] anarxisco:
It doesn't work, stuck and reboot

I will do this way, but exactly what ramdisk do you mean? erecovery, recovery o boot _ramdisk?
[General Topics] adeii:
ramdisk (part of ex boot.img)

---------- Post added at 11:07 PM ---------- Previous post was at 10:50 PM ----------

Diffs between stock L01 and stock L21

Ramdisk

L01:

L21:

Kernel config for L01 has additional lines:

Reminder for diff. regions codes.

This is permissive kernel for both L01 and L21 (also LX3), no matter region.

Version 3.18.121, security updates 2020-02.

Big kernel update:

There some good addons: kernel 3.18.140 with KCAL and Klapse support, with some IO schedulers, CPU freq. governors, TCP congs, Adreno idler.

Sourcecode: https://github.com/adeii/huawei-london-kernel