现在的位置: 首页 > 综合 > 正文

[Note] Install Android on VirtualBox

2013年08月23日 ⁄ 综合 ⁄ 共 2504字 ⁄ 字号 评论关闭

Get eee 701 vendor patch

 

1. create local_manifest.xml file in .repo directory

2. edit the local_manifest.xml file and append contents as following

<manifest>
<project name="platform/vendor/asus/eee_701" path="vendor/asus/eee_701"/>
</manifest>

 

3. Sync source code

[jelly@localhost:~/work/android]$repo sync

 

 

Compilation kernel image for X86 platform

 

1. copy kernel configuration file(kernel.config) to kernel directory and rename to .config

[jelly@localhost:~/work/android]$cp vendor/asus/eee_701/kernel.config kernel/.config

 

2. Configure kernel and modify following modules to built-in

* Device drivers / Network device support / Ethernet (10 or 100Mbit) / EISA, VLB, PCI and on board controllers / AMD PCnet32 PCI support
* Device drivers / Graphics support / Support for frame buffer devices / VESA VGA graphics support
* Device drivers / Graphics support / Console display driver support / Framebuffer Console support
* Device drivers / Graphics support / Console display driver support / Select Compiled-in fonts (VGA 8×8 font, VGA 8×16 font)

 

3. Cancel following modules

* Device drivers / Real Time Clock / Android alarm driver
* Device drivers / Misc devices / Android pmem allocator

 

4. Compile new kernel image

[jelly@localhost:~/work/android/kernel]$make zImage

 

5. Modify kernel start up arguments and network configuration

* append 'vga=788' to BOARD_KERNEL_CMDLINE line in vendor/asus/eee_701/BoardConfig.mk file
* change 'netcfg eth0 dhcp' to 'dhcpcd eth0' in vendor/asus/eee_701/init.eee_701.sh file

 

 

Compile Android Images

 

1. Create bash script for compilation images

cp kernel/arch/x86/boot/bzImage vendor/asus/eee_701/kernel
mkdir -p out/target/product/eee_701/data/
cp kernel/arch/x86/boot/bzImage out/target/product/eee_701/kernel

TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true make -j4 installer_img

 

2. Add executable privilege to script file

[jelly@localhost:~/work/android]$chmod +x build.sh

 

3.
The process of image compilation will consume too long times which
depend on your computer, so drink a cup of coffee for waiting~~~:)

[jelly@localhost:~/work/android]$./build.sh

 

4. If no error, there is installer.img file in out/target/product/eee_701 directory

 

Create installable filesystem image for VirtualBox

 

1. Convert installer.img to VirtualBox format

[jelly@localhost:~/work/android]$vboxmanage convertfromraw -format vdi installer.img

 

2. Create new virtual machine

KERNEL: Linux kernel 2.6
RAM: 256MB
DISK: >= 2G

 

3. Add the vdi disk image to VirtualBox

 

Installation Android on VirtualBox

 

1. Start up Virtual Machine

2. Press F12 button and select boot from second disk

3. Press any key in grub panel and press 'e' key to edit startup argument

4. Change hd(0,0) to hd(1,0) and press 'b' key to continue

5. If installation has finished, please reboot and remove installable disk image from VM configuration

~~~ THE END ~~~

抱歉!评论已关闭.