[Android General] chankruze:
Sometime you need to build some mod or own custom ROM for a new device or the device which don't have much development on it.On these situations to flash any partition to the device we need to know it's actual block,size,path,user privilage.

This can typically done by a Root explorer or via ADB shell.

In this comprehensive info guide I will focous on getting partition details via ADB shell.

Let's Dive In:-

REQUIREMENTS

1. UNLOCKED BOOTLOADER.

2. SUPERSU/MAGISK FOR ROOT ACCESS.

3. ADB INSTALLED PROPERLY IN PC.

4. RESPECTIVE DEVICE DRIVERS. (e.g. for moto g5 plus,which i have,need motorola usb drivers to be installed.)

PROCEDURE

1. Using df lists the filesystem path alias and size info as seen below (total size, used, free and block size).

Example :

root@android:/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1714040 3732 1710308 1% /
tmpfs 1819500 712 1818788 1% /dev
/dev/block/mmcblk0p53 3320680 1882092 1438588 57% /system
tmpfs 1819500 0 1819500 0% /mnt
/data/media 25782252 3489280 22292972 14% /mnt/runtime/default/emulated
/dev/block/vold/public:179_65 15640832 11533440 4107392 74% /mnt/media_rw/79D8-1EE2
/mnt/media_rw/79D8-1EE2 15640832 11533440 4107392 74% /mnt/runtime/default/79D8-1EE2
/dev/block/mmcblk0p54 25782252 3489280 22292972 14% /data
/dev/block/mmcblk0p52 253920 228 253692 1% /cache
/dev/block/mmcblk0p19 96688 69552 27136 72% /firmware
/dev/block/mmcblk0p29 2500 2492 8 100% /fsg
/dev/block/mmcblk0p22 12016 5052 6964 43% /dsp
/dev/block/mmcblk0p30 28144 520 27624 2% /persist
/dev/block/loop0 92656 996 91660 2% /su

