On my device, I can obtain a list of existing partitions by executing ls -al /dev/block/bootdevice/by-name via ADB. But I found no way to obtain the size of each partition without root powers: cat /proc/partitions, blockdev --getsize64 <device>, cat /sys/class/block/sda3/size, cat /proc/diskstats – all of them give me a Permission denied; lsblk -no SIZE <device> gives me a "not found" (no lsblk obviously). Things like df or mount are not helpful in this context as they only apply to mounted partitions, and I need sizes from partitions not currently mounted.
Are there any methods I might have missed and which might work on a non-rooted device?
(the device in question runs Android 10, but I'm interested in all general solutions at least for recent devices, hence no version tag)