What is this?
Looks like a harmless same-old USB drive right? You put it into a Windows PC and it has a few photos and mp3s on it, hmm?
WRONG!
What you see here is a Persistent Android Live USB with storage space that can be shared with windows. Pop it in a PC, boot from the USB drive and you have your own personal customized Android at your fingertips.
After several iterations, I finally got this to work. Here is how it is done.
1. Choose a USB stick
Android can install inside 200MB if using a read-only system (400MB for a read-write), but you'll also need some space for all the apps and media you may acquire. Then, decide how much space you'd like shared with windows.
I used an 8GB USB stick: 750MB for Android 1.25GB for Android Data and 5GB to share with windows.
2. Partition the USB drive
Yes, you can partition a USB drive - but probably not using windows built-in tools. You may need a Linux Live CD for this one - or specialized windows software. I prefer using Peppermint 3 (lightweight Linux).
The first partition will be the partition to share with Windows. If you try to put this partition in any other position on the USB drive, Windows will never read it and if you give it permission will format ONLY the first partition. It may look like windows will format a different partition, but it won't- TRUST ME!
Format the partition as FAT32. This is the only file system that Android and Windows both like. In my case, I made a 5GB FAT32 partition.
Next, create the partition for the Android system files. This will need to be at least 250MB for using a compressed, read only system - 500MB for read-write system files. Format this in ext2, which is more flash memory friendly. This will protect your Android system from access by Windows since it can't read linux file systems. In my case, I formatted partition 2 at 750MB. MAKE THIS PARTITION BOOTABLE!
Next, create the Android data partition. Format this in ext2. In my case, I formatted partition 3 1.25GB. Again, this will protect your Android data from access by Windows.
3. Install Android
Download the latest generic x86 Android iso from Android-x86.org and put it on a CD or USB. Pop it in your PC and boot from the device you installed it on. Feel free to try android from this Live medium all you want, but once you leave Android your data will be gone.
At the GRUB boot menu, select the option to install Android. Now pop in the partitioned USB stick and select: Detect devices. Three new partitions should be added to the list. Select the 2nd new item, sdx2 (where x is the proper linux drive letter). Tell it what kind of partition and feel free to format it if you like. Install GRUB.
Continue with the installation and choose a read-only or read-write install type. After installtion is complete, you get two options: Run Android or Reboot. Pull out the Android install medium and the new Android USB Drive and reboot.
4. Tweak Grub
Boot to a Linux operating system. Put the Android USB drive back in and open /grub/menu.lst as root. You will need to add DATA=sdx3 (substituting x for the proper drive letter) to each menu item. I also added options for booting with different screen resolutions and for situations where the USB drive would be sda or sdb. Here is what mine looked like:
default=0
timeout=6
splashimage=/grub/android-x86.xpm.gz
root (hd0,1)
title Android 4.2 Jelly Bean on sdb (1280x1024)
kernel /android-4.2-test/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.2-test vga=794 DATA=sdb3
initrd /android-4.2-test/initrd.img
title Android 4.2 Jelly Bean on sdb (1024x768)
kernel /android-4.2-test/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.2-testvga=791 DATA=sdb3
initrd /android-4.2-test/initrd.img
title Android 4.2 Jelly Bean on sda (1280x1024)
kernel /android-4.2-test/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.2-test vga=794 DATA=sda3
initrd /android-4.2-test/initrd.img
title Android 4.2 Jelly Bean on sda (1024x768)
kernel /android-4.2-test/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.2-test vga=791 DATA=sda3
initrd /android-4.2-test/initrd.img
5. Reboot and Test
Save the Grub modifications and reboot the PC. Boot from the Android USB Drive. There will be some initial setup questions when android starts. When it tells you your tablet is ready, make a few changes (like the wallpaper), then shut it down and boot again. This time it should skip the questions and boot right into Android with your new wallpaper. Yay! It's working! Now Shut it down again.
6. Test the Shared data partition
Plug the Android USB drive into a Windows PC. If it does not recognize it, then let it format the drive. Now copy some media to the Andriod USB. Unplug the Andriod USB and boot from it again. It should auto mount the first FAT32 shared parition and you should be able to access your media.
7. Play!
You now have an Android Persistent Live USB / Windows Removable drive. Now anywhere you go you can pop in your "Flash drive" and have a customized operating system at your fingertips. Have fun