Get device properties:
adb shell getprop
should result with:
- [ro.miui.cust_variant]: [x]
- [ro.miui.has_cust_partition]: [x]
- [ro.miui.has_handy_mode_sf]: [x]
- [ro.miui.has_real_blur]: [x]
- [ro.miui.mcc]: [xxx]
- [ro.miui.mnc]: [xxx]
- [ro.miui.region]: [x]
- [ro.miui.ui.version.code]: [x]
- [ro.miui.ui.version.name]: [x]
- [ro.miui.version.code_time]: [xxx]
And a few more consisting MIUI specific properties
Class<?> c = Class.forName("android.os.SystemProperties");
Method get = c.getMethod("get", String.class);
String miui = (String) get.invoke(c, "ro.miui.ui.version.code"); // maybe this one or any other
// if string miui is not empty, bingo
Or, get list of packages:
adb shell pm list packages
should result with
- package:com.miui.system
- package:com.android.calendar
- package:com.miui.translation.kingsoft
- package:com.miui.virtualsim
- package:com.miui.compass
...
So you could check with this piece of code:
//installedPackages - list them through package manager
for (String packageName : installedPackages) {
if (packageName.startsWith("com.miui.")) {
return true;
}
}
Build.DISPLAY
– Tardigrade