Setting up a Mac OS build environment

  In a default installation, Mac OS runs on a case-preserving but case-insensitive filesystem. This type of filesystem is not supported by git and will cause some git commands (such as git status) to behave abnormally. Because of this, we recommend that you always work with the AOSP source files on a case-sensitive filesystem. This can be done fairly easily using a disk image, discussed below.

  Once the proper filesystem is available, building the master branch in a modern Mac OS environment is very straightforward. Earlier branches, including ICS, require some additional tools and SDKs.

  Creating a case-sensitive disk image

  You can create a case-sensitive filesystem within your existing Mac OS environment using a disk image. To create the image, launch Disk Utility and select "New Image". A size of 25GB is the minimum to complete the build; larger numbers are more future-proof. Using sparse images saves space while allowing to grow later as the need arises. Be sure to select "case sensitive, journaled" as the volume format.

  You can also create it from a shell with the following command:

 hdiutil create -type SPARSE -fs ‘Case-sensitive Journaled HFS+‘ -size 40g ~/android.dmg

  This will create a .dmg (or possibly a .dmg.sparsefile) file which, once mounted, acts as a drive with the required formatting for Android development.

  If you need a larger volume later, you can also resize the sparse image with the following command:

hdiutil resize -size <new-size-you-want>g ~/android.dmg.sparseimage

For a disk image named android.dmg stored in your home directory, you can add helper functions to your~/.bash_profile:

  • To mount the image when you execute mountAndroid:

    mount the android file image
    function mountAndroid { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; }

    Note: If your system created a .dmg.sparsefile file, replace ~/android.dmg with~/android.dmg.sparsefile.

  • To unmount it when you execute umountAndroid:

    unmount the android file image
    function umountAndroid() { hdiutil detach /Volumes/android; }

  Once you‘ve mounted the android volume, you‘ll do all your work there. You can eject it (unmount it) just like you would with an external drive.

时间: 2024-11-06 03:51:37

Setting up a Mac OS build environment的相关文章

Programming in Go (Golang) – Setting up a Mac OS X Development Environment

http://www.distilnetworks.com/setup-go-golang-ide-for-mac-os-x/#.V1Byrf50yM8 Programming in Go (Golang) – Setting up a Mac OS X Development Environment Published on February 4, 2015 At Distil, we have recently started to use Go (Golang) to expand the

Setting up a EDK II build environment on Windows and Linux:搭建Windows和Linux开发环境[2.2]

Setting up a EDK II build environment on Windows and Linux:搭建Windows和Linux开发环境[2.2] 2015-07   北京海淀区  张俊浩 2. Setting Up EDKII Development Environment(EDKII开发环境的搭建) ->2.1The General Procedure Of Setting Up EDKII Development Environment(搭建EDKII项目的通用流程)

google官方提供的编译android源码的环境初始化,Initializing a Build Environment

原文网址:http://source.android.com/source/initializing.html Initializing a Build Environment IN THIS DOCUMENT Choosing a Branch Setting up a Linux build environment Installing the JDK Installing required packages (Ubuntu 14.04) Installing required packag

Android Initializing a Build Environment

from://https://source.android.com/source/initializing.html#next-download-the-source Initializing a Build Environment IN THIS DOCUMENT Choosing a Branch Setting up a Linux build environment Installing the JDK Installing required packages (Ubuntu 12.04

如何搭建maya plugin develop environment on MAC OS X

1.首先我使用的平台是xcode version 5.1.1 ,MAYA2015, MAX OS X 10.9.4. MAYA2015要求的是:Mountain Lion 10.8.5, Xcode 5.0.2 with SDK 10.8 (Mountain Lion), clang with libstdc++. 但是没有关系, 虽然xcode默认的工程编译sdk是10.9但是xcode 5.1.1是支持10.8的sdk的. 2. 在build setting 里面设置工程链接的lib的路径和

在Mac OS X Yosemite 10.10.3 中搭建第一个 ASP.NET 5 Web 项目

终于有时间在 Mac 上安装一下 ASP.NET 5,网上有许多教程,但是多数的时间比较早了,版本不是最新,搭着 Build 2015 的春风,我也实践一下 Mac OS X 上的 ASP.NET 5. 经常使用 Windows 8.1,对 Mac 并不太熟悉,也一并把安装中的问题趟一遍. 前几天刚刚更新了 Mac 的操作系统,操作系统版本 Mac OS X Yosemite 10.10.3. 1. 在 Mac OS X 上安装 ASP.NET 5 ASP.NET 5 运行在 DNX 之上,DN

Building android AOSP on Mac OS X Mountain Lion

I have been working with the Android AOSP source code for some time now and spent endless hours searching the internet for problems that arose on different occasions. Today I decided to note them down, on the one hand it is convenient for me to just

在mac os下编译android -相关文章

1. Mac OS X下编译Android源码 http://blog.csdn.net/bulreed/article/details/22783467 2.MAC OS 编译 Android源代码 http://blog.sina.com.cn/s/blog_768cfa5901011zod.html 3. Setting Up A Build Environment on OS X 10.9 Mavericks http://blog.csdn.net/michaelpp/article/

Blender源码在Mac OS X上的编译(英)

Install Xcode Development Tools It is recommended to download the newest Xcode package from the Mac App Store for your system (it's free). For Xcode 4, you need to install the command line tools additionally. This is done by starting Xcode, going int