Notes
Android
Android
  • 🤖AOSP
    • Clone AOSP repository
    • Directory Structure
    • Setup IDE
      • Setup VSCode
    • Build
      • BluePrint for Application Project
      • BluePrint for Android Library Project
    • Manifest
      • sharedUserId
      • persistant
  • Gradle
    • Create Custom Build Config Variables
    • Create Custom manifest Variables
    • Make app debugable
  • Android Process
    • Find a process by name
    • Kill a process by Id
  • Catch any exception in Android
  • 🎨Theming
    • Theming
      • RRO
        • RRO Internals
        • RRO classes in AOSP
        • RRO Example
        • RRO Permission
      • Fabricated RRO (FRRO)
        • FRRO Example
        • Permission
  • Lifecycle
    • Basics
      • Lifecycle
        • Activity
        • Fragment
          • Fragment add
    • Lifecycle Aware Custom Class
  • ℹ️Interview
    • Interview Questions
    • Architecture Pattern
      • MVC Architecture pattern
      • MVP Architecture Pattern
      • MVVM Architecture Pattern
  • ↔️AIDL
    • Simple AIDL Communication
      • Creating an AIDL file
      • Create an AIDL server
      • Create AIDL client
      • Limitations
    • AIDL with callback
      • Create AILD interfaces
      • Create an AIDL server
      • Create AIDL client
Powered by GitBook
On this page
  1. 🤖AOSP
  2. Build

BluePrint for Application Project

How to configure Android.bp for an application

PreviousBuildNextBluePrint for Android Library Project

Last updated 2 years ago

CtrlK

Here is list of some properties in an android application blueprint:

  • name: The name of the module. This must be unique across all Android.bp files.

  • srcs: A list of the source files that make up the module.

  • manifest: The path to the AndroidManifest.xml file for the module.

  • resource_dirs: A list of directories that contain resources for the module.

  • platform_apis: A boolean value that indicates whether the module uses platform APIs.

  • required: A list of other modules that the module depends on.

  • certificate: The certificate that is used to sign the module.

  • privileged: A boolean value that indicates whether the module has privileged permissions.

  • overrides: A list of other modules that the module overrides.

  • static_libs: A list of static libraries that the module depends on.

  • libs: A list of dynamic libraries that the module depends on.

  • optimize: A property that controls whether the module is optimized.

  • dex_preopt: A property that controls whether the module is pre-optimized for dex.

  • product_variables: A property that allows you to set product-specific variables for the module.

Here is a sample android.bp file

android_app {
    name: "CarLauncher",
    
    srcs: [
        "app/src/main/java/**/*.java"
    ],
    
    manifest: "app/src/main/AndroidManifest.xml",

    resource_dirs: [],

    platform_apis: true,

    required: ["allowed_privapp_com.android.car.carlauncher"],

    certificate: "platform",

    privileged: true,

    overrides: [
        "Launcher2",
        "Launcher3",
        "Launcher3QuickStep",
    ],

    static_libs: ["CarLauncher-core"],

    libs: ["android.car"],

    optimize: {
        enabled: false,
    },

    dex_preopt: {
        enabled: false,
    },

    product_variables: {
        pdk: {
            enabled: false,
        },
    },
}