By patching MiuiCamera's Device.isGlobal() and Build.IS_INTERNATIONAL_BUILD to unconditionally return true, the app always assumes it is running on a global device. This prevents attempts to launch the custom permission dialog from HyperOS Security Center, allowing the app to run seamlessly on AOSP ROMs without requiring ro.product.mod_device=surya_global or CTA spoofing properties. Reference: https://github.com/kardebayan/Leica_Universal_5.0_Beta_8.3/commit/a36c2a77fb6753a119d77be0aee186031318556c Change-Id: I3ffce0136d6777dc72c4ea01bb5b7c41d89af73f
29 lines
901 B
Makefile
29 lines
901 B
Makefile
#
|
|
# Copyright (C) 2024-2026 The LineageOS Project
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
# Inherit from the proprietary version
|
|
$(call inherit-product, vendor/xiaomi/miuicamera-surya/surya/surya-vendor.mk)
|
|
|
|
# Overlays
|
|
PRODUCT_PACKAGES += \
|
|
MiuiCameraOverlay
|
|
|
|
# Default permissions
|
|
PRODUCT_COPY_FILES += \
|
|
$(LOCAL_PATH)/configs/default-permissions-miuicamera.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/default-permissions/default-permissions-miuicamera.xml
|
|
|
|
# Priv-app permission
|
|
PRODUCT_COPY_FILES += \
|
|
$(LOCAL_PATH)/configs/privapp-permissions-miuicamera.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-miuicamera.xml
|
|
|
|
# Soong namespaces
|
|
PRODUCT_SOONG_NAMESPACES += \
|
|
$(LOCAL_PATH)
|
|
|
|
# Sysconfig
|
|
PRODUCT_COPY_FILES += \
|
|
$(LOCAL_PATH)/configs/miuicamera-hiddenapi-package-allowlist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/miuicamera-hiddenapi-package-allowlist.xml
|