[Android Software Development] TKruzze:
Advanced Features & Options

ADVANCED FEATURES & OPTIONS

The features outlined below are COMPLETELY OPTIONAL and designed to allow advanced users the ability to modify the default behavior of the GApps installers. Without the use of these options, the installers will function exactly as outlined in Post #1 above.

INTRODUCTION

To modify the default behavior of the GApps installer, create a text file called .gapps-config or gapps-config.txt (.gapps-config will take precedence) and place it in the same folder as the GApps zip or in /sdcard/TK-GApps. Additionally, if your device has a Persist partition, you may place the file there as well. Note that the zip folder, followed by /sdcard/TK-GApps will be checked first. Once you've created the gapps-config file, simply type in the Key Word options you want from the lists below.

TESTING

To perform a test installation that will only simulate an install, add the Key Word Test to your gapps-config. The installer will perform all system space calculations and generate a detailed log tk_gapps_log.txt (in the same folder as your gapps-config), but WILL NOT MAKE ANY CHANGES to your device. This should be helpful for trying to find just the right combination of apps that will work with your particular device.

DEBUGGING

By default, the installer will generate Debug Logs - tk_gapps_debug_logs.tar.gz - a compressed file that contains a set of files to help troubleshoot any problems you might experience with the install. This file can be easily attached to any post on XDA, making it easy for you to provide important information to help troubleshoot any issues you're having. You will find tk_gapps_debug_logs.tar.gz in the same folder as your tk_gapps_log.txt. You may disable this feature by adding the Key Word NoDebug to your gapps-config.

PRESETS

You can use Presets with any GApps package. This allows you to transform any GApps package into one of its 'little brothers' by adding one of the following Key Words to your gapps-config. This will transform ALL INSTALLER BEHAVIOR (including default removals AND applications available for install) - effectively turning it into a new GApps package.

Valid Key Word options are:

FullGApps - To downsize the following package to Full Modular GApps. [Stock]

MiniGApps - To downsize any of the following packages to Mini Modular GApps. [Stock/Full]

MicroGApps - To downsize any of the following packages to Micro Modular GApps. [Stock/Full/Mini]

NanoGApps - To downsize any of the following packages to Nano Modular GApps. [Stock/Full/Mini/Micro]

PicoGApps - To downsize any of the following packages to Pico Modular GApps. [Stock/Full/Mini/Micro/Nano]​

[HIGHLIGHT]NOTE:[/HIGHLIGHT] ALL BEHAVIOR OF THE INSTALLER WILL BE TRANSFORMED TO THE NEW PRESET, including default removals AND applications available for install.

INCLUDING or EXCLUDING APPLICATIONS

You can choose either the apps you WANT installed (called an Include Install) or the apps you DON'T WANT installed (default behavior - called an Exclude Install). To select ONLY the apps you WANT installed, add the Key Word Include to your gapps-config file. The installer will now install ONLY THOSE APPS you have listed in your gapps-config. (Since the default behavior is an Exclude install, it is not necessary to add Exclude to your gapps-config). Stock/AOSP removals (see below) function the same whether you're doing an Include or Exclude Install.

Type the application Key Word (name) you want to Exclude/Include inside your gapps-config file.

Valid Key Word options are:

AndroidPay - To Exclude/Include Android Pay [Stock/Full]

Books - To Exclude/Include Google Play Books [Stock/Full]

CalendarGoogle - To Exclude/Include Google Calendar [Stock/Full/Mini/Micro]

CalSync - To Exclude/Include Google Calendar Sync (installed by default when Google Calendar is NOT being installed) [Stock/Full/Mini/Micro/Nano/Pico]

CameraGoogle - To Exclude/Include Google Camera [Stock]

Chrome - To Exclude/Include Chrome Browser [Stock/Full]

ClockGoogle - To Exclude/Include Google Clock [Stock/Full/Mini]

CloudPrint - To Exclude/Include Cloud Print [Stock/Full]

Docs - To Exclude/Include Google Docs [Stock/Full]

Drive - To Exclude/Include Google Drive [Stock/Full]

Ears - To Exclude/Include Sound Search for Google Play [Stock/Full]

