Slim >>> OSE
Allow devices to specify certain ro. props via TARGET_INIT_VENDOR_LIB

This modifies buildinfo.sh to not set model, name, description, and
fingerprint in build.prop. These can then be set via custom init
lib.
This also fixes ota_from_target_files to function without these
props being preset.

Change-Id: I945b2c38e60b207d2d0f82b34f4f230ac21b0657

Conflicts:
	core/Makefile
	tools/releasetools/ota_from_target_files
add option to use -pipe

Same as this patch http://review.pac-rom.com/#/c/1008/

Usage:
export TARGET_USE_PIPE=true && ./build-pac.sh

Change-Id: Id5b3ade07364cb5be33172fc7f99f2a6c80b0e63
build: no longer build emulator by default

This is just increasing build times when most people are not using it.
Let's speed up builds a bit.

Building emulator should still be possible by appending BUILD_EMULATOR=true
to the build command

Change-Id: Ibd8e2b90455bd603a691c7b95466068b6fae212a
Allow defining multiple GCC O Levels [1/2]

Available GCC Optimization Levels
    -Os
    -O2 (Default)
    -O3

PS2: Derp fix
PS3: Derp fix 2.0

Change-Id: I55fa04026df24841b9d67325242ce3cb460726a1
Signed-off-by: Lokesh Chamane <lokesh.c703@gmail.com>

Conflicts:
	core/combo/TARGET_linux-arm.mk
	core/combo/select.mk
MAKE NOVO & MAGICBROWNIES!

PS2: It's impossible to make Lokesh happy :P
PS3: ERRRR
PS4:Fix everything

This commit is for Lokesh, I really want him to get his builds down to 18 mins. Here's rooting for ya lokesh!

To use: Run "make magicbrownies" and it will clear only the out/target/product folder, for hopefully, faster builds.

Change-Id: I6ff6ffcf7c351cf18d90ab3970b13b806bffed54

Conflicts:
	core/main.mk
Moar clean options!

appclean: clears out all apks
imgclean: clears out all img files
kernelclean: clears out all kernel stuff
systemclean: clears out all system stuff
recoveryclean: clears out all recovery stuff
rootclean: clears out all root stuff

Change-Id: I3b6d9ca53e083385cca3ae66084c5a39901b3d1b
build: use the system's ccache by default

ccache 3.x supports direct mode (http://ccache.samba.org/manual.html#_the_direct_mode)
This is not supported in the prebuilt version. Direct mode has been shown to decrease build time by up to 40x, compared to preprocessor mode used in ccache 2.4, which is substantially less

Change-Id: I224de8e5bc53bbe18a7a02fc811324307cf3ab8c
Set default GCCs
Fix kernel paths

Conflicts:
	core/tasks/kernel.mk
Switch of set gcc for kernel
Build ROM with 4.9 sabermod
Make it dirty

Change-Id: Iaf28934f4d3c90b681289696cfa9fadb1ae102ec
Fix building :P
Add our ANSI Art to updater script
Change Toolchain paths
Merge remote-tracking branch 'slim/kk4.4' into ose
Runtime resource overlay, iteration 2

Support any number of overlay packages. Support any target package.

UPDATED PACKAGE MATCHING
------------------------
In Runtime resource overlay, iteration 1, only a single overlay package
was considered. Package matching was based on file paths:
/vendor/overlay/system/framework-res.apk corresponded to
/system/framework-res.apk. Introduce a more flexible matching scheme
where any package is an overlay package if its manifest includes

    <overlay targetPackage="com.target.package"/>

For security reasons, an overlay package must fulfill certain criteria
to take effect: see below.

THE IDMAP TOOL AND IDMAP FILES
------------------------------
Idmap files are created by the 'idmap' binary; idmap files must be
present when loading packages. For the Android system, Zygote calls
'idmap' as part of the resource pre-loading. For application packages,
'idmap' is invoked via 'installd' during package installation (similar
to 'dexopt').

UPDATED FLOW
------------
The following is an outline of the start-up sequences for the Android
system and Android apps. Steps marked with '+' are introduced by this
commit.

Zygote initialization
   Initial AssetManager object created
+    idmap --scan creates idmaps for overlays targeting 'android', \
           stores list of overlays in /data/resource-cache/overlays.list
   AssetManager caches framework-res.apk
+  AssetManager caches overlay packages listed in overlays.list

Android boot
   New AssetManager's ResTable acquired
     AssetManager re-uses cached framework-res.apk
+    AssetManager re-uses cached 'android' overlays (if any)

App boot
   ActivityThread prepares AssetManager to load app.apk
+  ActivityThread prepares AssetManager to load app overlays (if any)
   New AssetManager's ResTable acquired as per Android boot

SECURITY
--------
Overlay packages are required to be pre-loaded (in /vendor/overlay).
These packages are trusted by definition. A future iteration of runtime
resource overlay may add support for downloaded overlays, which would
likely require target and overlay signatures match for the overlay to
be trusted.

LOOKUP PRIORITY
---------------
During resource lookup, packages are sequentially queried to provide a
best match, given the constraints of the current configuration. If any
package provide a better match than what has been found so far, it
replaces the previous match. The target package is always queried last.

When loading a package with more than one overlay, the order in which
the overlays are added become significant if several packages overlay
the same resource.

Had downloaded overlays been supported, the install time could have been
used to determine the load order. Regardless, for pre-installed
overlays, the install time is randomly determined by the order in which
the Package Manager locates the packages during initial boot. To support
a well-defined order, pre-installed overlay packages are expected to
define an additional 'priority' attribute in their <overlay> tags:

    <overlay targetPackage="com.target.package" priority="1234"/>

Pre-installed overlays are loaded in order of their priority attributes,
sorted in ascending order.

Assigning the same priority to several overlays targeting the same base
package leads to undefined behaviour. It is the responsibility of the
vendor to avoid this.

The following example shows the ResTable and PackageGroups after loading
an application and two overlays. The resource lookup framework will
query the packages in the order C, B, A.

        +------+------+-     -+------+------+
        | 0x01 |      |  ...  |      | 0x7f |
        +------+------+-     -+------+------+
            |                           |
        "android"                Target package A
                                        |
                       Pre-installed overlay B (priority 1)
                                        |
                       Pre-installed overlay C (priority 2)

Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e
New Theme Engine [4/6]

Adds aapt for on device compiling of theme assets

Change-Id: I2f9f4b3e27ddf32b339694f9c6d3b75a12b700d9
Merge remote-tracking branch 'slim/kk4.4' into ose

Conflicts:
	core/Makefile
	tools/buildinfo.sh
	tools/releasetools/ota_from_target_files