How-Tos‎ > ‎

Android-x86 on the Intel Compute Stick (Sterling City)

posted 23 Feb 2016, 05:23 by Ian MORRISON   [ updated 5 Mar 2016, 20:45 ]
With the growing interest in Remix OS and the new Phoenix OS I thought it would be interesting to install these Android-x86 based systems together with the original Android-x86 on the latest Intel Compute Stick to be able to see what the key differences are.

The following instructions should be simple enough for anyone to follow and work on the new ICS STK1AW32SC. It is possible to multi-boot Windows, Linux and the Android based systems and I've previously posted instructions for dual-booting Windows and Ubuntu so I'm assuming that an Ubuntu installation is already understood.

So the starting point is to set the BIOS 'Select Operating System' to 'Windows 64 bit' and ensure USB booting is enabled so you can install Ubuntu from a USB. First create a LiveUSB with Ubuntu 15.10 and install on your ICS SC. Note that I did try 14.04 but it didn't work initially and I haven't investigated any further to determine if it would be possible.



Having installed and booted Ubuntu it is necessary to install the squash file system tools in order to improve the speed of the Android systems when running:

sudo apt-get install squashfs-tools


Initially you going to install the two latest versions of Android-x86 available from http://www.android-x86.org/download. Download the 'android-x86-4.4-r5.iso' ISO and to make a bootable Android-x86 enter:

sudo mkdir /boot/android-x86-4.4-r5
sudo mount android-x86-4.4-r5.iso /mnt
sudo cp /mnt/initrd.img /boot/android-x86-4.4-r5
sudo cp /mnt/kernel /boot/android-x86-4.4-r5
sudo cp /mnt/ramdisk.img /boot/android-x86-4.4-r5
sudo cp /mnt/system.sfs /boot/android-x86-4.4-r5
sudo unsquashfs -d /boot/android-x86-4.4-r5/system /boot/android-x86-4.4-r5/system.sfs
sudo mv /boot/android-x86-4.4-r5/system/system.img /boot/android-x86-4.4-r5
sudo rm -rf /boot/android-x86-4.4-r5/system /boot/android-x86-4.4-r5/system.sfs
sudo umount /mnt


Now download the 'android-x86_64-5.1-rc1.img' EFI image also from that site and 'install' by entering:

sudo mkdir /boot/android-x86_64-5.1-rc1
sudo kpartx -l android-x86_64-5.1-rc1.img | head -1 | sed 's/ .*//'

Make a note of the loop device (e.g. loop0p1) for the 'mount' command below:

sudo kpartx -a android-x86_64-5.1-rc1.img
sudo mount /dev/mapper/loop0p1 /mnt
sudo cp /mnt/initrd.img /boot/android-x86_64-5.1-rc1
sudo cp /mnt/kernel /boot/android-x86_64-5.1-rc1
sudo cp /mnt/ramdisk.img /boot/android-x86_64-5.1-rc1
sudo cp /mnt/system.sfs /boot/android-x86_64-5.1-rc1
sudo umount /mnt
sudo kpartx -d android-x86_64-5.1-rc1.img
sudo unsquashfs -d /boot/android-x86_64-5.1-rc1/system /boot/android-x86_64-5.1-rc1/system.sfs
sudo mv /boot/android-x86_64-5.1-rc1/system/system.img /boot/android-x86_64-5.1-rc1
sudo rm -rf /boot/android-x86_64-5.1-rc1/system /boot/android-x86_64-5.1-rc1/system.sfs


The next Android system to install is Phoenix OS and the installation image can be found at http://www.phoenixos.com/download_x86 so start by download the installation file 'PhoenixOSInstaller-1.0.3-beta.exe'. Although this is issued as a Windows executable we can still extract the files required on Linux by entering:
 
sudo mkdir /boot/phoenixos
sudo 7z x -o/boot/phoenixos PhoenixOSInstaller-1.0.3-beta.exe
sudo rm /boot/phoenixos/install.img
sudo unsquashfs -d /boot/phoenixos/system /boot/phoenixos/system.sfs
sudo mv /boot/phoenixos/system/system.img /boot/phoenixos
sudo rm -rf /boot/phoenixos/system /boot/phoenixos/system.sfs


Finally to install Remix OS you need to download the one marked EFI from http://www.jide.com/en/remixos-for-pc#downloadNow and enter:

sudo unzip Remix_OS_for_PC_64_B2016020201_Alpha_EFI.zip
sudo mkdir /boot/remixos
sudo kpartx -l Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img | head -1 | sed 's/ .*//'

Again make a note of the loop device (e.g. loop0p1) for the 'mount' command below:

sudo kpartx -a Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img
sudo mount /dev/mapper/loop0p1 /mnt
sudo cp /mnt/initrd.img /boot/remixos
sudo cp /mnt/kernel /boot/remixos
sudo cp /mnt/ramdisk.img /boot/remixos
sudo cp /mnt/system.sfs /boot/remixos
sudo umount /mnt
sudo kpartx -d Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img
sudo unsquashfs -d /boot/remixos/system /boot/remixos/system.sfs
sudo mv /boot/remixos/system/system.img /boot/remixos
sudo rm -rf /boot/remixos/system /boot/remixos/system.sfs

None of the systems have a 'persistent' pseudo data partition at the stage so the next step is to create an empty 'data.img' file by entering:

sudo dd if=/dev/zero of=data.img bs=2G count=1
sudo mkfs.ext4 -F data.img
sudo fsck.ext4 -fp data.img

You could modify the 'count' if a larger file is required however I recommend 2GB as a minimum.

Now copy this 'data.img' file to each of the boot directories created above:

sudo cp data.img /boot/android-x86-4.4-r5
sudo cp data.img /boot/android-x86_64-5.1-rc1.img
sudo cp data.img /boot/phoenixos
sudo cp data.img /boot/remixos

You can now delete all the downloads and any files/directories created from the above commands to tidy up and save on space.

To boot each Android system you need to create the grub config files:

sudo cat <<EOF > /boot/grub/android-x86-4.4-r5.cfg
menuentry 'Android-x86 4.4-r5' --class android-x86 {
        search --file --no-floppy --set=root /boot/android-x86-4.4-r5/system.img
        linux /boot/android-x86-4.4-r5/kernel root=/dev/ram0 androidboot.hardware=android_x86 quiet DATA=/boot/android-x86-4.4-r5
        initrd /boot/android-x86-4.4-r5/initrd.img
}
EOF

sudo cat <<EOF > /boot/grub/android-x86_64-5.1-rc1.cfg
menuentry 'Android-x86 5.1-rc1' --class android-x86 {
        search --file --no-floppy --set=root /boot/android-x86_64-5.1-rc1/system.img
        linuxefi /boot/android-x86_64-5.1-rc1/kernel root=/dev/ram0 androidboot.hardware=android_x86_64 quiet DATA=/boot/android-x86_64-5.1-rc1
        initrdefi /boot/android-x86_64-5.1-rc1/initrd.img
}
EOF

sudo cat <<EOF > /boot/grub/phoenixos.cfg
menuentry 'Phoenix OS 1.0.3 Beta' --class phoenix {
        search --file --no-floppy --set=root /boot/phoenixos/system.img
        linuxefi /boot/phoenixos/kernel root=/dev/ram0 androidboot.hardware=android_x86 quiet DATA=/boot/phoenixos
        initrdefi /boot/phoenixos/initrd.img
}
EOF

sudo cat <<EOF > /boot/grub/remixos.cfg
menuentry 'Remix OS Alpha' --class android-x86 {
        search --file --no-floppy --set=root /boot/remixos/system.img
        linuxefi /boot/remixos/kernel root=/dev/ram0 androidboot.hardware=remix_x86_64 androidboot.selinux=permissive quiet DATA=/boot/remixos
        initrdefi /boot/remixos/initrd.img
}
EOF

If you are using 'cut&paste' to enter these commands then make sure to only copy and paste each section of seven lines at a time otherwise you might find the shell doesn't recognise the 'EOF' line due to trailing spaces and you'll end up just with one big file!

     

To make the boot options appear on the initial menu you need to edit '/etc/default/grub' and make sure the following lines are commented out:

#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true

Then edit the file '/etc/grub.d/40_custom' and add the following lines which create the boot menu options:

source /boot/grub/android-x86-4.4-r5.cfg
source /boot/grub/android-x86_64-5.1-rc1.cfg
source /boot/grub/phoenixos.cfg
source /boot/grub/remixos.cfg

And lastly update grub so the options appear on the next boot:

sudo update-grub

Although the standard Phoenix system partition doesn't include Google Play Store you can address this by following https://www.reddit.com/r/PhoenixOS/comments/41flzt/phoenixos_rooted_systemimg and downloading the file 
'PhoenixOS-x86.1.0.3.rooted.gapps.resized.system.img.zip' from https://mega.nz/#!HgY3HIbK!AHzALibHdlrluCmTzwMmk2nuN_esDSMWA48bIQL1TVQ. To install the updated system image enter:

sudo unzip PhoenixOS-x86.1.0.3.rooted.gapps.resized.system.img.zip
sudo mv system.img /boot/phoenixos

Again you can now delete the download and any files/directories created from the above commands.

Similarly Remix OS also cannot include Google Play Store so by following http://liliputing.com/2016/01/remix-os-for-pc-how-to-install-the-google-play-store.html once you have booted Remix OS you can easily add it.


Finally reboot and select the Android-x86 system you wish to boot from the menu and enjoy!

Comments