All Projects → opengapps → Aosp_build

opengapps / Aosp_build

Licence: gpl-3.0
AOSP Build system compatible version of Open GApps

Labels

Projects that are alternatives of or similar to Aosp build

Rancid Git
DEPRECATED -- Strongly consider using the upstream, the version here is very out of date and a poor place to start from!
Stars: ✭ 225 (-10%)
Mutual labels:  makefile
Memory Hack
打造超人大脑
Stars: ✭ 237 (-5.2%)
Mutual labels:  makefile
Crazeeriderbbc
Crazee Rider - BBC Micro
Stars: ✭ 243 (-2.8%)
Mutual labels:  makefile
Esp Idf Template
Template application for https://github.com/espressif/esp-idf
Stars: ✭ 227 (-9.2%)
Mutual labels:  makefile
Mav voxblox planning
MAV planning tools using voxblox as the map representation.
Stars: ✭ 234 (-6.4%)
Mutual labels:  makefile
Source Code Examples
Examples of code for the ESP8266
Stars: ✭ 237 (-5.2%)
Mutual labels:  makefile
Orac
Orac : virtual modular synth
Stars: ✭ 224 (-10.4%)
Mutual labels:  makefile
Python Ios Support
A meta-package for building a version of Python that can be embedded into an iOS project.
Stars: ✭ 246 (-1.6%)
Mutual labels:  makefile
Build Harness
🤖Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
Stars: ✭ 236 (-5.6%)
Mutual labels:  makefile
Mach
A remake of make (in ClojureScript)
Stars: ✭ 240 (-4%)
Mutual labels:  makefile
Smallest Secured Golang Docker Image
Create the smallest and secured golang docker image based on scratch
Stars: ✭ 229 (-8.4%)
Mutual labels:  makefile
Bullet Train.zsh
🚄 An oh-my-zsh shell theme based on the Powerline Vim plugin
Stars: ✭ 2,628 (+951.2%)
Mutual labels:  makefile
Tesla Menu
The Nintendo Switch overlay menu
Stars: ✭ 236 (-5.6%)
Mutual labels:  makefile
Paint Timing
Paint Timing
Stars: ✭ 226 (-9.6%)
Mutual labels:  makefile
Personal Server
Personal server configuration with k3s
Stars: ✭ 2,784 (+1013.6%)
Mutual labels:  makefile
Mkdkr
Make + Docker + Shell = CI Pipeline
Stars: ✭ 225 (-10%)
Mutual labels:  makefile
Rhplaceholder
Show pleasant loading view for your users 😍
Stars: ✭ 238 (-4.8%)
Mutual labels:  makefile
Data Making Guidelines
📘 Making Data, the DataMade Way
Stars: ✭ 248 (-0.8%)
Mutual labels:  makefile
Verified Smart Contracts
Smart contracts which are formally verified
Stars: ✭ 243 (-2.8%)
Mutual labels:  makefile
Dircolors Solarized
This is a repository of themes for GNU ls (configured via GNU dircolors) that support Ethan Schoonover’s Solarized color scheme.
Stars: ✭ 2,671 (+968.4%)
Mutual labels:  makefile

OpenGApps AOSP based build system

++Infrastructure Issues++

05-Nov-2019 Gitlab maintenance: we've recreated all of our package repos (all, arm, arm64, x86, x86_64) from scratch. Please make sure to:

  • install git-lfs (more info here) since we're now using it
  • clean and do a fresh pull before building

25-Feb-2019 Please see Ilya Danilkin's blog post on the main OpenGapps project page that explains GitHub infrastructure issues that affected certain opengapps projects:

https://opengapps.org/blog/post/2019/02/17/github-situation/

In short, the git-remote has changed for the projects all, arm, arm64, x86, x86_64. You should update your manifest entries for those projects (see the updated example below that uses the remote "gitlab").

More discussion on this issue can be found here:

https://github.com/opengapps/opengapps/issues/719

Disclaimer

  1. Use this at your own risk. Cyanogenmod received a cease and desist letter from Google when they included Google Apps in their ROM. See: A Note on Google Apps for Android
  2. This project is in no way affiliated with, sponsored by, or related to Google.

Getting started

1. Add the build system, and the wanted sources to your manifest.

Find your manifest file (check inside ${ANDROID_BUILD_TOP}/.repo/manifests/) and add the following towards the end:

<remote name="opengapps" fetch="https://github.com/opengapps/"  />
<remote name="opengapps-gitlab" fetch="https://gitlab.opengapps.org/opengapps/"  />

<project path="vendor/opengapps/build" name="aosp_build" revision="master" remote="opengapps" />

<project path="vendor/opengapps/sources/all" name="all" clone-depth="1" revision="master" remote="opengapps-gitlab" />

<!-- arm64 depends on arm -->
<project path="vendor/opengapps/sources/arm" name="arm" clone-depth="1" revision="master" remote="opengapps-gitlab" />
<project path="vendor/opengapps/sources/arm64" name="arm64" clone-depth="1" revision="master" remote="opengapps-gitlab" />

<project path="vendor/opengapps/sources/x86" name="x86" clone-depth="1" revision="master" remote="opengapps-gitlab" />
<project path="vendor/opengapps/sources/x86_64" name="x86_64" clone-depth="1" revision="master" remote="opengapps-gitlab" />