Earth - To Exclude/Include Google Earth [Stock/Full]

ExchangeGoogle - To Exclude/Include Google Exchange Services [Stock/Full/Mini/Micro]

FaceUnlock - To Exclude/Include FaceUnlock [Stock/Full/Mini/Micro]

Gmail - To Exclude/Include Gmail [Stock/Full/Mini/Micro]

GoogleNow - To Exclude/Include Google Now Launcher [Stock/Full/Mini/Micro]

GooglePlus - To Exclude/Include Google+ [Stock/Full/Mini]

GoogleTTS - To Exclude/Include Google Text-to-Speech [Stock/Full/Mini/Micro]

Hangouts - To Exclude/Include Hangouts [Stock/Full/Mini]

Keep - To Exclude/Include Google Keep [Stock/Full]

KeyboardGoogle - To Exclude/Include Google Keyboard [Stock]

Maps - To Exclude/Include Maps [Stock/Full/Mini]

Messenger - To Exclude/Include Messenger (not installed on tablet devices) [Stock/Full]

Movies - To Exclude/Include Google Play Movies & TV [Stock/Full]

Music - To Exclude/Include Google Play Music [Stock/Full]

NewsStand - To Exclude/Include Google Play Newsstand [Stock/Full]

NewsWidget - To Exclude/Include Google News & Weather [Stock/Full]

Photos - To Exclude/Include Photos [Stock/Full/Mini]

PlayGames - To Exclude/Include Google Play Games [Stock/Full]

Sheets - To Exclude/Include Google Sheets [Stock]

Slides - To Exclude/Include Google Slides [Stock]

Search - To Exclude [HIGHLIGHT]BOTH[/HIGHLIGHT] Google Search [HIGHLIGHT]AND[/HIGHLIGHT] Google Now Launcher [Stock/Full/Mini/Micro/Nano]

OR

Search - To Include Google Search [Stock/Full/Mini/Micro/Nano]

Speech - To Exclude/Include off-line Speech files (Required for off-line "Okay Google" support) [Stock/Full/Mini/Micro/Nano]

Street - To Exclude/Include Google Street View [Stock/Full]

Sunbeam - To Exclude/Include the Sun Beam Live Wallpaper [Stock/Full]

Talkback - To Exclude/Include TalkBack [Stock/Full]

WebviewGoogle - To Exclude/Include Android System WebView [Stock]

YouTube - To Exclude/Include YouTube [Stock/Full/Mini]​

STOCK/AOSP APPLICATION REMOVALS

To manage the removal of certain Stock/AOSP applications from your ROM, type the application Key Word (name) inside your gapps-config file.

Valid Key Word options are:

Browser - To remove the Stock/AOSP Browser

CalendarStock - To remove the Stock/AOSP Calendar Application (automatically removed when Google Calendar is installed)

CameraStock - To remove the Stock/AOSP Camera Application (automatically removed when Google Camera is installed)

ClockStock - To remove the Stock/AOSP Clock Application (automatically removed when Google Clock is installed)

CMAudioFX - To remove the Stock CM AudioFX Application

CMEleven - To remove the Stock CM Music Application

CMFileManager - To remove the Stock CM File Manager

CMWallpapers - To remove the Stock CM Wallpapers

