Introducing a new way to review your PRs.

Read the announcement

shmykelsa / aaad

The original application for downloading and installing apps made specifically for Android Auto outside of Google Play Store. Active since 2021.

View on GitHub

6 documents · Updated Nov 16, 2026

docs / android-project-build-and-entrypoints

Android Project Build and Entrypoints

Overview

This repository builds a single Android application module. The root Gradle file at build.gradle defines the shared buildscript repositories and pins the Android Gradle plugin, Google Services plugin, Kotlin plugin, and KSP plugin versions used by the project. The application module configuration in app/build.gradle applies the Android application, Kotlin Android, Kotlin kapt, and Google Services plugins, then defines the package identity, SDK levels, signing inputs, generated BuildConfig constants, dependencies, lint behavior, and APK packaging rules for the app published as sksa.aa.customapps.

The manifest at app/…/AndroidManifest.xml is the runtime entrypoint map. It declares LauncherActivity as the exported launcher activity, exposes MainActivityNew for a single HTTPS deep link under https://inceptive.ru/projects/s2a/download/, registers internal screens for onboarding, payments, support, license transfer, Pro activation, and Android Auto setup, and wires providers/receivers used by installation flows. The app’s public behavior described in README.md is that AAAD downloads third-party Android Auto apps and installs them in the way required for them to appear in Android Auto; the build and manifest support that by granting network/package visibility/install-related permissions and by packaging Firebase, Stripe, Shizuku, Room, WorkManager, and APK-signing libraries.

LICENSE.md currently contains an MIT license, while the README.md license section describes more restrictive redistribution terms and links to LICENSE. Treat repository-level licensing as part of release/documentation review because these two files make different claims.

Path-routable build/config sections

build.gradle

The top-level Gradle script supplies the buildscript classpath only; application dependencies are intentionally kept in app/build.gradle. It uses google() and mavenCentral() for both buildscript.repositories and allprojects.repositories, and pins:

  • com.android.tools.build:gradle:8.13.1
  • com.google.gms:google-services:4.4.3
  • org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.21
  • com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.0.21-1.0.28

The file also registers a root clean task that deletes rootProject.buildDir. If plugin versions are changed here, verify the module script still applies compatible plugin IDs and dependency processors.

app/build.gradle

The app module applies com.android.application, kotlin-android, kotlin-kapt, and com.google.gms.google-services. It adds JitPack to allprojects.repositories because UI dependencies such as com.github.iGio90:BottomDialogs, com.github.blikoon:QRCodeScanner, and Glide are resolved from GitHub-style coordinates.

Important build settings:

  • namespace = 'com.legs.appsforaa', but defaultConfig.applicationId = 'sksa.aa.customapps'. Manifest authorities and the installed package identity follow the application ID, not the namespace.
  • Java and Kotlin compile targets are both set to JVM 11.
  • compileSdk = 36, targetSdk = 36, and minSdk = 24; the min SDK comment ties this to Shizuku support for Android 7.0+.
  • versionCode = 18, versionName = '2.1', and base.archivesName = 'AAAD-' + versionName, so release artifacts are named from the app version.
  • viewBinding and buildConfig are enabled.
  • Lint disables MissingTranslation and ImpliedQuantity, does not abort on errors, and still checks release builds.
  • The release build type does not minify and uses the default optimized ProGuard file plus proguard-rules.pro.

The module reads local.properties directly in the android block and again in defaultConfig. Required local keys include signing inputs (STORELOCATION, STOREPASSWORD, KEYPASSWORD) and generated constants for payments, Firebase, app catalog/download links, and external app links (STRIPE_PUBLISHABLE_KEY, STRIPE_PRICE_ID, STRIPE_PRICE_ID_PROMO, FIREBASE_INSTANCE, FIREBASE_PROJECT_ID, FIREBASE_REGION, AAPASSENGER_LINK, CARSTREAM205_LINK, CARSTREAM204_LINK, CARSTREAM202_LINK, AAMP_LINK, AAMIRROR_LINK, AAWIDGETS_LINK, AASTREAM_LINK, APP_CATALOG_URL). A missing local.properties or missing key breaks configuration before the app can be built.

Packaging excludes common META-INF license/notice files, Kotlin module metadata, and META-INF/versions/9/OSGI-INF/MANIFEST.MF, with the latter annotated as a BouncyCastle 1.78 conflict fix. BouncyCastle transitive bcprov-jdk15to18 is excluded globally, and bcpkix-jdk18on:1.82 plus bcprov-jdk18on:1.82 are added explicitly for APK signing/certificate work.

Key dependency groups that define downstream flows:

  • Firebase Realtime Database, Storage, Auth, and Functions are versioned by com.google.firebase:firebase-bom:34.6.0 and require the Google Services plugin plus Firebase configuration outside this doc’s covered files.
  • Stripe Android uses generated BuildConfig price/publishable-key constants for purchase/licensing screens.
  • OkHttp, Volley, Commons Net, Commons IO, and Jsoup support network/download/parsing code.
  • WorkManager, Room, and DataStore support background work and local persistence flows.
  • Shizuku API/provider dependencies pair with the manifest ShizukuProvider for privileged/silent install paths on newer Android versions.

