Android-x86 4.0/4.4 in a VirtualBox VM - how to allocate a functional SDCARD?

202 views
Skip to first unread message

Ryan Martin

unread,
Feb 9, 2015, 12:46:06 AM2/9/15
to andro...@googlegroups.com
I've been trying to get Android-x86 working on VirtualBox 4.3.20, using at least version 4.0 and preferably 4.4. It seems that the instructions on how to set up in a VM are out of date regarding provisioning a fake SDCARD to get apps that use one to work correctly. I tried making one big partition and installing on it, but while it booted, anything which needed the SDCARD failed with a "No External Storage" error. Then I tried two partitions, sda1 as ext3 with the install, sda2 as vfat, but it didn't help. It was not autodetected, adding SDCARD=sda2 to the kernel cmdline didn't work, and neither did trying various /system/etc/vold.fstab lines.

What exactly are the 4.0 and later Android-x86 looking for that is "internal storage" in the release notes, and how can I mimic this in a VM so that Android will detect and use it?

Antony Stone

unread,
Feb 9, 2015, 10:41:55 AM2/9/15
to andro...@googlegroups.com
On Monday 09 Feb 2015 at 05:46, Ryan Martin wrote:

> I tried two partitions, sda1 as ext3 with the install, sda2 as vfat, but it
> didn't help. It was not autodetected, adding SDCARD=sda2 to the kernel
> cmdline didn't work, and neither did trying various /system/etc/vold.fstab
> lines.
>
> What exactly are the 4.0 and later Android-x86 looking for that is
> "internal storage" in the release notes, and how can I mimic this in a VM
> so that Android will detect and use it?

I can't speak from specific experience, however I would expect you to need two
different devices, not just two different partitions on one device.

Therefore try sda1 as ext3 for the Android-x86 installation, and sdb1 as vfat
for the Pseudo-SD card.


Regards,


Antony.

--
"A person lives in the UK, but commutes to France daily for work.
He belongs in the UK."

- From UK Revenue & Customs notice 741, page 13, paragraph 3.5.1
- http://tinyurl.com/o7gnm4

Please reply to the list;
please *don't* CC me.

Meerio

unread,
Feb 9, 2015, 1:40:11 PM2/9/15
to andro...@googlegroups.com
it's SDCARD=/dev/sda2 , i've one formatted fat32 but vfat should be ok too

Chih-Wei Huang

unread,
Feb 10, 2015, 11:09:15 AM2/10/15
to Android-x86
2015/2/9 上午7:32 於 "Ryan Martin" <kynal...@gmail.com> 寫道:
>
> I've been trying to get Android-x86 working on VirtualBox 4.3.20, using at least version 4.0 and preferably 4.4. It seems that the instructions on how to set up in a VM are out of date regarding provisioning a fake SDCARD to get apps that use one to work correctly. I tried making one big partition and installing on it, but while it booted, anything which needed the SDCARD failed with a "No External Storage" error. Then I tried two partitions, sda1 as ext3 with the install, sda2 as vfat, but it didn't help. It was not autodetected, adding SDCARD=sda2 to the kernel cmdline didn't work, and neither did trying various /system/etc/vold.fstab lines.
>
> What exactly are the 4.0 and later Android-x86 looking for that is "internal storage" in the release notes, and how can I mimic this in a VM so that Android will detect and use it?

You don't need to do anything to use internal storage.
It's configured and be used automatically.

Internal storage is very standard for modern android devices.
If your app can't use it, it's your app's bug.
Ask the author to fix it.
(What app did you try exactly?)

SDCARD is used to configure a second storage (a real external storage).
However, no app should require to use it
since not every android device has external storage.

Basically speaking, an app should check the env variable
EXTERNAL_STORAGE to determine the storage path it can use.
(Note the variable name is a little confusing. It actually points to
the internal storage of modern android devices)
The app could also check the SECONDARY_STORAGE
as a list of the real external storages it can use.
But this should be optional, not mandatory.

Ryan Martin

unread,
Feb 10, 2015, 3:48:30 PM2/10/15
to andro...@googlegroups.com, antony...@android.open.source.it
Thanks, Anthony. Presenting two separate .vdi volumes as separate storage devices thru VirtualBox fixed the issue.
Reply all
Reply to author
Forward
0 new messages