How to build Android Windows SDK

0. Build sdk in Linux

  $ cd mydroid
  $ make PRODUCT-sdk-sdk

1. Install jdk in Windows to E:\Java\jdk1.6.0_21


2. Install cygwin:
  - Download the latest version of cygwin from http://www.cygwin.com/
  - Install cygwin
  - Required packages:
            autoconf, bison, curl, flex, gcc, gcc-g++, git, gnupg, make, gettext, gettext-devel, ncurses, libncurses-devel
            mingw-zlib, python, zip, unzip
  - Suggested extra packages:
            diffutils, emacs, openssh, rsync, vim, wget.
  - Packages that must not be installed: readline.

3. export PATH=$PATH:/cygdrive/e/Java/jdk1.6.0_21/bin/

4. download android source in cygwin

    $ mkdir ~/mydroid
    $ cd ~/mydriod
    $ repo init -u git://android.git.kernel.org/platform/manifest.git -b android2.2-r1.1
    $ repo sync

5. Install textinfo
  $ wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.9.tar.bz2
  $ tar jvfx textinfo-4.9.tar.bz2
  $ cd textsinfo
  $ ./configure --prefix=/usr
  $ make
  $ make install

6. Install android toolchain from
  $ wget http://android.git.kernel.org/pub/android-toolchain-20081019.tar.bz2
  $ tar jvfx android-toolchain-20081019.tar.bz2
  $ cd android-toolchain-20081019
  $ ./configure --target=arm-eabi --prefix=XXX
  $ make build
  $ make install

7. Build windows sdk
  $ copy android-sdk_eng.me_linux-x86.zip from Linux to out/host/linux-x86/sdk/
  $ export SDK_NUMBER=${USER}-`date +%Y%m%d-%H%M%S`
  $ cd mydroid
  $ mkdir -p out/host/windows-x86/sdk
  $ development/build/tools/make_windows_sdk.sh out/host/linux-x86/sdk/android-sdk_eng.me_linux-x86.zip out/host/windows-x86/sdk

Note:
1). Add acp to fucntion_build() in development/build/tool/make_windows_sdk.sh as below:
  make \
    acp aapt aidl \
    etc1tool \
    prebuilt \
    dexdump dmtracedump \
    hprof-conv \
    mksdcard \
    sdklauncher sqlite3 \
    zipalign \
    || die "Build failed"

2). adb and fastboot have problem, so remove them in make_windows_sdk.sh


3). Remove cp *.dll in make_windows_sdk.sh, modify as below:

   #cp -v out/host/windows-x86/bin/*.{exe,dll} "$TOOLS"/
    cp -v out/host/windows-x86/bin/*.exe "$TOOLS"/


4). Because we can't build adb, so please copy adb.exe from downloaded windows sdk, and make a zipped file again.


转载自:http://buaadallas.blog.51cto.com/399160/382352

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值