blob: b14a4a947e8a0df1270c12cf291566504859edf6 [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
39 <title>Build Tips - Team Bliss</title>
40
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
78 <a href="#build-tips" tabindex="1" class="md-skip">
79 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
104 Build Tips
105
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 <li class="md-nav__item">
Eric Park608ce5a2019-08-07 21:27:46 +0800338 <a href="../build-guide/" title="Build Guide" class="md-nav__link">
339 Build Guide
Eric Parkc9931992019-07-29 13:10:53 +0900340 </a>
341 </li>
342
343
344
345
346
347
348
349
350
351 <li class="md-nav__item md-nav__item--active">
352
353 <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
354
355
356
357
358 <label class="md-nav__link md-nav__link--active" for="__toc">
359 Build Tips
360 </label>
361
362 <a href="./" title="Build Tips" class="md-nav__link md-nav__link--active">
363 Build Tips
364 </a>
365
366
367<nav class="md-nav md-nav--secondary">
368
369
370
371
372
373 <label class="md-nav__title" for="__toc">Table of contents</label>
374 <ul class="md-nav__list" data-md-scrollfix>
375
376 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800377 <a href="#repo-optimization-tips" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900378 repo optimization tips
379 </a>
380
381 <nav class="md-nav">
382 <ul class="md-nav__list">
383
384 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800385 <a href="#threads" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900386 Threads
387 </a>
388
389</li>
390
391 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900392 <a href="#current-branch-only" class="md-nav__link">
393 Current branch only
394 </a>
395
396</li>
397
398 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800399 <a href="#current-history-only" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900400 Current history only
401 </a>
402
403</li>
404
405 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800406 <a href="#minimal-fetch" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900407 Minimal fetch
408 </a>
409
410</li>
411
412 <li class="md-nav__item">
Eric Parkf7befcf2020-01-17 07:17:51 +0800413 <a href="#force-sync" class="md-nav__link">
414 Force sync
415 </a>
416
417 <nav class="md-nav">
418 <ul class="md-nav__list">
419
420 <li class="md-nav__item">
421 <a href="#why-not-use-f-as-well" class="md-nav__link">
422 Why not use -f as well?
423 </a>
424
425</li>
426
427 </ul>
428 </nav>
429
430</li>
431
432 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900433 <a href="#reposync-alias" class="md-nav__link">
434 reposync alias
Eric Parkc9931992019-07-29 13:10:53 +0900435 </a>
436
437</li>
438
439 </ul>
440 </nav>
441
442</li>
443
444 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900445 <a href="#delete-all-device-trees-and-local-manifests" class="md-nav__link">
446 Delete all device trees and local manifests
Eric Parkc9931992019-07-29 13:10:53 +0900447 </a>
448
449</li>
450
451 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800452 <a href="#github-cherry-pick" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900453 GitHub cherry-pick
454 </a>
455
456</li>
457
Eric Parkc9931992019-07-29 13:10:53 +0900458
459
460
461
462 </ul>
463
464</nav>
465
466 </li>
467
468
469 </ul>
470 </nav>
471 </li>
472
473
474
475
476
477
478
479 <li class="md-nav__item md-nav__item--nested">
480
481 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">
482
483 <label class="md-nav__link" for="nav-4">
484 Common
485 </label>
486 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
487 <label class="md-nav__title" for="nav-4">
488 Common
489 </label>
490 <ul class="md-nav__list" data-md-scrollfix>
491
492
493
494
495
496
497
498 <li class="md-nav__item">
499 <a href="../../common/" title="Index" class="md-nav__link">
500 Index
501 </a>
502 </li>
503
504
505
506
507
508
509
510 <li class="md-nav__item">
511 <a href="../../common/git-started/" title="Git Started" class="md-nav__link">
512 Git Started
513 </a>
514 </li>
515
516
Eric Park608ce5a2019-08-07 21:27:46 +0800517
518
519
520
521
522 <li class="md-nav__item">
Eric Park8584eda2019-09-02 09:45:55 +0800523 <a href="../../common/maintaining-proper-authorship/" title="Maintaining proper authorship" class="md-nav__link">
524 Maintaining proper authorship
525 </a>
526 </li>
527
528
529
530
531
532
533
534 <li class="md-nav__item">
Eric Park608ce5a2019-08-07 21:27:46 +0800535 <a href="../../common/using-dippy-bird/" title="Using `dippy-bird`" class="md-nav__link">
536 Using `dippy-bird`
537 </a>
538 </li>
539
540
Eric Parkc9931992019-07-29 13:10:53 +0900541 </ul>
542 </nav>
543 </li>
544
545
546
547
548
549
550
551 <li class="md-nav__item md-nav__item--nested">
552
553 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
554
555 <label class="md-nav__link" for="nav-5">
556 Infrastructure
557 </label>
558 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
559 <label class="md-nav__title" for="nav-5">
560 Infrastructure
561 </label>
562 <ul class="md-nav__list" data-md-scrollfix>
563
564
565
566
567
568
569
570 <li class="md-nav__item">
571 <a href="../../infrastructure/" title="Index" class="md-nav__link">
572 Index
573 </a>
574 </li>
575
576
577 </ul>
578 </nav>
579 </li>
580
581
582 </ul>
583</nav>
584 </div>
585 </div>
586 </div>
587
588
589 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
590 <div class="md-sidebar__scrollwrap">
591 <div class="md-sidebar__inner">
592
593<nav class="md-nav md-nav--secondary">
594
595
596
597
598
599 <label class="md-nav__title" for="__toc">Table of contents</label>
600 <ul class="md-nav__list" data-md-scrollfix>
601
602 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800603 <a href="#repo-optimization-tips" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900604 repo optimization tips
605 </a>
606
607 <nav class="md-nav">
608 <ul class="md-nav__list">
609
610 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800611 <a href="#threads" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900612 Threads
613 </a>
614
615</li>
616
617 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900618 <a href="#current-branch-only" class="md-nav__link">
619 Current branch only
620 </a>
621
622</li>
623
624 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800625 <a href="#current-history-only" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900626 Current history only
627 </a>
628
629</li>
630
631 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800632 <a href="#minimal-fetch" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900633 Minimal fetch
634 </a>
635
636</li>
637
638 <li class="md-nav__item">
Eric Parkf7befcf2020-01-17 07:17:51 +0800639 <a href="#force-sync" class="md-nav__link">
640 Force sync
641 </a>
642
643 <nav class="md-nav">
644 <ul class="md-nav__list">
645
646 <li class="md-nav__item">
647 <a href="#why-not-use-f-as-well" class="md-nav__link">
648 Why not use -f as well?
649 </a>
650
651</li>
652
653 </ul>
654 </nav>
655
656</li>
657
658 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900659 <a href="#reposync-alias" class="md-nav__link">
660 reposync alias
Eric Parkc9931992019-07-29 13:10:53 +0900661 </a>
662
663</li>
664
665 </ul>
666 </nav>
667
668</li>
669
670 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900671 <a href="#delete-all-device-trees-and-local-manifests" class="md-nav__link">
672 Delete all device trees and local manifests
Eric Parkc9931992019-07-29 13:10:53 +0900673 </a>
674
675</li>
676
677 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800678 <a href="#github-cherry-pick" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900679 GitHub cherry-pick
680 </a>
681
682</li>
683
Eric Parkc9931992019-07-29 13:10:53 +0900684
685
686
687
688 </ul>
689
690</nav>
691 </div>
692 </div>
693 </div>
694
695
696 <div class="md-content">
697 <article class="md-content__inner md-typeset">
698
699
700
701 <h1 id="build-tips">Build Tips</h1>
702<p>Here's a collective list of things you can try to improve your builds. Have fun!</p>
703<h2 id="repo-optimization-tips"><code>repo</code> optimization tips</h2>
704<h3 id="threads">Threads</h3>
Eric Parkf1180122019-12-28 17:11:20 +0900705<p>By default, <code>repo</code> only utilizes four threads (or whatever the ROM manifest declares.) If you have a stronger machine with more threads, you can increase this number. For example, to use 8 threads:</p>
706<pre><code>repo sync -j8
Eric Parkc9931992019-07-29 13:10:53 +0900707</code></pre>
Eric Parkf1180122019-12-28 17:11:20 +0900708<p>To use all of the threads on your machine, use:</p>
709<pre><code>repo sync -j$(nproc --all)
710</code></pre>
711<h3 id="current-branch-only">Current branch only</h3>
712<p>This is usually set by default in your ROM manifest, but just in case, you can tell <code>repo</code> to only fetch the branch you want to work on:</p>
Eric Parkc9931992019-07-29 13:10:53 +0900713<pre><code>repo sync -c
714</code></pre>
Eric Parkf1180122019-12-28 17:11:20 +0900715<h3 id="current-history-only">Current history only</h3>
716<p>To only download the most recent changes, use this flag:</p>
717<pre><code>repo sync --depth=1
718</code></pre>
719<p>This will make <code>repo</code> fetch the most recent changes.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900720<h3 id="minimal-fetch">Minimal fetch</h3>
721<p>To disable syncing clone bundles and tags, use:</p>
722<pre><code>repo sync --no-clone-bundle --no-tags
723</code></pre>
Eric Parkf1180122019-12-28 17:11:20 +0900724<p><code>repo</code> uses <code>git</code> bundles over HTTP to download repositories. To disable this behavior, we use the <code>--no-clone-bundle</code> flag. We also don't need all of the <code>git</code> tags in each repository, so we disable that too with <code>--no-tags</code>.</p>
Eric Parkf7befcf2020-01-17 07:17:51 +0800725<h3 id="force-sync">Force sync</h3>
726<p>Sometimes, bad Internet conditions may cause your <code>.repo</code> directory to become corrupt and not sync. <code>repo</code> keeps two copies of a repository - one under <code>.repo</code>, and one in the root of your source directory. If the repository in <code>.repo</code> is corrupted, it will not sync over to the source directory.</p>
727<p>To resolve this problem, you need to sometimes tell <code>repo</code> to forcefully sync the repository in <code>.repo</code> again with the remote repository so that changes can be synced over to the main source tree. Use the <code>--force-sync</code> flag to achieve this:</p>
728<pre><code>repo sync --force-sync
729</code></pre>
730<h4 id="why-not-use-f-as-well">Why not use <code>-f</code> as well?</h4>
731<p>Starting from <code>repo</code> 1.26, the use of the flags <code>-f</code> and <code>--force-sync</code> together has been deprecated. <code>repo</code> will warn you of this change if you try and use those two flags together. To make sure your scripts do not break in future <code>repo</code> versions, it is recommended to not use the <code>-f</code> flag at all.</p>
Eric Parkf1180122019-12-28 17:11:20 +0900732<h3 id="reposync-alias"><code>reposync</code> alias</h3>
733<pre><code>repo sync -c -j$(nproc --all) --no-clone-bundle --no-tags
Eric Parkc9931992019-07-29 13:10:53 +0900734</code></pre>
735<p>That's quite long! How about we add this to our <code>.bashrc</code> as a alias? That way, we only have to type one phrase for <code>bash</code> to automatically type that out for us.</p>
736<p>Open up <code>~/.bashrc</code> and add these lines:</p>
737<pre><code># Alias to sync
Eric Parkf1180122019-12-28 17:11:20 +0900738alias reposync='repo sync -c -j$(nproc --all) --no-clone-bundle --no-tags'
Eric Parkc9931992019-07-29 13:10:53 +0900739</code></pre>
740<p>This way, next time you want to sync, just type <code>reposync</code> and <code>bash</code> will substitute the command for you. Easy! Just don't forget to <code>source ~/.bashrc</code> otherwise <code>bash</code> will not know of this new alias.</p>
Eric Parkf1180122019-12-28 17:11:20 +0900741<h2 id="delete-all-device-trees-and-local-manifests">Delete all device trees and local manifests</h2>
742<p><strong>WARNING</strong>: If you have any changes in your device trees, commit them and push them to a remote repository. This tip will permanently delete your local changes, so back them up!</p>
743<p>While messing around with device specific folders, you may break something and the build process might not work. Or, you may have multiple devices synced and you want to delete it all and start over. This tip/command will let you delete only the device trees.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900744<p>Add this function to your <code>~/.bashrc</code>:</p>
Eric Parkf1180122019-12-28 17:11:20 +0900745<pre><code># Remove all device trees/local manifests
Eric Parkc9931992019-07-29 13:10:53 +0900746function resettree() {
747 rm -rf device kernel vendor out .repo/local_manifests
748 reposync
749}
750</code></pre>
751<p>Let's go over what this does, word by word:</p>
752<ul>
753<li><code>rm -rf</code>: Destructive command to erase all of the following:</li>
754<li><code>device</code> folder: Holds all device-related files</li>
755<li><code>kernel</code> folder: Holds all kernel-related files for devices</li>
756<li><code>vendor</code> folder: Holds all vendor-related files for devices AND ROM-specific vendor customizations</li>
757<li><code>out</code> folder: Stores artifacts of builds</li>
758<li><code>.repo/local_manifests</code> folder: Stores "manifest" information of devices to sync.</li>
759<li><code>reposync</code>: Executes the <code>repo sync</code> alias we made earlier.</li>
760</ul>
761<p>The last line is important, because by deleting the <code>vendor</code> folder, we also delete some crucial files for building Bliss. To fix that, we rerun a sync. Note that because we did not delete any other folders, syncing and updating files only take a fraction of a time compared to starting from scratch.</p>
Eric Parkf1180122019-12-28 17:11:20 +0900762<p>After running <code>resettree</code>, make sure to initialize a new tree by running <code>breakfast &lt;devicename&gt;</code>.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900763<h2 id="github-cherry-pick">GitHub cherry-pick</h2>
764<p>Thanks to @blueyes for providing the script!</p>
765<p>Copy the following into your <code>~/.bashrc</code>:</p>
766<pre><code>function gcp() {
767 COMMIT=`echo "$1" | cut -d/ -f6`
768 GH=`echo "$1" | cut -d/ -f1-3`
769 if [ "$COMMIT" != "commit" ]; then
770 echo -e "Please use a commit URL."
771 elif [ "$GH" != "https://github.com" ]; then
772 echo -e "Please use an https://github.com/ URL."
773 else
774 PROJECT=`echo "$1" | cut -d/ -f1-5`
775 git fetch $PROJECT
776 CP=`echo "$1" | cut -d/ -f7`
777 git cherry-pick $CP
778 fi
779}
780</code></pre>
781<p>To use this, <code>source ~/.bashrc</code> and then run <code>gcp &lt;GitHub commit URL here&gt;</code>.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900782
783
784
785
786
787
788
789
790
791 </article>
792 </div>
793 </div>
794 </main>
795
796
797<footer class="md-footer">
798
799 <div class="md-footer-nav">
800 <nav class="md-footer-nav__inner md-grid">
801
Eric Park608ce5a2019-08-07 21:27:46 +0800802 <a href="../build-guide/" title="Build Guide" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
Eric Parkc9931992019-07-29 13:10:53 +0900803 <div class="md-flex__cell md-flex__cell--shrink">
804 <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
805 </div>
806 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
807 <span class="md-flex__ellipsis">
808 <span class="md-footer-nav__direction">
809 Previous
810 </span>
Eric Park608ce5a2019-08-07 21:27:46 +0800811 Build Guide
Eric Parkc9931992019-07-29 13:10:53 +0900812 </span>
813 </div>
814 </a>
815
816
817 <a href="../../common/" title="Index" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
818 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
819 <span class="md-flex__ellipsis">
820 <span class="md-footer-nav__direction">
821 Next
822 </span>
823 Index
824 </span>
825 </div>
826 <div class="md-flex__cell md-flex__cell--shrink">
827 <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
828 </div>
829 </a>
830
831 </nav>
832 </div>
833
834 <div class="md-footer-meta md-typeset">
835 <div class="md-footer-meta__inner md-grid">
836 <div class="md-footer-copyright">
837
838 powered by
839 <a href="https://www.mkdocs.org">MkDocs</a>
840 and
841 <a href="https://squidfunk.github.io/mkdocs-material/">
842 Material for MkDocs</a>
843 </div>
844
845 </div>
846 </div>
847</footer>
848
849 </div>
850
Eric Park45174ca2019-10-21 01:38:33 +0800851 <script src="../../assets/javascripts/application.ac79c3b0.js"></script>
Eric Parkc9931992019-07-29 13:10:53 +0900852
853 <script>app.initialize({version:"1.0.4",url:{base:"../.."}})</script>
854
855
856 </body>
857</html>