Tags

, ,

There is on-going work to make Firefox for Android available for x86 hardware — see bug 802527, for instance. Still, I found it is now possible to build, install, and run without much difficulty. I don’t have an x86 Android device, so I installed and tested on the android-x86 emulator.

Here are some notes on my experience.

SDK, NDK, and Emulator setup

I updated my Android SDK and NDK installations to:

  • Android 4.1.2 (API 16) SDK
  • android-ndk-r7b

I understand that r7b is the minimum required NDK version. Using r8b creates a minor complication — see bug 802527.

Using the “android” setup program, I installed an x86 image: “Intel x86 Atom System Image”.

Then I created an AVD to use the x86 image (Tools / Manage AVDs… / New…):

Be sure to:

  • select the x86 image
  • enable GPU emulation
  • give it lots of RAM.

Build for x86:

You just need the right mozconfig! I had trouble with the mozconfigs I found at mobile/android/config/mozconfigs/android-x86, so I made my own:

. “$topsrcdir/mobile/android/config/mozconfigs/common”
ac_add_options –enable-application=mobile/android
ac_add_options –target=i686-linux-android
ac_add_options –with-android-ndk=”/media/extra/android-ndk-r7b”
ac_add_options –with-android-sdk=”/home/mozdev/android-sdk-linux_x86/platforms/android-16″
ac_add_options –with-android-platform=”/media/extra/android-ndk-r7b/platforms/android-14/arch-x86″
ac_add_options –with-android-version=16
ac_add_options –with-system-zlib
# IonMonkey disabled in bug 789373
ac_add_options –disable-ion
ac_add_options –with-branding=mobile/android/branding/nightly
ac_add_options –with-ccache=/usr/bin/ccache
mk_add_options MOZ_OBJDIR=/media/extra/objdir-x86-droid
mk_add_options MOZ_MAKE_FLAGS=”-j9 -s”

Now build and package as normal: make -f client.mk, etc.

Start the emulator with the configured AVD:

mozdev:~$ emulator -avd gyb16x86b

Install Fennec on the emulator:

mozdev:/media/extra/objdir-x86-droid$ adb devices
List of devices attached
03700149427f5657    device
emulator-5554    offline
mozdev:/media/extra/objdir-x86-droid$ adb -e install dist/fennec*.apk
4210 KB/s (20333055 bytes in 4.715s)
pkg: /data/local/tmp/fennec-19.0a1.en-US.android-i686.apk
Success

Launch Firefox for Android on the emulator:

About these ads