Using the Android-x86 Port as your Emulator

來源:互聯網
上載者:User

Ok here's some basic steps to get it up and running. You'll also be able to save snapshots of running VMs (actually this has always been available with Virtual Box).  Note if you haven't visited http://android-x86.org in awhile some of the docs are already
dated - e.g. use generic vs eepc build in Virtual Box:

 1) Download latest VirtualBox if you haven't http://www.virtualbox.org/wiki/Downloadsand then download    android-x86-2.2-generic.iso from http://www.android-x86.org/download 2) Create and configure your new android vm in VirtualBox Manager. From storage options mount the iso as the cd/dvd and under network use bridged adapter and now you can go ahead and start the VM and choose Live CD Vesa option at boot
(don't blink you may miss the Android boot screen).    3) Disable mouse integration (right click on mouse configuration button lower right) - you can also make this stick in VBox preferences. 4) Use alt-F1 and alt-F7 to toggle to terminal and note the ip address (use netcfgcommand) 5) from host: adb connect [ipaddress]  - you should now be able to see it listed as a device in Eclipse  Now to add additional screen sizes (and portrait view) such as 320x480,  shutdown and add the following to your .vbox file in the section called ExtraData section: (you can add several)<ExtraDataItem name="CustomVideoMode2" value="320x480x16"/> And this time when you boot hit tab after selecting VESA mode option to enter additional kernel config boot options - add UVESA_MODE=320x480 and change vga= to vga=ask You'll be prompted to hit enter to view screen size options
and your additional options will be available to select (enter number of option to select).         Now you'll notice I also added DATA=sda1 and SDCARD=sda2 (DATA is for persisting apps and settings) But first you'll need to create and setup the two partitions. From the install to harddisk option above in boot menu you can create the 2 paritions. Leave room for both (I gave around 256M to SD card partition).  Now get back to the command
line and run: mdev -smke2fs -j -L DATA /dev/sda1mke2fs -j -L SDCARD /dev/sda2  reboot -f More detailed info re: partitioning is available at: http://www.android-x86.org/documents/virtualboxhowto  Now from within Android -> Settings you can format and mount the SD card, as well as disable lock screen and increase display timeout.  If you have any trouble with setting up VirtuallBox, here's my settings (I'm on a Mac OS Host - see VirtualBox manual for other hosts)  Obviously there's more to making this more automated and a bit more permanent (like editing grub menu etc) - I just wanted to give you the minimal to get it up and running.  One thing I noticed when I enabled my webcam (with USB device filters) is that it successfully detected it which is also the case with 3D hardware graphics acceleration (but not 2D).  In fact although I didn't get an actual camera preview working when
I ran a camera application, it was able to actually turn on the device !   Also noteworthy is the low battery notification in the emulator when your laptop battery is indeed low. So it looks like we may not be too far from seeing hardware work in our emulators soon, just some work needed with both projects and this is where you come in as it's all open source.  It seems like opengl on the Android-x86 side is turned off or needs
matching configuration (judging by the logs) and on the VBox side, more support is needed for Mac OS X (darwin) so you may get further on Linux and Windows 7 hosts but there still needs some work to be done to make it work better with Android. For example,
mouse support could use the equivalent of VBox guest additions for Android-x86 as you'll notice with smaller screen sizes. Some shortcuts from the SDK emulator will be missing of course. For example, you can't toggle betwwen landscape and portrait modes so you'll just have to restart or run a second instance. For info on virtual box and features such as RDP support (which works if you enable it) and additional features like "teleporting" see: http://www.virtualbox.org/manual/ch07.html  And for an interesting white paper illustrating some ideas using Virtual Box and Android-x86: IEEE Paper: Virtual Smartphone over IP

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.