I'm trying to run freshly built Android image on emulator (generic
repo init -u https://android.googlesource.com/platform/manifest
mksdcard 1G sd.img
emulator -no-window -no-skin -no-audio -sdcard sd.img &
adb shell mount | grep vfat
adb shell blkid
/dev/block/vda1: LABEL="system" UUID="da594c53-9beb-f85c-85c5-cedf76546f7a" TYPE="ext4"
/dev/block/vdb: LABEL="cache" UUID="f73de97f-7017-ca5e-9b47-ca9c8f633e83" TYPE="ext4"
/dev/block/vde1: LABEL="vendor" UUID="6d16bab1-58d9-3c5d-8f14-f608f924affd" TYPE="ext4"
/dev/block/vdf: LABEL="SDCARD" UUID="1CEA-0B06" TYPE="vfat"
Turns out, in my case headless mode was the culprit. When I run emulator with
-no-skin -no-window options, SD card is not mounted. If I remove these options (and enable X11 forwarding, since I work on a headless server), everything works correctly.
I still want to know why I can't use SD card in headless mode, but at least I was able to solve the problem for the required task.