Skip to content

Instantly share code, notes, and snippets.

@deadman96385
Created January 27, 2016 21:20
Show Gist options
  • Save deadman96385/84c1c20e73eaf6c5c2eb to your computer and use it in GitHub Desktop.
Save deadman96385/84c1c20e73eaf6c5c2eb to your computer and use it in GitHub Desktop.
# When you need to map emmc blocks to mounts without root and no access to /dev
# Start by finding the target - look in /sys/dev/block for major:minor block devices
# that will link to mmcblk0, and use that in the first cd below (too lazy to script it today, sue me)
# EarlyMon 2016/01/27
# Steal this method :D
cd /sys/devices/soc.0/7824900.sdhci/mmc_host/mmc0/mmc0:0001/block/mmcblk0
for i in mmcblk0p*
do
cat $i/uevent | grep "NAME"
echo ""
done
@EarlyMon
Copy link

Can also change first two lines to -

cd /sys/dev/block
for i in 179:*

  • because 179 is the major node number for the emmc.

@EarlyMon
Copy link

Sizes still come from /proc/partitions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment