Social Icons

Pages

Thứ Bảy, 29 tháng 6, 2013

Iphone 5 x86 Android emulator on Virtualbox

Action
Step 1: Download
Firstly always download. You go to the following page: android-x86.org/download
Wazi encourage you to use the android-x86-2.x-RC1-eeepc.iso, 2.x is 2.2 or 2.3 (Simply because Wazi tested many times, and it is also the currently popular android )
Next, you download VirtualBox (which is free google offline)
Download complete jump to step2
Step 2: Setup
1. Install VirtualBox (easy as eating candy should not only be okay SS)
2. Install Androidx86:
Create new 2.A (which you are already familiar with Virtualbox can jump through 2.b)
- First you start Virtualbox and click New to create a new one. Enter a name for it. Choose OS is Linux, the Linux version 2.6 (the version is also very important, it must not) then Next.
Click on the image to get the big picture Name: ADBConnect.PNG Views: 50 Size: 60.9 KB ID: 8881
Next">- Capacity 256MB RAM for basic -> Next
- Go to the Virtual Hard Disk you can select Create New or use an existing virtual disk. Here the assumption is made new Wazi. Next">-> Next
Next">- Windows Virtual Hard Disk Creation Wizard appears, select VDI -> Next
Next.">- Select Fixed Size -> Next. Fill out this virtual disk space (2GB is enough) and where to store it by clicking on the folder in the Location box (in case you do not want to save it in the default location). Create và chờ cho nó tạo đĩa">Done click Next-> Create disc and wait for it
Click on the image to get the big picture Name: CreateNewVHD.PNG Views: 31 Size: 88.1 KB ID: 8884
- Create Press it again to finish creating the virtual machine.
Storage->Ở phần IDE Controller bấm vào hình cái đĩa có dấu cộng -> Hộp thoại hiện ra -> Chọn Choose Disk rồi Browse đến cái file Androidx86… .iso vừa mới download">- After creating the virtual machine, in Settings -> Storage-> IDE Controller At the click of a disk with a plus sign -> dialog box -> Select Choose Disk and then Browse to the file just downloaded iso Androidx86 .... above.
Click on the image to get the big picture Name: Storage.PNG Views: 33 Size: 70.3 KB ID: 8890
- Through step 2.b
2.b. Installing Android x86
- Start the newly created virtual machine by clicking Start. Boot Menu appears select Install to hard disk android x86
Click on the image to get the big picture Name: BootUp.PNG Views: 42 Size: 72.1 KB ID: 8882
- Next select the Create / Modify Partition
Primary -> Điền size vào (thường nó đã điền sẵn cho maximum size rồi) -> Enter">- Use the arrow keys select New -> Primary -> Enter the size (usually it was filled to the maximum size it) -> Enter
Enter.">- Select Bootable (Once selected, the word Boot Flags column) and then use the arrow (left and right) to move to Write -> Enter. Type "yes" to confirm
Click on the image to get the big picture Name: CreatePartition.PNG Views: 36 Size: 50.6 KB ID: 8885
- Wait for the write is complete, it moves the arrow to Quit and enter text
- Choose Partition dialog box appears, select the newly created partition (sda1). It asked ext3 format and then select OK
- I heard something after all OK (install GRUB, / system directory)
- Wait for it installed, then select Create Fake SD Card, fill custom size (about 64MB for example)
- Done Reboot the virtual machine and always go off (stop it purpose is to draw out the ISO disk)
Storage -> Chọn đĩa ISO lúc nãy mount vào, nhấn dấu trừ để remove nó ra.">- Go to Settings -> Storage -> Choose ISO mount earlier on, press the minus sign to remove it.
- Still in Settings, the Network Choose Adapter1 set as follows
Click on the image to get the big picture Name: Network.PNG Views: 152 Size: 70.7 KB ID: 8888
It is possible to select the Attach Host Only Adapter or Bridge Adapter are, but require you to have Bridge 1 DHCP server to allocate IP for the virtual machine (something like you're connected to the internet, is the choice of exchange This will let you access the internet in androidx86)
- Done OK and restart the Androidx86 just installed.
2.c Use
- Press Ctrl (right) + I to select Mouse Integration function (to use the mouse in a virtual machine)
- While you click on the first screen using Virtual Box will have some notice. Just OK + Do not Show Again (after fiddling gradually know all that)
- To exit from the screen press Ctrl-click (right) (Add this added to the default Ctrl key function of the virtual machine, the relevant functions are associated with this key)
- Right Ctrl + C: switch mode Scale.
Step 3: Connect to the virtual machine for programmers
You see update below the bottom of the article to get the choice of how much easier
- While in the virtual machine, press Left Alt + F1 to switch to console mode (Left Alt + F7 to return to normal screen)
- Type netcfg command to find the IP of the virtual machine
Click on the image to get the big picture Name: Netcfg.PNG Views: 179 Size: 63.9 KB ID: 8887
- IP of it in this case (eth0) 192.168.1.33
- Next is connected to the virtual machine using adb tool in the Android SDK
- Open cmd in Windows, ANDROID_HOME% folder% \ android-sdk \ platform-tools ANDROID_HOME%% which is Android SDK installation directory (for example: D: \ Program Files \ Android \ android-sdk \ platform-tools ) type
Code:
adb connect IP
where IP is the ip virtual machine has taken a while ago. After you see the message that you're connected to ... connect successfully.
- To test, try out Eclipse and Run
Click on the image to get the big picture Name: TEST.png Views: 108 Size: 364.8 KB ID: 8891
- Come as you've made it!
Step 4: Enhance: Adjust the resolution of the virtual machine androidx86
- As you see in the image on the android virtual machine can Wazi screen ratio looks a little phone (portrait) while you set out to square the square (4:3) does not sound like one.
- The following key (Known capacity of an advantage)
- First, set custom resolution for VirtualBox. Open cmd find VirtualBox installation directory (eg D: \ Program Files \ Oracle \ VirtualBox) and then fill in the following format command
Code:
VBoxManage setextradata "Androidx86" "CustomVideoMode1" "640x960x16"
Which is Androidx86 name your virtual machine. You can add many different CustomVideoModel (okay sure to fill another name)
- Next, add the menu above resolution of the Grub androidx86
- Start androidx86, on the Boot Menu, select Debug mode
- Type the following command in turn
-
Code:
mount-o remount, rw / mnt
vi / mnt / grub / menu.lst
- The vi editor is as follows
Click on the image to get the big picture Name: en.png Views: 91 Size: 120.7 KB ID: 8892
- The next task is to create a new boot option in addition to earlier resolution by adding the kernel option option: UVESA_MODE = "640x960" (640x960 resolution is just above)
1. Move the cursor to the first title word in turn 3 and then press Shift + y (3 goals is to copy the first line of the menu to paste it down below for help to retype)
2. Move the cursor to the end of the file and press p. It will just copy paste 3 lines
3. Press a to enter edit mode, move the cursor to the title by just pasting the title to edit it (for big block, but this line does not matter much) Next move to the kernel line, add UVESA_MODE type = " 640x960 "on, it's roughly as follows
Code:
.... acpi_sleep = s3_bios, s3_mode UVESA_MODE = 480x720 DPI = 240 SRC = / android-2.3-RC1 ...
You can move the cursor to the default place to adjust the default boot menu (the menu numbered from 0)
4. Press Esc to exit Edit mode
5. Press: wq to write and quite (not write is not nothing)
6. Reboot the virtual machine and enjoy (To Scale screen mode by pressing ctrl + C Right)
Results:
The whole tutorial was written by Wazi after sports Armstrong@diendan.congdongcviet.com see more articles on which this article is mainly dev.blogs.nuxeo.com/2011/10/speeding-up-the-android -emulator.html
Bonus: Comparison between androidx86 speed, android emulator and Nexus One
Click on the image to get the big picture Name: SpeedComparison.PNG Views: 157 Size: 26.0 KB ID: 8889
Sincerely!
Wazi Armstrong
PS: You can download attachments tutorial.zip for offline reading (requires a M $ Word 2007 or higher)
UPDATE ================================ ================= ==================
In step 2.b above when you select the network card for Android, there are 2 options are Host Only or Bridge. Only Host is not on the internet while the Bridge is the DHCP Server is required (some inconvenience when their company network as the DHCP server IP level it under MAC address level rather indiscriminately)
So I figured out how to solve the optimal one (in his best)
You select the NAT network card. With this option, you can go to the internet without a DHCP server
However, do not connect the adb (although still existing netcfg ip is 10.0.2.15)
I had to find out and know that with NAT options, Android will connect with the outside via his computer as 1 router. Meanwhile adb port work in 5555, 5554 should it not be able to see your computer. At this point you must also understand what you say
Using port forwarding command of virtualbox
Code:
[],tcp|udp,[],,[], ">VBoxManage modifyvm "AndroidVM" - natpf <1-N> [<name>], tcp | udp, [<hostip>], <hostport>, [<guestip>], <guestport>
Explain a little AndroidVM is my android virtual hostname
là số thứ tự của card mạng (nếu bạn chọn cái NAT đó ở cái tab Adapter thứ nhất thì điền 1)"><1-N> is the number of the network card (if you choose that NAT in the Adapter tab first, then fill 1)
, cái này tùy chọn, là tên của cái port forwarding này"><name>, this option is the name of the port forwarding
selected protocol is tcp offline
hostip, hostport, guestport, the only guestip not need to explain, which is optional hostip with guestip
So for your case, the command is roughly
Code:
VBoxManage modifyvm "AndroidVM" - natpf1 "adb, tcp,, 5555,, 5555"
remember the number of consecutive 1 after natpf and then give parameters to "". Just because I lack quotes (instructions say it can not) do finish last forever curious: (
Okay, now turn up Virtualbox, boot Android (firewall may ask, for the port to which, allow themselves only)
Then turn up typing cmd
Code:
adb connect localhost
(Actually, both my 2 computers are not required to type this line, eclipse turned up, turn it up VMs themselves always, is always run)
That's it!

Không có nhận xét nào:

Đăng nhận xét