將WINDOWS下ANDROID自帶的應用程序移植到設備端

1:先將windows下android自帶的SDK的SAMPLE(JetBoy)編譯通過,調試並運行成功。

2:把JetBoy文件夾複製到ubuntu /home/james/gingerbread_0408/packages/apps目錄下。

3:參考一個模板在JetBoy目錄下建立一個android.mk文件

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

 

LOCAL_MODULE_TAGS := optional

 

LOCAL_SRC_FILES := $(call all-java-files-under,src)

 

# TODO: Remove dependency of application on the test runner (android.test.runner)

# library.

LOCAL_JAVA_LIBRARIES := android.test.runner

 

LOCAL_STATIC_JAVA_LIBRARIES += android-common

 

LOCAL_PACKAGE_NAME := JetBoy

 

include $(BUILD_PACKAGE)

 

# Use the following include to make our test apk.

include $(call all-makefiles-under,$(LOCAL_PATH))

 

4:配置好編譯壞境,終端進人/home/james/gingerbread_0408/packages/apps/JetBoy,輸入mm進行模塊編譯。

5:再編譯生成tcc8800_mtd.img

6:重新燒錄,開機運行,即可在主菜單看到JetBoy程序