Custom ROM / TWRP for Honor 10 Lite?

Search This thread

djaurin

New member
Jan 30, 2020
1
0
TWRP??

i saw in a website a TWRP for 10 lite (cant link a newbie) or any of you have a working TWRP?
as you know soon there will be EMUI 10 and new rom needs wipe of dalvik cache. I don't know if im asking here right
 

aIecxs

Senior Member
Feb 17, 2016
1,054
328
see post #49 "working" but untested because lack of users. needs a small fix for system-as-root maybe. try and report back
 

Gigifol

New member
Apr 27, 2020
1
1
Ciao ragazzi a quanto pare sul sito che vi sto per scivere c'è il download di rom per

Ciao ragazzi a quanto pare sul sito che sto per dirvi ci sono le rom per molti dei modelli huawei ed Honor. Il sito è
openkirin.net/download/
Mi date conferma? Si può quindi flashare una rom custom su Huawei?
 
  • Like
Reactions: aIecxs
i can not find a mkfs.erofs binary so the partitions remain read-only and non-wipeable. please test this version, i had some trouble re-packing so it may not boot.

do not flash it! test version only!
Download: twrp_3.2_kirin710_erofs.zip

@kilroystyx Many thanks about the notch, your improvement is highly appreciated!

if you get managed to make a backup of the erofs partitions, you can reformat it to ext4 and restore the backup with the other version. then some files inside /vendor need to be patched (change everything from erofs to ext4)

however, if this fail you may still have a option to find another rom which uses ext4

