Android source download for linux
来源:互联网 发布:erp基础数据导入工具 编辑:程序博客网 时间:2024/05/15 05:37
To build the Android source under Linux, you will need Ubuntu. The Android build is routinely tested on recent versions of Ubuntu (6.06 and later), but reports of successes or failures on other distributions are welcome.
To set up your Linux development environment, make sure you have the following:
To set up your Linux development environment, make sure you have the following:
- Git 1.5.4 or newer. Instructions for how to install and configure Git are below.
- Python 2.4, which you can download from python.org .
- JDK 5.0, update 12 or higher, which you can download from java.sun.com .
- The following packages: flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev (optional), build-essential. To make sure you have all these packages, run
$ sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential - You might also want Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc. To install it, run
$ sudo apt-get install valgrind
Mac OS
Requirements:
- To build the Android files in a Mac OS environment, you need an Intel/x86 machine. The Android build system and tools do not support the obsolete PowerPC architecture.
- We recommend that you build Android on a partition that has been formatted with the "Case-sensitive Journaled HFS+" file system:
- A case-sensitive file system is required because the sources contain files that differ only in case.
- Journaled systems are more robust. (This is optional, but recommended.)
- HFS+ is required to successfully build Mac OS applications such as the Android Emulator for OS X.
- Install the XCode version 2.4 or later from http://developer.apple.com . We recommend version 3.0 or newer.
- Install MacPorts. To do this:
- Download the tar file from http://www.macports.org/ and untar the files.
- Run the following:
$ ./configure
$ make
$ sudo make install
$ sudo port selfupdate - View your path:
$ echo $PATH
Make sure that /opt/local/bin is in your path before /usr/bin. If not, edit $HOME/.bash_profileand add the line "export PATH=/opt/local/bin:$PATH" (or the equivalent for other shells) after any other PATH-related lines. To verify that your path is now correct, open a new terminal and run echo $PATH again.
- Upgrade GNU make to 3.81 or later by running
$ sudo port install gmake
$ sudo ln -s gmake /opt/local/bin/make - Install libsdl by running
$ sudo port install libsdl - Set an appropriate per-process file descriptor limit. To do this, add the following lines to your .bash_profile file:
# set the number of open files to be 1024
ulimit -S -n 1024 - Install these optional packages, if you want to:
$ sudo port install xemacs +sumo
$ sudo port install gimp
$ POSIXLY_CORRECT=1 sudo port install package-name
Installing Git
To work with the Android source files, you will need to use the Git open-source version control system and several complementary tools:
- Repo is a wrapper script that makes it easier to work with Git in the context of Android.
- Gerrit is a visual interface for tracking, commenting on, and approving changes to the code.
To install Git and set up your files for the installation of Repo, follow these steps:
- Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
$ cd ~
$ mkdir bin
$ echo $PATH - Install Git and the GNU Privacy Guard:
- For Linux, run sudo apt-get install git-core gnupg
- For Mac OS:- Run sudo port install gnupg
- Download the latest Git from http://git.or.cz/ .
- Untar the file, then cd into the Git directory.
- Run make install.
For more about installing and configuring Git, see the Git Community Book .
Installing Repo
To install, initialize, and configure Repo, follow these steps:
- Download the repo script and make sure it is executable:
$ curl http://android.kernel.org/repo >~/bin/repo$ chmod a+x ~/bin/repo - Create an empty directory to hold your working files:
$ mkdir mydroid
$ cd mydroid - Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest:
$ repo init -u git://android.kernel.org/platform/manifest.git - When prompted, configure Repo with your real name and email address. If you plan to submit code, use an email address that is associated with a Google account.
What is a manifest file?
The Android source files are divided among a number of different repositories. A manifest file contains a mapping of where the files from these repositories will be placed within your working directory when you synchronize your files.
repo initialized in /mydroid
Your client directory should now contain a .repo directory where files such as the manifest will be kept.
What will my name and email be used for?
To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account (which does not have to be a Gmail address). Make sure this is a live address at which you can receive messages. The real name that you provide here will show up in attributions for your code submissions.
Getting the files
To pull down files to your working directory from the repositories as specified in the default manifest, run
$ repo sync
For more about repo sync and other Repo commands, see Using Repo.
The Android source files will be located in your working directory under their project names.
Building the code
To build the files, run make from within your working directory:
$ cd ~/mydroid
$ make
- Android source download for linux
- The steps for download android source code
- Android download source code
- Download the Android Source
- Android source download
- Download android 5.0 source
- Download Linux Kernel source code
- download android-4.0 source code
- download android source in google
- download android 4 source code
- android source code download notes
- android Download the Source Tree
- Generating SSH Keys for download private source
- Android 各版本代号 & Java Source Download
- Download Android Source Code in Windows
- Download the android source from china mirrors
- download android source code and build
- android source code download from tsinghua
- 刷新ASP.NET页面的疑问
- ASP.NET的 JQuery实例 (转)
- 毕业后的五年拉开大家差距的原因
- 想想 我是一个学生
- 11月随笔
- Android source download for linux
- 这才是我的窝
- BIOS内存分布
- 30 November 2010 Thusday
- C# 怎么通过Iphlpapi.dll 这个API操作路由表
- _CrtIsValidHeapPointer(pUserData) 错误
- jquery语法总结和注意事项
- JSP网站开发(1)
- 再做MBTI测试,挺喜欢这个结果