app/…/AndroidManifest.xml

The manifest declares an optional camera feature and permissions for wake locks, internet/network state, foreground service, package install/delete requests, legacy external storage write up to SDK 28, camera, vibration, notifications, and broad package visibility via QUERY_ALL_PACKAGES. It also declares protected INSTALL_PACKAGES and DELETE_PACKAGES with tools ignores; these permissions are not generally granted to normal sideloaded apps, so install/delete code must handle fallback paths.

The <queries> block makes Android 11+ package visibility explicit for installer intents, content/file view intents, email intents, known Android Auto companion app package names, Shizuku (moe.shizuku.privileged.api), and Android Auto (com.google.android.projection.gearhead). If app detection, support email routing, or Android Auto setup checks change, this block must be reviewed alongside the code that queries package managers.

The <application> allows cleartext traffic, backup, RTL, portrait orientation, and uses @style/Theme.AA_Apps_Downloader with launcher icons and @string/app_name.

Manifest-declared components:

  • .LauncherActivity is exported and owns the MAIN/LAUNCHER intent filter, making it the app launch entrypoint.
  • .OnboardingActivity and .OnboardingActivityNew are internal onboarding screens.
  • .MainActivityNew is exported and handles browsable HTTPS links matching inceptive.ru/projects/s2a/download/; this is the only manifest deep link.
  • .AboutPaymentActivity, .ProVersionActivity, .EnterProCode, .TransferLicense, .LicenseTransferActivity, .SupportActivity, and .AndroidAutoSetupActivity are internal screens for payment, Pro/licensing, support, and Android Auto setup flows. Several declare parentActivityName back to .MainActivityNew or .OnboardingActivityNew for navigation.
  • androidx.core.content.FileProvider uses authority sksa.aa.customapps.fileProvider and @xml/paths for URI grants when sharing APK/files with installers.
  • rikka.shizuku.ShizukuProvider uses authority ${applicationId}.shizuku, is exported, and requires android.permission.INTERACT_ACROSS_USERS_FULL; it is the manifest side of Shizuku integration.
  • .receivers.PackageInstallReceiver is exported for PACKAGE_ADDED, PACKAGE_REMOVED, and PACKAGE_REPLACED broadcasts with package: data, so install-state tracking flows depend on this receiver being present.

README.md

The README is the repository-level product and distribution contract. It states that GitHub releases are the official download source, describes AAAD as a non-root Android Auto app downloader/installer, documents free-vs-Pro behavior, points users to in-app support and email flows, and warns about device/Android-version issues, Android Auto compatibility, Play Protect, and app support boundaries. Build/release changes should keep these claims aligned with app/build.gradle versioning, manifest permissions, and the actual distribution path.

LICENSE.md

LICENSE.md contains the MIT License with a 2025 Shmykelsa copyright. Because README.md separately says modified redistribution is not allowed without written approval, licensing-sensitive changes should review both files together rather than relying on only one of them.

Coupling

  • If app/build.gradle changes applicationId, also update manifest authorities and any installer/file-sharing code that expects sksa.aa.customapps.fileProvider; app/…/AndroidManifest.xml hard-codes the FileProvider authority while the Shizuku authority derives from ${applicationId}.
  • If a generated BuildConfig key in app/build.gradle is renamed or removed, update the payment, Firebase, catalog, and download-link flows that read those constants; Gradle injects them from local.properties, so missing local configuration fails before runtime.
  • If dependencies using annotation/code generation are changed, verify the applied plugins in app/build.gradle; Room currently uses kapt, while the root build.gradle also pins KSP but the app module does not apply it.
  • If install, uninstall, update-detection, or package-visibility behavior changes, review both app/…/AndroidManifest.xml permissions/queries/receiver declarations and the implementation flow. Android 11+ visibility depends on <queries>, while Android 14+ privileged installation depends on both the Shizuku dependencies in app/build.gradle and rikka.shizuku.ShizukuProvider in the manifest.
  • If the public support or licensing story changes, update README.md and LICENSE.md together; they are both user-facing repository-level policy documents and currently differ in redistribution terms.

Risks

  • app/build.gradle loads local.properties with new FileInputStream(rootProject.file("local.properties")) during configuration. A clean checkout or CI job without that file fails before any task can run, including tasks that do not need signing or production service keys.
  • app/…/AndroidManifest.xml declares protected install/delete permissions and an exported package broadcast receiver. If installer flows assume those permissions are granted, sideloaded builds can fail to install/delete packages; if receiver handling is not defensive, external package broadcasts can trigger state changes.
  • app/build.gradle sets namespace = 'com.legs.appsforaa' while applicationId = 'sksa.aa.customapps'. Code/resource generation uses the namespace, but installed package identity, manifest provider authorities, Firebase/Google Services matching, and release identity use the application ID; changing either one without checking those consumers can produce build or runtime mismatches.
  • README.md and LICENSE.md conflict on redistribution rights: the README restricts modified redistribution, while LICENSE.md grants MIT permissions. Release/legal review should resolve this before relying on either text as the sole source of truth.