edit:
Huawei recently changed the LZ4 decompression (improved speed), if someone want to compile use the new sources!
staging: erofs: switch to new decompression backend
As it is a read-only file system, it is generally not supported to mount rw. That means, the whole partition has to be re-created each time you want to modify (for example /vendor/etc/*fstab*). Magisk does support EROFS already. for flashing partitions use /system_image or /vendor_image (it is handled as RAW data) so this TWRP should be fine. But you can not, and you never will be able to install any zips on /system
I recently unlocked my Honor 10 Lite and flashed this recovery image (because I can't boot it through fastboot, it reports "command not allowed" during booting stage). At this moment of time, I noticed the next bugs:
1. Touch doesn't work, but I can use mouse through USB-OTG cable
2. Recovery cannot remember ticked state of "Never show this screen again" on "Unmodified system partition" screen and any modified options: language, timezone, etc.
3. Also recovery cannot mount some partitions, according to logs. Command to mount /system from this post works perfectly, and after that I can also format this partition.

I can be your recovery tester, if you want. But I don't visit XDA forum that often, so you may write me on Discord: Neko-Monika#0940
 
Last edited:

aIecxs

Senior Member
Feb 17, 2016
1,054
328
hi, many thanks for testing and reporting back!

as you may already have noticed i don't own this device. therefore i am not primary interested in development. but of course i am offering my help in case you want me to fix

fastboot boot is disabled on most devices nowadays, which makes it harder to figure out cause of touchsreen not working. glad you figured out otg mouse.

unfortunately i don't know how twrp works (language, timezone, etc.) but if you provide recovery.log i will help to fix fstab with proper mounts
 

aIecxs

Senior Member
Feb 17, 2016
1,054
328
seems the init.d script is not working, can you try to start manually from shell. when script is running try to mount system from the mount menu a view times, finally adb pull /tmp/recovery.log again
Code:
sh -x /etc/init.d/00_mount_watchdog
 
I started this script manually through TWRP Terminal, then went to main screen and open Mount menu. Practically all partitions were ticked (except Splash2; Micro SD Card and USB OTG doesn't count, I think). Then I tried to untick and tick System few times: unticking happens immediately, but ticking - only after a short time.
 

Attachments

  • recovery.zip
    29.9 KB · Views: 5

aIecxs

Senior Member
Feb 17, 2016
1,054
328
have added init.d support in init.rc to make the script run on boot. added /system_root and /storage in recovery.fstab (same link)
Code:
service set_permissive /sbin/permissive.sh
    oneshot
    seclabel u:r:recovery:s0
Note the delay is in nature of this cheat because all 00_mount_watchdog does is looking for failed mount attempt in recovery.log and update /etc/mtab with erofs entry. with growing log the TWRP session becomes more and more slower
 
Last edited:
have added init.d support in init.rc to make the script run on boot. added /system_root and /storage in recovery.fstab (same link)
Code:
service set_permissive /sbin/permissive.sh
    oneshot
    seclabel u:r:recovery:s0
Note the delay is in nature of this cheat because all 00_mount_watchdog does is looking for failed mount attempt in recovery.log and update /etc/mtab with erofs entry. with growing log the TWRP session becomes more and more slower
I redownloaded and updated flashed recovery image through fastboot. Touchscreen still doesn't work, System Root mounts in Mount menu successfully, but it's a little strange to see a System item next to it. And TWRP still tries unsuccessfully to mount same partitions. What else can I check to see if it's working?

By the way, I went from stock EMUI 9 to AEX 10 ROM by OpenKirin. Is that not critical in tests?
 

aIecxs

Senior Member
Feb 17, 2016
1,054
328
Touch screen nothing i can do. /system is required for binaries in /system/bin and is only a bind mount of /system_root/system

TWRP can not mount partitions because it does not allow erofs file system type, that's what the shell script is for and it's only a cheat not a fix. Is the script running automatically on boot?

afaik ROM doesn't matter because this TWRP has bundled kind of it's own ROM in /system

you can try to flash magisk canary maybe it will fix touch by patching dts or dtb partition (check logs)
 
TWRP can not mount partitions because it does not allow erofs file system type, that's what the shell script is for and it's only a cheat not a fix. Is the script running automatically on boot?
Well, I went to EMUI 9.1 after some minor issues in custom ROM, but that's not the point. So, I can mount System Root on custom ROM, but in stock ROM - I can't, it gives me an "Invalid argument" error. Probably because system partition in custom ROM is not in erofs format.

I also tried to mount vendor, same error. Seems like script doesn't boot during recovery loading.

If anything, "Не удается смонтировать" is "Failed to mount" on English. I just changed recovery language on Russian.
 

Attachments

  • recovery.zip
    38.2 KB · Views: 5
Last edited:

aIecxs

Senior Member
Feb 17, 2016
1,054
328
custom ROM is ext4 as usual. interestingly i see no error for /storage that mean bind mounts will work out of the box without script at all. can you please double check if script still works in english language when started manually, maybe i broke it completely or maybe it just not running..
please also try to start from
Code:
/sbin/permissive.sh
sh /sbin/permissive.sh
/etc/init.d/00_mount_watchdog
sh /etc/init.d/00_mount_watchdog
 
Last edited:
custom ROM is ext4 as usual. interestingly i see no error for /storage that mean bind mounts will work out of the box without script at all. can you please double check if script still works in english language when started manually, maybe i broke it completely or maybe it just not running..
please also try to start from
Code:
/sbin/permissive.sh
sh /sbin/permissive.sh
/etc/init.d/00_mount_watchdog
sh /etc/init.d/00_mount_watchdog
Manually started sh -x /etc/init.d/00_mount_watchdog is still running successfully. I also tried to run these commands, and here's results:
1. sh /sbin/permissive.sh refuses to start without -x:
Code:
setenforce: setenforce() failed: Invalid argument
But if I run this command with -x, the output will be:
Code:
+ setenforce 0
setenforce: setenforce() failed: Invalid argument
+ chmod -R 0750 /etc/init.d
+ find /etc/init.d -maxdepth 1 -type f -perm /110
+ / # sort
+ read -r SCRIPT
+ /etc/init.d/00_mount_watchdog
And after these strings it starts spamming this string:
Code:
umount: can't unmount : No such file or directory
But in Mount menu practically all partitions, except Splash2, were mounted.
2. sh /etc/init.d/00_mount_watchdog started without any output, and seems like practically all partitions, except Splash2, were mounted.
Here's logs:
 

Attachments

  • recovery.zip
    30.4 KB · Views: 5
  • recovery2.zip
    43.3 KB · Views: 5
Last edited:
  • Like
Reactions: aIecxs

aIecxs

Senior Member
Feb 17, 2016
1,054
328
fixed the language bug, should detect Failed to mount/Не удается смонтировать now in every language according to /twres/languages/ru.xml -> if that text line appears in recovery.log the script will mount erofs (same for umount)

not sure whats the problem with autostart, have deleted permissive.sh and moved the init.d code into setprop.sh instead. note there is a delay of 10 seconds on boot. if script still does not start you can start it manually by typing
Code:
setprop.sh
please confirm umount is spamming only when script is started twice (so two sessions of 00_mount_watchdog are in a race condition)
 
Last edited:
fixed the language bug, should detect Failed to mount/Не удается смонтировать now in every language according to /twres/languages/ru.xml -> if that text line appears in recovery.log the script will mount erofs (same for umount)

not sure whats the problem autostart, have deleted permissive.sh and moved the init.d code into setprop.sh instead. if script still does not start you can start it manually by typing
Code:
setprop.sh
please confirm umount is spamming only when script is started twice (so two sessions of 00_mount_watchdog are in a race condition)
I've updated flashed recovery, then rebooted into it, move slider "Slide to Allow Modifications" to right and went into Mount menu. All system partitions, except Splash2, were mounted.

I also checked sh -x /sbin/setprop.sh in Terminal. It shows some errors:
Code:
mkdir: can't create directory '/sp': File exists
cat: can't open '/sp/build.prop': No such file or directory
libc: Access denied finding property "libc.debug.malloc.options"
libc: Access denied finding property "ro.debuggable"
usage: setprop <key> <value>
And after following strings:
Code:
+ umount /sp
+ chmod -R 0750 /etc/init.d
/ # + sort
+ find /etc/init.d -maxdepth 1 -type f -perm /110
+ read -r SCRIPT
+ /etc/init.d/00_mount_watchdog
+ read -r SCRIPT
There were no spamming. Seems like -x enables verbose output of the same command.

I then went in Wipe - Advanced Wipe, ticked System Root and select Repair or Change File System. TWRP reported this partition is formatted as ext4 and showed zeros in Size, Free, Used and Backup Size parameters. Wiping attempt of this partition leads to this error:
Code:
Failed to mount '/system_root' (Device or resource busy)
And after "Updating partition details..." message appeared, phone reboots and unsuccessfully trying to boot system. It can be fixed only after stock image flashing through fastboot, because I can boot into custom recovery only via ADB; holding Power+Volume Up boots stock eRecovery.
If I unmount System Root and System (not sure, which one I should have to unmount) and wipe System Root, TWRP wipes it and even shows correct size parameters in Repair or Change File System. Then I tried to flash GSI image as System Image, and TWRP reported about successfully completed operation, but phone cannot boot system after that.

Among other things, after booting into recovery and allowing modifications, the phone begins to get very hot: CPU temperature in left upper corner rises from ~46°C up to ~72°C, and it gets hot even to the touch.

Also recovery.log is cluttered by MTP-related messages. It can be fixed by selecting Disable MTP in Mount menu?
 

Attachments

  • recovery.zip
    87.1 KB · Views: 5
  • Like
Reactions: aIecxs
I also tried to flash Magisk Canary through TWRP. It patched and flashed my boot image, but seems like it came to nothing: Magisk app didn't installed after archive flashing, and if I install it manually, it shows "N/A" on "Installed" graph of "Magisk" column and offers to install itself through boot image patching. And sadly, it didn't fixed touch in recovery.

By the way, before Magisk flashing I flashed custom ROM again, because I thought that this may give me full root access since erofs partitions is mounted as read only.

Then I flashed stock system image and tried to install Magisk Manager on it. Still "N/A" on "Installed" graph.
 

Attachments

  • recovery.zip
    37 KB · Views: 3
  • Screenshot_20210310_213332_com.topjohnwu.magisk.jpg
    Screenshot_20210310_213332_com.topjohnwu.magisk.jpg
    213.7 KB · Views: 8

aIecxs

Senior Member
Feb 17, 2016
1,054
328
don't know if still valid but according to instructions for devices without ramdisk in boot, one must patch (twrp) recovery instead (with magisk in recovery option) and boot into recovery all the time
 
Last edited:
don't know if still valid but according to instructions for devices without ramdisk in boot, one must patch (twrp) recovery instead (with magisk in recovery option) and boot into recovery all the time
So, I should patch recovery image, reflash it and then reboot into system through it?

Update: It works, I surprised. Although I cannot boot into TWRP after that.
 

Attachments

  • Screenshot_20210311_182404_com.topjohnwu.magisk.jpg
    Screenshot_20210311_182404_com.topjohnwu.magisk.jpg
    288.3 KB · Views: 7
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Openkirin has roms for honor 10 lite.
    2
    Nobody cries for unlocking iPhone, why not accept Huawei's decision? Buy unlocking code from third party once available
    2
    For f*cks sake, will they make bootloader unlockable?!

    And who does not give the green light to unlock the bootloader? After all, a lot of people want to unlock.
    1
    Also recovery.log is cluttered by MTP-related messages. It can be fixed by selecting Disable MTP in Mount menu?
    I asked, I answered: yes, disabling MTP before any partition operations prevents MTP-related messages spamming, but it required to be enabled to be able to use ADB commands from PC.
    1
    I think we'll have to wait many months before someone finds an hack to unlock bootloader. This is a very recent smartphone and also Huawei and Honor are not for modding, since it's everything locked and they're not providing unlock codes anymore. Too bad I discovered it after I bought it !
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone