Android x86 Installation and Troubleshooting Procedures

Installing Android x86 allows you to use the full Android operating system on laptops and desktops that use x86 processors. The setup process usually includes starting your computer from a USB drive, choosing and formatting a hard drive for Android x86, and setting up GRUB so your changes are saved permanently.

For the best results, make sure to pick the correct partition type—either MBR or GPT—and use the recommended ext4 filesystem. Most common installation problems happen when GRUB is skipped, if you use an unsupported filesystem like NTFS, or if your UEFI settings aren’t set up correctly.

Requirements:

If you are using Ubuntu, you can install UNetbootin by running this command in the terminal: sudo apt-get install unetbootin

If you are using Arch Linux, use this command: pacman -S unetbootin

USB Flash Drive Installation

  1. Launch UNetbootin and select your Android x86 ISO file.
  2. Choose “USB Drive” as the installation type and click OK.
  3. UNetbootin will copy Android x86 to your USB flash drive, turning it into a portable installer.
  4. Once complete, reboot your computer and access your BIOS menu.
  5. Navigate to the BIOS page that allows you to select the boot device (such as HDD, CD, USB, etc.).
  6. Select the USB flash drive as your boot device.
  7. When the GRUB menu appears, choose the option to install Android x86 to your hard drive.
  8. Choose a partition to install Android x86. If you’re unsure, do not format the partition. Be careful not to overwrite your current operating system.
  9. You’ll be asked if you want to install GRUB. If your computer only has Windows with no other Linux installed, choose Yes. If you already have Linux/GRUB, don’t install over it.
  10. Next, you’ll be asked whether to “Make system R/W.” Choose Yes. This will “root” Android x86 and allow read-write access to the /system partition.
  11. Reboot your computer and enjoy your fresh Android x86 installation.

For CD / DVD Installation

The installation steps are almost identical, except you’ll burn a bootable CD/DVD from the Android x86 ISO. There are many ISO burners you can use – for example, Free ISO Burner.

Installing to a Virtual Machine

  1. Set up your virtual machine (VM) with at least 512 MB of RAM. For newer Oreo-based versions, allocating more RAM is recommended for better performance.
  2. Load the Android x86 ISO file in your VM and start it.
  3. When the GRUB menu appears, select the option to install Android x86 to the hard disk.
  4. Create a new partition and install Android x86 to it. Format it as ext3, ext2, ntfs, or fat32. If you use fat32, you’ll see a warning that no data can be saved – Android x86 will run as a live CD in this case (no system data will be saved as you use it).
  5. When asked to install the GRUB bootloader, select “Yes” and also allow it to make the system R/W to enable root access.
  6. Reboot the VM once the installation is done.

Adding Android x86 to the GRUB Menu

First, install GRUB Customizer to make this process easier.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

sudo apt-get update

sudo apt-get install grub-customizer

After installing, launch GRUB Customizer and create a new GRUB entry.

Click the ‘Sources’ tab and enter the following commands:

set root='(hd0,4)'

search --no-floppy --fs-uuid --set=root e1f9de05-8d18-48aa-8f08-f0377f663de3

linux androidx86/kernel root=UUID=e1f9de05-8d18-48aa-8f08-f0377f663de3 quiet androidboot.hardware=generic_x86 SRC=/androidx86 acpi_sleep=s3_bios,s3_mode

initrd androidx86/initrd.img

A few items in the commands above are bolded, as you’ll need to customize them for your setup:

– For set root='(hd0,4)’: Change (hd0,4) to the partition where Android x86 is installed. hd0 refers to the first drive (SDA), hd1 would be the second (SDB), and the number is the partition (so hd0,4 is SDA4).
– For –set=root e1f9de05-8d18-48aa-8f08-f0377f663de3: Replace the UUID string with the actual UUID of your Android x86 partition. You can find this in GRUB Customizer by creating a new entry, then selecting your partition under the Options tab; the correct UUID will be displayed in the Source tab.
– Where you see androidx86/: This is your Android x86 installation root. Go to your Android x86 partition and look for a folder named ‘android’ – use that as the root.

androidboot.hardware: Use your specific hardware value here. For example, on older Android x86 versions (such as 4.03), use androidboot_hardware (with an underscore, not a period). However, on the latest versions, you usually don’t need to set this – the init process will detect your hardware automatically.

Here are some options you can use:

  • generic_x86: Use this if your hardware isn’t specifically listed
  • eeepc: For EEEPC laptops
  • asus_laptop: For supported ASUS laptop models

How to Display the Correct Battery Value

Android was designed for specific hardware, so on different platforms (like laptops), the battery values may appear incorrect. Here’s how you can adjust it:

In Linux, applications get the battery status from /sys/class/power_supply/. However, Android expects a certain directory structure, which can be different on various computers. To fix this, edit vendor/asus/eeepc/system.prop and adjust the entries as needed for your system:

ro.sys.fs.power_supply.ac=/AC0
ro.sys.fs.power_supply.bat=/BAT0
ro.sys.fs.power_supply.ac.feature.online=/online
ro.sys.fs.power_supply.bat.feature.status=/status
ro.sys.fs.power_supply.bat.feature.present=/present
ro.sys.fs.power_supply.bat.feature.capacity.now=/charge_now
ro.sys.fs.power_supply.bat.feature.capacity.full=/charge_full
ro.sys.fs.power_supply.bat.feature.voltage.now=/voltage_now
ro.sys.fs.power_supply.bat.feature.voltage.full=/voltage_full
ro.sys.fs.power_supply.bat.feature.tech=/technology
#ro.sys.fs.power_supply.bat.features.bat.health is not supported
#ro.sys.fs.power_supply.bat.features.bat.temperature is not supported

These changes tell Android where to find the correct battery information on your computer.

If you want to create your own battery status code, you’ll need to re-implement the IBatteryServiceStatus class in frameworks/base/libs/utils/IBatteryServiceStatus.cpp, replacing frameworks/base/libs/utils/BatteryServiceStatus.cpp with your own version.

To Wake up the Machine

Unlike some other operating systems, you can’t always wake up Android x86 from sleep by moving the mouse or pressing any key.

You can only use the ESC, Menu, Left, Right, Up, or Down keys to wake up the system. Hold one of these keys for at least 1 second. If the keyguard screen appears, press the Menu key to unlock, or use the mouse to unlock the screen by turning the wheel on the keyguard.

How to Boot Android x86 on Unsupported Graphics

If you have trouble with your graphics when booting the Live-CD, here’s what to do:

When the boot menu appears, press the Tab key to bring up the boot prompt.

You’ll see something like:

kernel initrd=/initrd.img root=/dev/ram0
androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode video=-16
quiet SRC= DATA= DPI=240

First, remove “quiet” from the line so you can see more detailed boot messages from the kernel.

Next, try different video mode parameters:
nomodeset: Disables kernel mode setting, so the kernel won’t automatically set the screen resolution.
xforcevesa: Forces the use of the basic VESA graphics driver.

You can use them both together like this: nomodeset xforcevesa. Try different options to see which one works for you.

ABOUT THE AUTHOR

Kamil Anwar


Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.