DashClock - To remove the Stock DashClock Application (found in certain ROM's)

Email - To remove the Stock/AOSP Email Application

ExchangeStock - To remove the Stock/AOSP Exchange Services (automatically removed when Google Exchange Services is installed)

FMRadio - To remove the Stock FM Radio Application (not found on all devices or ROM's)

Gallery - To remove the Stock/AOSP Gallery

KeyboardStock - To remove the Stock/AOSP Keyboard (automatically removed when Google Keyboard is installed)

Launcher - To remove the Stock/AOSP Launcher(s)

MMS - To remove the Stock/AOSP SMS Application

PicoTTS - To remove the Stock/AOSP PicoTTS

SimToolKit - To remove the Stock/AOSP SimToolKit Application

Studio - To remove the Stock/AOSP Movie Studio Application

SykoPath - To remove SykoPath OverlayManager (found in certain ROM's)

WebviewStock - To remove the Stock/AOSP Webview Application (automatically removed when Google WebView is installed)

SPECIAL RULES FOR GOOGLE STOCK GAPPS

To prevent the default removal of the Stock/AOSP apps (listed below) when using Google Stock GApps, type the Key Word option preceded by a '+' as shown below:

+Browser - To bypass the automatic removal of Stock/AOSP Browser [Stock ONLY]

+Email - To bypass the automatic removal of Stock/AOSP Email Application [Stock ONLY]

+Gallery - To bypass the automatic removal of Stock/AOSP Gallery Application [Stock ONLY]

+Launcher - To bypass the automatic removal of Stock/AOSP Launcher(s) [Stock ONLY]

+MMS - To bypass the automatic removal of Stock/AOSP SMS Application [Stock ONLY]

+PicoTTS - To bypass the automatic removal of the Stock/AOSP PicoTTS app [Stock ONLY]

Note: While the above special '+' Key Words are intended for Google Stock GApps, they can also be safely used with any of the other GApps packages as well.

NOTE: The installer will automatically NOT remove the Stock/AOSP application if its Google counterpart is NOT being installed. For example, if you are NOT installing Hangouts or Messenger, then the Stock MMS app will NOT automatically be removed (although you can still force its removal by adding it to your gapps-config). The same is true for Google Calendar|Stock Calendar, Google Camera|Stock Camera, Google Clock|Stock Clock, Gmail|Stock Email, Google Exchange Services|Stock Exchange Services, Google Keyboard|Stock Keyboard, Photos|Stock Gallery, Google Now Launcher|Stock Launcher, GoogleTTS|PicoTTS, and Google Webview|Stock Webview.​

UNIVERSAL APPLICATION REMOVALS

In addition to the Stock/AOSP Removals above, we have recently added Universal Application Removals to the installer. Universal Removals allow you to remove ANY system app (folder and all) on your device or ROM.

To use this feature, enclose the name of the apk in parentheses inside your gapps-config file.

See below for complete details:

For example, to remove the Spare Parts app found in many ROM's, simply add (SpareParts) to your gapps-config. When using this feature, keep the following in mind:

Adding the .apk extension is not required (however, it may be added if you prefer)

Works for all apps in system/app or system/priv-app

Removes the apk and entire contents of the containing folder (if installed in its own subfolder)

Removal is also added to the addon.d backup script so the removals will also be applied if you update your ROM

Gives you the ability to do some really bad things to your device, so [HIGHLIGHT]DO A BACKUP[/HIGHLIGHT] before trying

While Core GApps components may also be removed using this method, it is NEVER recommended and only intended for testing

- Removal of Core GApps will take place AFTER the GApps installation process has completed

- No support is offered should you choose to remove Core GApps components

[HIGHLIGHT]WARNING:[/HIGHLIGHT] Because this feature gives you the ability to remove files that may be important to the proper function of your device, it is only recommended for very experienced users who know what they are doing.​

MISCELLANEOUS

You can add notes or comments to your gapps-config using a #. Anything following a # will be ignored until the end of that line.

For example:

The line below would be completely ignored

# Exclude Search

While the line below would process the first Search Key Word (since it appeared BEFORE the '#')

Search # Exclude Search​

You can override the automatic device dpi detection system and force the installer to install specific dpi versions of Google Play services and other dpi specific apps by using the ForceDPIxxx option, where xxx must be 240, 320, 480, 640, or 000 (for NODPI).

This will override the installer's hardware based detection system and force the installer to detect your device as the specific DPI you choose.

- Use of this option is only recommended for testing purposes

"Protection from Stupidity" is built into the GApps Installer. To prevent you from accidentally leaving yourself with no keyboard, Launcher, MMS, or Webview app when you start your device, the installer WILL NOT ALLOW you to remove the Stock/AOSP Keyboard, Launcher, MMS, or Webview app if you are not also installing a Google version of these apps. You can, however, override this protection by adding the Key Word Override to your gapps-config. Be very careful when using this option and make certain you have a replacement app already installed on your device before using this option.

[HIGHLIGHT]Note:[/HIGHLIGHT] Case, order, spaces, or using separate lines does not matter when using gapps-config.