2. Using cat /proc/mounts shows the partition file path, the alias, the filesystem type, the startnig inode, the number of blocks, read/write status (and other parameters of the individual partition that I'm not entirely sure of).

Example:

root@android:/ # cat /proc/mounts
rootfs / rootfs ro,seclabel,size=1714040k,nr_inodes=428510 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1819500k,nr_inodes=454875,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
none /dev/cpuset cgroup rw,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
proc /proc proc rw,relatime,gid=3009,hidepid=2 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tracefs /sys/kernel/tracing tracefs rw,relatime 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
/dev/block/platform/soc/7824900.sdhci/by-name/system /system ext4 ro,seclabel,relatime,discard,data=ordered 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,size=1819500k,nr_inodes=454875,mode=755,gid=1000 0 0
/data/media /mnt/runtime/default/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid 0 0
/data/media /mnt/runtime/read/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid 0 0
/data/media /mnt/runtime/write/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid 0 0
/dev/block/vold/public:179_65 /mnt/media_rw/79D8-1EE2 vfat rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/mnt/media_rw/79D8-1EE2 /mnt/runtime/default/79D8-1EE2 sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6 0 0
/mnt/media_rw/79D8-1EE2 /mnt/runtime/read/79D8-1EE2 sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18 0 0
/mnt/media_rw/79D8-1EE2 /mnt/runtime/write/79D8-1EE2 sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18 0 0
none /config configfs rw,relatime 0 0
/dev/block/bootdevice/by-name/userdata /data f2fs rw,seclabel,nosuid,nodev,noatime,nodiratime,background_gc=on,discard,user_xattr,inline_xattr,acl,inline_data,nobarrier,extent_cache,active_logs=6 0 0
/dev/block/bootdevice/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/dev/block/bootdevice/by-name/modem /firmware ext4 ro,context=u:object_r:firmware_file:s0,nosuid,nodev,relatime,nobarrier,data=ordered 0 0
/dev/block/bootdevice/by-name/fsg /fsg ext4 ro,context=u:object_r:fsg_file:s0,nosuid,nodev,relatime 0 0
/dev/block/bootdevice/by-name/dsp /dsp ext4 ro,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/persist /persist ext4 rw,context=u:object_r:persist_file:s0,nosuid,nodev,noatime,noauto_da_alloc,data=ordered 0 0
/dev/block/loop0 /su ext4 rw,seclabel,noatime,data=ordered 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,size=1819500k,nr_inodes=454875,mode=755,gid=1000 0 0
/data/media /storage/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid 0 0
/mnt/media_rw/79D8-1EE2 /storage/79D8-1EE2 sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6 0 0
tmpfs /storage/self tmpfs rw,seclabel,relatime,size=1819500k,nr_inodes=454875,mode=755,gid=1000 0 0

3.Using cat /proc/partitions you will get the actual partition name identifier and the number of blocks in the partition.

Example:

root@android:/ # cat /proc/partitions
major minor #blocks name

7 0 98304 loop0
254 0 524288 zram0
179 0 30535680 mmcblk0
179 1 512 mmcblk0p1
179 2 256 mmcblk0p2
179 3 1792 mmcblk0p3
179 4 64 mmcblk0p4
179 5 1536 mmcblk0p5
179 6 256 mmcblk0p6
179 7 256 mmcblk0p7
179 8 256 mmcblk0p8
179 9 192 mmcblk0p9
179 10 512 mmcblk0p10
179 11 256 mmcblk0p11
179 12 1792 mmcblk0p12
179 13 64 mmcblk0p13
179 14 1536 mmcblk0p14
179 15 256 mmcblk0p15
179 16 256 mmcblk0p16
179 17 256 mmcblk0p17
179 18 192 mmcblk0p18
179 19 102400 mmcblk0p19
179 20 1 mmcblk0p20
179 21 8 mmcblk0p21
179 22 16384 mmcblk0p22
179 23 32 mmcblk0p23
179 24 16 mmcblk0p24
179 25 512 mmcblk0p25
179 26 512 mmcblk0p26
179 27 2048 mmcblk0p27
179 28 2048 mmcblk0p28
179 29 8192 mmcblk0p29
179 30 32768 mmcblk0p30
179 31 512 mmcblk0p31
259 0 128 mmcblk0p32
259 1 16384 mmcblk0p33
259 2 16384 mmcblk0p34
259 3 512 mmcblk0p35
259 4 8192 mmcblk0p36
259 5 16384 mmcblk0p37
259 6 20580 mmcblk0p38
259 7 1024 mmcblk0p39
259 8 32 mmcblk0p40
259 9 512 mmcblk0p41
259 10 1024 mmcblk0p42
259 11 512 mmcblk0p43
259 12 2048 mmcblk0p44
259 13 256 mmcblk0p45
259 14 256 mmcblk0p46
259 15 8 mmcblk0p47
259 16 128 mmcblk0p48
259 17 8192 mmcblk0p49
259 18 8192 mmcblk0p50
259 19 671744 mmcblk0p51
259 20 262144 mmcblk0p52
259 21 3538944 mmcblk0p53
259 22 25784303 mmcblk0p54
179 32 4096 mmcblk0rpmb
179 64 15645696 mmcblk1
179 65 15644672 mmcblk1p1

Here comes a tricky part,

This folder in which by-name output is stored varies from devices to devices.

I will write the procedure to find this thing out.

Note : Here I am using MOTO G5 PLUS [POTTER] for demonstration.

As I change directory to /dev/block/bootdevice/ & ls to see the files & folders in this folder , i found that by-name folder which i was looking for.

Example:

root@android:/ # cd /dev/block/bootdevice/
root@android:/dev/block/bootdevice # ls -a -l
total 0
drwxr-xr-x 4 root root 1200 1970-08-14 04:53 .
drwxr-xr-x 4 root root 80 2018-03-22 09:08 ..
drwxr-xr-x 2 root root 1120 1970-08-14 04:53 by-name
drwxr-xr-x 2 root root 1120 1970-08-14 04:53 by-num
lrwxrwxrwx 1 root root 18 1970-08-14 04:53 mmcblk0 -> /dev/block/mmcblk0
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p10 -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p11 -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p12 -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p13 -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p14 -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p15 -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p16 -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p17 -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p18 -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p19 -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p2 -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p20 -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p21 -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p22 -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p23 -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p24 -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p25 -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p26 -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p27 -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p28 -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p29 -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p3 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p30 -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p31 -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p32 -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p33 -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p34 -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p35 -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p36 -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p37 -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p38 -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p39 -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p4 -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p40 -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p41 -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p42 -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p43 -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p44 -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p45 -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p46 -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p47 -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p48 -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p49 -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p5 -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p50 -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p51 -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p52 -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p53 -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mmcblk0p54 -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p6 -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p7 -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p8 -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 mmcblk0p9 -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 22 1970-08-14 04:53 mmcblk0rpmb -> /dev/block/mmcblk0rpmb
root@android:/dev/block/bootdevice #

Now i will enterby-name folder & see what's inside ?

...

Hola we nailed it !,I found exactly what i was trying to find,the detailed info of partitions.see below code.

root@android:/dev/block/bootdevice # cd by
by-name/ by-num/
root@android:/dev/block/bootdevice # cd by-name/
root@android:/dev/block/bootdevice/by-name # ls -a -l
total 0
drwxr-xr-x 2 root root 1120 1970-08-14 04:53 .
drwxr-xr-x 4 root root 1200 1970-08-14 04:53 ..
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 DDR -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 abootbak -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]apdp -> /dev/block/mmcblk0p45[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]boot -> /dev/block/mmcblk0p37[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]cache -> /dev/block/mmcblk0p52[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 carrier -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 cid -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 cmnlib -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 cmnlib64 -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 cmnlib64bak -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 cmnlibbak -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 devcfg -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 devcfgbak -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 dip -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 dpo -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 dsp -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 frp -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 fsc -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 fsg -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]hw -> /dev/block/mmcblk0p50[/COLOR]
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 keymaster -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 keymasterbak -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 kpan -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 limits -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-08-14 04:53[COLOR="Magenta"] logo -> /dev/block/mmcblk0p33[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 logs -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 metadata -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 misc -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]modem -> /dev/block/mmcblk0p19[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 modemst1 -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 modemst2 -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mota -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 msadp -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]oem -> /dev/block/mmcblk0p51[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 padA -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="Magenta"]persist -> /dev/block/mmcblk0p30[/COLOR]
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 prov -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 provbak -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]recovery -> /dev/block/mmcblk0p38[/COLOR]
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 [COLOR="magenta"]rpm -> /dev/block/mmcblk0p2[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 rpmbak -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 sbl1 -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 sbl1bak -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]sec -> /dev/block/mmcblk0p24[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 sp -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 ssd -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 syscfg -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]system -> /dev/block/mmcblk0p53[/COLOR]
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 tz -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 tzbak -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 [COLOR="magenta"]userdata -> /dev/block/mmcblk0p54[/COLOR]
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 utags -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 utagsBackup -> /dev/block/mmcblk0p26
root@android:/dev/block/bootdevice/by-name #

