Feedburner Facebook youtube pinterest twitter

Monday, August 11, 2014

How to install Dual Boot Android x86 on PC KitKat 4.4 RC2 without USB or CD


Not that long ago after screwing up my android while fooling around with ZTE merit codes on my ZTE Z990g that was rooted with the ZTE avail, I screwed up my touchscreen calibration firmware and cannot figure out how to reinstall it, oops.  After figuring out how to get my rooted devices to work with android screencast on my computer so that it could be accessed, I than proceeded to try different techniques to unroot my android to see if there was any way to get into FTM mode.  Just for kicks, my SD card reader decided to take a dive, great, now I have an android, that is unrooted and can't do a thing until my new phone and new touchscreen comes in.

Anyways, while doing many searches on how to fix my issue while waiting, I discovered the world of installing the Android Operating system on the computer.  My oh my, this is so cool, had to try it out.  Well since Android is still in beta testing, it was unable to detect my my keyboard after getting past the "install to harddisk screen", grrr.  Tried it in Virtual Machine, way to slow, sheesh, if one wanted to go back in time and get that nostalgic feeling of installing windows 98 on a 486, why not do just that.  Okay so there had to be a way, and let me just say, it was easier than I thought.  There are a few ways I discovered, that one would not find in a search but had to know what they where searching for, search for all those little pieces and put them together, so I did just that, got Android KitKat running on my Desktop computer.  Now let me make it easier for you, in one Blog Post, just how to the same thing I did, without doing all those searches one how to do one thing only to have to put them all together.

There are a few ways this can be done, my preferable way is using a Linux operating system, since Android is a linux operating system, this technique is a little easier than if you are running Windows.  If using windows, it is probably a better idea to just use the steps to create an ext4 format on a USB stick, setup your bios settings to boot to USB stick as first or second boot option.  

For Ubuntu, things you will or may need:
  1. Ubuntu or Xubuntu live CD, 14.04 is the latest stable release
  2. Android x86 KitKat RC2 Iso
  3. Some type of unzip tool to extract your android x86 ISO to your harddisk, winzip - extraction tool already available if Ubuntu is already installed.
  4. Gparted - if you are already running Ubuntu and have a second hard disk or a area already partitioned off, then you can run the following commands:
sudo apt-get install gparted

