miuicamera-surya: Assume that mod_device is global and drop CTA props
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
This commit is contained in:
1 parent
0c6761ce9a
commit
4504ed5b75
4 files changed
+61
-19
No files matched your search
@@ -26,14 +26,3 @@ PRODUCT_SOONG_NAMESPACES += \
|
|||||||
# Sysconfig
|
# Sysconfig
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
$(LOCAL_PATH)/configs/miuicamera-hiddenapi-package-allowlist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/miuicamera-hiddenapi-package-allowlist.xml
|
$(LOCAL_PATH)/configs/miuicamera-hiddenapi-package-allowlist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/miuicamera-hiddenapi-package-allowlist.xml
|
||||||
|
|
||||||
# Properties
|
|
||||||
PRODUCT_SYSTEM_PROPERTIES += \
|
|
||||||
ro.com.google.lens.oem_camera_package=com.android.camera \
|
|
||||||
ro.miui.notch=1 \
|
|
||||||
ro.miui.support.cta=0 \
|
|
||||||
ro.miui.customized.region= \
|
|
||||||
ro.miui.region=Global \
|
|
||||||
ro.miui.build.region=global \
|
|
||||||
ro.miui.cust_variant=en \
|
|
||||||
ro.product.mod_device=surya_global
|
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
From ced167d2b0f5dbda3b0ab57b80f7510bd804cbef Mon Sep 17 00:00:00 2001
|
||||||
|
From: Raya Mahardika <94042378+rktdnt@users.noreply.github.com>
|
||||||
|
Date: Tue, 27 Oct 2026 18:36:10 +0000
|
||||||
|
Subject: [PATCH] Assume that mod_device is global
|
||||||
|
|
||||||
|
Otherwise, the app tries to start a custom permissions dialog which
|
||||||
|
has dependencies on HyperOS Security Center app
|
||||||
|
|
||||||
|
Change-Id: I3ffce0136d6777dc72c4ea01bb5b7c41d89af73f
|
||||||
|
---
|
||||||
|
smali/OooO0O0/OooO0Oo/OooO00o/OooO0O0.smali | 18 +-----------------
|
||||||
|
smali_classes3/miuix/os/Build.smali | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/smali/OooO0O0/OooO0Oo/OooO00o/OooO0O0.smali b/smali/OooO0O0/OooO0Oo/OooO00o/OooO0O0.smali
|
||||||
|
index a35a4d4..f507b9a 100644
|
||||||
|
--- a/smali/OooO0O0/OooO0Oo/OooO00o/OooO0O0.smali
|
||||||
|
+++ b/smali/OooO0O0/OooO0Oo/OooO00o/OooO0O0.smali
|
||||||
|
@@ -1230,19 +1230,3 @@
|
||||||
|
.method public static OooO0o()Z
|
||||||
|
- .locals 2
|
||||||
|
-
|
||||||
|
- const-string/jumbo v0, "ro.product.mod_device"
|
||||||
|
-
|
||||||
|
- const-string v1, ""
|
||||||
|
-
|
||||||
|
- .line 1
|
||||||
|
- invoke-static {v0, v1}, Lcom/xiaomi/camera/util/SystemProperties;->get(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
||||||
|
-
|
||||||
|
- move-result-object v0
|
||||||
|
-
|
||||||
|
- const-string v1, "_global"
|
||||||
|
-
|
||||||
|
- invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
-
|
||||||
|
- move-result v0
|
||||||
|
-
|
||||||
|
- return v0
|
||||||
|
+ .locals 1
|
||||||
|
+
|
||||||
|
+ const/4 v0, 0x1
|
||||||
|
+
|
||||||
|
+ return v0
|
||||||
|
.end method
|
||||||
|
diff --git a/smali_classes3/miuix/os/Build.smali b/smali_classes3/miuix/os/Build.smali
|
||||||
|
index 3d23089..f845309 100644
|
||||||
|
--- a/smali_classes3/miuix/os/Build.smali
|
||||||
|
+++ b/smali_classes3/miuix/os/Build.smali
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
|
||||||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
|
||||||
|
- move-result v0
|
||||||
|
+ const/4 v0, 0x1
|
||||||
|
|
||||||
|
sput-boolean v0, Lmiuix/os/Build;->IS_INTERNATIONAL_BUILD:Z
|
||||||
|
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
Binary file not shown.
@@ -6,9 +6,3 @@ persist.vendor.camera.privapp.list=com.android.camera
|
|||||||
|
|
||||||
# MiuiCamera
|
# MiuiCamera
|
||||||
ro.miui.notch=1
|
ro.miui.notch=1
|
||||||
ro.miui.support.cta=0
|
|
||||||
ro.miui.customized.region=
|
|
||||||
ro.miui.region=Global
|
|
||||||
ro.miui.build.region=global
|
|
||||||
ro.miui.cust_variant=en
|
|
||||||
ro.product.mod_device=surya_global
|
|
||||||
Reference in new issue
Block a user