# # 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 # --------------------------------------------------------------------------- # Recovery is NOT part of the normal build: if it were, AOSP forces recovery.img # into the vendor image size check (RECOVERY_FROM_BOOT_PATCH) and the padded # 2GB vendor.img + recovery.img overflows the 2GB partition. Build recovery on # demand instead, with the `precovery` helper (PAWLET_BUILD_RECOVERY=1 m # recoveryimage), and flash the result to the recovery partition manually. PRODUCT_BUILD_RECOVERY_IMAGE := $(if $(PAWLET_BUILD_RECOVERY),true,false) # --------------------------------------------------------------------------- # 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 first-party apps # Privapp permissions and default-permissions are declared in each app's # Android.bp and installed automatically by the build system. # --------------------------------------------------------------------------- PRODUCT_PACKAGES += \ Updater \ BgUpd \ PawletSetupWizard # bg-upd's own sepolicy domain — lives in its own repo (packages/apps/BgUpd/sepolicy), # included unconditionally since it's a core PawletOS system app, not an optional one. BOARD_SEPOLICY_DIRS += packages/apps/BgUpd/sepolicy # --------------------------------------------------------------------------- # MicroG — open-source Google Play Services replacement # --------------------------------------------------------------------------- $(call inherit-product, vendor/pawlet/config/microg.mk) # --------------------------------------------------------------------------- # Hardware update subsystem (pawlethwd) — peripheral firmware updates # --------------------------------------------------------------------------- $(call inherit-product, vendor/pawlet/hwupdate/hwupdate.mk) # --------------------------------------------------------------------------- # 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)