HUAWEI Y7 PRIME (2018)/NOVA 2 LITE/LDN-LX2/LDN-L21/LDN-TL10 General Discussion

Search This thread

Hari tharan

New member
Oct 26, 2018
2
0
I have downloaded the source code, but how can I make a custom rom from it?
I'm using Huawei Nova 2 Lite how to root my device please help me
 

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
I have downloaded the source code, but how can I make a custom rom from it?
I'm using Huawei Nova 2 Lite how to root my device please help me
Does sourcecode contain /kernel, /vendor folders only or you had found something more like device tree?
This should be enough to make custom recovery first, but for custom rom...something is missing.
 

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
I made backup of some partitions of LDN-L21B (Y7 P. '18) with stock rom (8.0.0.134-C432) here@mega.
There are no classic /boot, but partition /aboot, /kernel, /bootfail and /ramdisk; (i guess boot is splinted to kernel and ramdisk).
Stock recovery is splitted to /recovery_ramdisk and /recovery_vendor (i guess also /kernel, since no zImage on unpacked image)
There is also eRecovery with parts /erecovery_kernel, /erecovery_ramdisk and /erecovery_vendor. (/er_kernel is the same as /kernel). May be useful for future projects.
 

nena2410

New member
Oct 31, 2018
2
0
I use y7 prime 2018(ldn-l21) but I can't find twrp file on Google can someone please send me a link and is there any other way to install it without pc
 
Last edited:

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
I use y7 prime 2018(ldn-l21) but I can't find twrp file on Google can someone please send me a link and is there any other way to install it without pc
1 - its not made yet;
2 - we have to use PC to flash future twrp.img via fastboot command in bootloader mode...or it could be done with rooted phone, in terminal like: dd if=twrp.img of=/dev/block/mmcblk0p43
I guess it should be flash to /recovery_ramdisk partition.
 

nena2410

New member
Oct 31, 2018
2
0
Can someone tell me step by step if I can root y7 prime 2018(ldn-l21) without any custom recovery.?
Becase I can't find any custom recovery on internet
and king root and other apps don't work.
 
Last edited:

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
Can someone tell me step by step if I can root y7 prime 2018(ldn-l21) without any custom recovery.?
Becase I can't find any custom recovery on internet
and king root and other apps don't work.
This guy did it over teamviewer and flexihub for 4$ ministryofsolutions.com/huawei-bootloader-unlock-paid-service-html. Cracking bootloader code will ERASE all data in phone (internal memory also). After 1st boot of phone, turn on adb debug and oem unlocking. Then unlock bootloader (in bootloader mode) with code that you got from "ministry of solutions"-guy and it will ERASE all data again. Use this guide.
Now easy part, overwrite ramdisk part of bootloader with patched ramdisk and install Magisk Manager to got rooted phone, with no need for custom recovery! Use this guide!
 

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
TWRP is compiled (android 8.0 branch) and can not boot.
Error: dtb not found. Dummy (empty) recovery.img-dt or *.img-dtb not helping.

UPDATE: Built again, but no luck.
Even: flashboot boot zImage ramdisk.cpio.gz
freeze and do not boot to recovery. (zImage is stock from /kernel and ramdisk is from compiled TWRP recovery.img.
Even ramdisk from TRT-Lx1 TWRP do not work on Y7 Prime 2018. Any way to patch kernel to work with twrp?!
 
Last edited:

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
With "cat /proc/config.gz > config.gz" and "adb pull config.gz", I got (stock) kernel config from Y7 Prime 2018. if someone needed.
 

Attachments

  • london_defconfig.zip
    27.8 KB · Views: 205

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
Honor 7A and Honor 7C also has the same CPU MSM8937 but no twrp for them.
Honor 6A has older system, EMUI 5.1 and CPU MSM8937.
I tried to port Honor 6A's TWRP to stock recovery of Y7 Prime 2018..
.
It boots, but extremely unstable and reboots to recovery after 2 sec. You can not bypass recovery-loop, only way is to reflash original recovery_ramdisk in bootloader mode.
If someone can help, to make stable twrp, link is https://www.androidfilehost.com/?w=files&flid=285727.

Use fastboot flash recovery_ramdisk rec_ramdisk_honor6a.img and fastboot reboot to reboot to system. Then reboot to recovery using some app or adb command... Be sure that you already make backup of stock recovery_ramdisk for re-flashing / unbricking.

update: problem is probably in many *.rc files in /recovery_ramdisk but also in symlinked files from /vendor
 
Last edited:

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
TWRP 3.2.3 for Toronto (Y7 2017) by Kiruha21, successfully ported for London (Y7 [Prime] 2018) !!!
https://www.androidfilehost.com/?fid=11410963190603859487

Still in beta phase!!! WORKS, BUT USE ON YOUR RESPONSIBILITY!!!

Limitations:
- stock /data and its part /sdcard (or /internal_sd) are encrypted and folders and files have fuzzy names
- screencap -p *.png and sideload do not work
- adb can not write on /external_sd even as root

Pros:
- charger animation works (green cycle and flashbolt)
- reboot to system, recovery, bootloader and power off works
- mounting of partitions works
- reading files works
- terminal can write files

Installation:
-Back up stock /recovery_ramdisk partition (terminal > su > dd if=/dev/block/mmcblk0p43 of=/storage/5CEB-2300/stock_recovery_ramdisk.img)
-Boot to bootloader mode (power off Y7 and hold Vol- and Power until white Bootloader screen)
-Flash twrp via fastboot (fastboot flash recovery_ramdisk rec_ramdisk_trt2ldn_port1.img)
-Reboot to system (fastboot reboot)
-After that, reboot to twrp recovery (adb reboot recovery) or use some app like 3Minit rebooter or use Vol+ + Power combo on turned off Y7.
 
Last edited:
  • Like
Reactions: futuristicsam
TWRP 3.2.3 for Toronto (Y7 2017) by Kiruha21, successfully ported for London (Y7 [Prime] 2018) !!!
https://www.androidfilehost.com/?fid=11410963190603859487

Still in beta phase!!! WORKS, BUT USE ON YOUR RESPONSIBILITY!!!

Limitations:
- stock /data and its part /sdcard (or /internal_sd) are encrypted and folders and files have fuzzy names
- screencap -p *.png and sideload do not work
- adb can not write on /external_sd even as root

Pros:
- charger animation works (green cycle and flashbolt)
- reboot to system, recovery, bootloader and power off works
- mounting of partitions works
- reading files works
- terminal can write files

Installation:
-Back up stock /recovery_ramdisk partition (terminal > su > dd if=/dev/block/mmcblk0p43 of=/storage/5CEB-2300/stock_recovery_ramdisk.img)
-Boot to bootloader mode (power off Y7 and hold Vol- and Power until white Bootloader screen)
-Flash twrp via fastboot (fastboot flash recovery_ramdisk rec_ramdisk_trt2ldn_port1.img)
-Reboot to system (fastboot reboot)
-After that, reboot to twrp recovery (adb reboot recovery) or use some app like 3Minit rebooter or use Vol+ + Power combo on turned off Y7.

Hi, Im a few minutes from trying it... have you flashed any zip with the recovery or do a nandroid backup?... Do I need an sdcard to flash zip if internal storage is encrypted or it works regardless?...Also can I sideload zip via adb?

Update: Sorry about the adb question. Didnt read correctly. Works as you said. Thank you. I'll try to find sd card or otg for flashing zip.
 
Last edited:
  • Like
Reactions: adeii

Proseph

Member
Jul 23, 2018
11
3
Which partition contains boot.img? I need to pull it via ADB in order to install magisk using the patched boot.img method. I have a Y7 Prime 2018 (LDN-LX2) running Ressurection Remix GSI and it's limited to ADB root only
 

Proseph

Member
Jul 23, 2018
11
3
OTG and Sideload not work. Have to use adb push to /tmp (or /data/tmp) or use external sd.
/data and /sdcard have most of crypted folders and files and can not backup on stock rom.
Which partition contains boot.img? I need to pull it via ADB in order to install magisk using the patched boot.img method. I have a Y7 Prime 2018 (LDN-LX2) running Ressurection Remix GSI and it's limited to ADB root only
 

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
Which partition contains boot.img? I need to pull it via ADB in order to install magisk using the patched boot.img method. I have a Y7 Prime 2018 (LDN-LX2) running Ressurection Remix GSI and it's limited to ADB root only
No boot.img in Oreo. There are kernel.img and ramdisk.img, Magisk patches ramdisk.img.
Backing up of kernel, ramdisk, e/recovery also works in TWRP but just to external Micro SD.
If you disable forced encryption of /data and /sdcard, you could also backup to internal storage.
Code:
/kernel            emmc     /dev/block/bootdevice/by-name/kernel            flags=display="Kernel";backup=1;flashimg
/ramdisk           emmc     /dev/block/bootdevice/by-name/ramdisk           flags=display="Boot_RamDisk";backup=1;flashimg

Run in terminal: ls -l /dev/block/platform/soc/7824900.sdhci/by-name to list all partitions.

Code:
 Partitions in LDN-L21, should be the same

kernel -> /dev/block/mmcblk0p41
ramdisk -> /dev/block/mmcblk0p42
recovery_ramdisk -> /dev/block/mmcblk0p43
system -> /dev/block/mmcblk0p54
userdata -> /dev/block/mmcblk0p55
vendor -> /dev/block/mmcblk0p51
 

Attachments

  • parts2.txt
    4 KB · Views: 107
Last edited:
  • Like
Reactions: Proseph

Proseph

Member
Jul 23, 2018
11
3
No boot.img in Oreo. There are kernel.img and ramdisk.img, Magisk patches ramdisk.img.
Backing up of kernel, ramdisk, e/recovery also works in TWRP but just to external Micro SD.
If you disable forced encryption of /data and /sdcard, you could also backup to internal storage.
Code:
/kernel            emmc     /dev/block/bootdevice/by-name/kernel            flags=display="Kernel";backup=1;flashimg
/ramdisk           emmc     /dev/block/bootdevice/by-name/ramdisk           flags=display="Boot_RamDisk";backup=1;flashimg

Run in terminal: ls -l /dev/block/platform/soc/7824900.sdhci/by-name to list all partitions.

Code:
 Partitions in LDN-L21, should be the same

kernel -> /dev/block/mmcblk0p41
ramdisk -> /dev/block/mmcblk0p42
recovery_ramdisk -> /dev/block/mmcblk0p43
system -> /dev/block/mmcblk0p54
userdata -> /dev/block/mmcblk0p55
vendor -> /dev/block/mmcblk0p51

Thanks. I successfully installed magisk. Is there a way to set selinux mode to permissive? I've tried multiple apps but it won't work and tried the command "setenforce 0" via adb but it says "invalid argument"
 
  • Like
Reactions: adeii

adeii

Senior Member
Nov 11, 2013
413
93
Sajlent Hil
Thanks. I successfully installed magisk. Is there a way to set selinux mode to permissive? I've tried multiple apps but it won't work and tried the command "setenforce 0" via adb but it says "invalid argument"
If you decompile ramdisk.img, you will got /split_img/ramdisk.img-cmdline with ending:
... androidboot.selinux=enforcing buildvariant=user you could change it to androidboot.selinux=permissive buildvariant=userdebug
and recompile it.
 
  • Like
Reactions: Proseph

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Huawei Y7 Prime (2018) is a phone that packs 6 inches HD+ Fullview IPS Display with Qualcomm Snapdragon 430 and 3gb of ram/32gb of internal storage. It has a dual camera setup of 13+2mp 2,2 aperture and a front camera of 8mp 2,0 aperture. This phone was released April, 2018 and has Android 8.0 onboard with a kernel that is attached in here. I ask for a cooperation with XDA developers and I hope that we, users, help you as well in return. I hope that these device will soon have its custom recovery, root guide, custom kernel, and etc.

    This is the link for its kernel source code, "LDN" is the name of the device: http://download-c1.huawei.com/downl...oadId=98800&version=416724&siteCode=worldwide

    I hope for a better future with this phone I'm using:fingers-crossede32::):cyclops:


    2
    can you provide the procedure of unlocking bootloader of Nova 2 Lite please?

    Bro i have unlocked through www.ministryofsolutions.com
    You can also try
    2
    Sorry for replying late! Had some few examinations to go through before continuing some android development. I'll answer some questions since my last visit here.

    Can you build this GSI please? Descendant

    I'll see what I can do about that. Meanwhile, feel free to use @adeii 's solution here.

    UPDATE1 - Maybe, PIE GSI needs 3 POST-sGSI files to be flash to boots normally according to https://androidfilehost.com/?w=files&flid=280192

    UPDATE2 - This toolkit can unpack/repack PIE GSIs https://xdaforums.com/android/software/tool-turkdevs-image-kitchen-t3816395 so combining phh GSI + Descendant at once could works...

    That might be a good solution to the boot-up failure we've been getting on Pie GSIs.

    Also, I need your favor, since you're still on stock rom (and most probably rooted), could you upload framework-res.apk from /system/framework? The max brightness on my GSI is literally the minimum brightness on the stock EMUI rom. I need the file to create and overlay file(which has info about the true minimum and maximum brightness for the device). If you wanna know more about what I mean, here it is.

    thank you mate , last question please .. is lineage roms full stable ? do you recommend it

    Hmm, I would recommend phh-treble by @phhusson if you're upgrading to a Pie GSI. And this is the ONLY GSI that would work on the device as of today's testing.

    For Oreo GSIs, you're better off with any GSI you'd like since I tried 5 and they all would boot.

    Just make sure you've done:
    - Filesystem modifications (would ease some installs on TWRP/remove forced encryption)
    - The permissive kernel I made. (Since GSIs need a permissive SELinux to boot)
    - a full wipe (system, userdata, cache)
    2
    After a bunch more testing....

    CC: @adeii

    Ok, I’ve tested the permissive kernel and it works fine on @phhusson’s Android Pie GSI. What I’m weirded out is that it doesn’t want to boot any other GSI out there.:eek:

    Resurrection Remix needs to be flashed over phhtreble to actually boot, but the kernel init stage takes TOO MUCH TIME.
    If you want to try, this is the method:
    Code:
    fastboot erase system
    fastboot flash system (phhtreble GSI)
    fastboot reboot
    Then, do the initial setup. After finishing, reboot to fastboot and do this:
    Code:
    fastboot -u flash (RROS 7 GSI)
    fastboot reboot
    The -u is needed to flash over phhtreble system files, more accurately merge them both.
    Be careful: This results in ADB and SD Card not working, and the kernel init slowness. (This is not all the bugs I found since I quickly reverted back into phhtreble)

    Luckily, I might have a solution to the problem. The main problem would be that the vendor HALs (the piece of android code used to communicate with /vendor code) that are present in any other GSIs support Huawei’s EMUI 9 vendor HAL but not EMUI 8 vendor HAL. One proof that this might be true would be this repo by @phhusson himself which contains a folder called “Huawei-8.1” which the latest commit (as of writing) labelling it as EMUI 8.1 HALs. What’s convenient about this repo is that it has an automatic GSI builder with device patches which enable booting on other devices (in this case, the LDN device line). I’ll fire up my android build server and see if this method works.

    If you want a build of these GSIs below, let me know. I’ll build one for you.
    - AOSP 9
    - RROS 7
    - Pixel Experience Pie
    - AOSP Extended
    - Havoc OS

    I’ll build with this configuration: arm64-aonly-vanilla-nosu . This means no GAPPs installed and no superuser. If you want a custom config, also let me know.

    This list is not complete though, so if you have another GSI in mind, give me the GitHub link to the source code and I’ll see if I can modify the auto-builder code.

    I’ll do some further testing, will be back with you guys in about 3-4 days of tireless backups and tests. Feel free to send me PMs if you want, I’m in the forum in like 7am - 9am, 12pm - 2pm, and 10pm - 11pm (all times are in UTC btw). See ya!

    Screenshots of phone running Android P:
    https://imgur.com/a/JH9VFQt
    https://streamable.com/vavpm
    2
    I have downloaded the source code, but how can I make a custom rom from it?
    I'm using Huawei Nova 2 Lite how to root my device please help me
    Does sourcecode contain /kernel, /vendor folders only or you had found something more like device tree?
    This should be enough to make custom recovery first, but for custom rom...something is missing.