Setting up a MAC OS build environment

Source: Internet
Author: User
Tags git commands

In a default installation, Mac OS runs on a case-preserving but case-insensitive filesystem. This type of filesystem was not supported by git and would cause some GIT commands (such as git status ) to behave abnormally. Because of this, we recommend, and the AOSP source files on a case-sensitive filesystem. This can is 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 straight Forward. 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 is 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:

' case-sensitive journaled hfs+ ' -size 40g ~/android.dmg

This would create a .dmg (or possibly a .dmg.sparsefile ) file which, once mounted, acts as a drive with the required for Matting 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&NBSP; 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 imagefunction mountandroid {hdiutil attach  ~/android.dmg-mountpoint/volumes/android; 

    Note:  if your System created A&NBSP; . Dmg.sparsefile  file, Replace&NBSP; ~/android.dmg Span class= "Apple-converted-space" > with ~/android.dmg.sparsefile .

  • To unmount it when you execute umountAndroid :
    /volumes/android; }

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

Setting up a MAC OS build environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.