CloudServices/NativeSync

From MozillaWiki
Jump to navigation Jump to search

Native Sync

Setup

Setting up an Android dev environment

  • note: installing *all* the platform tools (all Android from 1 to 3.3) takes a while, if you only need a specific SDK version, just install from the GUI tool:
$SDK/tools/android

Emulators

  • create emulator with $SDK/tools/android, menubar>Tools>Manage AVDs...
  • Target (probably) needs to match build specified in .mozconfig (see Building Fennec Native below)
  • to launch:
$SDK/tools/emulator -wipe-data -avd <AVD> -partition-size 2047

(so you don't run into insufficient storage error)

After installation, fennec would crash on installation (unable to locate mozutils library, although it's in the apk). Possibly related to emulator failing to run NDK applications?

Running Fennec

Building Fennec Native

  • Android device: (WFM)
    • enable USB debugging: Settings > Applications > Development > USB debugging
$SDK/platform-tools/adb install -r <path-to-apk>
  • Emulator:
$SDK/tools/emulator
(as another process:)
$SDK/platform-tools/adb install -r <path-to-apk>

You may need to run adb kill-server, adb start-server if adb doesn't recognize the emulator.

N.B., NativeUI Fennec won't run in the emulator.

Logcat debug statements

adb logcat