Files
android_vendor_pawlet/config/common.mk
T

133 lines
5.8 KiB
Makefile

#
# Copyright (C) 2025 oxmc / PawletOS
#
# SPDX-License-Identifier: Apache-2.0
#
# Common product config inherited by every PawletOS device.
# Include from each device's device.mk:
# $(call inherit-product, vendor/pawlet/config/common.mk)
#
# ---------------------------------------------------------------------------
# Soong namespace for vendor/pawlet HALs and apps
# ---------------------------------------------------------------------------
PRODUCT_SOONG_NAMESPACES += vendor/pawlet
# ---------------------------------------------------------------------------
# Brand
# ---------------------------------------------------------------------------
PRODUCT_BRAND ?= PawletOS
# ---------------------------------------------------------------------------
# Device name used in version strings (defaults to TARGET_DEVICE)
# ---------------------------------------------------------------------------
PAWLET_BUILD ?= $(TARGET_DEVICE)
# ---------------------------------------------------------------------------
# A/B (Seamless) system updates
# ---------------------------------------------------------------------------
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS := \
boot \
system \
system_ext \
vendor
PRODUCT_PACKAGES += \
update_engine \
update_engine_client \
update_verifier
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
# ---------------------------------------------------------------------------
# A/B: allow downgrade on non-user builds
# ---------------------------------------------------------------------------
ifneq ($(strip $(AB_OTA_PARTITIONS) $(AB_OTA_POSTINSTALL_CONFIG)),)
ifneq ($(TARGET_BUILD_VARIANT),user)
PRODUCT_PRODUCT_PROPERTIES += \
ro.ota.allow_downgrade=true
endif
endif
# ---------------------------------------------------------------------------
# ADB security
# ---------------------------------------------------------------------------
ifeq ($(TARGET_BUILD_VARIANT),user)
PRODUCT_SYSTEM_EXT_PROPERTIES += ro.adb.secure=1
else
PRODUCT_SYSTEM_EXT_PROPERTIES += ro.adb.secure=0
endif
# ---------------------------------------------------------------------------
# Enforce privapp-permissions whitelist
# ---------------------------------------------------------------------------
PRODUCT_PRODUCT_PROPERTIES += \
ro.control_privapp_permissions=enforce
# ---------------------------------------------------------------------------
# This is PawletOS — declare the platform feature
# ---------------------------------------------------------------------------
PRODUCT_COPY_FILES += \
vendor/pawlet/config/permissions/me.pawlet.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/me.pawlet.android.xml \
vendor/pawlet/config/permissions/privapp-permissions-dev.oxmc.configprovisioner.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-dev.oxmc.configprovisioner.xml \
vendor/pawlet/config/permissions/privapp-permissions-me.pawlet.settings.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-me.pawlet.settings.xml \
vendor/pawlet/config/permissions/privapp-permissions-microg.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-microg.xml
# ---------------------------------------------------------------------------
# PawletOS platform resource package
# Exports device strings, icons, and OS metadata accessible to all apps via:
# context.createPackageContext("me.pawlet.android", 0).getResources()
# ---------------------------------------------------------------------------
PRODUCT_PACKAGES += \
PawletPlatform
# ---------------------------------------------------------------------------
# PawletOS system updater app
# Privapp permissions and default-permissions are declared in the app's
# Android.bp and installed automatically by the build system.
# ---------------------------------------------------------------------------
PRODUCT_PACKAGES += \
Updater
# ---------------------------------------------------------------------------
# PawletOS build-time framework resource overlay (adds new drawables)
# ---------------------------------------------------------------------------
PRODUCT_PACKAGE_OVERLAYS += vendor/pawlet/overlay/static
# ---------------------------------------------------------------------------
# PawletOS resource overlay (framework customisations)
# ---------------------------------------------------------------------------
PRODUCT_PACKAGES += \
pawlet-framework-res-overlay
# ---------------------------------------------------------------------------
# Boot and shutdown animations
# ---------------------------------------------------------------------------
PRODUCT_COPY_FILES += \
vendor/pawlet/media/bootanimation.zip:$(TARGET_COPY_OUT_PRODUCT)/media/bootanimation.zip \
vendor/pawlet/media/shutdownanimation.zip:$(TARGET_COPY_OUT_PRODUCT)/media/shutdownanimation.zip
# ---------------------------------------------------------------------------
# MusicFX — system sound effects processor (equalizer, reverb)
# ---------------------------------------------------------------------------
PRODUCT_PACKAGES += \
MusicFX
# ---------------------------------------------------------------------------
# Monet / Material You — ThemePicker + Wallpaper & style
# ---------------------------------------------------------------------------
# ThemePicker (com.android.wallpaper) is added per-device product mk file.
# This overlay enables Monet color scheme, icon shape, font, and dark mode
# sections inside the app.
PRODUCT_PACKAGES += \
ThemePickerPawletOverlay \
pawlet-systemui-overlay
# ---------------------------------------------------------------------------
# Version properties
# ---------------------------------------------------------------------------
$(call inherit-product, vendor/pawlet/config/version.mk)