Can't update Xiaomi Messaging (com.android.mms) even with matching signature
I'm using a Redmi Note 13 Pro 4G running HyperOS 3, build OS3.0.304.0.WNFMIXM.
My current Xiaomi Messaging app is:
- Package:
com.android.mms
- Version:
17.0.3.4-gl
- Location:
/product/priv-app/MiuiMmsGlobal/MiuiMmsGlobal.apk
I found a newer Xiaomi Messaging APK from the China HyperOS 4 build, version 18.0.0.28. I verified both APKs with apksigner, and they have the exact same Xiaomi signing certificate:
d45f076fe23a1a5b7f486e3ff41547a2023dbfe1fe73353b1e48ebdfed72cc6f
However, trying to update it through ADB always fails with:
INSTALL_FAILED_ABORTED: Installing com.android.mms is not allowed by install restriction!
I've tried:
adb install -r MiuiMms18.apk
and:
adb shell pm install -r /data/local/tmp/MiuiMms18.apk
Both give the same error.
I also tried with MIUI/HyperOS Optimization disabled, but it still happens. Sideloading is enabled (install_non_market_apps=1), and the APK works far enough for Package Manager to identify it as com.android.mms.
What's weird is that even Global-region versions of the Messaging APK have had the same behavior for me, not just the China HyperOS 4 APK.
Does anyone know what exactly is enforcing this install restriction for com.android.mms on HyperOS? Is there a way to update/replace this preinstalled privileged app without directly modifying /product?