2. Set the desired OpenGapps variant

In your device/manufacturer/product/device.mk file, in the beginning, add:

GAPPS_VARIANT := <variant>

where <variant> is one of the package types in lowercase. E.g:

GAPPS_VARIANT := stock

3. Include the opengapps-packages.mk file

The opengapps-packages.mk file will make the Android build system build the necessary PRODUCT_PACKAGES, and include the necessary PRODUCT_COPY_FILES.

In device/manufacturer/product/device.mk file, towards the end, add:

$(call inherit-product, vendor/opengapps/build/opengapps-packages.mk)

4. Install git LFS and pull in all dependencies

# More info: https://github.com/git-lfs/git-lfs/blob/master/INSTALLING.md
# Apt/deb
sudo apt install git-lfs
# Yum/rpm
sudo yum install git-lfs
# on macOS
brew install git-lfs

git lfs install
repo forall -c git lfs pull

5. Build Android

Customizations

Adding extra packages

You can add packages from versions higher then your set version. E.g. if you want to include Chrome, but you use GAPPS_VARIANT := micro

In your device/manufacturer/product/device.mk just add, for example:

GAPPS_PRODUCT_PACKAGES += Chrome

This uses the module name. You can find the module name for a package by checking vendor/opengapps/build/modules/ and look at the LOCAL_MODULE value.

Excluding packages

You can exclude certain packages from the list of packages associated with your selected OpenGapps variant. E.g. if you have GAPPS_VARIANT := stock and want all those apps installed except for Hangouts, then in your device/manufacturer/product/device.mk just add:

GAPPS_EXCLUDED_PACKAGES := Hangouts

Force stock package overrides

You can force GApps packages to override the stock packages. This can be defined in two ways inside device/manufacturer/product/device.mk.

For all package:

GAPPS_FORCE_PACKAGE_OVERRIDES := true

If you want to include WebViewGoogle on a non-stock build you need:

GAPPS_FORCE_WEBVIEW_OVERRIDES := true

If you want to include Messenger on a non-stock build you need:

GAPPS_FORCE_MMS_OVERRIDES := true

If you want to include Google Dialer on a non-stock build you need:

GAPPS_FORCE_DIALER_OVERRIDES := true

If you want to include Chrome on a non-full build you need:

GAPPS_FORCE_BROWSER_OVERRIDES := true

PixelLauncher is the default launcher in Oreo builds (and newer); in builds older than Oreo, the default launcher is GoogleNow. If desired, then you can force PixelLauncher to be used by setting the following variable:

GAPPS_FORCE_PIXEL_LAUNCHER := true

On a per-app basis, add the GApps package to GAPPS_PACKAGE_OVERRIDES. Example:

GAPPS_PACKAGE_OVERRIDES := Chrome

Disable stock packages overrides

You can tell the GApps packages not to override the stock packages. This can be defined inside device/manufacturer/product/device.mk by adding the GApps package to GAPPS_BYPASS_PACKAGE_OVERRIDES. Example:

GAPPS_BYPASS_PACKAGE_OVERRIDES := Chrome

Force the system to get the correct DPI package for your device

By default, the latest package version will be selected with the closest DPI. You can force the system to select either a matching DPI package or "nodpi" package even if it is not the latest version.

This can be defined inside device/manufacturer/product/device.mk using:

GAPPS_FORCE_MATCHING_DPI := true

DEX pre-optimization

It is possible to build Android with dex preoptimization. This results in a quicker boot time, at the cost of additional storage used on /system.

This is normally done by setting the value:

WITH_DEXPREOPT := true

in BoardConfig.mk. This will, by default, if set to true, also enable DEX Preoptimization for Google Apps.

You can disable this entirely by setting:

DONT_DEXPREOPT_PREBUILTS := true

How it works

When building in an AOSP tree, the build system processes the file device/manufacturer/product/device.mk very early, which means that the file vendor/opengapps/build/opengapps-packages.mk is also processed very early. This causes two special build "functions" (generic build rules) to be defined before any Android.mk files are read:

BUILD_GAPPS_PREBUILT_APK # - for apps
BUILD_GAPPS_PREBUILT_SHARED_LIBRARY # - for shared libraries

The definitions use the already existing AOSP build infrastructure for prebuilt APKs and SHARED_LIBRARYs, but remove a lot of the boilerplate.

The build rules take care of locating the correct APK/libraries in an architecture-independent way. The AOSP based build system already prioritizes SoC architecture. E.g. if it finds an apk in sources/arm64 and sources/arm, it will automatically prioritize sources/arm64.

The APK rule will also scan the APK for any libraries, and if it finds libraries it will get the AOSP build system to automatically extract them and place them at the expected place.

Caveats

Some modules are missing overrides

With reference to the package comparison, currently only package overrides has been setup for a GAPPS_VARIANT of micro or lower, + Chrome.

Pull requests to add package overrides for more modules is welcome. See modules/Chrome/Android.mk for an example.

Chrome on Lollipop requires an extra patch

Run these commands:

cd build
curl https://raw.githubusercontent.com/opengapps/aosp_build/master/patches/Lollipop/0001-Fix-Chrome.patch | git am -

(Patch only tested on 5.1.1 r37).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].