<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Run Android on VirtualBox/VMWare</title>
<link>http://blog.roodo.com/thinkingmore/archives/8533633.html/</link>
<description><![CDATA[有人問了，所以這裡大致整理一下，也算是留下一個記憶（之後沒有要繼續...Orz...)。
事實上，網路上可以找到許多人的文章，根據歸納之後，我發現大多都是從 android-porting 裡的這篇：Howto build Android full source for X86 Architecture like EeePC(ASUS)轉貼來的，所以只要耐心爬完這篇，大致上都沒問題。

第一步當然是要把 source 拉下來，這個步驟，官方描述得很清楚：Get source (Android Open Source Project)，這裡不多作描述。如果你用的是 Ubuntu 8.10，會踩到雷的只有 libreadline5-dev，因為並沒有該頁面描述的 lib32readline5-dev。這裡我假設你跟官方教學步驟一樣，建了 mydroid 目錄。sync 整份 source code 以後，還需要 eee 701 的部份，所以要在 .repo 下新增一個檔案，並命名為 local_manifest.xml：&lt;manifest&gt;
    &lt;project name="platform/vendor/asus/eee_701" path="vendor/asus/eee_701"/&gt;
  &lt;/manifest&gt;，然後再 sync 一次。這次的 sync 會很快，結束以後，要先 build kernel。切到 mydroid/kernel 目錄下，複製 mydroid/vendor/asus/eee_701/kernel.config 為 mydroid/kernel/.config，接著執行 make menuconfig，進入 kernel configuration 選單以後，把這幾個 driver 選為 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 supportDevice drivers / Graphics support / Console display driver support / Framebuffer Console supportDevice drivers / Graphics support / Console display driver support / Select Compiled-in fonts (VGA 8x8 font, VGA 8x16 font)，再把這些取消：Device drivers / Real Time Clock / Android alarm driverDevice drivers / Misc devices / Android pmem allocator，然後重新建置 kernel：make bzImage。編譯好之後，把 arch/x86/boot/bzImage 複製為 mydroid/vendor/asus/eee_701/kernel。我稍稍更動了一些設定，這樣我後面就省打一些東西：vendor/asus/eee_701/BoardConfig.mk：在 BOARD_KERNEL_CMDLINE 加上 vga=788vendor/asus/eee_701/init.eee_701.sh：把 netcfg eth0 dhcp 改為 dhcpcd eth0接著就是建置 image 了，這裡是我用的 script，把以下內容存為 build.sh，並放在 mydroid 下：#!/bin/bash
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 -j2 installer_img
，執行前別忘了 chmod +x 。建置完以後，你會在 out/target/product/eee_701 下找到 installer.img。把 installer.img 轉為 VirtualBox/VMWare 可用的 disk image，這邊要利用 VirtualBox 的 vboxmanage 來轉：vboxmanage convertfromraw -format vdi installer.img installer.vdi，如果你用 VMWare，則是：vboxmanage convertfromraw -format vmdk installer.img installer.vmdk建置新的 VM，設置為 Linux kernel 2.6，256M 的 RAM，以及一個超過 2G 的硬碟。然後把上個步驟轉好的 disk image 加為第二個儲存裝置。接下來，我只以 VirtualBox 為例，因為我沒試過 VMWare，不過原理一樣。將這個 VM 開機，一開機馬上按 F12，選擇從第二個儲存裝置開機。一開機，你會看到 grub 的開機選單，趕緊按下任意鍵，因為這邊要修改一下，預設 Loader 的開機磁碟是 hd(0,0)，你要按 e 進行修改，把 hd(0,0) 改為 hd(1,0)，再按 b 繼續開機(如果你不熟 grub，麻煩熟悉，這邊我不多說)。開機以後，就會開始進行安裝的動作，Android 會安裝到第一個磁碟上去，這個步驟要等一陣子，如果有錯誤，再重複一次即可，根據我的經驗，有時候會因為切割磁碟失敗而停止安裝，但再從第二個磁碟開機安裝一次，通常即可解決。安裝完成不會有什麼訊息，但看一下畫面上訊息，你應該可以知道已經完成，輸入 reboot 重新開機。最後就大功告成啦～接著你可以移除第二個磁碟，因為再也用不到啦～

最後的最後，希望我沒有遺漏～

]]>
	</description>
