Gabri3lZ / SwitchrootAndroidUtils

Utils for Switchroots LineageOS Android ROM for Nintendo Switch
MIT License
45 stars 4 forks source link

Feature Request: Support PCIe card readers (/dev/mmcblk0) #1

Closed mchubby closed 5 years ago

mchubby commented 5 years ago

What happens?

Some PCs and laptops have a built-in SD card reader attached through a PCI express interface, not USB, which present the devices & partitions through the mmc sub-system (mmcblkXpY). Thus, they are not detected by the script.

Your settings

Other details:

Instead of detecting lsblk -S, use lsblk -I 8,179 instead (uppercase i followed by device types).

Since the partition naming scheme will be different (instead of ${devicePath}${i} => sdb7), it is necessary to add a special case for addressing a partition, e.g. mmcblk0p7

See https://stackoverflow.com/a/2172367 for pattern matching in Bash.

Gabri3lZ commented 5 years ago

@mchubby thank you for your PR. I merged it with 1 slight change into master:

Instead of lsblk --nodeps -I 8,179 I used lsblk -d -e 7