Android-x86 ICS on VirtualBox
Awhile back I stumbled across a pre-made .vdi file with Android 4.0 ready to go for VirtualBox. The stock releases of Android-x86, which I had been using for Android 2.x systems in VirtualBox to test my Android app, hadn't yet supported ethernet in the 4.0 iteration. I was particularly happy to find ethernet support in the pre-made image, but it did have its limitations in terms of customization and SD card support (or at least documentation of them), for which Android-x86 had been very adept at both.
Fortunately, there appears to have been active discussion on this very topic on the Android-x86 mail list, and new builds have appeared that support ethernet out-of-the-box along with many other various improvements. So now if you need to test your Android app without having to plug in your device, you can once again take full advantage of the full suite of Android-x86 support. Here are some of the improvements I found:
Fortunately, there appears to have been active discussion on this very topic on the Android-x86 mail list, and new builds have appeared that support ethernet out-of-the-box along with many other various improvements. So now if you need to test your Android app without having to plug in your device, you can once again take full advantage of the full suite of Android-x86 support. Here are some of the improvements I found:
- Sounds support: now even button presses have a satisfying click, despite the lack of haptic feedback on my laptop.
- Ethernet: with ethernet support, I can now connect directly from the host to the virtual machine via ADB for launching and debugging Android apps.
- Google Play Store: somehow they managed to include the old Android Market, which seamlessly gets upgraded to the latest and greatest Play Store after first launch.
I had previously been quite excited and hopeful about the announcements of Intel x86-based Android support in the default Android emulator, which spoke of greatly improved performance using hardware-based acceleration. In my cursory tests, however, I continued to see a considerable performance lag both compared to my own actual device as well as the VirtualBox-based Android-x86 image. Perhaps I don't have the correct settings, or the Intel-based images may improve, but for now I'm happy to stick with the VirtualBox-based setup.
So how does one actually get the Android-x86 4.0 distro working in VirtualBox? The steps are similar to the previous description, with a few changes:
- Grab a special android-x86-4.0-eth0 build, which includes the latest ethernet patches. As of the 20120327 build (but not on prior builds), I found that ethernet support allowed not only web browsing, but also the all important ADB access for Android app testing. I installed the "generic" package for use in VirtualBox.
- Follow the previous instructions for setup and installation.
- Turn off mouse integration through Machine > Disable Mouse Integration. Otherwise the mouse is nowhere to be found.
- Turn off display sleep through Settings > Display > Sleep > Never time out. Otherwise after a period the time display can become unresponsive, even though the mouse still moves about.
- When you want to shut down Android, you can press Ctrl-H to bring up the shutdown dialog (which I could never find in the pre-made image).
Now the big question for me is this: with Android successfully running within Windows, is it possible to replicate the Windows 8 (Metro mobile + classic desktop) experience via Android + VirtualBox + Window 7? Perhaps we shall see.
Comments
Very nice VM, indeed!
Many apps from the Gmarket do not work, though.
Problem: with my old Dell D505 (pentium M) the browser does not work prperly: cannot access web pages. Problem does not exist with the dell e6500, though.
volker
I used to use one of those 505s as well! I've read that ICS is more resource hungry and uses a lot more hardware acceleration, particularly for the browser. I wonder if there's a compatibility issue with the 505's chipset?
In particular, since the older android versions, uncluding 2.3, run well (no browser problem) on the d505.
volker
no log output.Browser just quietly closes after short while...
Ninesky browser: same problem; no webpages loaded!
Dolphin Browser: rotated screen. Anyway, appears to have the same problem.
Firefox: could not install it.
Found another nice x86 build:
http://www.ceh-photo.de/blog/
Problem even more severe: does not boot as VM on the D505 host (though nicely on the e6500).
volker
Have you tried out NetFront? It appears to have its own NetFront engine, and I was able to install and run it on the VirtualBox device. Initially went into portrait mode, but then came back to landscape for actual browsing.
Have followed your previous suggestion and used "adb logcat *.E":
Browser crashes with
F/libc (1984) Fatal signal 4 (SIGILL) at 0x9cab41a1 (code2).
Will follow your suggestion to try - out Netfront. I'm familiar with the portrait mode problem.
volker
I was also thinking that the Firefox nightly builds might be worth a shot since they're switching to a native UI that's quite different from the current one ( https://wiki.mozilla.org/Fennec/NativeUI ).
Tried NetFront -similar behaviour: browser starts, no webpages loading.
During install of the .apk, I had some problems with the playstore: said something like "cannot handle your purchase". Cleaning the Cache did not help. Had to re - install the VM. Any simpler solution for this problem?
volker
hmm...running out of browser options. Any chance that Opera is available? It uses its own Presto layout engine with an apparently unique design.
What has really startled me is that the fact, whether the browser runs or not in the ICS - VM, depends on the underlying host hardware! I would have expected that, once an android build supports Virtualbox,it would run in any Virtualbox, independent on the underlying hardware. This obviously not true.
volker
I did find TextOnly, a text-based browser that might have fewer requirements. Might be worth trying if you don't mind the lack of graphics.
playstore problem:
go to settings -> apps -> google playstore -> deinstall all updates. This brings back the initial market icon -> install works again. I can live with that...
browser problem:
I like the TextOnly browser! Tested it in the VM on the other host. Finally, exported the VM to the old dell.
Browser finds all the links -> displays the title of the webpages -> BUT: does not access or show the content of the webpages!
At least, by now, we know that it has nothing to to with the graphics...
volker
still the browser problem; some additional weird findings
Email: the list of incoming emails is shown with all clients (Gmail, Email). Opening an entry shows the header of the mail only, BUT the text of the mail is not displayed.
File Handling: installed Dropbox to access my .doc and .pdf - files. Used DocumentsToGo for .doc and MobilePDFViewer for.pdf. Text is indeed displayed, BUT only for about 30s.
Playstore (Market): works well. Could install .apk 's.
ALwaysOnPC.apk: opens a VPN to a cloud server under Linux. With the FF browser of the server I can see all webpages correctly.
After all, I start to believe that there is a timing problem.
Any more ideas?
volker
With the doc and pdf files, does the app crash after 30s, or just go blank? Makes me wonder about timing issues like you mentioned, or perhaps refresh issues. Does increasing the base memory or video memory make any difference? If you open another activity on top of it and then return, does it refresh the app's display?
yes, network works fine.
Doc and pdf files: the text disappears and I come back to Dropbox. That means the apps closes, I suppose.
Doubled the base and video memory ...without success.
Opening another activity when the viewers are open, appears to close them.
Thinking to use an older version of virtualbox. Any comment?
volker
I saw this discussion from awhile back on the android-x86 list that sounded familiar with the logcat output you got after the browser crash. I wonder if it's related and if anymore work has been done with the toolchain? Seems like it could help for your system.
tried VB-3.2:
not easy because I couldn't access the available.vmdk files anymore. Anyway, same behavior with the build on the d505 as far browser and .doc - files are concerned.Thus, I feel that the problems cannot be caused by VB.
Used UNetbootin: .iso boots on the e6500 and everything appears to work fine; on the d505 the .iso does not boot. Not very illuminating...
Presently, I'm waiting for a new build; not much hope as far the d505 is concerned.
volker
Have you tried Bluestacks on the d505 btw? I haven't tried it myself (just an early build that blue-screened my machine) but figured it might be another build to try.
still the d505:
I got it working today(about 90 percent, maybe), but do not really understand why:
Took the android-x86-4.0-RC1-eeepc.iso (from android-x86.org)-> set up the VM -> boot successful. But, as I knew before, no internet ( with netcfg: -> eth0 is down). Did the following:
ALT + F1 -> netcfg eth0 up -> netcfg eth0 dhcp -> setprop net.dns1 8.8.8.8
Expected to get network connection. Indeed, network works. AND,at the same time the browser works fine; I can configure EMail (not GMail!!-> problem is that, as yet, I cannot access the market...) and read the text of the mails. Still, need to invest more time to check for other problems.
Now, we know that there is no problem with VB, and we know that there is no problem with the Browser. And, furthermore, I feel that there is no problem with the D505...
But, where is the problem with the android builds based on that of android-x86, such as the build of tabletsx86 (which comes with the network activated).
Do you know how to make the activation of the network permanent? Probably, I have to write something into /etc/init.sh?
Bluestacks: all my hosts are under linux; have to look for an linux alternative.
volker
I saw that tabletsx86 has new builds for Android 4.0.4. Perhaps a chance they work any better on your D505?
Regarding your network settings, can you set the DNS manually from the ethernet configuration in the settings panel? I imagine you could also write a shell script with those lines to execute manually or from /etc/init.d .
Android 4.0.4: works fine on the dell e6500. On the D505, it boots as well, the browser does not load webpages nor is the text of emails shown. The same problems as with his android 4.0.3 build.
Android 3.2: I used his (most recent) generic-eth0-build (from Feb 2012). Hard to believe, but it works flawlessly also on the D505 (no problems with browser, text of email, use of DocumentsToGo to read my Dropbox files).Installation of apps (from the web) works also. Only problem: I cannot connect to my email server, can only configure GMail. But, this problem exist for the e6500 as well. Sadly, the build does not have the Gapps built - in.
Standard build (eeepc - RC1): its only problem on the D505 is with some Google apps, namely those which check whether a wifi connection exists (which is not available). I do not know how to force these apps, GMail and market in particular, to use eth0! (This problem exists for the e6500 as well.)
volker
I realize this would probably be close to impossible/completely impractical, but perhaps you could run 2 or 3 of those builds simultaneously via VB on your D505? Would be total overkill though... After reading about Intel's new Android-based smartphone, I'm curious how that would work on older Intel chipsets, whenever it gets released.
f.i. I could use the ICS build of tabletsx86 which has the full market on the D505 (but no working browser) to download/install the apps. Then, I pull the apps to the host PC. Finally, I push them to the RC1 build which has a working browser.
In fact, I used already a similar procedure in the past when I had no access at all to the market. Then, I decided to have a small reservoir of important apps on my host PC:
3.2/honeycomb build of tabletsx86 (which has no gapps):
have installed the Gapps by moving them to /system/app. Cannot use market and Gmail because I cannot force these apps to use eth0 instead of wifi. Nevertheless, maps and latitude work well.
RC1 standard build of android-x86.org:
now eth0 is turned on during booting: I edited the /etc/init.sh - file (vi /etc/init.sh) by adding the required netcfg commands and the setprop - command.
Would be nice if I could contact tabletsx86. Do you know a way how to?
At least some small progress with the D505,
volker
I haven't contacted tabletsx86 except through posts on the Android-x86 Google group (which is where I learned about tabletsx86 in the first place). Apparently they mainly apply submitted patches that I imagine may eventually get merged into the main Android-x86 project.
got the following reply from tabletsx86.org:
"I can only speculate cause I'm not sure BUT:
the D505 is Celeron...check the forums as that has an issue with sse/sse2 instructions as I recall...there are solutions but most likely not included in the sources from git which we
build from..."
This is not entirely plausible to me because I do not have the problems with the "standard build", android-x86-4.0-RC1-eeepc.iso (from android-x86.org).
volker
http://home.comcast.net/~rbg.tabletsx86/android-x86-builds.htm