• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] [EMUI 9] Magisk Root Huawei P10 VTR-L09 for Android PIE

Search This thread

gilraya

New member
Aug 27, 2020
1
1
Just rooted my P10 VTR-L29 device with Android / Emui 9.1 (9.1.0.252(C432E1R1P9patch04)) using this guide - worked fine after some fiddling around.

Regarding the aptouch service:
Magisk provides some entry points for that: https://github.com/topjohnwu/Magisk/blob/master/docs/guides.md#boot-scripts (found through some associated googling)

So to recap, from terminal emulator or adb shell:
Code:
su
whoami #make sure its "root" not "shell"!
echo "#!/system/bin/sh" > /data/adb/service.d/stop_aptouch.sh
echo "sleep 10" >> /data/adb/service.d/stop_aptouch.sh
echo "stop aptouch" >> /data/adb/service.d/stop_aptouch.sh
chmod +x /data/adb/service.d/stop_aptouch.sh

Reboot and try. Works at least for me.
 
Last edited:
  • Like
Reactions: Holgee
Just rooted my P10 VTR-L29 device with Android / Emui 9.1 (9.1.0.252(C432E1R1P9patch04)) using this guide - worked fine after some fiddling around.

Regarding the aptouch service:
Magisk provides some entry points for that: https://github.com/topjohnwu/Magisk/blob/master/docs/guides.md#boot-scripts (found through some associated googling)

So to recap, from terminal emulator or adb shell:
Code:
su
whoami #make sure its "root" not "shell"!
echo "#!/system/bin/sh" > /data/adb/service.d/stop_aptouch.sh
echo "sleep 10" >> /data/adb/service.d/stop_aptouch.sh
echo "stop aptouch" >> /data/adb/service.d/stop_aptouch.sh
chmod +x /data/adb/service.d/stop_aptouch.sh

Reboot and try. Works at least for me.

Hi how did you manage to flash patched image? I don't have access
Code:
.\fastboot.exe flash RECOVERY_RAMDISK .\magisk_patched.img
target reported max download size of 471859200 bytes
sending 'RECOVERY_RAMDISK' (32052 KB)...
OKAY [  0.703s]
writing 'RECOVERY_RAMDISK'...
FAILED (remote: Command not allowed)
finished. total time: 0.718s
Could you please explain how did you do it? I have same model and version.
 

jgkosak

New member
Dec 16, 2016
1
0
without root folder access.

I managed to take root. but I don't have access to modify system files.
What will be the problem?
 

zgfg

Senior Member
Oct 10, 2016
6,111
3,621
I managed to take root. but I don't have access to modify system files.
What will be the problem?
SAR and system is read-only (on the file system level)
You can only use systemless overlays

If not familiar with terms , please google and read Magisk docs on GitHub

---------- Post added at 10:12 PM ---------- Previous post was at 10:08 PM ----------

.\fastboot.exe flash RECOVERY_RAMDISK .\magisk_patched.img target reported max download size of 471859200 bytes sending 'RECOVERY_RAMDISK' (32052 KB)... OKAY [ 0.703s] writing 'RECOVERY_RAMDISK'... FAILED (remote: Command not allowed) finished. total time: 0.718s.
For flashing from Fastboot, make sure that Bootloader and FRP are unlocked
 
Last edited:

josua19

Member
Oct 13, 2015
5
3
Just rooted my P10 VTR-L29 device with Android / Emui 9.1 (9.1.0.252(C432E1R1P9patch04)) using this guide - worked fine after some fiddling around.

Regarding the aptouch service:
Magisk provides some entry points for that: https://github.com/topjohnwu/Magisk/blob/master/docs/guides.md#boot-scripts (found through some associated googling)

So to recap, from terminal emulator or adb shell:
Code:
su
whoami #make sure its "root" not "shell"!
echo "#!/system/bin/sh" > /data/adb/service.d/stop_aptouch.sh
echo "sleep 10" >> /data/adb/service.d/stop_aptouch.sh
echo "stop aptouch" >> /data/adb/service.d/stop_aptouch.sh
chmod +x /data/adb/service.d/stop_aptouch.sh

Reboot and try. Works at least for me.

you are the best bro, it worked for me
 

Sterben11

Member
Jan 7, 2021
6
1
Just rooted my P10 VTR-L29 device with Android / Emui 9.1 (9.1.0.252(C432E1R1P9patch04)) using this guide - worked fine after some fiddling around.

Regarding the aptouch service:
Magisk provides some entry points for that: https://github.com/topjohnwu/Magisk/blob/master/docs/guides.md#boot-scripts (found through some associated googling)

