blob: b02b14cfd025b130d68598b89a358e42e0a1a816 [file] [log] [blame]
Jeff Gastonc6dfc4e2017-05-30 17:12:37 -07001#!/bin/bash
2
3# locate some directories
4cd "$(dirname $0)"
5SCRIPT_DIR="${PWD}"
6cd ../..
7TOP="${PWD}"
8
9message='The basic Android build process is:
10
11cd '"${TOP}"'
12source build/envsetup.sh # Add "lunch" (and other utilities and variables)
13 # to the shell environment.
14lunch [<product>-<variant>] # Choose the device to target.
15m -j [<goals>] # Execute the configured build.
16
17Usage of "m" imitates usage of the program "make".
Dan Willemsen77338622017-11-08 16:39:18 -080018See '"${SCRIPT_DIR}"'/Usage.txt for more info about build usage and concepts.
Jeff Gastonc6dfc4e2017-05-30 17:12:37 -070019
20Common goals are:
21
22 clean (aka clobber) equivalent to rm -rf out/
23 checkbuild Build every module defined in the source tree
24 droid Default target
25 nothing Do not build anything, just parse and validate the build structure
26
27 java Build all the java code in the source tree
28 native Build all the native code in the source tree
29
30 host Build all the host code (not to be run on a device) in the source tree
31 target Build all the target code (to be run on the device) in the source tree
32
33 (java|native)-(host|target)
34 (host|target)-(java|native)
35 Build the intersection of the two given arguments
36
37 snod Quickly rebuild the system image from built packages
38 Stands for "System, NO Dependencies"
39 vnod Quickly rebuild the vendor image from built packages
40 Stands for "Vendor, NO Dependencies"
Jaekyun Seokb7735d82017-11-27 17:04:47 +090041 pnod Quickly rebuild the product image from built packages
42 Stands for "Product, NO Dependencies"
Justin Yun6151e3f2019-06-25 15:58:13 +090043 senod Quickly rebuild the system_ext image from built packages
44 Stands for "SystemExt, NO Dependencies"
Bowgo Tsaid624fa62017-11-14 23:42:30 +080045 onod Quickly rebuild the odm image from built packages
46 Stands for "ODM, NO Dependencies"
Jeff Gastonc6dfc4e2017-05-30 17:12:37 -070047
48
49So, for example, you could run:
50
51cd '"${TOP}"'
52source build/envsetup.sh
53lunch aosp_arm-userdebug
54m -j java
55
56to build all of the java code for the userdebug variant of the aosp_arm device.
57'
58
59echo "$message"