blob: 48bb2f7c69a52e4daffabf967b081e05fe8dc069 [file] [log] [blame]
Eric Park5e3a1012019-08-12 13:17:03 +08001
Eric Park5e3a1012019-08-12 13:17:03 +08002<!doctype html>
3<html lang="en" class="no-js">
4 <head>
5
6 <meta charset="utf-8">
7 <meta name="viewport" content="width=device-width,initial-scale=1">
Eric Park5e3a1012019-08-12 13:17:03 +08008
9
10
Eric Park5e3a1012019-08-12 13:17:03 +080011 <link rel="shortcut icon" href="../../assets/images/favicon.png">
Eric Park8fd7bfb2020-10-02 19:05:33 +090012 <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1">
Eric Park5e3a1012019-08-12 13:17:03 +080013
14
15
16 <title>Build Guide - Team Bliss</title>
17
18
19
Eric Park8fd7bfb2020-10-02 19:05:33 +090020 <link rel="stylesheet" href="../../assets/stylesheets/main.38780c08.min.css">
Eric Park5e3a1012019-08-12 13:17:03 +080021
Eric Park8fd7bfb2020-10-02 19:05:33 +090022
23 <link rel="stylesheet" href="../../assets/stylesheets/palette.3f72e892.min.css">
24
Eric Park5e3a1012019-08-12 13:17:03 +080025
26
27
Eric Park5e3a1012019-08-12 13:17:03 +080028
29
Eric Park8fd7bfb2020-10-02 19:05:33 +090030
Eric Park5e3a1012019-08-12 13:17:03 +080031 <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
Eric Park8fd7bfb2020-10-02 19:05:33 +090032 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
33 <style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style>
Eric Park5e3a1012019-08-12 13:17:03 +080034
35
Eric Park5e3a1012019-08-12 13:17:03 +080036
37
38
39
40
41
42 </head>
43
Eric Park5e3a1012019-08-12 13:17:03 +080044
Eric Park8fd7bfb2020-10-02 19:05:33 +090045
46
47
48
49
50 <body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none">
51
52
Eric Park5e3a1012019-08-12 13:17:03 +080053 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
54 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
Eric Park8fd7bfb2020-10-02 19:05:33 +090055 <label class="md-overlay" for="__drawer"></label>
56 <div data-md-component="skip">
57
58
59 <a href="#build-guide" class="md-skip">
60 Skip to content
61 </a>
62
63 </div>
64 <div data-md-component="announce">
65
66 </div>
Eric Park5e3a1012019-08-12 13:17:03 +080067
68 <header class="md-header" data-md-component="header">
Eric Park8fd7bfb2020-10-02 19:05:33 +090069 <nav class="md-header-nav md-grid" aria-label="Header">
70 <a href="../.." title="Team Bliss" class="md-header-nav__button md-logo" aria-label="Team Bliss">
71
72
73 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
74
75 </a>
76 <label class="md-header-nav__button md-icon" for="__drawer">
77 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
78 </label>
79 <div class="md-header-nav__title" data-md-component="header-title">
80
81 <div class="md-header-nav__ellipsis">
82 <span class="md-header-nav__topic md-ellipsis">
83 Team Bliss
84 </span>
85 <span class="md-header-nav__topic md-ellipsis">
86
87 Build Guide
88
89 </span>
Eric Park5e3a1012019-08-12 13:17:03 +080090 </div>
Eric Park8fd7bfb2020-10-02 19:05:33 +090091
92 </div>
93
94 <label class="md-header-nav__button md-icon" for="__search">
95 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
96 </label>
97
Eric Park5e3a1012019-08-12 13:17:03 +080098<div class="md-search" data-md-component="search" role="dialog">
99 <label class="md-search__overlay" for="__search"></label>
100 <div class="md-search__inner" role="search">
101 <form class="md-search__form" name="search">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900102 <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active">
103 <label class="md-search__icon md-icon" for="__search">
104 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
105 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
106 </label>
107 <button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1">
108 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
Eric Park5e3a1012019-08-12 13:17:03 +0800109 </button>
110 </form>
111 <div class="md-search__output">
112 <div class="md-search__scrollwrap" data-md-scrollfix>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900113 <div class="md-search-result" data-md-component="search-result">
Eric Park5e3a1012019-08-12 13:17:03 +0800114 <div class="md-search-result__meta">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900115 Initializing search
Eric Park5e3a1012019-08-12 13:17:03 +0800116 </div>
117 <ol class="md-search-result__list"></ol>
118 </div>
119 </div>
120 </div>
121 </div>
122</div>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900123
124
Eric Park5e3a1012019-08-12 13:17:03 +0800125 </nav>
126</header>
127
Eric Park8fd7bfb2020-10-02 19:05:33 +0900128 <div class="md-container" data-md-component="container">
129
Eric Park5e3a1012019-08-12 13:17:03 +0800130
131
132
Eric Park8fd7bfb2020-10-02 19:05:33 +0900133 <main class="md-main" data-md-component="main">
134 <div class="md-main__inner md-grid">
Eric Park5e3a1012019-08-12 13:17:03 +0800135
136
137 <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
138 <div class="md-sidebar__scrollwrap">
139 <div class="md-sidebar__inner">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900140 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
141 <label class="md-nav__title" for="__drawer">
142 <a href="../.." title="Team Bliss" class="md-nav__button md-logo" aria-label="Team Bliss">
Eric Park5e3a1012019-08-12 13:17:03 +0800143
Eric Park8fd7bfb2020-10-02 19:05:33 +0900144
145 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
146
Eric Park5e3a1012019-08-12 13:17:03 +0800147 </a>
148 Team Bliss
149 </label>
150
151 <ul class="md-nav__list" data-md-scrollfix>
152
153
154
155
156
157
158 <li class="md-nav__item">
159 <a href="../.." title="Home" class="md-nav__link">
160 Home
161 </a>
162 </li>
163
164
165
166
167
168
169
170
171
172 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
173
Eric Park8fd7bfb2020-10-02 19:05:33 +0900174 <input class="md-nav__toggle md-toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2" checked>
Eric Park5e3a1012019-08-12 13:17:03 +0800175
176 <label class="md-nav__link" for="nav-2">
177 Bliss OS
Eric Park8fd7bfb2020-10-02 19:05:33 +0900178 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800179 </label>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900180 <nav class="md-nav" aria-label="Bliss OS" data-md-level="1">
Eric Park5e3a1012019-08-12 13:17:03 +0800181 <label class="md-nav__title" for="nav-2">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900182 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800183 Bliss OS
184 </label>
185 <ul class="md-nav__list" data-md-scrollfix>
186
187
188
189
190
191
192
193 <li class="md-nav__item">
194 <a href="../" title="Index" class="md-nav__link">
195 Index
196 </a>
197 </li>
198
199
200
201
202
203
204
205
206
207 <li class="md-nav__item md-nav__item--active">
208
Eric Park8fd7bfb2020-10-02 19:05:33 +0900209 <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
Eric Park5e3a1012019-08-12 13:17:03 +0800210
211
212
213
214 <label class="md-nav__link md-nav__link--active" for="__toc">
215 Build Guide
Eric Park8fd7bfb2020-10-02 19:05:33 +0900216 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800217 </label>
218
219 <a href="./" title="Build Guide" class="md-nav__link md-nav__link--active">
220 Build Guide
221 </a>
222
223
Eric Park8fd7bfb2020-10-02 19:05:33 +0900224<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
Eric Park5e3a1012019-08-12 13:17:03 +0800225
226
227
228
229
Eric Park8fd7bfb2020-10-02 19:05:33 +0900230 <label class="md-nav__title" for="__toc">
231 <span class="md-nav__icon md-icon"></span>
232 Table of contents
233 </label>
Eric Park5e3a1012019-08-12 13:17:03 +0800234 <ul class="md-nav__list" data-md-scrollfix>
235
236 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800237 <a href="#introduction" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800238 Introduction
239 </a>
240
241</li>
242
243 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800244 <a href="#preparation" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800245 Preparation
246 </a>
247
248</li>
249
250 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800251 <a href="#install-the-jdk" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800252 Install the JDK
253 </a>
254
255</li>
256
257 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800258 <a href="#install-build-tools" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800259 Install build tools
260 </a>
261
262</li>
263
264 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800265 <a href="#install-source-code-tools" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800266 Install source code tools
267 </a>
268
Eric Park8fd7bfb2020-10-02 19:05:33 +0900269 <nav class="md-nav" aria-label="Install source code tools">
Eric Park5e3a1012019-08-12 13:17:03 +0800270 <ul class="md-nav__list">
271
272 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800273 <a href="#what-is-source" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800274 What is source?
275 </a>
276
277</li>
278
279 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800280 <a href="#what-if-i-need-repo-globally" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800281 What if I need repo globally?
282 </a>
283
284</li>
285
286 </ul>
287 </nav>
288
289</li>
290
291 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800292 <a href="#download" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800293 Download
294 </a>
295
Eric Park8fd7bfb2020-10-02 19:05:33 +0900296 <nav class="md-nav" aria-label="Download">
Eric Park5e3a1012019-08-12 13:17:03 +0800297 <ul class="md-nav__list">
298
299 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800300 <a href="#i-still-dont-know-how-much-cpu-threads-i-have-how-do-i-check" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800301 I still don't know how much CPU threads I have. How do I check?
302 </a>
303
304</li>
305
306 </ul>
307 </nav>
308
309</li>
310
311 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800312 <a href="#easy-build-instructions" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800313 Easy Build Instructions
314 </a>
315
316</li>
317
318 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800319 <a href="#advanced-build-instructions" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800320 Advanced Build Instructions
321 </a>
322
Eric Park8fd7bfb2020-10-02 19:05:33 +0900323 <nav class="md-nav" aria-label="Advanced Build Instructions">
Eric Park5e3a1012019-08-12 13:17:03 +0800324 <ul class="md-nav__list">
325
326 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800327 <a href="#my-device-isnt-booting-and-userdebug-wont-print-any-adb-logcats-what-gives" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800328 My device isn't booting, and userdebug won't print any adb logcats. What gives?
329 </a>
330
331</li>
332
333 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800334 <a href="#why-mka-and-not-make" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800335 Why mka and not make?
336 </a>
337
338</li>
339
340 </ul>
341 </nav>
342
343</li>
344
345 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800346 <a href="#after-building" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800347 After building
348 </a>
349
350</li>
351
352 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800353 <a href="#changing-the-target-kernel-branch" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800354 Changing the target kernel branch
355 </a>
356
Eric Park8fd7bfb2020-10-02 19:05:33 +0900357 <nav class="md-nav" aria-label="Changing the target kernel branch">
Eric Park5e3a1012019-08-12 13:17:03 +0800358 <ul class="md-nav__list">
359
360 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800361 <a href="#switching-the-kernel-branch" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800362 Switching the kernel branch
363 </a>
364
365</li>
366
367 </ul>
368 </nav>
369
370</li>
371
372 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800373 <a href="#using-the-patch-system-for-testing" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800374 Using the patch system for testing
375 </a>
376
377</li>
378
379 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800380 <a href="#troubleshooting" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800381 Troubleshooting
382 </a>
383
384</li>
385
386 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800387 <a href="#conclusion" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800388 Conclusion
389 </a>
390
391</li>
392
Eric Park5e3a1012019-08-12 13:17:03 +0800393 </ul>
394
395</nav>
396
397 </li>
398
399
400
401
402
403
404
405 <li class="md-nav__item">
406 <a href="../extras/" title="Extras" class="md-nav__link">
407 Extras
408 </a>
409 </li>
410
411
412
413
414
415
416
417 <li class="md-nav__item">
Eric Parkd09b00e2020-02-15 11:07:48 +0900418 <a href="../installation-guide-misc/" title="Installation Guide (Misc)" class="md-nav__link">
419 Installation Guide (Misc)
420 </a>
421 </li>
422
423
424
425
426
427
428
429 <li class="md-nav__item">
430 <a href="../installation-guide-surface-devices/" title="Installation Guide (Surface devices)" class="md-nav__link">
431 Installation Guide (Surface devices)
432 </a>
433 </li>
434
435
436
437
438
439
440
441 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800442 <a href="../installation-guide/" title="Installation Guide" class="md-nav__link">
443 Installation Guide
444 </a>
445 </li>
446
447
448
449
450
451
452
453 <li class="md-nav__item">
Eric Park0509f652020-03-01 01:54:39 +0900454 <a href="../taking-bug-reports/" title="Taking bug reports" class="md-nav__link">
455 Taking bug reports
456 </a>
457 </li>
458
459
460
461
462
463
464
465 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800466 <a href="../troubleshooting/" title="Troubleshooting" class="md-nav__link">
467 Troubleshooting
468 </a>
469 </li>
470
471
472 </ul>
473 </nav>
474 </li>
475
476
477
478
479
480
481
482 <li class="md-nav__item md-nav__item--nested">
483
Eric Park8fd7bfb2020-10-02 19:05:33 +0900484 <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
Eric Park5e3a1012019-08-12 13:17:03 +0800485
486 <label class="md-nav__link" for="nav-3">
487 BlissRoms
Eric Park8fd7bfb2020-10-02 19:05:33 +0900488 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800489 </label>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900490 <nav class="md-nav" aria-label="BlissRoms" data-md-level="1">
Eric Park5e3a1012019-08-12 13:17:03 +0800491 <label class="md-nav__title" for="nav-3">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900492 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800493 BlissRoms
494 </label>
495 <ul class="md-nav__list" data-md-scrollfix>
496
497
498
499
500
501
502
503 <li class="md-nav__item">
504 <a href="../../BlissRoms/" title="Index" class="md-nav__link">
505 Index
506 </a>
507 </li>
508
509
510
511
512
513
514
515 <li class="md-nav__item">
516 <a href="../../BlissRoms/build-guide/" title="Build Guide" class="md-nav__link">
517 Build Guide
518 </a>
519 </li>
520
521
522
523
524
525
526
527 <li class="md-nav__item">
528 <a href="../../BlissRoms/build-tips/" title="Build Tips" class="md-nav__link">
529 Build Tips
530 </a>
531 </li>
532
533
534 </ul>
535 </nav>
536 </li>
537
538
539
540
541
542
543
544 <li class="md-nav__item md-nav__item--nested">
545
Eric Park8fd7bfb2020-10-02 19:05:33 +0900546 <input class="md-nav__toggle md-toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">
Eric Park5e3a1012019-08-12 13:17:03 +0800547
548 <label class="md-nav__link" for="nav-4">
549 Common
Eric Park8fd7bfb2020-10-02 19:05:33 +0900550 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800551 </label>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900552 <nav class="md-nav" aria-label="Common" data-md-level="1">
Eric Park5e3a1012019-08-12 13:17:03 +0800553 <label class="md-nav__title" for="nav-4">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900554 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800555 Common
556 </label>
557 <ul class="md-nav__list" data-md-scrollfix>
558
559
560
561
562
563
564
565 <li class="md-nav__item">
566 <a href="../../common/" title="Index" class="md-nav__link">
567 Index
568 </a>
569 </li>
570
571
572
573
574
575
576
577 <li class="md-nav__item">
578 <a href="../../common/git-started/" title="Git Started" class="md-nav__link">
579 Git Started
580 </a>
581 </li>
582
583
584
585
586
587
588
589 <li class="md-nav__item">
Eric Park8584eda2019-09-02 09:45:55 +0800590 <a href="../../common/maintaining-proper-authorship/" title="Maintaining proper authorship" class="md-nav__link">
591 Maintaining proper authorship
592 </a>
593 </li>
594
595
596
597
598
599
600
601 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800602 <a href="../../common/using-dippy-bird/" title="Using `dippy-bird`" class="md-nav__link">
603 Using `dippy-bird`
604 </a>
605 </li>
606
607
608 </ul>
609 </nav>
610 </li>
611
612
613
614
615
616
617
618 <li class="md-nav__item md-nav__item--nested">
619
Eric Park8fd7bfb2020-10-02 19:05:33 +0900620 <input class="md-nav__toggle md-toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
Eric Park5e3a1012019-08-12 13:17:03 +0800621
622 <label class="md-nav__link" for="nav-5">
623 Infrastructure
Eric Park8fd7bfb2020-10-02 19:05:33 +0900624 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800625 </label>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900626 <nav class="md-nav" aria-label="Infrastructure" data-md-level="1">
Eric Park5e3a1012019-08-12 13:17:03 +0800627 <label class="md-nav__title" for="nav-5">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900628 <span class="md-nav__icon md-icon"></span>
Eric Park5e3a1012019-08-12 13:17:03 +0800629 Infrastructure
630 </label>
631 <ul class="md-nav__list" data-md-scrollfix>
632
633
634
635
636
637
638
639 <li class="md-nav__item">
640 <a href="../../infrastructure/" title="Index" class="md-nav__link">
641 Index
642 </a>
643 </li>
644
645
646 </ul>
647 </nav>
648 </li>
649
650
651 </ul>
652</nav>
653 </div>
654 </div>
655 </div>
656
657
658 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
659 <div class="md-sidebar__scrollwrap">
660 <div class="md-sidebar__inner">
661
Eric Park8fd7bfb2020-10-02 19:05:33 +0900662<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
Eric Park5e3a1012019-08-12 13:17:03 +0800663
664
665
666
667
Eric Park8fd7bfb2020-10-02 19:05:33 +0900668 <label class="md-nav__title" for="__toc">
669 <span class="md-nav__icon md-icon"></span>
670 Table of contents
671 </label>
Eric Park5e3a1012019-08-12 13:17:03 +0800672 <ul class="md-nav__list" data-md-scrollfix>
673
674 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800675 <a href="#introduction" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800676 Introduction
677 </a>
678
679</li>
680
681 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800682 <a href="#preparation" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800683 Preparation
684 </a>
685
686</li>
687
688 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800689 <a href="#install-the-jdk" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800690 Install the JDK
691 </a>
692
693</li>
694
695 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800696 <a href="#install-build-tools" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800697 Install build tools
698 </a>
699
700</li>
701
702 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800703 <a href="#install-source-code-tools" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800704 Install source code tools
705 </a>
706
Eric Park8fd7bfb2020-10-02 19:05:33 +0900707 <nav class="md-nav" aria-label="Install source code tools">
Eric Park5e3a1012019-08-12 13:17:03 +0800708 <ul class="md-nav__list">
709
710 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800711 <a href="#what-is-source" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800712 What is source?
713 </a>
714
715</li>
716
717 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800718 <a href="#what-if-i-need-repo-globally" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800719 What if I need repo globally?
720 </a>
721
722</li>
723
724 </ul>
725 </nav>
726
727</li>
728
729 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800730 <a href="#download" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800731 Download
732 </a>
733
Eric Park8fd7bfb2020-10-02 19:05:33 +0900734 <nav class="md-nav" aria-label="Download">
Eric Park5e3a1012019-08-12 13:17:03 +0800735 <ul class="md-nav__list">
736
737 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800738 <a href="#i-still-dont-know-how-much-cpu-threads-i-have-how-do-i-check" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800739 I still don't know how much CPU threads I have. How do I check?
740 </a>
741
742</li>
743
744 </ul>
745 </nav>
746
747</li>
748
749 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800750 <a href="#easy-build-instructions" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800751 Easy Build Instructions
752 </a>
753
754</li>
755
756 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800757 <a href="#advanced-build-instructions" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800758 Advanced Build Instructions
759 </a>
760
Eric Park8fd7bfb2020-10-02 19:05:33 +0900761 <nav class="md-nav" aria-label="Advanced Build Instructions">
Eric Park5e3a1012019-08-12 13:17:03 +0800762 <ul class="md-nav__list">
763
764 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800765 <a href="#my-device-isnt-booting-and-userdebug-wont-print-any-adb-logcats-what-gives" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800766 My device isn't booting, and userdebug won't print any adb logcats. What gives?
767 </a>
768
769</li>
770
771 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800772 <a href="#why-mka-and-not-make" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800773 Why mka and not make?
774 </a>
775
776</li>
777
778 </ul>
779 </nav>
780
781</li>
782
783 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800784 <a href="#after-building" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800785 After building
786 </a>
787
788</li>
789
790 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800791 <a href="#changing-the-target-kernel-branch" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800792 Changing the target kernel branch
793 </a>
794
Eric Park8fd7bfb2020-10-02 19:05:33 +0900795 <nav class="md-nav" aria-label="Changing the target kernel branch">
Eric Park5e3a1012019-08-12 13:17:03 +0800796 <ul class="md-nav__list">
797
798 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800799 <a href="#switching-the-kernel-branch" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800800 Switching the kernel branch
801 </a>
802
803</li>
804
805 </ul>
806 </nav>
807
808</li>
809
810 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800811 <a href="#using-the-patch-system-for-testing" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800812 Using the patch system for testing
813 </a>
814
815</li>
816
817 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800818 <a href="#troubleshooting" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800819 Troubleshooting
820 </a>
821
822</li>
823
824 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800825 <a href="#conclusion" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800826 Conclusion
827 </a>
828
829</li>
830
Eric Park5e3a1012019-08-12 13:17:03 +0800831 </ul>
832
833</nav>
834 </div>
835 </div>
836 </div>
837
838
839 <div class="md-content">
840 <article class="md-content__inner md-typeset">
841
842
843
844 <h1 id="build-guide">Build Guide</h1>
845<h2 id="introduction">Introduction</h2>
846<p>This is the official guide to build Bliss OS for PCs. In this guide, we will only cover building for x86 &amp; x86_64 devices. We will also go over the details of using the patch system for testing and recompiling a build with a different kernel branch.</p>
847<p>The golden rule to building is patience. If something breaks, pay attention to the console output or take logs of the issue and ask for guidance in our build support chat.</p>
848<p>Let’s get started.</p>
849<h2 id="preparation">Preparation</h2>
850<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>
851<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>
852<h2 id="install-the-jdk">Install the JDK</h2>
853<p>Install OpenJDK:</p>
854<pre><code>sudo apt install openjdk-8-jdk
855</code></pre>
856<h2 id="install-build-tools">Install build tools</h2>
857<p>To install the required build tools, run the following command:</p>
858<pre><code>sudo apt-get install git-core gnupg flex bison maven gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip squashfs-tools python-mako libssl-dev ninja-build lunzip syslinux syslinux-utils gettext genisoimage gettext bc xorriso libncurses5
859</code></pre>
860<h2 id="install-source-code-tools">Install source code tools</h2>
861<p>Now we need to get the source code via a program named <code>repo</code>, made by Google. The primary function of <code>repo</code> is to read a manifest file located in Bliss OS's GitHub organization, and find what repositories you need to actually build Android.</p>
862<p>Create a <code>~/bin</code> directory for <code>repo</code>:</p>
863<pre><code>mkdir -p ~/bin
864</code></pre>
865<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>
866<pre><code>curl https://storage.googleapis.com/git-repo-downloads/repo &gt; ~/bin/repo
867</code></pre>
868<p>Make <code>repo</code> executable:</p>
869<pre><code>chmod a+x ~/bin/repo
870</code></pre>
871<p>And add it to PATH:</p>
872<pre><code>nano .bashrc
873</code></pre>
874<p>Scroll to the end of the file and type these lines:</p>
875<pre><code># Export ~/bin
876export PATH=~/bin:$PATH
877</code></pre>
878<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>
879<pre><code>source .bashrc
880</code></pre>
881<p>Which can be shortened to:</p>
882<pre><code>. .bashrc
883</code></pre>
884<h3 id="what-is-source">What is <code>source</code>?</h3>
885<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>
886<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>
887<h3 id="what-if-i-need-repo-globally">What if I need <code>repo</code> globally?</h3>
888<p>If you need the <code>repo</code> tool to be available anywhere, you will need to first download <code>repo</code> to your home directory, move it with <code>sudo</code> and give it executable permissions. The exact commands are as follows:</p>
889<pre><code>curl https://storage.googleapis.com/git-repo-downloads/repo &gt; ~/repo
890sudo mv ~/repo /usr/bin/
891chmod a+x /usr/bin/repo
892</code></pre>
893<p><code>repo</code> will now work anywhere, without any <code>.bashrc</code> modifications. However, these steps aren’t recommended as <code>repo</code> might become a security risk if a vulnerability is found.</p>
894<p>Now we’re ready to download the source code.</p>
895<h2 id="download">Download</h2>
896<p>Create a directory for the source:</p>
897<pre><code>mkdir -p ~/blissos/p9.0
898cd ~/blissos/p9.0
899</code></pre>
900<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>
901<pre><code>git config --global user.email “randy.mcrandyface@hotmail.net”
902git config --global user.name “Randy McRandyface”
903</code></pre>
904<p>Now, we’re ready to initialize. We need to tell <code>repo</code> which manifest to read:</p>
905<pre><code>repo init -u https://github.com/BlissRoms-x86/manifest.git -b p9.0-x86
906</code></pre>
907<p><code>-b</code> is for the branch, and we’re on <code>p9.0-x86</code>, Android Pie. It’ll take a couple of seconds. You may need to type <code>y</code> for the color prompt.</p>
908<p>Sync repo :</p>
909<pre><code>repo sync -j24 -c --no-tags --no-clone-bundle
910</code></pre>
911<p>Problems syncing? :</p>
912<pre><code>repo sync -j4 -c --no-tags --no-clone-bundle --force-sync
913</code></pre>
914<p><code>-j</code> is for threads. Typically, your CPU core count is your thread count, unless you’re using an older Intel CPU with hyperthreading. In that case, the thread count is double the count of your CPU cores. Newer CPUs have dropped hyperthreading unless you have the i9, so check how many threads you have. If you have four threads, you would run:</p>
915<pre><code>repo sync -j4 -c
916</code></pre>
917<p><code>-c</code> is for pulling in only the current branch, instead of the entire history. This is useful if you need the downloads fast and don’t want the entire history to be downloaded. This is used by default unless specified otherwise.</p>
918<h3 id="i-still-dont-know-how-much-cpu-threads-i-have-how-do-i-check">I still don't know how much CPU threads I have. How do I check?</h3>
919<p>Run <code>nproc</code>. The output should be something like this:</p>
920<pre><code>mybuildbox@test:~$ nproc
92124
922</code></pre>
923<p>This means that there are 24 threads in your machine.</p>
924<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>
925<h2 id="easy-build-instructions">Easy Build Instructions</h2>
926<p>This will build an x86 based .ISO for PCs.</p>
927<p>Usage: <code>$ bash build-x86.sh options buildVariants blissBranch extraOptions</code>
928Options:</p>
929<pre><code>-c | --clean : Does make clean &amp;&amp; make clobber and resets the efi device tree
930-s | --sync: Repo syncs the rom (clears out patches), then reapplies patches to needed repos
931-p | --patch: Just applies patches to needed repos
932-r | --proprietary: build needed items from proprietary vendor (non-public)
933</code></pre>
934<p>BuildVariants:</p>
935<pre><code>android_x86-user : Make user build
936android_x86-userdebug |: Make userdebug build
937android_x86-eng : Make eng build
938android_x86_64-user : Make user build
939android_x86_64-userdebug |: Make userdebug build
940android_x86_64-eng : Make eng build
941</code></pre>
942<p>BlissBranch:</p>
943<pre><code>select which bliss branch to sync, default is p9.0
944</code></pre>
945<p>ExtraOptions:</p>
946<pre><code>foss : packages microG &amp; FDroid with the build
947go : packages Gapps Go with the build
948gapps : packages OpenGapps with the build
949gms : packages GMS with the build (requires private repo access)
950none : force all extraOption flags to false.
951</code></pre>
952<p>To start, you must first use the -s (--sync) flag, then on following builds, it is not needed. Initial generation of the proprietary files from ChromeOS are also needed on the first build. We are able to use the -r (--proprietary) flag for that.
953<strong>This step needs to be on its own because the mounting process requires root permissions, so keep a look out for it asking for your root password</strong>.</p>
954<p>First you must sync with the new manifest changes:</p>
955<pre><code>bash build-x86.sh -p
956</code></pre>
957<p>This will do initial patching. Some of the patches will show as <code>already applied</code> or <code>conflict</code>. This is normal behavior and will not effect the build process if you continue to the next step without addressing any of the conflicts.</p>
958<p><strong>The only times you should worry about the conflicts is when you are adding or changing patches in <code>vendor/x86</code></strong>.</p>
959<p>Next step is to download the proprietary files from ChromeOS:</p>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900960<pre><code>mkdir vendor/bliss_priv/proprietary
961mkdir vendor/bliss_priv/source
Eric Park5e3a1012019-08-12 13:17:03 +0800962bash build-x86.sh -r android_x86_64-userdebug
963</code></pre>
964<p>After that, you can build your release file:</p>
965<pre><code>bash build-x86.sh android_x86_64-userdebug (to build the userdebug version for x86_64 CPUs)
966</code></pre>
967<h2 id="advanced-build-instructions">Advanced Build Instructions</h2>
968<p>Set up the build environment:</p>
969<pre><code>. build/envsetup.sh
970</code></pre>
971<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>
972<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>
973<p>For 32 bit devices:</p>
974<pre><code>lunch android_x86-userdebug
975</code></pre>
976<p>For 64 bit devices:</p>
977<pre><code>lunch android_x86_64-userdebug
978</code></pre>
979<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>x86</code> or <code>x86_64</code> is the specific device we are building. 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>
980<h3 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?</h3>
981<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>
982<p>If this is the first time you're running the build, you're going to want to run the proprietary build command first from the easy build instructions. Alternatively, you could also run those commands manually.</p>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900983<pre><code>mkdir vendor/bliss_priv/proprietary &amp;&amp; mkdir vendor/bliss_priv/source
Eric Park5e3a1012019-08-12 13:17:03 +0800984</code></pre>
985<p>Then:</p>
986<pre><code>lunch android_x86_64-userdebug
987mka update_engine_applier
988mka proprietary
989</code></pre>
990<p>After that is complete, we can start the main building process. Run:</p>
991<p><code>mka iso_img</code></p>
992<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>
993<h3 id="why-mka-and-not-make">Why <code>mka</code> and not <code>make</code>?</h3>
994<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>
995<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 -j#</code>, replacing the hash with the number of threads (example of <code>make -j4</code>).</p>
996<h2 id="after-building">After building</h2>
997<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>
998<p>If you face the latter, congratulations! You've successfully built BlissRoms for your device. Grab the artifacts for your device:</p>
999<pre><code>cd out/target/product/x86_64/
1000</code></pre>
1001<p>In here, you’ll find an <code>.iso</code> that goes along the lines of <code>Bliss-v11.9--OFFICIAL-20190801-1619_x86_64_k-k4.9.153_m-18.3.5-pie-x86-llvm80_f-dev-kernel.org.iso</code>.</p>
1002<h2 id="changing-the-target-kernel-branch">Changing the target kernel branch</h2>
1003<p>Sometimes, you might be working on a device that requires a different kernel branch. In order to switch kernels effectively on Bliss OS, they need to be compiled with the OS at build time.</p>
1004<h3 id="switching-the-kernel-branch">Switching the kernel branch</h3>
1005<p>Start off by entering the kernel folder</p>
1006<pre><code>cd kernel
1007</code></pre>
1008<p>Then pull all the available kernel branched from your target repo. In this case, we are using the default <code>BR-x86</code> repo</p>
1009<pre><code>git fetch BR-x86
1010</code></pre>
1011<p>Then after that is finished, we need to checkout our target branch, and in this example we are choosing our <code>k4.19.50-ax86-ga</code> branch, which has added commits from the GalliumOS project for Chromebooks</p>
1012<pre><code>git checkout BR-x86/k4.19.50-ax86-ga
1013</code></pre>
1014<p>Next step is to clean out any configs or generated files from the previously checked out kernel. To do this, run these commands</p>
1015<pre><code>make clean
1016make mrproper
1017</code></pre>
1018<p>Once that is done, we can <code>cd</code> back to our main project folder</p>
1019<pre><code>cd ..
1020</code></pre>
1021<p>And run our build command again to generate the <code>.iso</code> with the target kernel we selected</p>
1022<pre><code>rm -rf out/target/product/x86_64/kernel
1023mka iso_img
1024</code></pre>
1025<h2 id="using-the-patch-system-for-testing">Using the patch system for testing</h2>
1026<p>We use a patching method we adapted for Bliss from Intel's Project Celadon &amp; phh-treble. This patching system allows us to bring in a good number of commits to add to the OS, and test how they apply or if there are any conflicts.</p>
1027<p>Our intention was to make a system that can add all the needed x86/x86_64 commits to BlissROM, as well as other ROMs too.</p>
1028<p>The majority of this system is found in <code>vendor/x86/utils</code>.</p>
1029<p>From here, you simply generate the <code>.patch</code> files from your additions, and add them to the mix.
1030In the following example, we are going to generate patches from <code>packages/apps/Settings</code> and add them to the proper folder for live testing.</p>
1031<p>From your Project folder:</p>
1032<pre><code>cd packages/apps/Settings
1033</code></pre>
1034<p>And generate your <code>.patch</code> files. For this example, we've added four commits on top of what was there after sync</p>
1035<pre><code>git format-patch -4
1036</code></pre>
1037<p>Then copy those files to the proper folder in <code>vendor/x86</code>. In this case, you will find it here:</p>
1038<pre><code>vendor/x86/utils/android_p/google_diff/x86
1039</code></pre>
1040<p>After that is complete, you can <code>make clean</code> and run the patch system from your main project folder.</p>
1041<pre><code>make clean
1042bash build-x86.sh -p
1043</code></pre>
1044<p>This should start patching all the source files. Once that is complete, you can rebuild.</p>
1045<h2 id="troubleshooting">Troubleshooting</h2>
1046<p>If your build failed, there are a couple things you can try.</p>
1047<ul>
1048<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>
1049<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>
1050<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>
1051<li>Make sure you’re at the root of the build tree. Again, to quickly jump there, use <code>croot</code>.</li>
1052<li>Make sure your computer itself isn’t faulty. HDDs usually die first, followed by RAM. SSDs rarely die but failure is not unheard of. In extremely rare cases, your CPU may have a defect. If you're unsure, run a stress test using a program like Prime95.</li>
1053</ul>
1054<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 our Telegram Build Support chat.</p>
1055<h2 id="conclusion">Conclusion</h2>
1056<p>Building a ROM is very hard and tedious and the results are very rewarding! If you managed to follow along, congratulations!</p>
1057<p>After you finish building, you can try out the Git Started guide. Make changes, commit, and send them off to our GitHub for Bliss OS repos &amp; our Gerrit for review on BlissROMs repos! 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>
1058
Eric Park5e3a1012019-08-12 13:17:03 +08001059
1060
1061
1062
1063
1064
1065 </article>
1066 </div>
1067 </div>
1068 </main>
1069
1070
1071<footer class="md-footer">
1072
1073 <div class="md-footer-nav">
Eric Park8fd7bfb2020-10-02 19:05:33 +09001074 <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
Eric Park5e3a1012019-08-12 13:17:03 +08001075
Eric Park8fd7bfb2020-10-02 19:05:33 +09001076 <a href="../" title="Index" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
1077 <div class="md-footer-nav__button md-icon">
1078 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
Eric Park5e3a1012019-08-12 13:17:03 +08001079 </div>
Eric Park8fd7bfb2020-10-02 19:05:33 +09001080 <div class="md-footer-nav__title">
1081 <div class="md-ellipsis">
Eric Park5e3a1012019-08-12 13:17:03 +08001082 <span class="md-footer-nav__direction">
1083 Previous
1084 </span>
1085 Index
Eric Park8fd7bfb2020-10-02 19:05:33 +09001086 </div>
Eric Park5e3a1012019-08-12 13:17:03 +08001087 </div>
1088 </a>
1089
1090
Eric Park8fd7bfb2020-10-02 19:05:33 +09001091 <a href="../extras/" title="Extras" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
1092 <div class="md-footer-nav__title">
1093 <div class="md-ellipsis">
Eric Park5e3a1012019-08-12 13:17:03 +08001094 <span class="md-footer-nav__direction">
1095 Next
1096 </span>
1097 Extras
Eric Park8fd7bfb2020-10-02 19:05:33 +09001098 </div>
Eric Park5e3a1012019-08-12 13:17:03 +08001099 </div>
Eric Park8fd7bfb2020-10-02 19:05:33 +09001100 <div class="md-footer-nav__button md-icon">
1101 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
Eric Park5e3a1012019-08-12 13:17:03 +08001102 </div>
1103 </a>
1104
1105 </nav>
1106 </div>
1107
1108 <div class="md-footer-meta md-typeset">
1109 <div class="md-footer-meta__inner md-grid">
1110 <div class="md-footer-copyright">
1111
Eric Park8fd7bfb2020-10-02 19:05:33 +09001112 Made with
1113 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
1114 Material for MkDocs
1115 </a>
Eric Park5e3a1012019-08-12 13:17:03 +08001116 </div>
1117
1118 </div>
1119 </div>
1120</footer>
1121
1122 </div>
1123
Eric Park8fd7bfb2020-10-02 19:05:33 +09001124 <script src="../../assets/javascripts/vendor.77e55a48.min.js"></script>
1125 <script src="../../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
Eric Park5e3a1012019-08-12 13:17:03 +08001126
Eric Park8fd7bfb2020-10-02 19:05:33 +09001127 <script>
1128 app = initialize({
1129 base: "../..",
1130 features: [],
1131 search: Object.assign({
1132 worker: "../../assets/javascripts/worker/search.4ac00218.min.js"
1133 }, typeof search !== "undefined" && search)
1134 })
1135 </script>
Eric Park5e3a1012019-08-12 13:17:03 +08001136
1137
1138 </body>
1139</html>