4. So for a particular device you can use ls -al /dev/block/platform/Your_Folder_Name/by-name to see the mapping between the partition alias and the path of actual partition file with owner & user.

Example:

root@android:/dev/block/bootdevice/by-name # ls - a -l /dev/block/bootdevice/b
ls: -: No such file or directory
ls: a: No such file or directory
total 0
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 DDR -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 abootbak -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 apdp -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 boot -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 cache -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 carrier -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 cid -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 cmnlib -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 cmnlib64 -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 cmnlib64bak -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 cmnlibbak -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 devcfg -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 devcfgbak -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 dip -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 dpo -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 dsp -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 frp -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 fsc -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 fsg -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 hw -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 keymaster -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 keymasterbak -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 kpan -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 limits -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 logo -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 logs -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 metadata -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 misc -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 modem -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 modemst1 -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 modemst2 -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 mota -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 msadp -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 oem -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 padA -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 persist -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 prov -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 provbak -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 recovery -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 rpm -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 rpmbak -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 sbl1 -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 sbl1bak -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 sec -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 sp -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 ssd -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 syscfg -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 system -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 20 1970-08-14 04:53 tz -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 tzbak -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 userdata -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 utags -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-08-14 04:53 utagsBackup -> /dev/block/mmcblk0p26
1|root@android:/dev/block/bootdevice/by-name #

Now you must understand that before flashing anything do check the script of that file & make sure it is flashing to the right partition (mmcblk0xxx) according to your device.

IF your are happy & it helped you do hit the THANKS button. It always motivates when someone appreciate your work.

Thank You.

OFFICIAL COMMUNITY

Official Telegram Group

Official Telegram Channel

======== GEEKOFIA ========

VISIT​