Android 4.4 Emulator: The Complete Guide

Android Emulator
android-4-4-emulator-the-complete-guide
Source: Youtube.com

Introduction

Android 4.4, also known as KitKat, marked a significant milestone in the Android ecosystem, introducing numerous features and improvements. However, with the rapid advancement of technology, many apps and devices no longer support this version. For developers, researchers, and enthusiasts needing to test or run apps on an older Android version, setting up an emulator becomes essential. This guide will walk you through installing and configuring an Android 4.4 emulator on your PC using VirtualBox and Android-x86.

Prerequisites

Before starting, ensure you have the following:

  1. VirtualBox: Free and open-source virtualization software allowing multiple operating systems on a single physical machine.
  2. Android-x86 4.4 Image: ISO file containing the Android 4.4 operating system.
  3. A PC with sufficient resources: At least 1 GB of RAM and 1 GB of disk space for the virtual machine.

Step-by-Step Installation Guide

Install VirtualBox

  1. Download VirtualBox: Visit the VirtualBox download page and get the latest version for your operating system.
  2. Install VirtualBox: Run the installer and follow the prompts to complete the installation.

Create a New Virtual Machine

  1. Open VirtualBox: Launch VirtualBox from your start menu or applications folder.

  2. Create a New Virtual Machine:

    • Click the "New" button.
    • Enter a name for your virtual machine (e.g., "Android 4.4").
    • Select "Linux" as the operating system type.
    • Choose "Other Linux (64-bit)" as the version.
    • Click "Next."
  3. Set Memory:

    • Set the memory size to at least 1 GB.
    • Click "Next."
  4. Create a Virtual Hard Disk:

    • Select "Create a virtual hard disk now."
    • Choose "VDI" as the hard disk file type.
    • Select "Fixed size" or "Dynamically allocated."
    • Set the size of the virtual hard disk to at least 1 GB.
    • Click "Create."
  5. Configure Storage:

    • Select the virtual machine created.
    • Go to "Settings" > "Storage."
    • In the Storage Tree section, click on the CD/DVD drive.
    • Select the Android-x86 4.4 ISO file downloaded.
    • Check the box next to "Live CD/DVD" and click "OK."

Start the Virtual Machine

  1. Start the Virtual Machine:

    • Select the virtual machine created.
    • Click the "Start" button.
    • The virtual machine will boot up, showing a blue menu with several options.
  2. Install Android-x86:

    • Choose "Installation – Install Android-x86 to hard disk."
    • Press Enter to create or modify partitions.
    • Use the right arrow key to highlight the "New" option and press Enter.
    • Press Enter again to make this the primary partition.
    • Press Enter again to choose the size (maximum size available).
    • Ensure the "Bootable" option is selected and press Enter.
    • Use the right key again to get to the "Write" option and press Enter.
    • Type "yes" to confirm. All data on the virtual drive will be deleted, but the actual hard drive remains unaffected.
  3. Quit Disk Utility:

    • Move right once again to highlight the "Quit" option and press Enter.
  4. Install Boot Loader GRUB:

    • You will be back in the blue screen with a partition to install Android to.
    • Choose that option (listed as “VBOX HARDDISK”) and hit Enter.
    • Press Enter twice more to install boot loader GRUB and make the /system directory read/write.
    • Android-x86 will be copied to the drive, and now you’re ready to run Android for real!
  5. Remove Virtual CD/DVD:

    • Once Android has finished booting, go to Devices > CD/DVD devices > Remove disk from virtual drive.
    • You may need to press your right Ctrl key on your keyboard to click outside of the VM.
    • Also, go to Machine > Disable Mouse Integration to make the mouse cursor appear in the VM.
  6. Initial Setup:

    • Go through the initial setup as you would on a new Android smartphone or tablet.
    • Skip the step where you connect to a wireless network, as the VM provides a virtual wired connection by default.
    • Sign into your Google account and complete the remaining steps quickly.

Configuring the Emulator

Accessing the Play Store

  1. Open Google Play Store:
    • From the home screen, open the Google Play Store app.
    • Search for apps and install them just like on a physical device.

Running Apps

Many apps will work on your Android 4.4 emulator, but some might not due to compatibility issues. If issues arise, try searching for “Android-x86” and the app name, or “Android VM” and the app name.

Rooting the Emulator

Install ADB

  1. Download and Install ADB: Obtain ADB from the official Android SDK website.

Rooting Process

  1. Open Command Prompt or Terminal: Navigate to the directory where ADB is installed.

  2. Run the Following Command:
    bash
    adb root

    • Alternatively, use the su command inside the emulator shell:
      bash
      adb -e shell su root

    • This grants root access to the filesystem, allowing access to privileged directories and changing file/directory permissions.

Installing SuperSu App

  1. Download SuperSu App: Obtain it from a trusted source.

  2. Install on Emulator: Open the app and grant necessary permissions.

  3. Install Correct su Binary: The app will place the correct su binary in the /system/xbin/su directory.

  4. Change Permissions:
    bash
    adb -e shell su root cd /system/xbin/su chmod 06755 su

    • This ensures the su binary is executable and can be used to gain root access.

Turning Off SELinux Policies

  1. Disable SELinux Policies:
    bash
    adb -e shell setenforce 0

    • This temporarily disables SELinux policies, allowing root access.

Setting Up Daemon

  1. SuperSu App Daemon: The app requires setting up a daemon to manage root access. This step may require additional configuration but is necessary for persistent root access.

Additional Resources

For more detailed information on using the Android Emulator with Android Studio, refer to the official documentation provided by Google. If issues arise during the installation process, consult troubleshooting guides available online or seek help from the VirtualBox and Android-x86 communities.

By following this guide, you should be able to successfully install and configure an Android 4.4 emulator on your PC, providing a versatile tool for testing and running older Android apps and services.

Was this page helpful?