Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 03:52:20 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Android Emulator Slow? Try Android x86 via VirtualBox (or similar)  (Read 15239 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Below are some notes on getting Android x86 working on VirtualBox (thanks to Gothi[c] for the original suggestion and tips in getting it all working!).  (It's unlikely that the steps couldn't be adapted to work with VMWare or similar.)

0. Ensure VirtualBox, the Android SDK, Eclipse, and the ADT are installed appropriately.

1. Download Android x86 Live CD:

     http://www.android-x86.org/download

  There are many there, but for these instructions:

     http://android-x86.g...86-4.0-RC2-eeepc.iso

     sha1:1953717ac1d606d57fc7d7293b367f8025c51b65

2. In VirtualBox create a new virtual machine:

   Type: Linux
   Version: Linux 2.6
   Memory: 512 MB
   Hard disk size: 3 GB

   Network Adapter 1: NAT (eth0 - for ordinary network access from android)
     PCnet-FAST III <- other cards may not work
   Network Adapter 2: Host Only (eth1 - for adb connection -- e.g. for eclipse)
     PCnet-FAST III <- other cards may not work

   IDE Optical Drive: Point to downloaded Android x86 live CD iso

3. Start virtual machine

4. Choose "Installation - Install Android-x86 to harddisk"

5. Choose Create/Modify partitions

6. Choose New -> Primary -> Size (default size)

7. Select Bootable

8. Select Quit

9. Select sda1 Linux VBOX HARDDISK

10. Select ext3

11. Confirm format action

12. Confirm installation of boot loader GRUB

13. Select Yes for /system directory read-write

14. Choose to run Android x86 and wait for it to start up (consider unmounting iso image too)

15. Disable mouse pointer integration for the virtual machine

16. Alt+F1 to get to virtual console (for reference: Alt+F7 to get back to Android UI)

17. netcfg to check network interfaces (eth0 for general net, eth1 for adb)

18. If eth1 is not up: netcfg eth1 up dhcp

19. Note the IP address (e.g. 192.168.56.101)

20. On host machine: via <android-sdk>/platform-tools:

      adb connect 192.168.56.101

21. Start Eclipse

22. Start some Android app via Run in Eclipse UI

23. In resulting dialog, choose running Android (should list one connected
     via 192.168.56.101)

24. If web browsing fails, it may be a DNS problem.  Try the following via a
     virtual console (Alt+F1): setprop net.dns1 <ip-address-of-dns-server>

25. To shutdown via Android UI: Two rapid entries of Host + H

     If the screen locks instead:

      1. Try to unlock and try again

      2. If the lock icon is not draggable, type the menu key (between right win and right control) and try again

    Possibly less safe ways of shutting down or rebooting (preface w/ sync?) via virtual console:

    # reboot -p

   # poweroff

References:

  http://blog.gokifu.com/2011/05/android-x86-faster-emulator/
« Last Edit: April 03, 2013, 08:07:14 PM by ewemoa »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Android Emulator Slow? Try Android x86 via VirtualBox (or similar)
« Reply #1 on: December 22, 2012, 06:54:31 AM »
Good idea for faster debugging cycles - just remember to still test in the emulator often, and on real hardware every now and then... unless you want to end up, 5 minutes before deadline, realizing that your code runs too slow on The Real Thing... or that the native code module you're using does unaligned memory accesses that work fine on x86, but crash on ARM :)
- carpe noctem

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Android Emulator Slow? Try Android x86 via VirtualBox (or similar)
« Reply #2 on: December 22, 2012, 06:55:55 AM »
Thanks for the advice :up:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Android Emulator Slow? Try Android x86 via VirtualBox (or similar)
« Reply #3 on: December 24, 2012, 03:46:06 AM »
The emulator snapshot capability seems like it can alleviate the situation with the slow start-up:

  http://tools.android...nt/emulatorsnapshots

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Android Emulator Slow? Try Android x86 via VirtualBox (or similar)
« Reply #4 on: April 10, 2013, 10:05:37 AM »
AndroVM seems to be another alternative.

Some helpful hints here.

Seems to be working well here so far :)



"Wi-Fi" seems to work out-of-the-box for AndroVM whereas I didn't succeed in getting that working with the particular Android x86 ISO I tried.

stekolnik

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Android Emulator Slow? Try Android x86 via VirtualBox (or similar)
« Reply #5 on: July 20, 2013, 08:35:22 AM »
I do everything like this but it doesn't work