Determine if it is possible to run Android tests in virtualbox

RESOLVED WONTFIX

Status

()

Firefox for Android
General
RESOLVED WONTFIX
5 years ago
5 years ago

People

(Reporter: gbrown, Assigned: gbrown)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

5 years ago
Very similar to bug 813724, this bug is about investigating how to run Fennec and Fennec tests on VirtualBox.

This was my starting point: http://osxdaily.com/2012/02/23/android-4-ics-virtualbox/
(Assignee)

Comment 1

5 years ago
First test, running on OS X:

 - Download and install VirtualBox from http://download.virtualbox.org/virtualbox/4.2.4/VirtualBox-4.2.4-81684-OSX.dmg
 - Download Android 4.0.4 VM from http://www.vmlite.com/vmlite/VMLite-Android-v4.0.4.7z
 - Uncompress the VM file, look for “Android-*.vbox” and double-click it to load and boot the configuration into VirtualBox
 - At the boot menu in VirtualBox, select the option “Android Startup from /dev/sda” 
 - Let Android ICS boot

This came up fine and I was able to establish adb access with the Android SDK adb as well as the adb included with VirtualBox.

I installed SUTAgent and started it. It reported an IP of 10.0.2.15 (standard emulator behavior). I issued "adb forward tcp:20701 tcp:20701" and then "telnet localhost 20701" to verify correct SUTAgent behavior -- no problems.

I installed the latest Nightly without incident...but it won't start.
(Assignee)

Comment 2

5 years ago
E/GeckoAppShell(  411): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
E/GeckoAppShell(  411): java.lang.UnsatisfiedLinkError: Couldn't load mozglue: findLibrary returned null
E/GeckoAppShell(  411): 	at java.lang.Runtime.loadLibrary(Runtime.java:365)
E/GeckoAppShell(  411): 	at java.lang.System.loadLibrary(System.java:535)
E/GeckoAppShell(  411): 	at org.mozilla.gecko.GeckoAppShell.loadMozGlue(GeckoAppShell.java:509)
E/GeckoAppShell(  411): 	at org.mozilla.gecko.GeckoApp.onCreate(GeckoApp.java:1494)
E/GeckoAppShell(  411): 	at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java:205)
E/GeckoAppShell(  411): 	at android.app.Activity.performCreate(Activity.java:4465)
E/GeckoAppShell(  411): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
E/GeckoAppShell(  411): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
E/GeckoAppShell(  411): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
E/GeckoAppShell(  411): 	at android.app.ActivityThread.access$600(ActivityThread.java:123)
E/GeckoAppShell(  411): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
E/GeckoAppShell(  411): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/GeckoAppShell(  411): 	at android.os.Looper.loop(Looper.java:137)
E/GeckoAppShell(  411): 	at android.app.ActivityThread.main(ActivityThread.java:4424)
E/GeckoAppShell(  411): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoAppShell(  411): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/GeckoAppShell(  411): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/GeckoAppShell(  411): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/GeckoAppShell(  411): 	at dalvik.system.NativeStart.main(Native Method)
(Assignee)

Comment 3

5 years ago
Like bug 723295 (permissions? sdcard available?) or bug 792428 (armv6 v armv7)?
(Assignee)

Comment 4

5 years ago
I was using the wrong APK: trying to install an arm apk on an x86 VM.

Using an -i686 apk, Fennec starts up very briefly, then dies with our old friend:

11-29 19:25:58.823 I/Gecko   ( 1415): An error occurred earlier while querying gfx info: eglChooseConfig returned zero OpenGL ES2 configs. Maybe this device does not support OpenGL ES2?. 
11-29 19:25:58.823 I/Gecko   ( 1415): ###!!! ABORT: OpenGL-accelerated layers are a hard requirement on this platform. Cannot continue without support for them.: file /home/mozdev/src/widget/xpwidgets/nsBaseWidget.cpp, line 829
11-29 19:25:58.823 F/libc    ( 1415): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
(Assignee)

Comment 5

5 years ago
Similar to https://bugzilla.mozilla.org/show_bug.cgi?id=813724#c5 -- I cannot find a way around the gpu emulation issue, so...
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
(Assignee)

Comment 6

5 years ago
adb devices sometimes does not recognize virtual box. Try adb kill-server / adb start-server -- sometimes that helps.

When it works, it looks just like an emulator:

$ adb devices
List of devices attached 
emulator-5554	device
(Assignee)

Comment 7

5 years ago
More VMs at http://androvm.org/blog/download/ and http://www.android-x86.org/download
You need to log in before you can comment on or make changes to this bug.