Android emulator won't mount SD card -
i'm running virtual machine in android studio. problem is never mounting sd card. in settings, i've tried studio-managed (100mb) creating 1 myself:
$ ./mksdcard -l sdcard 100m sdcard.img
the file in home folder r/w rights.
this configuration:
avd.ini.encoding=utf-8 avdid=devicec_api_17 playstore.enabled=false abi.type=x86 avd.ini.displayname=devicec api 17 disk.datapartition.size=800m hw.accelerometer=no hw.audioinput=yes hw.battery=yes hw.camera.back=emulated hw.camera.front=emulated hw.cpu.arch=x86 hw.cpu.ncore=4 hw.dpad=no hw.device.manufacturer=user hw.device.name=devicec hw.gps=no hw.gpu.enabled=yes hw.gpu.mode=auto hw.initialorientation=landscape hw.keyboard=yes hw.lcd.density=160 hw.mainkeys=no hw.ramsize=1536 hw.sdcard=yes hw.sensors.orientation=no hw.sensors.proximity=no hw.trackball=no image.sysdir.1=system-images/android-17/google_apis/x86/ runtime.network.latency=none runtime.network.speed=full sdcard.path=/home/user/sdcard.img showdeviceframe=no skin.dynamic=yes skin.name=800x600 skin.path=_no_skin skin.path.backup=_no_skin tag.display=google apis tag.id=google_apis vm.heapsize=48
as can see, hw.sdcard
set yes
.
honestly don't know in logcat. filtering mount saw this:
08-14 17:45:55.544 1495-1508/system_process i/systemserver: mount service 08-14 17:45:55.544 1495-1508/system_process d/mountservice: got storage path: /mnt/sdcard description: usb storage primary: true removable: false emulated: false mtpreserve: 0 allowmassstorage: false maxfilesize: 0 08-14 17:45:55.544 1495-1508/system_process d/mountservice: addvolumelocked() storagevolume [mstorageid=0 mpath=/mnt/sdcard mdescriptionid=17040615 mprimary=true mremovable=false memulated=false mmtpreservespace=0 mallowmassstorage=false mmaxfilesize=0 mowner=null] 08-14 17:45:55.554 1495-1533/system_process d/mountservice: volume state changed /mnt/sdcard (null -> removed) 08-14 17:45:55.554 1495-1533/system_process w/mountservice: getsecurecontainerlist() called when storage not mounted
i've tried running in command line:
$ ./emulator -avd casio_api_17 -sdcard /home/mariano/sdcard.img
but don't see error. sd card won't mount.
this seems issue recent emulator version, possibly in relation older android versions (jelly bean, etc.).
downgrading sdk tools previous version solves issue.
it works example r25.2.5, can download windows, linux, or mac os x. if store tools outside of original sdk directory may need set android_sdk_root
environment variable.
then use emulator executable shipped package start avd:
$ ./emulator -avd casio_api_17 -sdcard /home/mariano/sdcard.img
Comments
Post a Comment