blob: 3f96154a214757e1e538869e028e2a0d96dca70e [file] [log] [blame]
Eric Parkc9931992019-07-29 13:10:53 +09001
2
3
4
5<!doctype html>
6<html lang="en" class="no-js">
7 <head>
8
9 <meta charset="utf-8">
10 <meta name="viewport" content="width=device-width,initial-scale=1">
11 <meta http-equiv="x-ua-compatible" content="ie=edge">
12
13
14
15
16 <meta name="lang:clipboard.copy" content="Copy to clipboard">
17
18 <meta name="lang:clipboard.copied" content="Copied to clipboard">
19
20 <meta name="lang:search.language" content="en">
21
22 <meta name="lang:search.pipeline.stopwords" content="True">
23
24 <meta name="lang:search.pipeline.trimmer" content="True">
25
26 <meta name="lang:search.result.none" content="No matching documents">
27
28 <meta name="lang:search.result.one" content="1 matching document">
29
30 <meta name="lang:search.result.other" content="# matching documents">
31
32 <meta name="lang:search.tokenizer" content="[\s\-]+">
33
34 <link rel="shortcut icon" href="../../assets/images/favicon.png">
Eric Park45174ca2019-10-21 01:38:33 +080035 <meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.3">
Eric Parkc9931992019-07-29 13:10:53 +090036
37
38
Eric Park608ce5a2019-08-07 21:27:46 +080039 <title>Build Guide - Team Bliss</title>
Eric Parkc9931992019-07-29 13:10:53 +090040
41
42
Eric Park45174ca2019-10-21 01:38:33 +080043 <link rel="stylesheet" href="../../assets/stylesheets/application.30686662.css">
Eric Parkc9931992019-07-29 13:10:53 +090044
45
46
47
48 <script src="../../assets/javascripts/modernizr.74668098.js"></script>
49
50
51
52 <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
53 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono&display=fallback">
54 <style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
55
56
57 <link rel="stylesheet" href="../../assets/fonts/material-icons.css">
58
59
60
61
62
63
64 </head>
65
66 <body dir="ltr">
67
68 <svg class="md-svg">
69 <defs>
70
71
72 </defs>
73 </svg>
74 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
75 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
76 <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
77
Eric Park608ce5a2019-08-07 21:27:46 +080078 <a href="#build-guide" tabindex="1" class="md-skip">
Eric Parkc9931992019-07-29 13:10:53 +090079 Skip to content
80 </a>
81
82
83 <header class="md-header" data-md-component="header">
84 <nav class="md-header-nav md-grid">
85 <div class="md-flex">
86 <div class="md-flex__cell md-flex__cell--shrink">
87 <a href="../.." title="Team Bliss" class="md-header-nav__button md-logo">
88
89 <i class="md-icon"></i>
90
91 </a>
92 </div>
93 <div class="md-flex__cell md-flex__cell--shrink">
94 <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
95 </div>
96 <div class="md-flex__cell md-flex__cell--stretch">
97 <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
98
99 <span class="md-header-nav__topic">
100 Team Bliss
101 </span>
102 <span class="md-header-nav__topic">
103
Eric Park608ce5a2019-08-07 21:27:46 +0800104 Build Guide
Eric Parkc9931992019-07-29 13:10:53 +0900105
106 </span>
107
108 </div>
109 </div>
110 <div class="md-flex__cell md-flex__cell--shrink">
111
112 <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
113
114<div class="md-search" data-md-component="search" role="dialog">
115 <label class="md-search__overlay" for="__search"></label>
116 <div class="md-search__inner" role="search">
117 <form class="md-search__form" name="search">
118 <input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
119 <label class="md-icon md-search__icon" for="__search"></label>
120 <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
121 &#xE5CD;
122 </button>
123 </form>
124 <div class="md-search__output">
125 <div class="md-search__scrollwrap" data-md-scrollfix>
126 <div class="md-search-result" data-md-component="result">
127 <div class="md-search-result__meta">
128 Type to start searching
129 </div>
130 <ol class="md-search-result__list"></ol>
131 </div>
132 </div>
133 </div>
134 </div>
135</div>
136
137 </div>
138
139 </div>
140 </nav>
141</header>
142
143 <div class="md-container">
144
145
146
147
Eric Park45174ca2019-10-21 01:38:33 +0800148 <main class="md-main" role="main">
Eric Parkc9931992019-07-29 13:10:53 +0900149 <div class="md-main__inner md-grid" data-md-component="container">
150
151
152 <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
153 <div class="md-sidebar__scrollwrap">
154 <div class="md-sidebar__inner">
155 <nav class="md-nav md-nav--primary" data-md-level="0">
156 <label class="md-nav__title md-nav__title--site" for="__drawer">
157 <a href="../.." title="Team Bliss" class="md-nav__button md-logo">
158
159 <i class="md-icon"></i>
160
161 </a>
162 Team Bliss
163 </label>
164
165 <ul class="md-nav__list" data-md-scrollfix>
166
167
168
169
170
171
172 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800173 <a href="../.." title="Home" class="md-nav__link">
174 Home
Eric Parkc9931992019-07-29 13:10:53 +0900175 </a>
176 </li>
177
178
179
180
181
182
183
184 <li class="md-nav__item md-nav__item--nested">
185
186 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2">
187
188 <label class="md-nav__link" for="nav-2">
189 Bliss OS
190 </label>
191 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
192 <label class="md-nav__title" for="nav-2">
193 Bliss OS
194 </label>
195 <ul class="md-nav__list" data-md-scrollfix>
196
197
198
199
200
201
202
203 <li class="md-nav__item">
204 <a href="../../Bliss OS/" title="Index" class="md-nav__link">
205 Index
206 </a>
207 </li>
208
209
Eric Park608ce5a2019-08-07 21:27:46 +0800210
211
212
213
214
215 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800216 <a href="../../Bliss OS/build-guide/" title="Build Guide" class="md-nav__link">
217 Build Guide
218 </a>
219 </li>
220
221
222
223
224
225
226
227 <li class="md-nav__item">
Eric Park608ce5a2019-08-07 21:27:46 +0800228 <a href="../../Bliss OS/extras/" title="Extras" class="md-nav__link">
229 Extras
230 </a>
231 </li>
232
233
234
235
236
237
238
239 <li class="md-nav__item">
Eric Parkd09b00e2020-02-15 11:07:48 +0900240 <a href="../../Bliss OS/installation-guide-misc/" title="Installation Guide (Misc)" class="md-nav__link">
241 Installation Guide (Misc)
242 </a>
243 </li>
244
245
246
247
248
249
250
251 <li class="md-nav__item">
252 <a href="../../Bliss OS/installation-guide-surface-devices/" title="Installation Guide (Surface devices)" class="md-nav__link">
253 Installation Guide (Surface devices)
254 </a>
255 </li>
256
257
258
259
260
261
262
263 <li class="md-nav__item">
Eric Park608ce5a2019-08-07 21:27:46 +0800264 <a href="../../Bliss OS/installation-guide/" title="Installation Guide" class="md-nav__link">
265 Installation Guide
266 </a>
267 </li>
268
269
270
271
272
273
274
275 <li class="md-nav__item">
Eric Park0509f652020-03-01 01:54:39 +0900276 <a href="../../Bliss OS/taking-bug-reports/" title="Taking bug reports" class="md-nav__link">
277 Taking bug reports
278 </a>
279 </li>
280
281
282
283
284
285
286
287 <li class="md-nav__item">
Eric Park608ce5a2019-08-07 21:27:46 +0800288 <a href="../../Bliss OS/troubleshooting/" title="Troubleshooting" class="md-nav__link">
289 Troubleshooting
290 </a>
291 </li>
292
293
Eric Parkc9931992019-07-29 13:10:53 +0900294 </ul>
295 </nav>
296 </li>
297
298
299
300
301
302
303
304
305
306 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
307
308 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3" checked>
309
310 <label class="md-nav__link" for="nav-3">
311 BlissRoms
312 </label>
313 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
314 <label class="md-nav__title" for="nav-3">
315 BlissRoms
316 </label>
317 <ul class="md-nav__list" data-md-scrollfix>
318
319
320
321
322
323
324
325 <li class="md-nav__item">
326 <a href="../" title="Index" class="md-nav__link">
327 Index
328 </a>
329 </li>
330
331
332
333
334
335
336
337
338
339 <li class="md-nav__item md-nav__item--active">
340
341 <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
342
343
344
345
346 <label class="md-nav__link md-nav__link--active" for="__toc">
Eric Park608ce5a2019-08-07 21:27:46 +0800347 Build Guide
Eric Parkc9931992019-07-29 13:10:53 +0900348 </label>
349
Eric Park608ce5a2019-08-07 21:27:46 +0800350 <a href="./" title="Build Guide" class="md-nav__link md-nav__link--active">
351 Build Guide
Eric Parkc9931992019-07-29 13:10:53 +0900352 </a>
353
354
355<nav class="md-nav md-nav--secondary">
356
357
358
359
360
361 <label class="md-nav__title" for="__toc">Table of contents</label>
362 <ul class="md-nav__list" data-md-scrollfix>
363
364 <li class="md-nav__item">
Eric Parkd5cc44a2019-10-21 12:15:48 +0800365 <a href="#updated-for-android-10-q" class="md-nav__link">
366 Updated for Android 10 (q)
Eric Parkc9931992019-07-29 13:10:53 +0900367 </a>
368
369 <nav class="md-nav">
370 <ul class="md-nav__list">
371
372 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800373 <a href="#introduction" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900374 Introduction
375 </a>
376
377</li>
378
379 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800380 <a href="#preparation" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900381 Preparation
382 </a>
383
384</li>
385
386 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800387 <a href="#install-the-jdk" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900388 Install the JDK
389 </a>
390
391</li>
392
393 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800394 <a href="#install-build-tools" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900395 Install build tools
396 </a>
397
398</li>
399
400 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800401 <a href="#install-source-code-tools" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900402 Install source code tools
403 </a>
404
405 <nav class="md-nav">
406 <ul class="md-nav__list">
407
408 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800409 <a href="#what-is-source" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900410 What is source?
411 </a>
412
413</li>
414
Eric Parkc9931992019-07-29 13:10:53 +0900415 </ul>
416 </nav>
417
418</li>
419
420 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800421 <a href="#download" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900422 Download
423 </a>
424
425</li>
426
427 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800428 <a href="#build" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900429 Build
430 </a>
431
432 <nav class="md-nav">
433 <ul class="md-nav__list">
434
435 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800436 <a href="#my-device-isnt-booting-and-userdebug-wont-print-any-adb-logcats-what-gives" class="md-nav__link">
Eric Park608ce5a2019-08-07 21:27:46 +0800437 My device isn't booting, and userdebug won't print any adb logcats. What gives?
438 </a>
439
440</li>
441
442 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800443 <a href="#why-mka-and-not-make" class="md-nav__link">
Eric Park35d8ee32019-08-11 01:34:35 +0800444 Why mka and not make?
445 </a>
446
447</li>
448
449 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800450 <a href="#i-get-an-error-about-no-blissify-targets-to-build-against-whats-wrong" class="md-nav__link">
Eric Park608ce5a2019-08-07 21:27:46 +0800451 I get an error about no blissify targets to build against, what's wrong?
Eric Parkc9931992019-07-29 13:10:53 +0900452 </a>
453
454</li>
455
456 </ul>
457 </nav>
458
459</li>
460
461 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800462 <a href="#after-building" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900463 After building
464 </a>
465
466</li>
467
468 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800469 <a href="#troubleshooting" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900470 Troubleshooting
471 </a>
472
473</li>
474
475 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800476 <a href="#conclusion" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900477 Conclusion
478 </a>
479
480</li>
481
482 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800483 <a href="#looking-for-the-next-tutorial" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900484 Looking for the next tutorial?
485 </a>
486
487</li>
488
489 </ul>
490 </nav>
491
492</li>
493
494
495
496
497
498 </ul>
499
500</nav>
501
502 </li>
503
504
505
506
507
508
509
510 <li class="md-nav__item">
511 <a href="../build-tips/" title="Build Tips" class="md-nav__link">
512 Build Tips
513 </a>
514 </li>
515
516
517 </ul>
518 </nav>
519 </li>
520
521
522
523
524
525
526
527 <li class="md-nav__item md-nav__item--nested">
528
529 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">
530
531 <label class="md-nav__link" for="nav-4">
532 Common
533 </label>
534 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
535 <label class="md-nav__title" for="nav-4">
536 Common
537 </label>
538 <ul class="md-nav__list" data-md-scrollfix>
539
540
541
542
543
544
545
546 <li class="md-nav__item">
547 <a href="../../common/" title="Index" class="md-nav__link">
548 Index
549 </a>
550 </li>
551
552
553
554
555
556
557
558 <li class="md-nav__item">
559 <a href="../../common/git-started/" title="Git Started" class="md-nav__link">
560 Git Started
561 </a>
562 </li>
563
564
Eric Park608ce5a2019-08-07 21:27:46 +0800565
566
567
568
569
570 <li class="md-nav__item">
Eric Park8584eda2019-09-02 09:45:55 +0800571 <a href="../../common/maintaining-proper-authorship/" title="Maintaining proper authorship" class="md-nav__link">
572 Maintaining proper authorship
573 </a>
574 </li>
575
576
577
578
579
580
581
582 <li class="md-nav__item">
Eric Park608ce5a2019-08-07 21:27:46 +0800583 <a href="../../common/using-dippy-bird/" title="Using `dippy-bird`" class="md-nav__link">
584 Using `dippy-bird`
585 </a>
586 </li>
587
588
Eric Parkc9931992019-07-29 13:10:53 +0900589 </ul>
590 </nav>
591 </li>
592
593
594
595
596
597
598
599 <li class="md-nav__item md-nav__item--nested">
600
601 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
602
603 <label class="md-nav__link" for="nav-5">
604 Infrastructure
605 </label>
606 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
607 <label class="md-nav__title" for="nav-5">
608 Infrastructure
609 </label>
610 <ul class="md-nav__list" data-md-scrollfix>
611
612
613
614
615
616
617
618 <li class="md-nav__item">
619 <a href="../../infrastructure/" title="Index" class="md-nav__link">
620 Index
621 </a>
622 </li>
623
624
625 </ul>
626 </nav>
627 </li>
628
629
630 </ul>
631</nav>
632 </div>
633 </div>
634 </div>
635
636
637 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
638 <div class="md-sidebar__scrollwrap">
639 <div class="md-sidebar__inner">
640
641<nav class="md-nav md-nav--secondary">
642
643
644
645
646
647 <label class="md-nav__title" for="__toc">Table of contents</label>
648 <ul class="md-nav__list" data-md-scrollfix>
649
650 <li class="md-nav__item">
Eric Parkd5cc44a2019-10-21 12:15:48 +0800651 <a href="#updated-for-android-10-q" class="md-nav__link">
652 Updated for Android 10 (q)
Eric Parkc9931992019-07-29 13:10:53 +0900653 </a>
654
655 <nav class="md-nav">
656 <ul class="md-nav__list">
657
658 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800659 <a href="#introduction" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900660 Introduction
661 </a>
662
663</li>
664
665 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800666 <a href="#preparation" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900667 Preparation
668 </a>
669
670</li>
671
672 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800673 <a href="#install-the-jdk" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900674 Install the JDK
675 </a>
676
677</li>
678
679 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800680 <a href="#install-build-tools" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900681 Install build tools
682 </a>
683
684</li>
685
686 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800687 <a href="#install-source-code-tools" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900688 Install source code tools
689 </a>
690
691 <nav class="md-nav">
692 <ul class="md-nav__list">
693
694 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800695 <a href="#what-is-source" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900696 What is source?
697 </a>
698
699</li>
700
Eric Parkc9931992019-07-29 13:10:53 +0900701 </ul>
702 </nav>
703
704</li>
705
706 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800707 <a href="#download" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900708 Download
709 </a>
710
711</li>
712
713 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800714 <a href="#build" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900715 Build
716 </a>
717
718 <nav class="md-nav">
719 <ul class="md-nav__list">
720
721 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800722 <a href="#my-device-isnt-booting-and-userdebug-wont-print-any-adb-logcats-what-gives" class="md-nav__link">
Eric Park608ce5a2019-08-07 21:27:46 +0800723 My device isn't booting, and userdebug won't print any adb logcats. What gives?
724 </a>
725
726</li>
727
728 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800729 <a href="#why-mka-and-not-make" class="md-nav__link">
Eric Park35d8ee32019-08-11 01:34:35 +0800730 Why mka and not make?
731 </a>
732
733</li>
734
735 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800736 <a href="#i-get-an-error-about-no-blissify-targets-to-build-against-whats-wrong" class="md-nav__link">
Eric Park608ce5a2019-08-07 21:27:46 +0800737 I get an error about no blissify targets to build against, what's wrong?
Eric Parkc9931992019-07-29 13:10:53 +0900738 </a>
739
740</li>
741
742 </ul>
743 </nav>
744
745</li>
746
747 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800748 <a href="#after-building" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900749 After building
750 </a>
751
752</li>
753
754 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800755 <a href="#troubleshooting" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900756 Troubleshooting
757 </a>
758
759</li>
760
761 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800762 <a href="#conclusion" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900763 Conclusion
764 </a>
765
766</li>
767
768 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800769 <a href="#looking-for-the-next-tutorial" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900770 Looking for the next tutorial?
771 </a>
772
773</li>
774
775 </ul>
776 </nav>
777
778</li>
779
780
781
782
783
784 </ul>
785
786</nav>
787 </div>
788 </div>
789 </div>
790
791
792 <div class="md-content">
793 <article class="md-content__inner md-typeset">
794
795
796
Eric Park608ce5a2019-08-07 21:27:46 +0800797 <h1 id="build-guide">Build Guide</h1>
Eric Parkd5cc44a2019-10-21 12:15:48 +0800798<h2 id="updated-for-android-10-q">Updated for Android 10 (q)</h2>
Eric Parkc9931992019-07-29 13:10:53 +0900799<h3 id="introduction">Introduction</h3>
800<p>This is the official guide to build BlissRoms for your device. In this guide, we will only cover official devices with actual maintainers. We will not delve into porting devices.</p>
801<p>The golden rule to building is patience. If something breaks, wait for your maintainer to fix it, send a polite message to your maintainer, or better yet, try and fix it yourself. Then you can make a merge request and contribute!</p>
802<p>Let’s get started.</p>
803<h3 id="preparation">Preparation</h3>
Eric Park608ce5a2019-08-07 21:27:46 +0800804<p>To get started, you need a computer with Ubuntu 18.04 (LTS), at least 200GB space of HDD, and at least 8GB RAM. A decent CPU (or CPUs if you have a server motherboard) is recommended. Other distros can work but is not officially supported in this guide.</p>
805<p>Underpowered machines may crash during compilation. If that happens, you may try and restart the build as most crashes are caused by lack of memory. If your storage space has run out, then you will need to build on a different hard drive.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900806<h3 id="install-the-jdk">Install the JDK</h3>
807<p>Install OpenJDK:</p>
808<pre><code>sudo apt install openjdk-8-jdk
809</code></pre>
810<h3 id="install-build-tools">Install build tools</h3>
Eric Park608ce5a2019-08-07 21:27:46 +0800811<p>To install the required build tools, run the following command:</p>
812<pre><code>sudo apt install git gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev lib32z1-dev ccache libgl1-mesa-dev libxml2 libxml2-utils xsltproc unzip squashfs-tools python python-mako libssl-dev ninja-build lunzip syslinux syslinux-utils gettext genisoimage bc xorriso liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev lzop maven pngcrush schedtool lib32readline-dev
Eric Parkc9931992019-07-29 13:10:53 +0900813</code></pre>
814<h3 id="install-source-code-tools">Install source code tools</h3>
Eric Parkf1180122019-12-28 17:11:20 +0900815<p>Now we need to get the source code via a program named <code>repo</code>. The primary function of <code>repo</code> is to read a manifest file located in BlissRoms's GitHub organization, and find what repositories you need to actually build Android.</p>
Eric Park608ce5a2019-08-07 21:27:46 +0800816<p>Create a <code>~/bin</code> directory for <code>repo</code>:</p>
Eric Parkc9931992019-07-29 13:10:53 +0900817<pre><code>mkdir -p ~/bin
818</code></pre>
819<p>The <code>-p</code> flag instructs <code>mkdir</code> to <em>only</em> create the directory if it does not exist in the first place. Now download the <code>repo</code> tool into <code>~/bin</code>:</p>
820<pre><code>curl https://storage.googleapis.com/git-repo-downloads/repo &gt; ~/bin/repo
821</code></pre>
822<p>Make <code>repo</code> executable:</p>
823<pre><code>chmod a+x ~/bin/repo
824</code></pre>
825<p>And add it to PATH:</p>
826<pre><code>nano .bashrc
827</code></pre>
828<p>Scroll to the end of the file and type these lines:</p>
829<pre><code># Export ~/bin
830export PATH=~/bin:$PATH
831</code></pre>
832<p>Ctrl-O and enter to save, then Ctrl-X to exit nano. Now either logout and login again (or reboot), or <code>source</code> the file:</p>
833<pre><code>source .bashrc
834</code></pre>
835<p>Which can be shortened to:</p>
836<pre><code>. .bashrc
837</code></pre>
838<h4 id="what-is-source">What is <code>source</code>?</h4>
839<p><code>source</code> is a <code>bash</code> command to read aliases, functions, and commands from the specified file. Typically, you'll supply <code>bash</code> with a configuration file such as <code>.bashrc</code> or <code>.bash_profile</code>, or an initialization file such as <code>envsetup.sh</code>. The difference is that while the configuration file lists configuration and user-defined aliases and functions, initialization files typically hold build commands such as <code>breakfast</code>, <code>brunch</code>, and <code>lunch</code>. Without those commands building would be significantly harder as you would have to memorize the long command to invoke a build manually!</p>
840<p>But why do you need to run it after modifying a file? Well, <code>bash</code> cannot automatically detect changes in our files. To solve this, we either <code>source</code> it or log out and log back in, forcing <code>bash</code> to reload configuration files. Keep this in mind, because unlike configuration files, if you forget to <code>source</code> initialization files, build commands will not function!</p>
Eric Parkc9931992019-07-29 13:10:53 +0900841<h3 id="download">Download</h3>
842<p>Create a directory for the source:</p>
Eric Parkd5cc44a2019-10-21 12:15:48 +0800843<pre><code>mkdir -p ~/bliss/q
844cd ~/bliss/q
Eric Parkc9931992019-07-29 13:10:53 +0900845</code></pre>
846<p>Before we download, we need to tell <code>repo</code> and <code>git</code> who we are. Run the following commands, substituting your information:</p>
Eric Parkf1180122019-12-28 17:11:20 +0900847<pre><code>git config --global user.email "john.appleseed@example.com"
848git config --global user.name "John Appleseed"
Eric Parkc9931992019-07-29 13:10:53 +0900849</code></pre>
850<p>Now, we’re ready to initialize. We need to tell <code>repo</code> which manifest to read:</p>
Eric Parkd5cc44a2019-10-21 12:15:48 +0800851<pre><code>repo init -u https://github.com/BlissRoms/platform_manifest.git -b q
Eric Parkc9931992019-07-29 13:10:53 +0900852</code></pre>
Eric Parkd5cc44a2019-10-21 12:15:48 +0800853<p><code>-b</code> is for the branch, and we’re on <code>q</code>, Android 10. It’ll take a couple of seconds. You may need to type <code>y</code> for the color prompt.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900854<p>Then sync the source:</p>
Eric Parkf1180122019-12-28 17:11:20 +0900855<pre><code>repo sync -j$(nproc --all) -c
Eric Parkc9931992019-07-29 13:10:53 +0900856</code></pre>
Eric Parkf1180122019-12-28 17:11:20 +0900857<p><em>Note: For more information about the <code>repo</code> tool, visit the <a href="../build-tips/">Build Tips guide</a> to learn more about the <a href="../build-tips/#repo-optimization-tips">repo flags</a>.</em></p>
Eric Parkc9931992019-07-29 13:10:53 +0900858<p><code>repo</code> will start downloading all the code. That’s going to be slow, even on a fiber network. Expect downloads to take more than a couple hours.</p>
859<h3 id="build">Build</h3>
860<p>Set up the build environment:</p>
861<pre><code>. build/envsetup.sh
862</code></pre>
863<p>This is the initialization file we talked about earlier up top. This "initializes" the environment, and imports a bunch of useful build commands required to build your device. Again, you need to remember to <code>source</code> this file every time you log out and log back in, or launch a new <code>bash</code>/Terminal instance.</p>
864<p>Define what device you’re going to build. For example, the Nexus 5X, has a codename of <code>bullhead</code>. You can check your specific device's codename on GitHub or on Google. Execute:</p>
865<pre><code>breakfast bullhead
866</code></pre>
867<p>What does this do? <code>breakfast</code> searches repositories for your device "tree", which contains all the details needed to make the build suitable for your device. CPU, kernel info, device screen size, whether the board has Bluetooth, NFC, what frequencies the build needs for Wi-Fi, and a bunch of other things. <code>breakfast</code> will automatically search in the <code>BlissRoms-Devices</code> GitHub repository, and grab your device tree for you.</p>
868<p>Okay, so we have the device tree set up. Feel free to browse around the source code to see what changed. You should see folders added to <code>device/</code>, <code>kernel/</code> and <code>vendor/</code>. A shortcut:</p>
869<pre><code>croot
870</code></pre>
871<p>will dump you back in the root of the source code tree. So if you’ve been going through folders and don’t have any idea where you are, you can use the above command. This command, however, requires you to have <code>source</code>d <code>build/envsetup.sh</code> earlier.</p>
Eric Park608ce5a2019-08-07 21:27:46 +0800872<p>We're ready to build, but before we teach you the easy command to execute a build, we will first try the manual method. To set up the current terminal environment for building your particular device, execute:</p>
873<pre><code>lunch bliss_bullhead-userdebug
Eric Parkc9931992019-07-29 13:10:53 +0900874</code></pre>
Eric Park608ce5a2019-08-07 21:27:46 +0800875<p>Let's break down the command. <code>lunch</code> initializes the proper environmental variables required for the build tools to build your specific device. Things like <code>BLISS_DEVICE</code> and other variables are set in this stage, and the changed variables will be shown as output. <code>bliss_</code> is the ROM that we are building. As convention, all devices will have this prefix. <code>bullhead</code> is the specific device we are building - in this case, the Nexus 5X. Finally, <code>userdebug</code> means that we will build a user-debuggable variant. This is usually what most ROMs use for publishing their builds. Manufacturers typically use <code>user</code> which disables most of the useful Android Logcats.</p>
876<h4 id="my-device-isnt-booting-and-userdebug-wont-print-any-adb-logcats-what-gives">My device isn't booting, and <code>userdebug</code> won't print any <code>adb logcat</code>s. What gives?</h4>
877<p>There is a third build variant called <code>eng</code>, short for engineering builds. These builds will activate <code>adb logcat</code> during boot, and will show you exactly what is going wrong, where, and why. However, these builds are <strong>NOT</strong> recommended for normal usage as they are not securely hardened, have log spam that will slow down your device, and other unexpected problems like userspace utilities crashing during runtime. If you want to submit your device for mainline, do <strong>NOT</strong> submit an <code>eng</code> build!</p>
878<p>All set? Let's start the building process. Run:</p>
Eric Park35d8ee32019-08-11 01:34:35 +0800879<p><code>mka blissify</code></p>
Eric Park608ce5a2019-08-07 21:27:46 +0800880<p>And the build should start. The build process will take a long time. Prepare to wait a few hours, even on a decent machine.</p>
Eric Park35d8ee32019-08-11 01:34:35 +0800881<h4 id="why-mka-and-not-make">Why <code>mka</code> and not <code>make</code>?</h4>
882<p><code>make</code> only runs with 1 thread. <code>mka</code> is properly aliased to use all of your threads by checking <code>nproc</code>.</p>
Eric Parkd5cc44a2019-10-21 12:15:48 +0800883<p>If you want to customize your thread count (maybe you're building with a fan-screaming laptop in a quiet coffee shop), use <code>make blissify -j#</code>, replacing the hash with the number of threads (example of <code>make blissify -j4</code>).</p>
Eric Park608ce5a2019-08-07 21:27:46 +0800884<h4 id="i-get-an-error-about-no-blissify-targets-to-build-against-whats-wrong">I get an error about no <code>blissify</code> targets to build against, what's wrong?</h4>
885<p>If you are building other ROMs, it is usually <code>make bacon</code>. For BlissRoms, we chose the build target of <code>blissify</code>. If that doesn't work, sometimes there is a bug, or the ROM developers do not implement a <code>bacon</code> target to build against. In this case, you will need to find what name they use to initialize a full build of the ROM. Conventionally, it is supposed to be <code>bacon</code>, but some ROM developers change this name inadvertently, or actually have a bug that causes the build target to never be found. If you cannot locate the build target, ask the developers of the ROM. Alternatively, you can try poking around in <code>build/make/core/Makefile</code> to see what the build target name is. But this is out of the scope of this article as you're not supposed to be building other ROMs (that's not what this tutorial is for, sorry!)</p>
886<p>All right, but that's annoying. You had to type <strong>three</strong> commands to build it all. What about running one command?</p>
887<pre><code>blissify bullhead
888</code></pre>
889<p>But what is <code>blissify</code>? It is a compact form of these commands:</p>
Eric Parkc9931992019-07-29 13:10:53 +0900890<pre><code>breakfast bullhead
Eric Park608ce5a2019-08-07 21:27:46 +0800891lunch bliss_bullhead-userdebug
892make blissify
Eric Parkc9931992019-07-29 13:10:53 +0900893</code></pre>
Eric Park608ce5a2019-08-07 21:27:46 +0800894<p>Sounds great, right? Once you have run the command, jump over to the next section.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900895<h3 id="after-building">After building</h3>
896<p>There are two outcomes to a build - either it fails and you get a red error message from <code>make</code>, or it succeeds and you see the Bliss logo in ASCII. If you encounter the former, you need to go back and fix whatever it's complaining about. Typically, 90% of the time the problem will be in your device tree. For the other 10%, submit a bug report to the ROM developers. Be sure to include the full log of your build to help diagnose the problem, and your device tree.</p>
897<p>If you face the latter, congratulations! You've successfully built BlissRoms for your device. Grab the artifacts for your device:</p>
898<pre><code>cd out/target/product/bullhead/
899</code></pre>
Eric Park608ce5a2019-08-07 21:27:46 +0800900<p>In here, you’ll find a <code>.zip</code> that goes along the lines of <code>Bliss-v11.9-Stable-bullhead-UNOFFICIAL-20190531.zip</code>. Install TWRP, flash the build to your device, and enjoy!</p>
Eric Parkc9931992019-07-29 13:10:53 +0900901<h3 id="troubleshooting">Troubleshooting</h3>
902<p>If your build failed, there are a couple things you can try.</p>
903<ul>
904<li>Try a fresh <code>repo sync</code> to make your repository up to date. Sometimes, the Internet connection between you and GitHub can be flaky. In rare cases a commit merge might be ongoing, and you might've grabbed an incomplete merge. Mostly, this should fix the issue 70% of the time.</li>
905<li>Make sure your dependencies are installed correctly. Error messages help out a lot here! Often it will say <code>shared/linked library not found</code> or something along those lines.</li>
906<li>Make sure you sourced <code>build/envsetup.sh</code>. This is especially common and worth suspecting if none of the build commands like <code>breakfast</code> and <code>lunch</code> work. If you have <code>repo sync</code>ed do this again.</li>
907<li>Make sure you’re at the root of the build tree. Again, to quickly jump there, use <code>croot</code>.</li>
908<li>Make sure you ran <code>breakfast</code> correctly and it did not error out. Missing device files will prevent successful builds.</li>
Eric Parkf1180122019-12-28 17:11:20 +0900909<li>Make sure your computer meets minimum requirements to compile AOSP. Chances are, you need more memory/CPU power to complete a build.</li>
910<li>Make sure your computer isn't faulty. This is unlikely, but to check, use a stress-test program like Prime95.</li>
Eric Parkc9931992019-07-29 13:10:53 +0900911</ul>
Eric Parkf1180122019-12-28 17:11:20 +0900912<p>If something goes wrong and you've tried everything above, first use Google to look up your error! Most of the errors you encounter is due to misconfiguration and wrong commands entered. More often than not, Google will have the answer you are looking for. If you're still stuck and nothing fixes the problem, then ask us via <a href="https://t.me/Team_Bliss_Build_Support">our Telegram Build Support chat.</a> (Please only ask issues about BlissRoms, not other custom ROMs as we are unable to assist with those!)</p>
Eric Parkc9931992019-07-29 13:10:53 +0900913<h3 id="conclusion">Conclusion</h3>
914<p>Building a ROM is very hard and tedious and the results are very rewarding! If you managed to follow along, congratulations!</p>
915<p>After you finish building, you can try out the Git Started guide. Make changes, commit, and send them off to our Gerrit for review! Or better yet, download experimental commits not ready for the mainline repositories and review them! Again, ROM building is a fun project you can work with. I hope this guide was a lot of fun to run through!</p>
916<p>-- Eric Park (ideaman924)</p>
917<h3 id="looking-for-the-next-tutorial">Looking for the next tutorial?</h3>
918<p>Check out <a href="../build-tips/">some tips to optimize your build experience.</a></p>
919
920
921
922
923
924
925
926
927
928 </article>
929 </div>
930 </div>
931 </main>
932
933
934<footer class="md-footer">
935
936 <div class="md-footer-nav">
937 <nav class="md-footer-nav__inner md-grid">
938
939 <a href="../" title="Index" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
940 <div class="md-flex__cell md-flex__cell--shrink">
941 <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
942 </div>
943 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
944 <span class="md-flex__ellipsis">
945 <span class="md-footer-nav__direction">
946 Previous
947 </span>
948 Index
949 </span>
950 </div>
951 </a>
952
953
954 <a href="../build-tips/" title="Build Tips" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
955 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
956 <span class="md-flex__ellipsis">
957 <span class="md-footer-nav__direction">
958 Next
959 </span>
960 Build Tips
961 </span>
962 </div>
963 <div class="md-flex__cell md-flex__cell--shrink">
964 <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
965 </div>
966 </a>
967
968 </nav>
969 </div>
970
971 <div class="md-footer-meta md-typeset">
972 <div class="md-footer-meta__inner md-grid">
973 <div class="md-footer-copyright">
974
975 powered by
976 <a href="https://www.mkdocs.org">MkDocs</a>
977 and
978 <a href="https://squidfunk.github.io/mkdocs-material/">
979 Material for MkDocs</a>
980 </div>
981
982 </div>
983 </div>
984</footer>
985
986 </div>
987
Eric Park45174ca2019-10-21 01:38:33 +0800988 <script src="../../assets/javascripts/application.ac79c3b0.js"></script>
Eric Parkc9931992019-07-29 13:10:53 +0900989
990 <script>app.initialize({version:"1.0.4",url:{base:"../.."}})</script>
991
992
993 </body>
994</html>