1. 程式人生 > >android原始碼編譯後如何用emulator啟動

android原始碼編譯後如何用emulator啟動

原始碼編譯完後:

root@hhw:/opt/Embedsky/android-4.3_r1# export ANDROID_BUILD_TOP=/opt/Embedsky/android-4.3_r

root@hhw:/opt/Embedsky/android-4.3_r1# export ANDROID_PRODUCT_OUT=/opt/Embedsky/android-4.3_r1/out/target/product/generic
root@hhw:/opt/Embedsky/android-4.3_r1# export PATH=$PATH:/opt/Embedsky/android-4.3_r1/out/host/linux-x86/bin


只需要這三句就OK

執行時只要:emulator

Android4.1.1系統編譯全過程

  若執行emulator出現如下提示:

                emulator: ERROR: You did not specify a virtual device name, and the system
                directory could not be found.

                If you are an Android SDK user, please use ‘@<name>’ or ‘-avd <name>’
                to start a given virtual device (see -help-avd for details).

               Otherwise, follow the instructions in -help-disk-images to start the emulator

可嘗試使用source /build/envsetup.sh命令後在執行emulator命令

完美執行:

Android4.1.1系統編譯全過程

下面是遇到的問題,可以看看:

編譯完系統後,用模擬器執行系統,在2.3之前只需要配置:

export Android_PRODUCT_OUT=/home/hudan/android/source/android4.1.1/out/target/product/generic_x86

export PATH=$PATH:/home/hudan/android/source/android4.1.1/out/host/linux-x86/bin

但這樣配置就一直出現如下的錯誤:

emulator: ERROR: You did not specify a virtual device name, and the system

directory could not be found.

If you are an Android SDK user, please use '@' or '-avd '

to start a given virtual device (see -help-avd for details).

Otherwise, follow the instructions in -help-disk-images to start the emulator

Android4.1.1系統編譯全過程

這就是adnroid4.1.1下emulator不能直接執行的問題

最後配置export ANDROID_BUILD_TOP=/home/hudan/android/source/android4.1.1

一切就都OK了。

Android4.1.1系統編譯全過程