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