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

adeii

Senior Member
Nov 11, 2013
331
83
58
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.
 
  • Like
Reactions: Hari tharan

adeii

Senior Member
Nov 11, 2013
331
83
58
Sajlent Hil
I made backup of some partitions of LDN-L21B (Y7 P. '18) with stock rom (8.0.0.134-C432) [email protected].
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
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
331
83
58
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
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
331
83
58
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
331
83
58
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
331
83
58
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
331
83
58
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

futuristicsam

Member
Jul 14, 2012
40
10
8
NL
www.twitter.com
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

adeii

Senior Member
Nov 11, 2013
331
83
58
Sajlent Hil
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.
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.
 

Proseph

Member
Jul 23, 2018
11
3
0
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
0
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
331
83
58
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

Last edited:
  • Like
Reactions: Proseph

Proseph

Member
Jul 23, 2018
11
3
0
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
331
83
58
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