sudo gparted
    If Ubuntu is already installed and you do not want to redo everything, but just want to create a new partition, there are a few work arounds.

    • Follow the steps using a USB Stick from gparted. 

    • Want mega space to run all kinds of Google Play APPS in AndroidX86 Kitkat but do not have any available partition, than a fresh install of Ubuntu is the best method. 

    • You could partition off the hard disk that Ubuntu is installed from using the method below through the live CD, but this may give you messy run around, causing issues with your boot.  

    • If you do decide to try to partition off your primary Windows or Ubuntu drive, from the Ubuntu Live CD:
                   a.  run Ubuntu Live CD

                   b.  unmount the linux-swap if Ubuntu
                   c.  right click on the primary partition and resize
                           d.  create a new primary partition from the unallocated space

                           e.  format the partition, ext4 is usually the safest way to go for
                                any  Linux based operating system.

                           f.  this could potentially cause problems with the Ubuntu boot
                               afterwards, if so, follow these instructions to repair the boot.

    As for using Gparted to partition off your Windows drive, not really sure, again, if in doubt use a USB stick.


    Burn your Ubuntu ISO to a CD, DVD or USB per instructions on the Ubuntu download link above.

    If you already have done the following Steps for installing Ubuntu/Xubuntu, skip down to the link below for instructions on how to manually install Android X86 below.

    Part One - getting ready for Android X86 KitKat!

    Make sure BIOS is setup to recognize the device you plan on using to Install Ubuntu from under boot options (USB or CD storage).  Each computer is different so you will have to reference your motherboard manual to find your settings.


    Insert your Xubuntu/Ubuntu CD/USB stick and turn on the PC, when finished loading, select Try Xubuntu/Ubuntu:
      When Ubuntu shell loads, click on the menu and open up your terminal:

      sudo gparted

      Gparted will now open, this is where you can partition your harddisk to suit your needs.  Lets say you have a 1.5 tb hard disk like me, this is how I setup my partitions.  For a fresh new install, you will need to right click on any partitions that are used and delete them, right click and delete until all the partitions are combined into one large unallocated space.
      Right click and delete unwanted partitions, you want to work with unallocated space.  If resizing, right click the partition you want to resize, create an extended partition then create a new ext4 partition.  This method is useful if dual-booting with windows.



      • Right Click on free space and create your an ext3 or ext4 partition, in the box that says "Free space following MiB" select how much you want to leave for whatever operating system or storage you are going to need following
      Optional: I'll show you later how to create an emulated SDCARD for Kitkat
      • Right click and again in the "Free space following MiB" set a number, if using for storage label storage, if using for your other OS skip this step.
      • Right Click, select new and create an extended partition than just select OK do not change any numbers.
      If your going to install windows just select OK no need to enter any values.
      • Right Click and create new in the new unallocated space, it will match the extended space above it, in "Free Space following MiB" enter a number for Linux Swap to match the amount of ram you have.  If you have 4gb of ram, then in the space "Free Space following MiB" enter 4000 for 4gb.  Under file system select ext 4 for Ubuntu or ntfs/fat32 for windows
      • Skip this step if going to install windows. Right click one last time and make your file system Linux Swap.


      This is how your final result should look
      Part Two: Setting up Android X86 4.4 without having to use the install method.

      • Right click on the Android-x86 and select "Extract Here"
      • Now you should see a folder with the same name as the Android-x86 ISO you just extracted.
      • In that folder all you need are the following four files:
        • initrd.img
        • ramdisk.img
        • kernel
        • system.sfs
      • Select just those four and copy them to the drive where android-x86 is going to run from and paste them into a folder called Android.  In the newly created folder Android create another folder called data.  The data structure should now be:
          • Android-x86
            • data
              • initrd.img
              • system.sfs
              • kernel
              • ramdisk.img
      There is a system folder in the picture above, this is because on the first boot of Android-x86, a system folder will be created automatically.
      • Open up terminal and enter the code:
      sudo nano /etc/grub.d/40_custom

      This is the following you will see:

      #!/bin/sh
      exec tail -n +3 $0
      # This file provides an easy way to add custom menu entries.  Simply type the
      # menu entries you want to add after this comment.  Be careful not to change
      # the 'exec tail' line above.

      At the bottom, enter the following:
      <code>menuentry "Android-x86" {
      set root='(hd0,X)'
      Linux /Android/kernel quiet root=/dev/ram0 androidboot.hardware=generic_x86 acpi_sleep=s3_bios,s3_mode SDCARD=sda3 SRC=/Android
      initrd /Android/initrd.img}
      </code>

      If you skipped the step for creating an emulated SDCARD, then just remove the line, SDCARD=sdaX.  If you did create a partition to use an emulated SDCARD, then below in the following command, <code>sudo fdisk -l</code> identify that partition and replace X with the number, mine is sda3.  As for the <code>set root='(hdX,X)'</code> this is determined as to which drive android is running from.  In terminal shell enter:

      sudo fdisk -l
      and the output will be, this is mine:

         Device Boot      Start         End      Blocks   Id  System
      /dev/sda1   *        2048   204802047   102400000   83  Linux
      /dev/sda2       204802048   307202047    51200000    7  HPFS/NTFS/exFAT
      /dev/sda3       307202048  1906276351   799537152   83  Linux
      /dev/sda4      1906278398  2930276351   511998977    5  Extended
      /dev/sda5      1906278400  2912458087   503089844   83  Linux
      /dev/sda6      2912460800  2930276351     8907776   82  Linux swap / Solaris

      sda1 is where android is running from, so my format is - set root='(hd0,1).

      Example

      Hard Drive
      sda = (hd0,0)
      sda1 = (hd0,1)
      sda2 = (hd0,2)

      USB Stick
      sdb = (hd1,0)
      sdb1 = (hd1,1)
      sdb2 = (hd1,2)

      Now that you have created your menuentry for android, press 
      ctrl x
      press enter
      type the letter y for yes
      press enter

      Now in terminal type:
      sudo update-grub

      sudo reboot

      In the Ubuntu boot menu you will see Android-X86 at the bottom, scroll down, hit enter, sit back and enjoy Android on your PC! 

      Adsense

      My Blog List