I have downloaded the Android source to my Mac. When I went to build, I got this message:
$make -j4
Checking build tools versions...
build/core/main.mk:90: ************************************************************
build/core/main.mk:91: You are building on a case-insensitive filesystem.
build/core/main.mk:92: Please move your source tree to a case-sensitive filesystem.
build/core/main.mk:93: ************************************************************
build/core/main.mk:94: *** Case-insensitive filesystems not supported. Stop.
Then I realised I had missed creating a case-sensitive image. So I created a new one as mentioned on http://source.android.com/source/initializing.html, like this:
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android.dmg
...but I can not create any folder in it, it says:
mkdir android
mkdir: android: Read-only file system
How can I move Android source code which was downloaded on my Mac OS to a newly created case-sensitive image?
I met the same problem. I found if you use sudo then the problem is gone.
Note the #
character in Google's step by step guide:
# hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android.dmg
function mountAndroid { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; }
So you have to run the commands with sudo
:
sudo hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android.dmg
sudo hdiutil attach ~/android.dmg -mountpoint /Volumes/android
With the given command:
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android.dmg
We'll get a read-only sparse disk image file. Thus we need to convert it to writable before mounting it:
hdiutil convert ~/android.dmg.sparsefile -format UDRW -o ~/android.dmg
Besides, instead create & convert images, we can generate writable disk image directly with OSX build-in Disk Utility.
As of macOS High Seirra, there's a faster alternative called "APFS Subvolumes". It's significantly faster than sparse images, and also features some fancy copy-on-write features like BTRFS.
You should now have an extremely fast, case-sensitive partition that grows dynamically like a sparse image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With