Sorry, but that is your fault alone. Just reading five minutes here in the forum should teach you, that:

1. Nobody at Xiaomi actually cares about you or any other customer
2. The admins here cannot help you, since Xiaomi seems not to care about them either
3. The developers at Xiaomi are the most incompetent of probably all phone manufacturers

So learn your lesson, sell those phones to someone who does not care about camera2 API and stay away from a company that disrespects customers as Xiaomi does.