• Yu Ning's avatar
    Support emulator's virtio-blk based SD card · 942d4e83
    Yu Ning authored
    
    
    Currently, vold only supports MMC (for SD cards) and SCSI (for USB
    drives) devices. It does not recognize any device whose major number is
    not one of those used by MMC and SCSI. Unfortunately, virtio-blk is one
    such device. It is used by the new Android emulator (a.k.a. qemu2,
    featuring the "ranchu" virtual board) for SD card emulation.
    
    In order to make this virtio-blk based SD card device appear in Android
    and appear as an SD card (rather than a USB drive), changes have to be
    made to both vold (wherever the device major number is checked) and
    ranchu's storage configuration. This CL implements former.
    
    This is a stop-gap solution for emulator in nyc.
    A longer term solution in-tune with upstream kernel is in the pipes.
    
    Updated from aosp/master version.
    
    BUG:27431753
    
    Change-Id: I5014edec73be7c5b565d91542464c82cbe58992c
    Signed-off-by: default avatarYu Ning <yu.ning@intel.com>
    (cherry picked from commit 5b1d1c7dfa13b4dca75213581dc8351b841b76c8)
    942d4e83
VolumeManager.cpp 54.5 KB