So to recap, from terminal emulator or adb shell:
Code:
su
whoami #make sure its "root" not "shell"!
echo "#!/system/bin/sh" > /data/adb/service.d/stop_aptouch.sh
echo "sleep 10" >> /data/adb/service.d/stop_aptouch.sh
echo "stop aptouch" >> /data/adb/service.d/stop_aptouch.sh
chmod +x /data/adb/service.d/stop_aptouch.sh

Reboot and try. Works at least for me.

Did you use the included ramdisk from the first post or did you managed to make your own patched ramdisk?
My Device:
Model:VTR-L29
bootloader unlock and frp unlock
custom rom Openkirin AEX P1 beta 1 from Emui 9.1 (9.1.0.252(C432E1R1P9patch04)
if you still have a copy of your stock ramdisk/patched one would you please be kind enough to share it?

Code:
 fastboot flash ramdisk patched_boot.img
Sending 'ramdisk' (32768 KB)                       OKAY [  0.742s]
Writing 'ramdisk'                                  FAILED (remote: 'partition length get error')
fastboot: error: Command failed
 

M1chiel

Senior Member
Did you use the included ramdisk from the first post or did you managed to make your own patched ramdisk?
My Device:
Model:VTR-L29
bootloader unlock and frp unlock
custom rom Openkirin AEX P1 beta 1 from Emui 9.1 (9.1.0.252(C432E1R1P9patch04)
if you still have a copy of your stock ramdisk/patched one would you please be kind enough to share it?

Code:
 fastboot flash ramdisk patched_boot.img
Sending 'ramdisk' (32768 KB)                       OKAY [  0.742s]
Writing 'ramdisk'                                  FAILED (remote: 'partition length get error')
fastboot: error: Command failed
The correct command is for emui 9 is: fastboot flash recovery_ramdisk patched-boot.img
 
  • Like
Reactions: Sterben11

orkeven

Member
Dec 8, 2009
24
3
Although I have an Honor 9 device, it has EMUI 9.1 and I will like someone who is kind enough to share a download link for the stock versions of ramdisk and eRecovery, please.
 

M1chiel

Senior Member

orkeven

Member
Dec 8, 2009
24
3
You can extract them yourself from the stock rom (I wouldn't take the risk flashing these images from another device). Good instructions are here: https://openkirin.net/user_guide/how-to-extract-partition-images-from-stock-emui-firmware/
I don't have a stock rom to extract from, hence the request from anyone who happens to have a working download link to the stock rom for Honor 9 Emui 9.1. In particular the files I'll need are the kernel, stock recovery, recovery_ramdis and system images (system can actually be replaced by a custom rom like openkirin).
 

Aryapars

Member
May 3, 2009
34
4
Hello,
I have the p10. Due to an issue I had, I took the newest update available in my region, which is 9.1.0.275.

However, now the phone won't boot with my patched recovery_ramdisk anymore. it gets stuck or restart. Normal boot works fine.

I assume we need to use now the original 9.1.0.275 version of recovery_ramdisk (as previously I used the 9.0 version from OP) and must patch that with magisk. As I was neither able to download the full rom on my PC (all links are dead or paid), would anyone mind posting either the patched version or the original version of recovery_ramdisk for 9.1.0.275 EMUI?

I would appreciate very much.

//Just to add: until 9.1.0.252, the image in OP worked fine....
 
Last edited:

qtotter

Senior Member
Mar 13, 2006
699
66
Tokyo
I assume we need to use now the original 9.1.0.275 version of recovery_ramdisk (as previously I used the 9.0 version from OP) and must patch that with magisk.
I guess it's too late for you, but I found the full firmware of the latest VTR-L29 9.1.0.275(C432E2R1P9) in /data/update/HwOUC during OTA update. I have extracted RECOVERY_RAMDIS.img and patched it with Magisk 23.0. Here's the link for the patched recovery image. I think the recovery images for VTR-L09 and L29 are compatible.

qt
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Requirements / Downloads
    Huawei VTR-L09 with unlocked bootloader (I not tested in other version)

    Minimal ADB & Fastboot

    Patched Recovery_Ramdisk VTR-L09


    Rooting your device
    1. Unzip Minimal ADB & Fastboot to any folder of your PC
    2. Download the patched file for your device and copy it to Minimal ADB & Fastboot folder.
    3. Start your smartphone in fastboot mode pressing [Vol-]+[Power] and connect it to your PC.
    4. Open a Powershell window in your Minimal ADB & Fastboot folder by [Shift]+[Rightclick].
    5. Flash the Recovery_Ramdisk:

    Code:
    fastboot flash recovery_ramdisk name_of_your_patched_file.img


    Adjusting Magisk Manager and patching files by yourself
    1. Download Magisk Manager to your phone and install.
    2. Check "force encryption" and "AVB 2.0" boxes.

    To patch yourself recovery_ramdisk:
    3. a) copy the ORIGINAL RECOVERY_RAMDISK VTR-L09 PIE version 9.0.1.165 C432 to anywhere on your P10
    b) Patch your *.img, that you have copied in any folder to your smartphone by pressing "Install" --> "Install" --> "Patch boot image" in Magisk Manager.
    4. Transfer the patched file (You will find it in your download folder of your smartphone. It will be called "patched_boot.img".) to your PC, start Smartphone in fastboot mode and flash:

    Code:
    fastboot flash recovery_ramdisk name_of_your_patched_file.img

    (You must adapt the file name to the real name of your file, e.g. patched_boot.img)

    AFTER FLASHING YOUR PATCHED BOOT ON FASTBOOT, UNPLUG YOUR USB, PRESS [VOL+] + [Power], KEEP VOL+ UNTIL REBOOTS, IT WILL REBOOT ON YOUR SYSTEM ROOTED.

    To actualize Magisk:
    4.b) Choose in Magisk Manager: "Install" --> "Install" --> "Direct Install (Recommended)" --> Restart
    4
    I've seen this before on custom ROMs; the workaround I've used is, as root:

    stop aptouch

    ......

    You are rock bro!!
    "stop aptouch" executed from root shell terminal work like a charm and touchscreen work again.
    I reply with this solution in my open issues on official magisk github.
    .. go to automate this at boot.
    Now my question is: why aptouch is involved in root privilege escalation?

    Update: i just add this to /system/etc/init/init.system.rc at end of file:
    Code:
    #  Aptouch_daemon fix
    service aptouch /system/bin/true
        class late_start
        disabled
        oneshot
    .. now at every boot my touch work again.
    4

    4.b) Choose in Magisk Manager: "Install" --> "Install" --> "Direct Install (Recommended)" --> Restart

    I've made everything, I've patched the img, and flash it through fastboot but when I tap Install I dont' have "direct install" but only download and patch :(

    EDIT: solved I need to boot with volume up
    3
    Thank you! Works great on VTR-L29 (EMMC 5.1 version)
    1) I've downloaded & installed latest Pie from https://pro-teammt.ru/online-firmware-database-ru/?firmware_model=VTR-L29C636&firmware_page=0
    2) Unpacked update.zip and extracted RECOVERY_RAMDIS.img from UPDATE.APP using HuaweiUpdateExtractor 0.9.9.5 (had to disable verify header checksum because of error)
    3) Copied RECOVERY_RAMDIS.img to phone and patched using magisk
    4) Copied generagrad magisk_patched.img to PC and flashed via fastboot using command: "fastboot flash recovery_ramdisk magisk_patched.img"
    5) Booted phone using Vol+ & power
    6) Check Magisk and root is working however touch does not work on edges - let's fix it
    7) Connect phone to PC, open cmd, start "adb shell" and go with:

    su (if Magisk ask for root grant it)
    mount -o rw,remount /system
    echo "" >> /system/etc/init/init.system.rc
    echo "# Aptouch_daemon fix" >> /system/etc/init/init.system.rc
    echo "service aptouch /system/bin/true" >> /system/etc/init/init.system.rc
    echo " class late_start" >> /system/etc/init/init.system.rc
    echo " disabled" >> /system/etc/init/init.system.rc
    echo " oneshot" >> /system/etc/init/init.system.rc

    8) That's it - powered off phone and turned on again using vol+ and power and both root and touch are flawless
    3
    Idem here with my p10 vtr-l09c432 with firmware 9.0.1.163.
    If i boot normal, i have android 9 without root and touch work fine.
    If i boot with [vol+] + [power] from recovery workaround android start with right privileges and magisk work fine but from now the touchscreen no work at extreme left and right border for all height display, boring problem in keyboard and navigation top bar.
    ps: i have manual patched my original extract recovery_ramdisk.img from update.app with magisk 18 and beta19, some result.

    I've seen this before on custom ROMs; the workaround I've used is, as root:

    stop aptouch

    If that does it, a magisk module that provides an empty file for /vendor/bin/aptouch_daemon (or a late start script that runs the above command) would correct it as well.