Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to carry around an Android OS install on a USB so I can have a Google Authenticator with me everywhere I go since I don't own any mobile devices. The idea being that I can run Android through VirtualBox on the computers I use.

So I first partitioned my 8 GB USB drive using gparted into a fat32 file system for portability.

Then I created a VirtualBox disk associated with the fat32 partition on the USB drive at /dev/sdd1:

$ sudo su -
root@ckleinlx:~/.VirtualBox/HardDisks# VBoxManage internalcommands createrawvmdk -filename /root/.VirtualBox/HardDisks/usbdisk.vmdk -rawdisk /dev/sdd1
RAW host disk access VMDK file /root/.VirtualBox/HardDisks/usbdisk.vmdk created successfully.

Then I downloaded the android-x86 iso, and attached the iso and newly created usbdisk.vmdk as storage on a new VM in VirtualBox.

enter image description here

Then I boot up the VM and start the installer.

enter image description here

I formatted the partition again as fat32 and marked it Bootable, then started the install. When asked if I want to install GRUB I confirm, installation completes, and I select "Reboot", then shut down the VM.

At this point I remove the Android install disk from the VM, leaving only usbdisk.vmdk, which has Android installed on it now. However, when I boot, I just get this:

enter image description here

Android and grub are both clearly installed on the usb:

root@ckleinlx:~/.VirtualBox/HardDisks# mount /dev/sdd1 /media/usb
root@ckleinlx:~/.VirtualBox/HardDisks# ls /media/usb
android-4.3-test  grub

And here's what the USB stick looks like in gparted

enter image description here

Why can't Android be booted from this USB? Everything seems to be installed correctly, but virtualbox complains that it can't read the boot medium.

share|improve this question

2 Answers 2

Here are a few things that I changed to make it work:

  1. Do not use the Android installer to format the drive.
  2. Create your VirtualBox vmdk disk from the device (/dev/sdd), not the partition (/dev/sdd1)
  3. Disable the USB devices on the VM: Settings -> USB -> USB Device Filters -> Uncheck all
share|improve this answer

I install Android to USB with the .iso file and a USB boot maker program (rufus). There are 2 ways: use 2 USB and use 1 USB only.

  • 2 USB: reboot computer > boot with USB > open Install to harddisk > push in the second USB > re detect > ...
  • 1 USB: you will need Acronis to split the USB after make a USB boot
    • My USB is 2GB. After make it bootable, I split to 500MB (for the boot data) and 1500MB for install. (After split, you won't see the second drive in explorer and the old driver now is 500MB) - - - MUST be FAT32
    • Reboot > Install to harddisk >... (it will count down) > choose your image size (2047 MB) > reboot > Push out the USB
    • Using Acronis to format the first drive (500MB) > merge second drive to first drive (1500MB to 500MB) (logical now will be primary)
    • OK, reboot your computer and start your android system first time.

I get some problems: some app not work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.