<language>zh-tw</language>
<generator>Roodo Blog System</generator>
<copyright>All Rights Reserved</copyright>
<atom:link href="http://blog.roodo.com/thinkingmore/archives/8533633-comment.xml" rel="self" type="application/rss+xml" />
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[我知道，後來就發現有 android-x86 的專案了，所以有持續關注你的 blog...]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19891833</guid>
		<category>文章回應</category>
	<pubDate>Wed, 30 Sep 2009 01:51:37 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[想玩 Android on x86 的，請看看
<a href='http://www.android-x86.org/' rel='nofollow'><a href='http://www.android-x86.org/' rel='nofollow'>http://www.android-x86.org/</a></a>
提供完整可編譯的 source code.
一個 make 指令就編完，不用再改來改去。
也有 prebuilt livecd iso 可下載。]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19888847</guid>
	<author>cwhuang@linux.org.tw(cwhuang)</author>	<category>文章回應</category>
	<pubDate>Tue, 29 Sep 2009 11:54:14 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[我用的是 cupcake，那時候，kernel 的確是在 mydroid 下。

目前最新的代碼我就沒看過了...
不妨用 find 找找看或用 tree 列出樹狀結構來看...]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19625233</guid>
		<category>文章回應</category>
	<pubDate>Tue, 04 Aug 2009 16:52:12 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[我的mydroid下也沒有Kernel這個資料夾耶，我也一直follow你的步驟，麻煩你了。]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19624431</guid>
		<category>文章回應</category>
	<pubDate>Tue, 04 Aug 2009 16:32:47 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[恩我也是這樣想,不過我按照步驟走下來,mydroid裡面也沒有出現一個kernel的資料夾,所以一直很疑惑,不知道您是在哪步驟的時候出現的？
方便的話能不能加個msn討論
謝謝

<a href="mailto:converse-2005@hotmail.com">converse-2005@hotmail.com</a>]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19612275</guid>
		<category>文章回應</category>
	<pubDate>Sat, 01 Aug 2009 22:28:22 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[mydroid/kernel 下就是了]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19585519</guid>
		<category>文章回應</category>
	<pubDate>Mon, 27 Jul 2009 01:21:09 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[你好我想請問一下

這次的 sync 會很快，結束以後，要先 build kernel。切到 mydroid/kernel 目錄下，複製 mydroid/vendor/asus/eee_701/kernel.config 為 mydroid/kernel/.config，接著執行 make menuconfig，進入 kernel configuration 選單以後，把這幾個 driver 選為 built-in：

請問一下kernel是指何處的kernel?
我一直沒有找到 可以麻煩指點一下嗎？︿︿
謝謝]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19583433</guid>
		<category>文章回應</category>
	<pubDate>Sun, 26 Jul 2009 11:55:12 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[frameworks/base/core/java/android/widget/Scroller.java:364那整塊註解砍掉之後,就解決了
不過還有個問題
----- Making installer image ------
rm -rf out/target/product/eee_701/installer
mkdir -p out/target/product/eee_701/installer
mkdir -p out/target/product/eee_701/installer/root
...
...
Copy: out/target/product/eee_701/installer/root/system/bin/logcat
Copy: out/target/product/eee_701/installer/root/system/xbin/strace
Copy: out/target/product/eee_701/installer/root/system/bin/netcfg
Copying installer base files...
Copy: out/target/product/eee_701/obj/lib/libdiskconfig.so -> out/target/product/eee_701/installer/root/system/lib/libdiskconfig.so
Copy:  -> 
dirname: 缺少運算元
請嘗試執行『dirname --help』來獲取更多資訊。
mkdir: 缺少運算元
請嘗試執行『mkdir --help』來獲取更多資訊。
cp: 缺少了檔案運算元
請嘗試執行『cp --help』來獲取更多資訊。
Copy:  -> 
dirname: 缺少運算元
請嘗試執行『dirname --help』來獲取更多資訊。
mkdir: 缺少運算元
請嘗試執行『mkdir --help』來獲取更多資訊。
cp: 缺少了檔案運算元
請嘗試執行『cp --help』來獲取更多資訊。
...
...
Copy:  -> 
dirname: 缺少運算元
請嘗試執行『dirname --help』來獲取更多資訊。
mkdir: 缺少運算元
請嘗試執行『mkdir --help』來獲取更多資訊。
cp: 缺少了檔案運算元
請嘗試執行『cp --help』來獲取更多資訊。
make: *** [out/target/product/eee_701/installer/ramdisk-installer.img] Error 1
make: *** Waiting for unfinished jobs....]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19073441</guid>
	<author>smallrat@gmail.com(smallrat)</author>	<category>文章回應</category>
	<pubDate>Fri, 08 May 2009 14:05:09 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[我懷疑arm_init 是我之前編過arm版的img的遺毒,所以我整個mydroid砍掉重repo sync,果然就沒遇到arm_init的問題
不過卻遇到以下問題
out/target/common/obj/APPS/framework-res_intermediates/src/android/R.java:4999: warning 13: Field android.R.attr.singleLine: @Deprecated annotation and @deprecated comment do not match
frameworks/base/core/java/android/widget/Scroller.java:364: error 1: Unresolved link/see tag "#setFinalX()" in android.widget.Scroller
frameworks/base/core/java/android/widget/Scroller.java:364: error 1: Unresolved link/see tag "setFinalY()" in android.widget.Scroller
Copy: out/target/product/eee_701/installer/root/system/bin/notify
Copy: out/target/product/eee_701/installer/root/system/bin/cmp
Copy: out/target/product/eee_701/installer/root/system/bin/dmesg
Copy: out/target/product/eee_701/installer/root/system/bin/route
Copy: out/target/product/eee_701/installer/root/system/bin/hd
make: *** [out/target/common/docs/offline-sdk-timestamp] Error 45
make: *** Waiting for unfinished jobs....]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19065457</guid>
	<author>smallrat@gmail.com(smallrat)</author>	<category>文章回應</category>
	<pubDate>Thu, 07 May 2009 12:41:43 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[其實做到build.sh還有個問題
build/core/product_config.mk:261: WARNING: adding test OTA key
============================================
TARGET_PRODUCT=eee_701
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
============================================
build/target/board/Android.mk:35: *** Please rename "vendor/asus/eee_701/Android.mk" to "vendor/asus/eee_701/AndroidBoard.mk".  Stop.
提示說要把Android.mk更名成AndroidBoard.mk
照著做可以解決此問題
只不過不知道這是否為正常流程]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19064511</guid>
	<author>smallrat@gmail.com(smallrat)</author>	<category>文章回應</category>
	<pubDate>Thu, 07 May 2009 09:30:55 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[為什麼會有 arm_init ??
感覺上不太對，可能要閱讀 apriori.c 看看...]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19060155</guid>
		<category>文章回應</category>
	<pubDate>Wed, 06 May 2009 19:22:24 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[直接修改build/target/product/generic_with_google.mk 將PRODUCT_COPY_FILES設空
結果雖然跳過了maps的錯誤
卻遇到以下錯誤
host Executable: apriori (out/host/linux-x86/obj/EXECUTABLES/apriori_intermediates/apriori)
out/host/linux-x86/obj/EXECUTABLES/apriori_intermediates/apriori.o: In function `init_source':
/media/new_disk/myandroid/build/tools/apriori/apriori.c:711: undefined reference to `arm_init'
out/host/linux-x86/obj/EXECUTABLES/apriori_intermediates/apriori.o: In function `process_file':
/media/new_disk/myandroid/build/tools/apriori/apriori.c:2359: undefined reference to `arm_init'
collect2: ld 回傳 1
make: *** [out/host/linux-x86/obj/EXECUTABLES/apriori_intermediates/apriori] Error 1
make: *** Waiting for unfinished jobs....]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19058887</guid>
	<author>smallrat@gmail.com(smallrat)</author>	<category>文章回應</category>
	<pubDate>Wed, 06 May 2009 15:57:36 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[照著做到執行build.sh時
遇到以下錯誤,看起來是maps編譯出問題
可能是現在sync版本跟elleryq的有差異
# ./build.sh
build/core/product_config.mk:261: WARNING: adding test OTA key
============================================
TARGET_PRODUCT=eee_701
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
============================================
build/core/copy_headers.mk:15: warning: overriding commands for target `out/target/product/eee_701/obj/include/libpv/getactualaacconfig.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for target `out/target/product/eee_701/obj/include/libpv/getactualaacconfig.h'
make: execvp: /bin/bash: 引數列項目過長
Install: out/host/linux-x86/bin/mkbootfs
...恕刪
Install: out/host/linux-x86/bin/kcm
make: *** No rule to make target `vendor/google/frameworks/maps/com.google.android.maps.xml', needed by `out/target/product/eee_701/system/etc/permissions/com.google.android.maps.xml'.  Stop.
make: *** Waiting for unfinished jobs....]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-19058595</guid>
	<author>smallrat@gmail.com(smallrat)</author>	<category>文章回應</category>
	<pubDate>Wed, 06 May 2009 15:16:09 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[檢查一下做出來的 image 裡的 /dev 下有沒有 tty 的裝置...]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-18966461</guid>
		<category>文章回應</category>
	<pubDate>Wed, 22 Apr 2009 22:12:21 +0800</pubDate>
</item>
<item>
	<title>回應：Run Android on VirtualBox/VMWare</title>
	<description><![CDATA[您好,我參考您的文章作了測試,但是在安裝進vm後執行系統時出現 sh:can't access tty; job control turned off
請問這有可能往那個方向看呢?感謝]]>
	</description>
	<link>http://blog.roodo.com/thinkingmore/archives/8533633.html</link>
	<guid>http://blog.roodo.com/thinkingmore/archives/8533633.html#comment-18965493</guid>
		<category>文章回應</category>
	<pubDate>Wed, 22 Apr 2009 18:19:42 +0800</pubDate>
</item>
</channel>
</rss>