1# Treble build tools 2 3Tools for building the Android Platform. 4 5[TOC] 6 7## Testing 8 9To run all project tests: 10 11``` 12./test.sh 13``` 14 15## Filesystem overlays 16 17Downstream consumers of the Android platform often create independent Android 18branches for each device. 19 20We can unify the development of all devices on the same Android Platform dessert 21with the help of filesystem overlays. 22 23For example, let's say we had two devices: Device A and Device B. 24The filesystem overlays would create the following build time views. 25 26``` 27+-------------------------------+ +--------------------------------------------+ 28| Android repo | | Android repo | 29| workspace | | workspace | 30| | | | 31| +--------------+ | | +----------------------------------------+ | 32| | +----------+ | +----------+ | | | +----------+ +----------+ | | 33| | | Platform | | | Device B | | | | | Platform | | Device B | Device B | | 34| | | projects | | | projects | | | | | projects | | projects | build view | | 35| | +----------+ | +----------+ | | | +----------+ +----------+ | | 36| | | | | +----------------------------------------+ | 37| | +----------+ | | | +----------+ | 38| | | Device A | | | | | Device A | | 39| | | projects | | | | | projects | | 40| | +----------+ | | | +----------+ | 41| | | | +--------------------------------------------+ 42| | Device A | | 43| | build view | | 44| | | | 45| +--------------+ | 46+-------------------------------+ 47``` 48 49To support filesystem overlays the Android repo workspace is required to the 50following structure. 51 52### Root directory 53 54Location: `${ANDROID_BUILD_TOP}` 55 56All projects in the root directory that are not in the overlays 57directory are shared among all Android targets. 58 59### Overlays directory 60 61Location: `${ANDROID_BUILD_TOP}/overlays` 62 63Contains target specific projects. Each subdirectory under the overlays 64directory can be mounted at the root directory to support different targets. 65 66### Build out directory 67 68Location: `${ANDROID_BUILD_TOP}/out` 69 70Contains all files generated during a build. This includes target files 71like system.img and host tools like adb. 72