[Magisk] Anghirrim:
Hello, I'd have some questions about Magisk flash on phones with locked bootloader.

The Hisense A5 is a phone that is sold in Chinese market with locked bootloader and no Gapps. It runs Android Pie.

Somehow, some versions are sold pre-rooted, or root service are offered on Internet.

The "df -h" shell output let's think we can confirm Magisk as root method. See below.

What we know about the current root procedure:

- It is needed to downgrade the phone to a specific version of the official firmware

- then reboot the phone in "edl mode" (the Qualcomm Emergency download mode)

- Run a .exe, that does some magic on the phone within a few seconds (shows something about Qualcomm HS-USB QDLoader 9008)

- Reboot phone, install Magisk Manager and check if root is present.

Side note:

- If after installation we let Magisk manager update Magisk (patch and repack boot.img), the phone is soft-bricked. Which is not suprising because the bootloader is locked. Flashing the official firmware solves it.

Our assumption is that the .exe uses Qualcomm Emergency download tools to flash a Magisk patched boot.img onto the phone.

Questions are:

- Rooted version are having Magisk Manager installed and it says that the phone is properly rooted. ==> Is this a proof that it has been rooted with Magisk, or can Magisk manager show a positive message, even if rooted with some other method (supersu, etc...) ?

- If that's the case, can we safely dump the boot.img of the rooted phone and flash it onto any other Hisense A5 to get root access (remember, bootloader is locked and the pathced boot.ig still has the right signature)?

- Seems the phone is Treble (don't know the type) compatible. On this kind of phones, is Magisk still located only into boot.img, or somewhere else?

To do so, we'll begin to look at how QPST/QFIL can be used. But before going further, we need to answer questions above.

thanks all!!

ls -l /dev/block/bootdevice/by-name output

HLTE202N:/ # ls -l /dev/block/bootdevice/by-name
total 0
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 DDR -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 aboot -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 abootbak -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 apdp -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 boot -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 cache -> /dev/block/mmcblk0p58
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 cmnlib -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 cmnlib64 -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 cmnlib64bak -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 cmnlibbak -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 config -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 databackup -> /dev/block/mmcblk0p64
lrwxrwxrwx 1 root root 20 1970-05-09 17:58 devcfg -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 devcfgbak -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 devinfo -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 diag -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 dip -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 dpo -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 dsp -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 dspbak -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 dtbo -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 dtbobak -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 flag -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 20 1970-05-09 17:58 fsc -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 fsg -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 grow -> /dev/block/mmcblk0p67
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 kdebug -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 kdebuginfo -> /dev/block/mmcblk0p60
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 keymaster -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 keymasterbak -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 keystore -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 limits -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 logdump -> /dev/block/mmcblk0p61
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 logo -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 logo1 -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 mcfg -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 mdtp -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 mdtpbak -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 metadata -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 misc -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 modem -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 modemst1 -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 modemst2 -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 mota -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 msadp -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 oem -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 persist -> /dev/block/mmcblk0p62
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 phonelog -> /dev/block/mmcblk0p59
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 prospecfg -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 recovery -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 reserve -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 reserve2 -> /dev/block/mmcblk0p65
lrwxrwxrwx 1 root root 20 1970-05-09 17:58 rpm -> /dev/block/mmcblk0p5
wxrwxrwx 1 root root 20 1970-05-09 17:58 rpmbak -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 1970-05-09 17:58 sbl1 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 1970-05-09 17:58 sbl1bak -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 sec -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 splash -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 20 1970-05-09 17:58 ssd -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 syscfg -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 system -> /dev/block/mmcblk0p63
lrwxrwxrwx 1 root root 20 1970-05-09 17:58 tz -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 1970-05-09 17:58 tzbak -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 userdata -> /dev/block/mmcblk0p66
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 vbmeta -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 vbmetabak -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-05-09 17:58 vendor -> /dev/block/mmcblk0p57