Mobile/Fennec/Android/Emulator

From MozillaWiki
< Mobile‎ | Fennec‎ | Android
Jump to: navigation, search

Running Fennec in Android Emulator

Prerequisites

As Fennec requires an ARMv7 architecture, we need an AVD (Android Virtual Device) that has the armeabi-v7 CPU ABI and GPU emulation. Such a device definition and images are only included in the newest SDK (at least revision 17 with Platform API 15r3). To ensure you have all the required software:

  1. install an Android SDK if you don't have one yet. (On OSX, install is just "download and unzip it somewhere").
  2. open your android SDK manager (using tools/android) and perform the following steps:
  • Check 'Android SDK Tools' and 'Android SDK Platform-tools' are installed and up to date
  • In your packages list, you should then have an entry "Android 4.1 (API 16)". Check this category and install all packages.
  • Read about using the Android emulator and how to launch the emulator.

Android-sdk-manager.png

Creating the AVD

Avd-manage-menu .png

Open the Android Virtual Device Manager (in the SDK Manager under tools > Manage AVDs), create a new entry and make sure you use "Android 4.1 (API Level 16)" as target. You can attach a virtual SD card as well and change display settings if you like. You can also set the device's RAM, which would help improve performance (recommended amount: 1024MB).

Avd-emulator.png

In the hardware list further down you can add or remove hardware support, e.g. you can simulate not having a hardware keyboard by adding "Keyboard support" to the list and changing that entry to "No" then. In order to run Fennec, you must select "GPU emulation" from the hardware options and set the value to "yes".

Avd-hwoptions.png

Avd-gpuemulation.png

Starting the AVD

Once you have created the AVD, you can select the AVD from the list and hit "Start". Booting up takes a while, and the device is very slow (especially with larger resolutions).

Installing Fennec

Once you have the emulator running, you can access it through adb by enabling USB debugging in Settings > Developer options. You should see it listed as a device:

$ adb devices
List of devices attached 
emulator-5554	device

You can download a Fennec .apk to your desktop and install it by running:

$ adb install <path to fennec apk>

See Mobile/Platforms/Android for direct links to releases of Fennec hosted on our FTP server.