Wifi/Network stopped working on rooted Redmi Note 9 Pro - Redmi Note 9 Pro Max Questions & Answers

Hey there,
I recently bought a new Xiaomi Redmi Note 9 Pro (joyeuse) in Germany. I then unlocked the bootloader, installed Lineage OS 18.1 (including microg), flashed Magisk 24.3 to get root access and then installed some Magisk Modules.
Well, after some time of usage, the Wifi and Mobile connections suddenly stopped working. It did not happen right away, so I can't tell which of the steps above is the cause. When I rebooted the phone, Wifi/network were working for a couple of minutes before malfunctioning again. (Bluetooth isn't affected.)
Steps I tried to solve this problem without success:
1. I followed the suggested solution from https://www.droidwin.com/fix-no-wifi-calls-network-after-root-custom-rom
So I downloaded 3 stock MIUI images from https://xiaomifirmwareupdater.com/archive/firmware/joyeuse/: V12.5.11 (EEA) and V13.0.1.0 (EEA and Global).
From each of the archives I extracted NON-HLOS.bin and used fastboot flash modem NON-HLOS.bin. No noticable difference when booting the system.
2. Factory reset and re-install Lineage OS from recovery. (I did not remove Magisk beforhand, which was maybe a mistake.)
3. I then simply installed the full stock MIUI system V13.0.1.0, EEA version from fastboot mode. (which was incidentally an upgrade from Android 11 to Android 12). The installation was performed using the flash_all.sh script from the downloaded joyeuse_eea_global_images_V13.0.1.0.SJZEUXM_20220725.0000.00_12.0_eea folder. This script is attached below. it flashes a whole lot of partitions (including modem). It took some minutes, there were no errors and the stock MIUI V13 booted successfully.. Unfortunately, the Wifi/Mobile network still did not work :-( Not even for a couple of minutes as before. Everything else seemed fine.
4. I then reinstalled Lineage recovery and and Lineage OS 19.1, which is starting without problem, but Wifi/Network still not working.
Further ideas how to locate the problem? Or what solutions I could try? Any help is appreciated. I can provide more information if needed.
Attachement 1: output of joyeuse:/ # ls -al /dev/block/by-name so you can see the mounted partitions:
total 0
drwxr-xr-x 2 root root 1860 1971-02-15 09:19 .
drwxr-xr-x 6 root root 2700 1971-02-15 09:21 ..
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 ALIGN_TO_128K_1 -> /dev/block/sdd1
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 ALIGN_TO_128K_2 -> /dev/block/sdf1
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 abl -> /dev/block/sde8
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 ablbak -> /dev/block/sde24
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 aop -> /dev/block/sde1
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 aopbak -> /dev/block/sde17
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 apdp -> /dev/block/sde35
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 bluetooth -> /dev/block/sde5
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 bluetoothbak -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 boot -> /dev/block/sde51
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 bootbak -> /dev/block/sde55
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 cache -> /dev/block/sda13
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 catecontentfv -> /dev/block/sde49
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 catefv -> /dev/block/sde48
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 cateloader -> /dev/block/sde41
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 cdt -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 cmnlib -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 cmnlib64 -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 cmnlib64bak -> /dev/block/sde28
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 cmnlibbak -> /dev/block/sde27
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 cust -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 ddr -> /dev/block/sdd3
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 devcfg -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 devcfgbak -> /dev/block/sde29
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 devinfo -> /dev/block/sde33
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 dip -> /dev/block/sde34
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 dsp -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 dspbak -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 dtbo -> /dev/block/sde52
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 dtbobak -> /dev/block/sde54
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 exaid -> /dev/block/sda14
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 ffu -> /dev/block/sda16
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 frp -> /dev/block/sda5
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 fsc -> /dev/block/sdf5
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 fsg -> /dev/block/sdf4
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 gsort -> /dev/block/sda15
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 hyp -> /dev/block/sde3
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 hypbak -> /dev/block/sde19
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 imagefv -> /dev/block/sde15
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 imagefvbak -> /dev/block/sde31
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 keymaster -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 keymasterbak -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 keystore -> /dev/block/sda4
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 limits -> /dev/block/sde38
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 logdump -> /dev/block/sde42
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 logfs -> /dev/block/sde40
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 mdtp -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 mdtpbak -> /dev/block/sde23
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 mdtpsecapp -> /dev/block/sde6
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 mdtpsecappbak -> /dev/block/sde22
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 metadata -> /dev/block/sda12
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 minidump -> /dev/block/sda6
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 misc -> /dev/block/sda3
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 modem -> /dev/block/sde4
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 modembak -> /dev/block/sde20
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 modemst1 -> /dev/block/sdf2
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 modemst2 -> /dev/block/sdf3
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 multiimgoem -> /dev/block/sde44
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 multiimgqti -> /dev/block/sde45
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 persist -> /dev/block/sda2
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 qupfw -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 qupfwbak -> /dev/block/sde30
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 recovery -> /dev/block/sda8
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 recoverybak -> /dev/block/sda9
lrwxrwxrwx 1 root root 14 1971-02-15 09:19 sda -> /dev/block/sda
lrwxrwxrwx 1 root root 14 1971-02-15 09:19 sdb -> /dev/block/sdb
lrwxrwxrwx 1 root root 14 1971-02-15 09:19 sdc -> /dev/block/sdc
lrwxrwxrwx 1 root root 14 1971-02-15 09:19 sdd -> /dev/block/sdd
lrwxrwxrwx 1 root root 14 1971-02-15 09:19 sde -> /dev/block/sde
lrwxrwxrwx 1 root root 14 1971-02-15 09:19 sdf -> /dev/block/sdf
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 secdata -> /dev/block/sde47
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 splash -> /dev/block/sde37
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 spunvm -> /dev/block/sde36
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 ssd -> /dev/block/sda1
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 storsec -> /dev/block/sde43
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 super -> /dev/block/sda17
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 toolsfv -> /dev/block/sde39
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 tz -> /dev/block/sde2
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 tzbak -> /dev/block/sde18
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 uefisecapp -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 uefisecappbak -> /dev/block/sde32
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 uefivarstore -> /dev/block/sde46
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 userdata -> /dev/block/sda18
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 vbmeta -> /dev/block/sde50
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 vbmeta_system -> /dev/block/sda10
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 vbmeta_systembak -> /dev/block/sda11
lrwxrwxrwx 1 root root 16 1971-02-15 09:19 vbmetabak -> /dev/block/sde53
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 xbl -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 xbl_config -> /dev/block/sdb2
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 xbl_configbak -> /dev/block/sdc2
lrwxrwxrwx 1 root root 15 1971-02-15 09:19 xblbak -> /dev/block/sdc1
Click to expand...
Click to collapse
Attachement 2: content of the flash_all.sh script used to install MIUI 13. You can see which partitions were flashed, so the problem shouldn't be located on those I assume.
fastboot $* getvar product 2>&1 | grep "^product: *joyeuse$"
if [ $? -ne 0 ] ; then echo "Missmatching image and device"; exit 1; fi
CURRENT_ANTI_VER=1
anti=`fastboot $* getvar anti 2>&1 | grep anti: | cut -f 2 -d ' '`
if [ -z "$anti" ];then
anti=0
fi
fastboot $* erase boot
if [ $? -ne 0 ] ; then echo "Erase boot error"; exit 1; fi
fastboot $* flash crclist `dirname $0`/images/crclist.txt
if [ $? -ne 0 ] ; then echo "Flash crclist error"; exit 1; fi
fastboot $* flash sparsecrclist `dirname $0`/images/sparsecrclist.txt
if [ $? -ne 0 ] ; then echo "Flash sparsecrclist error"; exit 1; fi
fastboot $* flash xbl `dirname $0`/images/xbl.elf
if [ $? -ne 0 ] ; then echo "Flash xbl error"; exit 1; fi
fastboot $* flash xblbak `dirname $0`/images/xbl.elf
if [ $? -ne 0 ] ; then echo "Flash xblbak error"; exit 1; fi
fastboot $* flash xbl_config `dirname $0`/images/xbl_config.elf
if [ $? -ne 0 ] ; then echo "Flash xbl_config error"; exit 1; fi
fastboot $* flash xbl_configbak `dirname $0`/images/xbl_config.elf
if [ $? -ne 0 ] ; then echo "Flash xbl_configbak error"; exit 1; fi
fastboot $* flash imagefv `dirname $0`/images/imagefv.elf
if [ $? -ne 0 ] ; then echo "Flash imagefv error"; exit 1; fi
fastboot $* flash imagefvbak `dirname $0`/images/imagefv.elf
if [ $? -ne 0 ] ; then echo "Flash imagefvbak error"; exit 1; fi
fastboot $* flash aop `dirname $0`/images/aop.mbn
if [ $? -ne 0 ] ; then echo "Flash aop error"; exit 1; fi
fastboot $* flash aopbak `dirname $0`/images/aop.mbn
if [ $? -ne 0 ] ; then echo "Flash aopbak error"; exit 1; fi
fastboot $* flash uefisecapp `dirname $0`/images/uefi_sec.mbn
if [ $? -ne 0 ] ; then echo "Flash uefisecapp error"; exit 1; fi
fastboot $* flash uefisecappbak `dirname $0`/images/uefi_sec.mbn
if [ $? -ne 0 ] ; then echo "Flash uefisecappbak error"; exit 1; fi
fastboot $* flash qupfw `dirname $0`/images/qupv3fw.elf
if [ $? -ne 0 ] ; then echo "Flash qupfw error"; exit 1; fi
fastboot $* flash qupfwbak `dirname $0`/images/qupv3fw.elf
if [ $? -ne 0 ] ; then echo "Flash qupfwbak error"; exit 1; fi
fastboot $* flash metadata `dirname $0`/images/metadata.img
if [ $? -ne 0 ] ; then echo "Flash metadata error"; exit 1; fi
fastboot $* flash tz `dirname $0`/images/tz.mbn
if [ $? -ne 0 ] ; then echo "Flash tz error"; exit 1; fi
fastboot $* flash tzbak `dirname $0`/images/tz.mbn
if [ $? -ne 0 ] ; then echo "Flash tzbak error"; exit 1; fi
fastboot $* flash hyp `dirname $0`/images/hyp.mbn
if [ $? -ne 0 ] ; then echo "Flash hyp error"; exit 1; fi
fastboot $* flash hypbak `dirname $0`/images/hyp.mbn
if [ $? -ne 0 ] ; then echo "Flash hypbak error"; exit 1; fi
fastboot $* flash keymaster `dirname $0`/images/km4.mbn
if [ $? -ne 0 ] ; then echo "Flash keymaster error"; exit 1; fi
fastboot $* flash keymasterbak `dirname $0`/images/km4.mbn
if [ $? -ne 0 ] ; then echo "Flash keymasterbak error"; exit 1; fi
fastboot $* flash cmnlib `dirname $0`/images/cmnlib.mbn
if [ $? -ne 0 ] ; then echo "Flash cmnlib error"; exit 1; fi
fastboot $* flash cmnlibbak `dirname $0`/images/cmnlib.mbn
if [ $? -ne 0 ] ; then echo "Flash cmnlibbak error"; exit 1; fi
fastboot $* flash cmnlib64 `dirname $0`/images/cmnlib64.mbn
if [ $? -ne 0 ] ; then echo "Flash cmnlib64 error"; exit 1; fi
fastboot $* flash cmnlib64bak `dirname $0`/images/cmnlib64.mbn
if [ $? -ne 0 ] ; then echo "Flash cmnlib64bak error"; exit 1; fi
fastboot $* flash modem `dirname $0`/images/NON-HLOS.bin
if [ $? -ne 0 ] ; then echo "Flash modem error"; exit 1; fi
fastboot $* flash dsp `dirname $0`/images/dspso.bin
if [ $? -ne 0 ] ; then echo "Flash dsp error"; exit 1; fi
fastboot $* flash dspbak `dirname $0`/images/dspso.bin
if [ $? -ne 0 ] ; then echo "Flash dspbak error"; exit 1; fi
fastboot $* flash bluetooth `dirname $0`/images/BTFM.bin
if [ $? -ne 0 ] ; then echo "Flash bluetooth error"; exit 1; fi
fastboot $* flash bluetoothbak `dirname $0`/images/BTFM.bin
if [ $? -ne 0 ] ; then echo "Flash bluetoothbak error"; exit 1; fi
fastboot $* flash storsec `dirname $0`/images/storsec.mbn
if [ $? -ne 0 ] ; then echo "Flash storsec error"; exit 1; fi
fastboot $* flash devcfg `dirname $0`/images/devcfg.mbn
if [ $? -ne 0 ] ; then echo "Flash devcfg error"; exit 1; fi
fastboot $* flash devcfgbak `dirname $0`/images/devcfg.mbn
if [ $? -ne 0 ] ; then echo "Flash devcfgbak error"; exit 1; fi
fastboot $* flash abl `dirname $0`/images/abl.elf
if [ $? -ne 0 ] ; then echo "Flash abl error"; exit 1; fi
fastboot $* flash ablbak `dirname $0`/images/abl.elf
if [ $? -ne 0 ] ; then echo "Flash abl error"; exit 1; fi
fastboot $* flash dtbo `dirname $0`/images/dtbo.img
if [ $? -ne 0 ] ; then echo "Flash dtbo error"; exit 1; fi
fastboot $* flash vbmeta `dirname $0`/images/vbmeta.img
if [ $? -ne 0 ] ; then echo "Flash vbmeta error"; exit 1; fi
fastboot $* flash vbmetabak `dirname $0`/images/vbmeta.img
if [ $? -ne 0 ] ; then echo "Flash vbmetabak error"; exit 1; fi
fastboot $* flash recovery `dirname $0`/images/recovery.img
if [ $? -ne 0 ] ; then echo "Flash recovery error"; exit 1; fi
fastboot $* flash super `dirname $0`/images/super.img
if [ $? -ne 0 ] ; then echo "Flash super error"; exit 1; fi
fastboot $* flash vbmeta_system `dirname $0`/images/vbmeta_system.img
if [ $? -ne 0 ] ; then echo "Flash vbmeta_system error"; exit 1; fi
fastboot $* flash vbmeta_systembak `dirname $0`/images/vbmeta_system.img
if [ $? -ne 0 ] ; then echo "Flash vbmeta_systembak error"; exit 1; fi
fastboot $* flash cache `dirname $0`/images/cache.img
if [ $? -ne 0 ] ; then echo "Flash cache error"; exit 1; fi
fastboot $* flash userdata `dirname $0`/images/userdata.img
if [ $? -ne 0 ] ; then echo "Flash userdata error"; exit 1; fi
fastboot $* flash cust `dirname $0`/images/cust.img
if [ $? -ne 0 ] ; then echo "Flash cust error"; exit 1; fi
fastboot $* flash ffu `dirname $0`/images/ffu.img
if [ $? -ne 0 ] ; then echo "Flash ffu error"; exit 1; fi
fastboot $* erase misc
if [ $? -ne 0 ] ; then echo "Erase misc error"; exit 1; fi
fastboot $* erase apdp
if [ $? -ne 0 ] ; then echo "Erase apdp error"; exit 1; fi
fastboot $* flash boot `dirname $0`/images/boot.img
if [ $? -ne 0 ] ; then echo "Flash boot error"; exit 1; fi
fastboot $* reboot
if [ $? -ne 0 ] ; then echo "Reboot error"; exit 1; fi
Click to expand...
Click to collapse

Useful fact: I do own a second Redmni Note 9 Pro joyeuse (not rooted) with the same model number. So in theory, I could compare files or copy partitions between the phones if it helps. just need to know what to look for.

Related

Backup boot and recovery partition?

I was wondering how to create a flashable restore for the stock boot and recovery image I was exploring the partitions and this is where I got stuck(I'm aware that there are A and B partitions, but have no idea what they are(are they split across two partitions or is b a backup of a and vice versa?):
taimen:/dev/block/platform/soc/1da4000.ufshc/by-name $ ls -al .
total 0
drwxr-xr-x 2 root root 1280 1970-01-14 05:56 .
drwxr-xr-x 4 root root 1460 1970-01-14 05:56 ..
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 abl_a -> /dev/block/sde6
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 abl_b -> /dev/block/sde20
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 aes_a -> /dev/block/sda10
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 aes_b -> /dev/block/sda11
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 align_parti -> /dev/block/sda12
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 apdp -> /dev/block/sde29
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 boot_a -> /dev/block/sde8
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 boot_b -> /dev/block/sde22
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 cdt -> /dev/block/sdd1
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 cmnlib64_a -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 cmnlib64_b -> /dev/block/sde24
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 cmnlib_a -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 cmnlib_b -> /dev/block/sde23
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 ddr -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 devcfg_a -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 devcfg_b -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 devinfo -> /dev/block/sde34
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 dip -> /dev/block/sde35
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 dpo -> /dev/block/sde36
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 dtbo_a -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 dtbo_b -> /dev/block/sde27
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 frp -> /dev/block/sdg1
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 fsc -> /dev/block/sdf3
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 fsg -> /dev/block/sde32
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 ftm -> /dev/block/sda6
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 hyp_a -> /dev/block/sde3
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 hyp_b -> /dev/block/sde17
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 keymaster_a -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 keymaster_b -> /dev/block/sde21
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 laf_a -> /dev/block/sda1
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 laf_b -> /dev/block/sda2
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 limits -> /dev/block/sde37
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 logfs -> /dev/block/sde39
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 metadata -> /dev/block/sde41
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 misc -> /dev/block/sda5
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 modem_a -> /dev/block/sde5
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 modem_b -> /dev/block/sde19
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 modemst2 -> /dev/block/sdf2
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 msadp -> /dev/block/sde30
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 persist -> /dev/block/sda4
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 pmic_a -> /dev/block/sde4
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 pmic_b -> /dev/block/sde18
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 pstore -> /dev/block/sda9
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 rpm_a -> /dev/block/sde1
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 rpm_b -> /dev/block/sde15
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 sec -> /dev/block/sde33
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 ssd -> /dev/block/sda3
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 sti -> /dev/block/sde40
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 storsec -> /dev/block/sde31
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 system_a -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 system_b -> /dev/block/sda8
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 toolsfv -> /dev/block/sde38
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 tz_a -> /dev/block/sde2
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 tz_b -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 userdata -> /dev/block/sda13
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 vbmeta_a -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 vbmeta_b -> /dev/block/sde26
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 vendor_a -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 1970-01-14 05:56 vendor_b -> /dev/block/sde28
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 xbl_a -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 1970-01-14 05:56 xbl_b -> /dev/block/sdc1
Click to expand...
Click to collapse
There is no recovery partition on this phone. The recovery image is contained within the boot image, which is why the TWRP site has flashable installers that you can download that patch the boot images so that they contain TWRP instead of stock. A and B partitions exist for Google's automatic seamless update feature. Your phone only boots off of either A or B at any given time. If your phone is using A and a software update becomes available, the update will download and install to B, and your phone will boot the B partition on the next reboot instead of A. When a future update is released, the same process will happen with A.
So if you want to backup boot and recovery, all you need to backup is boot of the partition that your phone is currently using (TWRP can tell you which one it is using).

Partitions Table of U12+

HTC U12+ is an A-B slot phone. There is no recovery partition, but it has boot_a and boot_b partitions, so it CAN boot to recovery mode.
Here is the partitions table from Chinese HTC U12+
Code:
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 abl_a -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 abl_b -> /dev/block/sde30
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 aop_a -> /dev/block/sde1
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 aop_b -> /dev/block/sde22
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 apdp -> /dev/block/sde46
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 avb_rec -> /dev/block/sde56
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 bluetooth_a -> /dev/block/sde6
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 bluetooth_b -> /dev/block/sde27
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 board_info -> /dev/block/sdf1
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 boot_a -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 boot_b -> /dev/block/sde34
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 carrier -> /dev/block/sda16
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 cdt -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cmnlib64_a -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cmnlib64_b -> /dev/block/sde37
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cmnlib_a -> /dev/block/sde15
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cmnlib_b -> /dev/block/sde36
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 control -> /dev/block/sda13
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cota -> /dev/block/sda17
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 ddr -> /dev/block/sdd3
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 devcfg_a -> /dev/block/sde17
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 devcfg_b -> /dev/block/sde38
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 devinfo -> /dev/block/sde44
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 devlog -> /dev/block/sda10
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dip -> /dev/block/sde45
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dpo -> /dev/block/sde48
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dsp_a -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dsp_b -> /dev/block/sde31
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dtbo_a -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dtbo_b -> /dev/block/sde42
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 extra -> /dev/block/sda12
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 fataldevlog -> /dev/block/sda11
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 frp -> /dev/block/sda14
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 fsc -> /dev/block/sdf4
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 fsg -> /dev/block/sdf3
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 hosd_a -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 hosd_b -> /dev/block/sde35
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 hvbmeta -> /dev/block/sda4
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 hyp_a -> /dev/block/sde3
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 hyp_b -> /dev/block/sde24
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 keymaster_a -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 keymaster_b -> /dev/block/sde32
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 limits -> /dev/block/sde50
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 local -> /dev/block/sda15
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 lockbooter_a -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 lockbooter_b -> /dev/block/sde33
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 logdump -> /dev/block/sde54
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 logfs -> /dev/block/sde52
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 mdtp_a -> /dev/block/sde8
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 mdtp_b -> /dev/block/sde29
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 mdtpsecapp_a -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 mdtpsecapp_b -> /dev/block/sde28
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 mfg -> /dev/block/sdf2
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 misc -> /dev/block/sda6
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 modemst1 -> /dev/block/sdf5
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 modemst2 -> /dev/block/sdf6
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 msadp -> /dev/block/sde47
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 oem_misc -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 padding0 -> /dev/block/sda1
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 padding3 -> /dev/block/sdd1
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 persist -> /dev/block/sda3
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 pg1fs -> /dev/block/sda5
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 pmic_a -> /dev/block/sde4
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 pmic_b -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 qupfw_a -> /dev/block/sde18
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 qupfw_b -> /dev/block/sde39
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 radio_a -> /dev/block/sde5
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 radio_b -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 ramdump -> /dev/block/sda8
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 reserve0 -> /dev/block/sda21
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 reserve4 -> /dev/block/sde57
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 reserve5 -> /dev/block/sdf7
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 sec -> /dev/block/sde43
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 sp1 -> /dev/block/sde49
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 ssd -> /dev/block/sda2
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 sti -> /dev/block/sde53
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 storsec -> /dev/block/sde55
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 system_a -> /dev/block/sda18
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 system_b -> /dev/block/sda19
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 tool_diag -> /dev/block/sda9
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 toolsfv -> /dev/block/sde51
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 tz_a -> /dev/block/sde2
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 tz_b -> /dev/block/sde23
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 userdata -> /dev/block/sda20
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 vbmeta_a -> /dev/block/sde20
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 vbmeta_b -> /dev/block/sde41
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 vendor_a -> /dev/block/sde19
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 vendor_b -> /dev/block/sde40
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 xbl_a -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 xbl_b -> /dev/block/sdc1
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 xbl_config_a -> /dev/block/sdb2
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 xbl_config_b -> /dev/block/sdc2
Its pretty much the same for the 64G Unlocked model sold in the US.
Code:
abl_a -> /dev/block/sde9
abl_b -> /dev/block/sde30
aop_a -> /dev/block/sde1
aop_b -> /dev/block/sde22
apdp -> /dev/block/sde46
avb_rec -> /dev/block/sde6
bluetooth_b -> /dev/block/sde27
board_info -> /dev/block/sdf1
boot_a -> /dev/block/sde13
boot_b -> /dev/block/sde34
carrier -> /dev/block/sdd2
cmnlib64_a -> /dev/block/sde16
cmnlib64_b -> /dev/block/sde37
cmnlib_a -> /dev/block/sde15
cmnlib_b -> /dev/block/sde36
control -> /dev/block/sda17
ddr -> /dev/block/sdd3
devcfg_a -> /dev/block/sde17
devcfg_b -> /dev/block/sde38
devinfo -> /dev/block/sda10
dip -> /dev/block/sde45
dpo -> /dev/block/sde48
dsp_a -> /dev/block/sde10
dsp_b -> /dev/block/sde31
dtbo_a -> /dev/block/sde21
dtbo_b -> /dev/block/sde42
extra -> /dev/block/sda12
fataldevlog -> /dev/block/sda11
frp -> /dev/block/sda14
fsc -> /dev/block/sdf4
fsg -> /dev/block/sdf3
hosd_a -> /dev/block/sde14
hosd_b -> /dev/block/sde35
hvbmeta -> /dev/block/sda4
hyp_a -> /dev/block/sde3
hyp_b -> /dev/block/sde24
keymaster_a -> /dev/block/sde11
keymaster_b -> /dev/block/sde32
limits -> /dev/block/sde50
local -> /dev/block/sda15
lockbooter_a -> /dev/block/sde12
lockbooter_b -> /dev/block/sde33
logdump -> /dev/block/sde52
mdtp_a -> /dev/block/sde8
mdtp_b -> /dev/block/sde29
mdtpsecapp_a -> /dev/block/sde7
mdtpsecapp_b -> /dev/block/sde28
mfg -> /dev/block/sdf2
misc -> /dev/block/sda6
modemst1 -> /dev/block/sde47
oem_misc -> /dev/block/sda3
pg1fs -> /dev/block/sda5
pmic_a -> /dev/block/sde4
pmic_b -> /dev/block/sde25
qupfw_a -> /dev/block/sde5
radio_b -> /dev/block/sda8
reserve0 -> /dev/block/sda21
reserve4 -> /dev/block/sde57
reserve5 -> /dev/block/sde43
sp1 -> /dev/block/sde49
ssd -> /dev/block/sda2
sti -> /dev/block/sde53
storsec -> /dev/block/sda18
system_b -> /dev/block/sda19
tool_diag -> /dev/block/sda9
toolsfv -> /dev/block/sde2
tz_b -> /dev/block/sde23
userdata -> /dev/block/sda20
vbmeta_a -> /dev/block/sde20
vbmeta_b -> /dev/block/sde41
vendor_a -> /dev/block/sde19
vendor_b -> /dev/block/sde40
xbl_a -> /dev/block/sdb1
xbl_b -> /dev/block/sdc1
xbl_config_a -> /dev/block/sdb2
xbl_config_b -> /dev/block/sdc2
Hi, guys. I need "modemst1.img" and "modemst2.img" files for my phone(htc_imedugl: 2Q5510000). Can somebody share them. Thank you.
modemst1.img (modemst1 -> /dev/block/sdf5)
modemst2.img (modemst2 -> /dev/block/sdf6)
HTC U11 uses the same partition type too, i checked yesterday

[GUIDE] How to root your U12+ | Info about A/B | Adaway | USB Audio Control

Hey guys and girls,
I couldn´t find any guide on how to root the U12+ without twrp yet, so I thought maybe it´s good to have one. It´s also useful for people who don´t like to boot/flash the recovery but want root access.
I also decided now to do a little write up about the A/B slot partition system on the U12+.
General Information about the A/B slot partition system and seamless updates
Google firstly introduced seamless updates on the Pixel Phones and with it the A/B partition system.
So this means, contrary to non A/B devices, there are two copys of most partitions except userdata.
We have two system (system_a and system_b), two boot (boot_a and boot_b) and two vendor (vendor_a and vendor_b) partitions, amongst others (can be found further down in the partition list but let´s concentrate on these).
When booted in the OS, one slot is actively used and the other is "inactive".
The main advantage that emerges now is, that in case an OTA arrives the "inactive" partitions get updated, while the OS is running. That means while the actual OTA is happening you can use your phone just like you always do.
The following reboot will boot into the former "inactive" slot and use the seamless updated partitions. This happens seamless and just with a reboot. So OTAs are much faster!
If you are interested further here are some links:
https://www.xda-developers.com/list-android-devices-seamless-updates/
https://source.android.com/devices/tech/ota/ab/
https://source.android.com/devices/tech/ota/ab/ab_faqs
Here’s another writeup from the XDA portal!
https://www.xda-developers.com/how-...ess-updates-affect-custom-development-on-xda/
However there comes some confusion. I will try to update the thread as best as I can when development, ROMs, Kernels etc kick in.
But here are a few tips and tricks:
NOTE:
For most of the commands that are slot specific like changing the active slot etc,download mode is the preferred method!
Code:
fastboot flash boot_a boot.img
and commands like this only work in download mode on standard production devices.
See below for these.
However fastboot boot boot.img is not working in download!
How to reboot to bootloader to be able to use fastboot:
From anywhere with buttons:
Long press (sometimes really long!) the Power button until you feel the vibration motor (not the haptic feedback) kick in. When it kicks in let go of power button quickly and push volume down to boot into bootloader.
thanks to @tbalden for figuring it out intially.
From the OS or recovery via ADB:
Code:
adb reboot bootloader
How to reboot to download mode to be able to use fastboot:
From anywhere with buttons:
Long press (sometimes really long!) the Power button until you feel the vibration motor (not the haptic feedback) kick in. When it kicks in let go of power button quickly and push volume down to boot into bootloader.
Now choose your option with volume buttons until you see reboot to download and confirm the option by pressing the power button.
thanks to @tbalden for figuring it out intially how to get into bootloader!
From the OS or recovery via ADB:
Code:
adb reboot download
How to get the active slot:
Code:
fastboot getvar current-slot
How to set the active slot:
A word of advice. If you don´t know what you´re doing you should probably not change slots. Because my U12+ only has a working A Slot. The B slot is without the first OTA or flashing a RUU unbootable.
Set active slot to a:
Code:
fastboot --set-active=a
Set active slot to b:
Code:
fastboot --set-active=b
How to fastboot flash system, boot, vendor and dtbo to only one partition:
Fastboot with A/B devices allow to flash certain files to a specific Slot. I will list here a few of the most common commands. However be warned that not all of them work on the U12+ currently.
It´s currently a WIP to determine why and if it´s possbile with temp S-Off.
These commands seem to work on Standard retail Units only in download mode.
How to flash boot.img to Slot A:
Code:
fastboot flash boot_a boot.img
How to flash boot.img to Slot B:
Code:
fastboot flash boot_b boot.img
How to flash system to Slot A:
Code:
fastboot flash system_a system.img
How to flash system to Slot B:
Code:
fastboot flash system_b system.img
How to flash vendor to Slot A:
Code:
fastboot flash vendor_a vendor.img
How to flash vendor to Slot B:
Code:
fastboot flash vendor_b vendor.img
How to flash dtbo to Slot A:
Code:
fastboot flash dtbo_a dtbo.img
How to flash dtbo to Slot B:
Code:
fastboot flash dtbo_b dtbo.img
for other partitions the general rule is being obvious in these examples I guess
Partition List / Overview for A/B Partitions
Here is a partition list. So you can check if there is an A/B system available for said partition:
Code:
htc_imedugl:/dev/block/platform/soc/1d84000.ufshc/by-name # ls -al
total 0
drwxr-xr-x 2 root root 1880 1970-02-05 04:16 .
drwxr-xr-x 4 root root 2040 1970-02-05 04:16 ..
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 abl_a -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 abl_b -> /dev/block/sde30
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 aop_a -> /dev/block/sde1
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 aop_b -> /dev/block/sde22
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 apdp -> /dev/block/sde46
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 avb_rec -> /dev/block/sde56
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 bluetooth_a -> /dev/block/sde6
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 bluetooth_b -> /dev/block/sde27
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 board_info -> /dev/block/sdf1
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 boot_a -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 boot_b -> /dev/block/sde34
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 carrier -> /dev/block/sda16
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 cdt -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 cmnlib64_a -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 cmnlib64_b -> /dev/block/sde37
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 cmnlib_a -> /dev/block/sde15
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 cmnlib_b -> /dev/block/sde36
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 control -> /dev/block/sda13
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 cota -> /dev/block/sda17
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 ddr -> /dev/block/sdd3
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 devcfg_a -> /dev/block/sde17
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 devcfg_b -> /dev/block/sde38
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 devinfo -> /dev/block/sde44
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 devlog -> /dev/block/sda10
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 dip -> /dev/block/sde45
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 dpo -> /dev/block/sde48
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 dsp_a -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 dsp_b -> /dev/block/sde31
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 dtbo_a -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 dtbo_b -> /dev/block/sde42
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 extra -> /dev/block/sda12
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 fataldevlog -> /dev/block/sda11
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 frp -> /dev/block/sda14
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 fsc -> /dev/block/sdf4
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 fsg -> /dev/block/sdf3
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 hosd_a -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 hosd_b -> /dev/block/sde35
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 hvbmeta -> /dev/block/sda4
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 hyp_a -> /dev/block/sde3
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 hyp_b -> /dev/block/sde24
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 keymaster_a -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 keymaster_b -> /dev/block/sde32
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 limits -> /dev/block/sde50
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 local -> /dev/block/sda15
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 lockbooter_a -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 lockbooter_b -> /dev/block/sde33
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 logdump -> /dev/block/sde54
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 logfs -> /dev/block/sde52
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 mdtp_a -> /dev/block/sde8
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 mdtp_b -> /dev/block/sde29
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 mdtpsecapp_a -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 mdtpsecapp_b -> /dev/block/sde28
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 mfg -> /dev/block/sdf2
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 misc -> /dev/block/sda6
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 modemst1 -> /dev/block/sdf5
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 modemst2 -> /dev/block/sdf6
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 msadp -> /dev/block/sde47
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 oem_misc -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 padding0 -> /dev/block/sda1
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 padding3 -> /dev/block/sdd1
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 persist -> /dev/block/sda3
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 pg1fs -> /dev/block/sda5
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 pmic_a -> /dev/block/sde4
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 pmic_b -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 qupfw_a -> /dev/block/sde18
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 qupfw_b -> /dev/block/sde39
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 radio_a -> /dev/block/sde5
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 radio_b -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 ramdump -> /dev/block/sda8
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 reserve0 -> /dev/block/sda21
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 reserve4 -> /dev/block/sde57
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 reserve5 -> /dev/block/sdf7
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 sec -> /dev/block/sde43
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 sp1 -> /dev/block/sde49
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 ssd -> /dev/block/sda2
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 sti -> /dev/block/sde53
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 storsec -> /dev/block/sde55
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 system_a -> /dev/block/sda18
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 system_b -> /dev/block/sda19
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 tool_diag -> /dev/block/sda9
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 toolsfv -> /dev/block/sde51
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 tz_a -> /dev/block/sde2
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 tz_b -> /dev/block/sde23
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 userdata -> /dev/block/sda20
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 vbmeta_a -> /dev/block/sde20
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 vbmeta_b -> /dev/block/sde41
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 vendor_a -> /dev/block/sde19
lrwxrwxrwx 1 root root 16 1970-02-05 04:16 vendor_b -> /dev/block/sde40
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 xbl_a -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 xbl_b -> /dev/block/sdc1
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 xbl_config_a -> /dev/block/sdb2
lrwxrwxrwx 1 root root 15 1970-02-05 04:16 xbl_config_b -> /dev/block/sdc2
How to root your phone with TWRP
Prerequisites:
- unlocked bootloader
- enabled USB-Debugging in Developer Options
- latest adb and fastboot binaries
- working adb and fastboot environment
How to root by flashing the magisk zip:
1. Download magisk zip from here:
https://github.com/topjohnwu/Magisk/releases
2. Download TWRP from here: https://forum.xda-developers.com/u12-plus/development/recovery-unofficial-twrp-3-2-2-0-htc-t3819343
3.
Code:
fastboot boot nameoftwrp.img
the TWRP Image! The process is described in the thread I linked above
or simply flash the magisk Zip from permanently installed TWRP
4. Flash magisk.zip
5. Reboot, profit and enjoy a rooted phone
How to with flashing a patched boot.img:
1. Download the latest magisk manager apk from here and install it on your phone: https://github.com/topjohnwu/MagiskManager/releases
2. Get a boot.img that fits your current firmware. You can find one in the firmware zips provided by the kind and helpful @5m4r7ph0n36uru here:
https://forum.xda-developers.com/showpost.php?p=76606102&postcount=2
it´s usually called boot_signed.img
Or extract it from a RUU! the process is described here:
https://forum.xda-developers.com/chef-central/android/tool-universal-htc-ruu-rom-decryption-t3382928
3. Copy the boot_signed.img to your phone
4. Open the magisk manager app and tap two times on install
5. Now choose patch boot.img file and select the boot(_signed).img you copied to your phone in the upcoming file chooser
6. Wait for the boot.img to be patched
7. Copy the patched boot.img to your device
8. Download TWRP from here: https://forum.xda-developers.com/u12-plus/development/recovery-unofficial-twrp-3-2-2-0-htc-t3819343
9. fastboot boot the TWRP! The process is described in the thread I linked above.
Or use the permanently installed TWRP
10. Important: Tap on reboot. It will show the active slot! Now switch to the inactive slot and back to your active slot!
11. Tap on install and navigate to the patched boot.img
12. Tap on install img at the bottom
13. Flash the patched.img
14. Tap on reboost system and boot back to system
15. You´re now rooted!
How to root your phone without TWRP
Prerequisites:
- unlocked bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
How to:
1. Download the latest magisk manager from here and install: https://github.com/topjohnwu/MagiskManager/releases
2. Get a boot.img that fits your current firmware. You can find one in the firmware zips provided by the kind and helpful @5m4r7ph0n36uru here:
https://forum.xda-developers.com/showpost.php?p=76606102&postcount=2
it´s usually called boot_signed.img
Or extract it from a RUU! the process is described here:
https://forum.xda-developers.com/chef-central/android/tool-universal-htc-ruu-rom-decryption-t3382928
3. Copy the boot_signed.img to your phone
4. Open the magisk manager app and tap two times on install
5. Now choose patch boot.img file and select the boot(_signed).img you copied to your phone in the upcoming file chooser
6. Wait for the boot.img to be patched
7. Now connect your phone to your pc and make sure usb debugging is enabled in developer options
8. Open up a terminal in your fastboot folder and make sure adb is working by typing
Code:
adb devices
into terminal which should return your serial number
9. Pull the patches boot.img to your fastboot folder via:
Code:
adb pull /sdcard/MagiskManager/patched_boot.img
10. Reboot to download mode:
Code:
adb reboot download
11. Check your active slot while in the bootloader mode with
Code:
fastboot getvar current-slot
output of this command will show your active slot
12. Depending on the active slot do
For active slot a do:
Code:
fastboot flash boot_a patched_boot.img
For active slot b do:
Code:
fastboot flash boot_b patched_boot.img
13. If the flash was successful do:
Code:
fastboot reboot
14. Congratulations you´re now rooted.
15. You will see a message stating there is an internal problem. That is nothing to worry about and will be resolved on a later stage.
IMPORTANT NOTICES
1. After rooting, the option to enable face unlock from htc will be greyed out.
How to fix:
a. Open Magisk Manager
b. Open the side menu and tap on magisk hide
c. Tick faceunlock to be hidden
d. Go to settings apps and delete data of faceunlock app
e. reboot!
I will refine this thread in the future and include a few more things to it when the time comes.
Drop a thanks if it helped you
And have a nice day
Here is described how to get adaway working after rooting the U12+
How to:
1. Download and install latest (at the time of writing 3.3) adaway apk from here:
https://forum.xda-developers.com/showthread.php?t=2190753
2. Please don´t download adaway apk elsewhere or from xda labs because 3.2 will not work.
3. Download busybox installer here:
https://play.google.com/store/apps/details?id=stericson.busybox
4. Open the app, grant root access and install busybox
5. Now open adaway and grant root access.
6. Let adaway do its thing and say yes when you will be asked for symlinking.
7. Reboot and profit!
So one more.
Have you ever wondered if it´s possible to adjust the HTC, Google or Dragonfly USB - C to 3,5mm Adapter/DAC more fine grained to your liking. Like controling analog gain of the phone and hardware gain of the dac seperately to achieve the best audio signal possible?
Fine, because here I have a nifty little tweak for you!
I came across this nice little mod and asked the kind @bjrmd if it was possible to adjust his app for the U11. He agreed and I got him the logs. Eventually he worked it out and got it running. Luckily enough this mod still works on the U12+
Prerequisites:
- Root (see above )
- A supported USB DAC (HTC U11 dongle, google dongle or dragonfly red)
Steps:
1. Visit the thread here: https://forum.xda-developers.com/pixel-2-xl/themes/pixel-2-usb-audio-control-t3704024
2. Read the thread!
3. Drop a thanks!
4. Download the latest pixel 2 audio.apk and install it
5. Download the tinymix32.zip, extract the tinymix32 file and place it in the Download folder of your internal SDCARD!
6. Place it nowhere different!
7. Open the previously installed app and grant root permission
8. Reboot your phone!
9. Let the phone boot up fully. The app will copy the file automatically
10. After you saw the toast message plug in the USB DAC with the headphones inserted. You notice the app will automatically open
11. Choose your favorite volume in the slider menu! (Analog (first row) should be maxed out, hardware dac gain (second row) adjusted to your liking but below max)
12. Play music without plugging the headphones to your ear. It may be loud!
13. Enjoy
14. For further questions visit the linked thread! It is full of interesting info!
and one
updated post #2 with how to get adaway working
Hey mate,
thanks for that brilliant guide. Great job!
Sent from my HTC U12+ using XDA Labs
5m4r7ph0n36uru said:
Hey mate,
thanks for that brilliant guide. Great job!
Click to expand...
Click to collapse
Thank you if you find any niggles I’m always open to suggestions or improvements
Would this method work on an HTC U11+? Given that the correct boot img is used ofcourse...
I have made a TWRP for U12+ , but cannot gain root using supersu, unfortunately.
robieNL said:
Would this method work on an HTC U11+? Given that the correct boot img is used ofcourse...
Click to expand...
Click to collapse
Yes it should work just fine
goodman_east said:
I have made a TWRP for U12+ , but cannot gain root using supersu, unfortunately.
Click to expand...
Click to collapse
Did you try to use the magisk flashable zip? Supersu is deprecated as it stands now. And magisk is more than capable to be a worthy successor
maybe open a thread for your twrp here and publish your sources so we can all start working on it?
Freak07 said:
Did you try to use the magisk flashable zip? Supersu is deprecated as it stands now. And magisk is more than capable to be a worthy successor
maybe open a thread for your twrp here and publish your sources so we can all start working on it?
Click to expand...
Click to collapse
yep, I flashed magisk.zip to gain root.
My twrp has some bugs:
1 data decrtytion failed
2 mtp not working
I don't know how to modify stock kernel to enable touch function, so I use kernel file from @sabpprook, but resulting in flashable twrp zip not working properly.
goodman_east said:
yep, I flashed magisk.zip to gain root.
My twrp has some bugs:
1 data decrtytion failed
2 mtp not working
I don't know how to modify stock kernel to enable touch function, so I use kernel file from @sabpprook, but resulting in flashable twrp zip not working properly.
Click to expand...
Click to collapse
Could you get us a dmesg and logcat?
And the recovery log too?
Freak07 said:
Hey guys and girls,
I couldn´t find any guide on how to root the U12+ without twrp yet, so I thought maybe it´s good to have one. It´s also useful for people who don´t like to boot/flash the recovery but want root access.
Prerequisites:
- unlocked bootloader
- latest adb and fastboot binaries
- working adb and fastboot environment
How to:
1. Download the latest magisk manager from here and install: https://github.com/topjohnwu/MagiskManager/releases
2. Get a boot.img that fits your current firmware. You can find one in the firmware zips provided by the kind and helpful @5m4r7ph0n36uru here:
https://forum.xda-developers.com/showpost.php?p=76606102&postcount=2
it´s usually called boot_signed.img
3. Copy the boot_signed.img to your phone
4. Open the magisk manager app and tap two times on install
5. Now choose patch boot.img file and select the boot(_signed).img you copied to your phone in the upcoming file chooser
6. Wait for the boot.img to be patched
7. Now connect your phone to your pc and make sure usb debugging is enabled
8. Open up a terminal in your fastboot folder
9. Pull the patches boot.img to your fastboot folder via:
Code:
adb pull /sdcard/MagiskManager/patched_boot.img
10. Reboot to bootloader:
Code:
adb reboot bootloader
11. Check your active slot in the bootloader/download mode on your phone.
12. Depending on the active slot do
For active slot a do:
Code:
fastboot flash boot_a patched_boot.img
For active slot b do:
Code:
fastboot flash boot_b patched_boot.img
13. If the flash was successful do:
Code:
fastboot reboot
14. Congratulations you´re now rooted.
I will refine this thread in the future and include a few more things to it when the time comes.
Drop a thanks if it helped you
And have a nice day
Click to expand...
Click to collapse
Would you mind writing a fool-proof all-in-one version of guide?
I'm sorry but seems like I am already encountering lots of confusion while reading the first few lines.
For instance, I know how to unlock my u12+'s bootloader and have already done so but I don't understand what boot.img means and also, the firmware version of my u12+ is 1.15.708 and there's only 401/617 for me so what can I do? Also what is adb and fastboot binaries? and does acquiring these 2 necessarily means acquiring both working adb and fastboot environment at the same time? if not, what are the difference?
Sorry but I am really a noob at rooting I would like to spend more time to learn about it but whenever I try to look up the forum the fact that there are too many articles to read from bombards me :crying:
Then you shouldn't be trying this. Not to be a pain, but if you don't learn about this stuff, you shouldn't play with it. The OP is quite articulate and easy to understand if you understand the entire process and Android architecture.
hgoldner said:
Then you shouldn't be trying this. Not to be a pain, but if you don't learn about this stuff, you shouldn't play with it. The OP is quite articulate and easy to understand if you understand the entire process and Android architecture.
Click to expand...
Click to collapse
Just like the essential phone now.
Hi people, I can not unlock my Phone
Anyone have an idea, whats the problem?
C:\adb>fastboot oem get_identifier_token
...
(bootloader) [KillSwitch] : /dev/block/bootdevice/by-name/frp
(bootloader) [KillSwitch] Last Byte is 0X00, disable unlock
(bootloader) [KillSwitch] oem unlock Turn Off!
OKAY [ 0.004s]
finished. total time: 0.004s
Click to expand...
Click to collapse
ok, got it!
had to ennable aditional to unlock the bootloader in developers menu in the phone
---------- Post added at 08:42 PM ---------- Previous post was at 08:34 PM ----------
next Problem ,
Unlocking Bootloader Failed!
Sorry it didn't work out. Here's why:
Required Resources
Please make sure all items are installed and up to date.
We're sorry, but it appears your attempt to unlock the bootloader on this device has failed. This could be caused by several factors including simple errors in the entry of the unlock token, problems with your device, or a lack of manufacturer support for the unlocking process. Please see the specific error code listed below, and try again if necessary.
Error Code: Invalid Bootloader Token Length.
Error Reason: The submitted Token appears to be the wrong length and won't work.
Click to expand...
Click to collapse
Edit: solved too, copied too much , deleted all (bootloader)
ataf said:
Hi people, I can not unlock my Phone
Anyone have an idea, whats the problem?
ok, got it!
had to ennable aditional to unlock the bootloader in developers menu in the phone
---------- Post added at 08:42 PM ---------- Previous post was at 08:34 PM ----------
next Problem ,
Click to expand...
Click to collapse
You probably copied something from the token you shouldn’t have copied?
Updated post #3 with another interesting mod! for all you audio guys out there!
https://forum.xda-developers.com/showpost.php?p=76781657&postcount=3
Freak07 said:
2. Get a boot.img that fits your current firmware. You can find one in the firmware zips provided by the kind and helpful @5m4r7ph0n36uru here:
https://forum.xda-developers.com/showpost.php?p=76606102&postcount=2
it´s usually called boot_signed.img
Click to expand...
Click to collapse
My firmware's version is 1.15.708.6, which is not available in that post for download. What can I do to root my phone?

Mi A2 Lite boots only on slot B

I have a problem with my Mi A2 Lite.
I have installed the Lineage OS ROM: https://forum.xda-developers.com/mi-a2-lite/development/lineageos-16-0-xiaomi-mi-a2-lite-t3919060
It seems that works only one slot, the slot B.
I flash the updates of the rom following this guide: https://github.com/tkchn/daisyinstall/blob/master/README.md
If the active slot is the slot B, when I install an update of the rom in the slot A and then change the active slot to slot A in TWRP, then reboot and the phone goes in bootloop with the androidone logo.
Then I reboot the phone holding the power button, boot to fastboot and boot to recovery.
As this point I repeat the whole process, flashing the rom to slot B and changing the active slot to slot B and now if I reboot the phone all work.
I had this problem with all the updates that I have done.
You have probably different firmware versions on each partition. You can fix that by writing the B partitions into the A ones.
Go to twrp, and through either 'adb shell' or the recovery shell:
Code:
su
dd if=/dev/block/mmcblk0p32 of=/dev/block/mmcblk0p31
dd if=/dev/block/mmcblk0p27 of=/dev/block/mmcblk0p26
dd if=/dev/block/mmcblk0p25 of=/dev/block/mmcblk0p24
dd if=/dev/block/mmcblk0p14 of=/dev/block/mmcblk0p13
dd if=/dev/block/mmcblk0p45 of=/dev/block/mmcblk0p44
dd if=/dev/block/mmcblk0p29 of=/dev/block/mmcblk0p28
dd if=/dev/block/mmcblk0p48 of=/dev/block/mmcblk0p47
dd if=/dev/block/mmcblk0p55 of=/dev/block/mmcblk0p54
dd if=/dev/block/mmcblk0p20 of=/dev/block/mmcblk0p19
dd if=/dev/block/mmcblk0p18 of=/dev/block/mmcblk0p17
dd if=/dev/block/mmcblk0p59 of=/dev/block/mmcblk0p58
You should have exactly similar A/B partitions after this (except for system and boot, the ones updated), and there should be no problem.
With custom rom...
Install the rom , TWRP and disable encryption in slot A
Install gapps, magisk, kernel, etc in slot B
The device only boots in B slot
In stock rom boots in A slot
Its ok
GDFI said:
You have probably different firmware versions on each partition. You can fix that by writing the B partitions into the A ones.
Go to twrp, and through either 'adb shell' or the recovery shell:
Code:
su
dd if=/dev/block/mmcblk0p32 of=/dev/block/mmcblk0p31
dd if=/dev/block/mmcblk0p27 of=/dev/block/mmcblk0p26
dd if=/dev/block/mmcblk0p25 of=/dev/block/mmcblk0p24
dd if=/dev/block/mmcblk0p14 of=/dev/block/mmcblk0p13
dd if=/dev/block/mmcblk0p45 of=/dev/block/mmcblk0p44
dd if=/dev/block/mmcblk0p29 of=/dev/block/mmcblk0p28
dd if=/dev/block/mmcblk0p48 of=/dev/block/mmcblk0p47
dd if=/dev/block/mmcblk0p55 of=/dev/block/mmcblk0p54
dd if=/dev/block/mmcblk0p20 of=/dev/block/mmcblk0p19
dd if=/dev/block/mmcblk0p18 of=/dev/block/mmcblk0p17
dd if=/dev/block/mmcblk0p59 of=/dev/block/mmcblk0p58
You should have exactly similar A/B partitions after this (except for system and boot, the ones updated), and there should be no problem.
Click to expand...
Click to collapse
Thank you very much @GDFI!
Probably I have android 8 in slot A and android 9 in slot B.
I will try to do this. Will all my data and settings survive this?
For knowledge, is there a list to understand what mmcblk**** partitions match?
leechgid said:
With custom rom...
Install the rom , TWRP and disable encryption in slot A
Install gapps, magisk, kernel, etc in slot B
The device only boots in B slot
In stock rom boots in A slot
Its ok
Click to expand...
Click to collapse
I don't understand, can you explain better?
I found how to see the list of partitions of the Mi A2 Lite:
Code:
daisy:/ # ls -l /dev/block/platform/soc/7824900.sdhci/by-name/
total 0
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 DDR -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 aboot_a -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 aboot_b -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 apdp -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 bk1 -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 bk2 -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 bk3 -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 bk4 -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 bk5 -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 bk6 -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 boot_a -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 boot_b -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 cmnlib64_a -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 cmnlib64_b -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 cmnlib_a -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 cmnlib_b -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 config -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 devcfg_a -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 devcfg_b -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 devinfo -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 dip -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 dpo -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 dsp_a -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 dsp_b -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 fsc -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 fsg -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 keymaster_a -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 keymaster_b -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 keystore -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 limits -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 lksecapp -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 lksecappbak -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 logdump -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 mcfg -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 mdtp_a -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 mdtp_b -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 misc -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 modem_a -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 modem_b -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 modemst1 -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 modemst2 -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 mota -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 msadp -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 persist -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 persistbak -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 rpm_a -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 rpm_b -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 sbl1_a -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 sbl1_b -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 sec -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 splash -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 ssd -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 syscfg -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 system_a -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 system_b -> /dev/block/mmcblk0p57
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_a -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_b -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 userdata -> /dev/block/mmcblk0p60
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 vendor_a -> /dev/block/mmcblk0p58
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 vendor_b -> /dev/block/mmcblk0p59
@GDFI You have omitted three partitions: system, boot, tz.
I understand system and boot, but what is the tz partition?
Should not be copied?
Code:
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_a -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_b -> /dev/block/mmcblk0p36
epcesp said:
@GDFI You have omitted three partitions: system, boot, tz.
I understand system and boot, but what is the tz partition?
Should not be copied?
Code:
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_a -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_b -> /dev/block/mmcblk0p36
Click to expand...
Click to collapse
Sorry I omitted the TZ partition by error, it must be copied from b to a too. (not important here but if you want to have an idea about every partition "role" : https://forum.xda-developers.com/android/general/info-android-device-partitions-basic-t3586565 )
For the boot and system partitions, you can also flash them from the B slot to the A one if you want, but when you flash an update from the B slot, the new system.img and boot.img from the update will be flashed into the A partitions ; so there's no absolute need to copy them manually unless you want to try booting from the A slot without updating. (I hope I am somehow clear lol )
Oh and it won't affect your data at all!
GDFI said:
Sorry I omitted the TZ partition by error, it must be copied from b to a too. (not important here but if you want to have an idea about every partition "role" : https://forum.xda-developers.com/android/general/info-android-device-partitions-basic-t3586565 )
For the boot and system partitions, you can also flash them from the B slot to the A one if you want, but when you flash an update from the B slot, the new system.img and boot.img from the update will be flashed into the A partitions ; so there's no absolute need to copy them manually unless you want to try booting from the A slot without updating. (I hope I am somehow clear lol )
Oh and it won't affect your data at all!
Click to expand...
Click to collapse
Thanks, you were very clear!
Definitely, I used these commands:
Code:
su
dd if=/dev/block/mmcblk0p32 of=/dev/block/mmcblk0p31 # aboot_b -> aboot_a
dd if=/dev/block/mmcblk0p52 of=/dev/block/mmcblk0p51 # boot_b -> boot_a
dd if=/dev/block/mmcblk0p27 of=/dev/block/mmcblk0p26 # cmnlib64_b -> cmnlib64_a
dd if=/dev/block/mmcblk0p25 of=/dev/block/mmcblk0p24 # cmnlib_b -> cmnlib_a
dd if=/dev/block/mmcblk0p14 of=/dev/block/mmcblk0p13 # devcfg_b -> devcfg_a
dd if=/dev/block/mmcblk0p45 of=/dev/block/mmcblk0p44 # dsp_b -> dsp_a
dd if=/dev/block/mmcblk0p29 of=/dev/block/mmcblk0p28 # keymaster_b -> keymaster_a
dd if=/dev/block/mmcblk0p48 of=/dev/block/mmcblk0p47 # mdtp_b -> mdtp_a
dd if=/dev/block/mmcblk0p55 of=/dev/block/mmcblk0p54 # modem_b -> modem_a
dd if=/dev/block/mmcblk0p20 of=/dev/block/mmcblk0p19 # rpm_b -> rpm_a
dd if=/dev/block/mmcblk0p18 of=/dev/block/mmcblk0p17 # sbl1_b -> sbl1_a
dd if=/dev/block/mmcblk0p57 of=/dev/block/mmcblk0p56 # system_b -> system_a
dd if=/dev/block/mmcblk0p36 of=/dev/block/mmcblk0p35 # tz_b -> tz_a
dd if=/dev/block/mmcblk0p59 of=/dev/block/mmcblk0p58 # vendor_b -> vendor_a
Now I have to wait the next update to see if it works.
I have a doubt, if the custom roms only change the system and boot partitions, does that mean that without having the original rom the other partitions will no longer be updated?
epcesp said:
Now I have to wait the next update to see if it works.
I have a doubt, if the custom roms only change the system and boot partitions, does that mean that without having the original rom the other partitions will no longer be updated?
Click to expand...
Click to collapse
Nice!
Yep, the custom roms rely on stock vendor, modem etc... and if you install one on the top of 10.0.0.3 stock for example, the vendor, modem, about, and other partitions will keep the same version and won't be updated with the custom rom updates.
You can update them manually by flashing newer images of those partitions (that can be extracted from ota updates), as long as the new version is still compatible with the rom ; for example a custom rom made to be compatible with an Oreo vendor may not work if the vendor is updated to its Pie version (The vendor having an Oreo version in the slot A might be the reason you couldn't boot :v ). Some developers recommend to use certain versions sometimes.
In short, those partitions won't be updated unless you want to do it manually
Clear, but if I want to update to latest version, mantaining my data and my rom, which partitions should I flash?
All except system and boot?
Yes, you flash everything except system and boot.
But one important thing is : if you have disabled encryption, flashing an update of vendor partition will re-enable forced encryption, so you would need to go to TWRP just after flashing and install Encryption disabler zip BEFORE the first boot, otherwise your data would be encrypted directly after first booting.
I made an update of the rom and now the phone works also in slot a, thanks @GDFI!
GDFI said:
Yes, you flash everything except system and boot.
But one important thing is : if you have disabled encryption, flashing an update of vendor partition will re-enable forced encryption, so you would need to go to TWRP just after flashing and install Encryption disabler zip BEFORE the first boot, otherwise your data would be encrypted directly after first booting.
Click to expand...
Click to collapse
What happens if I have my data already encrypted? I encrypted the phone from android settings.
When I installed the rom for the first time I flashed also force encryption disabled, as reported in the installation guide. Then in the rom from android security settings I encrypted the phone.
I'm not very sure about the purpouse of force encryption disabler.
epcesp said:
What happens if I have my data already encrypted? I encrypted the phone from android settings.
When I installed the rom for the first time I flashed also force encryption disabled, as reported in the installation guide. Then in the rom from android security settings I encrypted the phone.
I'm not very sure about the purpouse of force encryption disabler.
Click to expand...
Click to collapse
Happy it worked
Some ROMs don't support encryption, and TWRP especially cannot read encrypted data so most people prefer disable it. Since you're already encrypted, you can ignore the Disabler stuff!
Ok, thank you very much for all the support!

How can I backup System?[SOLVED]

Hello all. So without having TWRP stable and running, how can we pull a copy of system.img considering there is not a system partition, per se. Usually you could dd it and fastboot flash it but there is no system partition when you run ls -lah /dev/block/bootdevice/by-name. There is however a super partition which contains system, vendor and product. I've extracted the super partitioon to a .img. Is there a way to get it from this? This whole dynamic partition crap is confusing. Thanks!
I THINK I FOUND OUT A WAY TO BACK IT UP..
Code:
# ls -lah /dev/block/mapper
total 0
drwxr-xr-x 2 root root 380 1970-01-15 18:29 .
drwxr-xr-x 6 root root 3.5K 1970-01-15 18:29 ..
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 [email protected] -> /dev/block/dm-15
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 [email protected] -> /dev/block/dm-14
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 [email protected] -> /dev/block/dm-13
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 [email protected] -> /dev/block/dm-16
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 odm-verity -> /dev/block/dm-11
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 odm_a -> /dev/block/dm-3
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 odm_b -> /dev/block/dm-7
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 product-verity -> /dev/block/dm-9
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 product_a -> /dev/block/dm-1
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 product_b -> /dev/block/dm-5
[COLOR="DarkRed"][B]lrwxrwxrwx 1 root root 15 1970-01-15 18:29 system_a -> /dev/block/dm-0
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 system_b -> /dev/block/dm-4[/B][/COLOR]
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 system_root-verity -> /dev/block/dm-8
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 userdata -> /dev/block/dm-12
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 vendor-verity -> /dev/block/dm-10
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 vendor_a -> /dev/block/dm-2
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 vendor_b -> /dev/block/dm-6
As you can see here, we have 2 block devices pointing to system_a and system_b. I would imagine using dd to make a copy would be good enough for now.
Code:
dd if=/dev/block/mapper/system_a of=/sdcard/system_a.img
And then fastboot flash it to your current slot
Code:
fastboot flash system system_a.img
As a side note, to be able to tell which slot is currently being used, you can run
Code:
fastboot getvar all
and look for (bootloader) current-slot
Hope this helps

Categories

Resources