[ROM MOD][PUDDING] Xiaomi.eu OS3.0.318.0 Camera Region Fix | AVB/Verity Rebuilt


fakecher1

Members
9 Aug 2026
3
3
Base: Xiaomi.eu OS3.0.318.0.WPCCNXM for Xiaomi 17 / pudding
This is a modified Xiaomi.eu build addressing region-dependent camera tuning behavior on the Xiaomi 17.

What this mod does
Fixes the camera tuning behavior on the Xiaomi 17 CN model when using affected regional configurations.
The camera is no longer forced onto the CN tuning path simply because of the selected system region.
AVB and dm-verity remain enabled

Root Cause

The functional root cause is relatively small: the ODM CamX configuration redirects a defined list of regions to the CN tuning path through NeedCNTuningDataRegion.
The important part is how that modification is integrated.
The configuration resides inside the verified ODM logical partition, so modifying it changes the ODM filesystem digest and invalidates the original dm-verity / AVB metadata.

Implementation

Instead of bypassing verification, I rebuilt the integrity chain around the modified ODM:
  • Rebuilt ODM dm-verity hashtree + FEC
  • Generated a new ODM AVB root digest / descriptor
  • Adjusted the logical odm_a partition layout
  • Rebuilt LP / super metadata
  • Regenerated the top-level VBMeta with Flags=0
  • Preserved all unrelated AVB descriptors
  • Repacked super into Xiaomi.eu-compatible super.img.0-12
The patch is small. The integrity chain around it is not.

Result

  • Region-dependent CN camera tuning override removed
  • AVB remains enabled
  • VBMeta Flags=0
  • dm-verity remains enforcing
  • Camera tested working
  • SIM / calls / mobile data tested working
  • Reboot tested successfully
Important

This is not a from-scratch custom ROM.
It is a modified Xiaomi.eu package. Full credit for the base ROM goes to the Xiaomi.eu Team.
No HASHTREE_DISABLED workaround is used in this build.

Credits
  • Xiaomi.eu Team — Base ROM
  • Xiaomi / Qualcomm — Original platform components
  • AOSP AVB / liblp tools
Download

SHA256:
21d697cac30caa766a9d726ffb6fbe27467a616c30c64db44f3a4eb1095bcafd
 
Last edited:
That's a long description when the only change in this whole package is the removal of the value for "NeedCNTuningDataRegion" in odm/etc/camera/camxoverridesettings.txt.
So that's all it takes to make it work?
Code:
SelectTuningDataByRegion=TRUE
NeedCNTuningDataRegion=HK|TW|MO|JP|MM|TH|KH|LA|VN|PH|MY|SG|BN|ID|TL|IN|KR
 
That's a long description when the only change in this whole package is the removal of the value for "NeedCNTuningDataRegion" in odm/etc/camera/camxoverridesettings.txt.
So that's all it takes to make it work?
Code:
SelectTuningDataByRegion=TRUE
NeedCNTuningDataRegion=HK|TW|MO|JP|MM|TH|KH|LA|VN|PH|MY|SG|BN|ID|TL|IN|KR
Yes, that line is the root fix.
The actual work was integrating that change back into a verified dynamic partition: rebuilding ODM, dm-verity/FEC, AVB metadata, LP/super layout and VBMeta while keeping verification enabled.
The patch is simple; preserving the integrity chain is not.
 
What it do? What advantage it does
It fixes the camera behavior when using non-China regions on the Xiaomi 17 CN model.
Some regions can force the camera to use the CN tuning path. This mod removes that region restriction, so you can change the phone region without affecting the intended camera tuning.

The main advantage is: normal camera behavior across regions, while keeping AVB/dm-verity enabled
 
Last edited:
It fixes the camera behavior when using non-China regions on the Xiaomi 17 CN model.
Some regions can force the camera to use the CN tuning path. This mod removes that region restriction, so you can change the phone region without affecting the intended camera tuning.

The main advantage is: normal camera behavior across regions, while keeping AVB/dm-verity enabled
What mean normal... Try to be more specific. On Xiaomi EU camera works perfect.
 
它修復了小米 17 CN 機型在非中國地區使用相機時出現的問題。
某些地區可能會強制相機使用中國大陸的調校路徑。此修改程式移除了此區域限制,因此您可以變更手機區域而不會影響相機的預設調校。

主要優勢在於:在不同區域保持正常的攝影機行為,同時啟用 AVB/dm-verity
THX SO MUCH
 
Hi guys did this work on Pandora edition ? (Xiaomi 17 Pro ) ?
I have the same problem on camera, doesn't work anymore