-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-on-mac.html
357 lines (344 loc) · 15.5 KB
/
build-on-mac.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Tutorial on how to build AICP Custom ROM from source on Mac OSX">
<meta name="author" content="eboye">
<link rel="apple-touch-icon" sizes="57x57" href="imgs/favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="imgs/favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="imgs/favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="imgs/favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="imgs/favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="imgs/favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="imgs/favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="imgs/favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="imgs/favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="imgs/favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="imgs/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="imgs/favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="imgs/favicons/favicon-16x16.png">
<link rel="manifest" href="imgs/favicons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="imgs/favicons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Twitter Card data -->
<meta name="twitter:card" content="imgs/featured_image_aicp.png">
<meta name="twitter:site" content="@eboyee">
<meta name="twitter:title" content="AICP OTA">
<meta name="twitter:description" content="Tutorial on how to build AICP Custom ROM from source on Mac OSX">
<meta name="twitter:creator" content="@eboyee">
<meta name="twitter:image:src" content="imgs/featured_image_aicp.png">
<!-- Open Graph data -->
<meta property="og:title" content="AICP OTA"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://eboye.github.io/AICP-OTA/build-on-mac.html"/>
<meta property="og:image" content="imgs/featured_image_aicp.png"/>
<meta property="og:description" content="Tutorial on how to build AICP Custom ROM from source on Mac OSX"/>
<meta property="og:site_name" content="AICP OTA"/>
<title>Tutorial on how to build AICP Custom ROM from source on Mac OSX</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-71822266-1', 'auto');
ga('send', 'pageview', {
'page': location.pathname + location.search + location.hash
});
</script>
</head>
<body>
<nav class="blue-grey darken-4">
<div class="container">
<div class="nav-wrapper">
<a href="https://eboye.github.io/AICP-OTA/" class="brand-logo">
<img src="imgs/aicp_vector.svg" alt="AICP OTA" width="111" height="56"/>
</a>
<a href="#!" data-activates="mobile-menu" class="button-collapse right"><i class="aicp-menu"></i></a>
<ul id="main-nav" class="right hide-on-med-and-down">
<li>
<a href="https://eboye.github.io/AICP-OTA/">
<i class="aicp-download left"></i>OTA updates
</a>
</li>
<li>
<a href="https://plus.google.com/communities/101008638920580274588" target="_blank">
<i class="aicp-google-plus left"></i>Community
</a>
</li>
<li class="active">
<a href="#!" class="dropdown-button" data-activates="source_code" data-beloworigin="true">
<i class="aicp-code left"></i>Source code<i class="aicp-arrow_drop_down right"></i>
</a>
</li>
</ul>
<ul id="source_code" class="dropdown-content">
<li>
<a target="_blank" class="right-align blue-grey-text text-darken-4" href="https://github.com/AICP">
<i class="aicp-github-alt left"></i>GitHub
</a>
</li>
<li>
<a target="_blank" class="right-align blue-grey-text text-darken-4" href="http://gerrit.aicp-rom.com/">
<i class="aicp-code left"></i>Gerrit
</a>
</li>
<li class="divider"></li>
<li class="menu-title allcaps blue-grey-text text-darken-4">Build tutorials</li>
<li class="divider"></li>
<li>
<a href="build-on-linux.html" class="right-align blue-grey-text text-darken-4">
<i class="aicp-linux left"></i>Linux
</a>
</li>
<li class="active">
<a href="build-on-mac.html" class="right-align blue-grey-text text-darken-4">
<i class="aicp-apple left"></i>Mac
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="jumbotron material-jumbotron blue-grey darken-4 white-text">
<div class="container">
<h1>How to build AICP on OS X 10.8.X?</h1>
<p>This is a guide to build AICP on OS X Mountain Lion(10.8.X).</p>
</div>
</div>
<div class="container">
<div class="page-header">
<h2>Pre Requirements:</h2>
</div>
<ol>
<li>Go to <strong>App Store</strong> on your OS X and download <strong>Xcode 4</strong>. Once it is installed,
open Xcode and go to preferences.
<br> There you will find a tab "DOWNLOADS", open it and find <em>"Command line tools"</em>. Click on INSTALL
next to it. It will take a few minutes to download and install
</li>
<li>Make sure you have the <strong>android-sdk</strong> downloaded and adb and fastboot are setup, and they
work.
<br> It's recommended to place the android-sdk to <code>/usr/local/</code></li>
</ol>
<div class="page-header">
<h3>Initializing the build environment</h3>
<p>First we need to set up our OS X to be able to build Android. This needs some extra things compared to, for
example, building in Linux. But the main stuff is pretty much the same. So let’s get started then, shall
we?</p>
</div>
<p>Open up Terminal and type</p>
<code>java</code>
<br>
<p>If you don’t have <strong>Java</strong> installed you will get a prompt to install it.</p>
<p>Next we will install <strong>homebrew</strong>
<mark>(you can also use macports if you like)</mark>
</p>
<code>ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)</code>
<br>
<p>Now make sure android-sdk and homebrew are in <strong>$PATH</strong></p>
<code>touch ~/.bash_profile && echo
"PATH=/usr/local/bin:/usr/local/sbin:$PATH:/usr/local/android-sdk/tools:/usr/local/android-sdk/platform-tools"
>> ~/.bash_profile</code>
<br>
<p>Now run this and see if you need to update anything.</p>
<code>brew doctor</code>
<br>
<p>If you do (and you probably will once a day) type:</p>
<code>brew update</code>
<br>
<p>Now we need to get our
<strong>dev packages</strong>
</p>
<code>brew install git coreutils findutils gnu-sed gnupg pngcrush repo</code>
<br>
<p>Once that is done, run</p>
<code>brew outdated</code>
<br>
<p>if it shows anything, run</p>
<code> brew upgrade</code>
<br>
<p>Now run this to correct a few symlinks
<mark>[Not sure if these are needed anymore]</mark>
:
</p>
<code>ln -s /usr/local/bin/gfind /usr/local/bin/find && ln -s /usr/local/bin/gsed /usr/local/bin/sed</code>
<br>
<p>Now to create our case sensitive image for our AICP project
<mark>[NOTE: the 60g can be changed to anything. It only takes up what it needs but I used 60GB]:</mark>
</p>
<code>hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach
~/Desktop/Android</code>
<br>
<p>Now to create our working directory</p>
<code>cd /Volumes/Android && mkdir aicp && cd aicp</code>
<br>
<div class="page-header">
<h3>Download the Source</h3>
<p class="lead">Initializing Repository</p>
</div>
<ol>
<li>Repo initialization:
<br>
<br>
<code>repo init -u https://github.com/AICP/platform_manifest.git -b n7.1</code>
<br>
<br>
</li>
<li>sync repo:
<br>
<br>
<code>repo sync</code>
</li>
</ol>
<div class="page-header">
<h3>Building</h3>
<p class="lead">After the sync is finished, please read the <a href="http://s.android.com/source/building.html"
title="instructions from the Android site">instructions
from the Android site</a> on how to build.</p>
</div>
<ol>
<li>Build:
<br>
<br>
<code>. build/envsetup.sh</code>
<br>
<code>brunch</code>
<br>
<br>
</li>
<li>You can also build
<mark>(and see how long it took)</mark>
for specific devices like this:
<br>
<br>
<code>. build/envsetup.sh</code>
<br>
<code>time brunch m7</code>
</li>
</ol>
<p>Remember to <code>make clobber</code> every now and then!</p>
</div>
<footer class="page-footer grey lighten-4">
<div class="footer-copyright">
<div class="container">
<p class="blue-grey-text text-darken-4">
© 2017 AICP
</p>
</div>
</div>
</footer>
<ul class="side-nav" id="mobile-menu">
<li class="active">
<a href="https://eboye.github.io/AICP-OTA/">
<i class="aicp-download left"></i>OTA updates
</a>
</li>
<li>
<a href="https://plus.google.com/communities/101008638920580274588" target="_blank">
<i class="aicp-google-plus left"></i>Google+ Community
</a>
</li>
<li class="divider"></li>
<li>
<a target="_blank" class="blue-grey-text text-darken-4" href="https://github.com/AICP">
<i class="aicp-github-alt left"></i>GitHub
</a>
</li>
<li>
<a target="_blank" class="blue-grey-text text-darken-4" href="http://gerrit.aicp-rom.com/">
<i class="aicp-code left"></i>Gerrit
</a>
</li>
<li class="divider"></li>
<li class="menu-title allcaps blue-grey-text text-darken-4">Build tutorials</li>
<li class="divider"></li>
<li>
<a href="build-on-linux.html" class="blue-grey-text text-darken-4">
<i class="aicp-linux left"></i>Linux
</a>
</li>
<li>
<a href="build-on-mac.html" class="blue-grey-text text-darken-4">
<i class="aicp-apple left"></i>Mac
</a>
</li>
</ul>
<div class="fixed-action-btn share-btn" style="bottom: 45px; right: 24px;">
<div class="btn-floating btn-large red">
<i class="aicp-share"></i>
</div>
<ul>
<li>
<a target="_blank"
href="https://twitter.com/intent/tweet?source=https://eboye.github.io/AICP-OTA/build-on-mac.html&text=Tutorial on how to build AICP Custom ROM from source on Mac OSX https://eboye.github.io/AICP-OTA/build-on-mac.html&hashtags=aicp"
class="btn-floating color-twitter">
<i class="socicon">a</i>
</a>
</li>
<li>
<a target="_blank"
href="https://www.facebook.com/sharer/sharer.php?u=https://eboye.github.io/AICP-OTA/build-on-mac.html&t=Tutorial on how to build AICP Custom ROM from source on Mac OSX"
class="btn-floating color-facebook">
<i class="socicon">b</i>
</a>
</li>
<li>
<a target="_blank" href="https://plus.google.com/share?url=https://eboye.github.io/AICP-OTA/build-on-mac.html"
class="btn-floating color-googleplus">
<i class="socicon">c</i>
</a>
</li>
<li>
<a target="_blank"
href="http://pinterest.com/pin/create/button/?url=https://eboye.github.io/AICP-OTA/build-on-mac.html&media=https://eboye.github.io/AICP-OTA/build-on-mac.htmlimgs/featured_image_aicp.png&description=Tutorial on how to build AICP Custom ROM from source on Mac OSX"
class="btn-floating color-pinterest">
<i class="socicon">d</i>
</a>
</li>
<li>
<a target="_blank"
href="https://getpocket.com/save?url=https://eboye.github.io/AICP-OTA/build-on-mac.html&title=Tutorial on how to build AICP Custom ROM from source on Mac OSX"
class="btn-floating color-pocket">
<i class="socicon">?</i>
</a>
</li>
<li>
<a target="_blank"
href="https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=&url=https://eboye.github.io/AICP-OTA/build-on-mac.html&title=Tutorial on how to build AICP Custom ROM from source on Mac OSX"
class="btn-floating color-tumblr">
<i class="socicon">z</i>
</a>
</li>
<li>
<a target="_blank"
href="http://www.linkedin.com/shareArticle?mini=true&url=https://eboye.github.io/AICP-OTA/build-on-mac.html&title=Tutorial on how to build AICP Custom ROM from source on Mac OSX&summary=Tutorial on how to build AICP Custom ROM from source on Mac OSX&source=https://eboye.github.io/AICP-OTA/build-on-mac.html"
class="btn-floating color-linkedin">
<i class="socicon">j</i>
</a>
</li>
<li>
<a target="_blank"
href="mailto:?subject=Tutorial on how to build AICP Custom ROM from source on Mac OSX&body=Tutorial on how to build AICP Custom ROM from source on Mac OSX"
class="btn-floating color-email">
<i class="socicon">@</i>
</a>
</li>
</ul>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-storage-api/1.9.4/jquery.storageapi.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>