[Xiaomi Mi Note Pro] Aqq123:
Modifying the System Partition Image: Configuration Files

The configuration files discussed below, along with unified diffs against the original files, are included as attachments to this post. Note that they were made against the version 5.12.31 of China Developer ROM, so some of the changes might eventually get outdated. For this reason, I suggest you always apply the patches against the newest config files, and not reuse the old patched ones.

Configuration

/system/build.prop

Even if you're using Xiaomi.eu's ROM as your base, I suggest to start with the stock version of this file, as it's less cluttered, and just make the following edits:

ro.product.locale.language=en

ro.product.locale.region=US

Switch the default language to English.

ro.com.android.dateformat=yyyy-MM-dd

Change the date format to ISO standard.

persist.sys.mitalk.enable=false

Mi Talk is an online service I have no need for. Do you?

Further, we make the following additions:

drm.service.enabled=true

ro.com.google.gmsversion=5.1_r1

This is used for Google Apps.

persist.adb.notify=0

Disable the persistent notification when the device is in USB Debugging mode.

ro.adb.secure=1

Only allow ADB connections from hosts with pre-approved fingerprints. Important for security: otherwise, anything connected to your phone through USB will be able to get superuser access (and yes, that includes even something that might look just like an ordinary charger).

ro.product.mod_device=leo_mam_global

Adding the _global suffix sets the IS_INTERNATIONAL_VERSION flag inside some of the APKs, which is what you usually want, unless you are located in China (but then, removing some of the items listed above apparently breaks the China version, you'd need to investigate this on your own). Further, in Xiaomi.eu's version this has been modified to _mam_global inside the Settings app, so without this suffix you will experience force-closes when trying to open Additional settings (with other ROMs, you can probably just use _global as the suffix).

ro.setupwizard.mode=OPTIONAL

This setting would skip the setup wizard on first boot but then it stopped working at some point. I keep it here just in case someone searches for it or it starts working again but for now, don't bother.

You can also set the properties below to distinguish your build. It serves only cosmetic purpose but shows up in the Settings and is available to user-space apps:

ro.build.display.id=LMY47V-Custom

ro.build.date=Fri Jan 1 00:00:00 UTC 2016

ro.build.date.utc=1451606400

/system/etc/gps.conf

Again, I suggest starting with the stock version, and then making the following changes:

XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin

XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin

XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin

Without it, you can see an occasional complaint in the logs that XTRA servers are not set, so perhaps this has the potential to improve fix time.

NTP_SERVER=pool.ntp.org

One is enough. And with the NTP.org pool you will get a server topologically very close to you. It already works very well just by analyzing your IP address. There is no need to constrain it to something like myvillage.mycountry.continent.ntp.org, especially on a mobile device, which is, by definition, mobile (unless you never travel outside your village). Seriously, too many people get this completely wrong. There is no benefit to be gained from setting it to anything else.

SUPL_HOST=supl.google.com

SUPL_PORT=7276

Even if it's unset in gps.conf, it might be set at runtime by an app. However, the above settings are correct, and there is no harm in setting to those values (other than Google knowing your location).

A_GLONASS_POS_PROTOCOL_SELECT = 0x7

Now this is something I was unable to find any documentation for so I might be completely wrong but according to the comments in the file, it should enable all the "assisted" GLONASS modes. I figured even if it does not, again there is no harm in trying, as it would not affect the other GPS options anyway. If anyone can shed more light on this, comments are welcome.

/system/etc/init.qcom.post_boot.sh

Only if you're using Xiaomi.eu's version, revert this file to the stock version to remove the additions they made at the end of this file.

/system/etc/install_app_filter.xml

Only if you're using the stock version, you can get rid of all the crap inside, as it doesn't serve any purpose but it's probably still parsed at every boot. Xiaomi.eu already has this file emptied. Make the contents look like this:

<?xml version="1.0" encoding="UTF-8"?>
<app_list>
<add_apps>
</add_apps>
<ignore_apps>
</ignore_apps>
</app_list>

/system/etc/mcd_default.conf

Add your browser to the list of browser apps, so that it can be allowed to consume more resources (as browsers typically do). The entries for Chrome and Sleipnir, my favorite browser, look like this:

{"uid": "*", "name": "com.android.chrome*" },
{"uid": "*", "name": "jp.co.fenrir.android.sleipnir*" },

Other than that, I also remove here the privileged entry for com.miui.whetstone. Since Whetstone cannot be removed completely, I decided to leave the APKs for it for the moment as well. If anyone has any comments on Whetstone, please feel free to share.

/system/etc/spn-conf.xml

This file has the names of known mobile networks. (You might also be interested in /system/etc/apns-conf.xml, which has the APN settings.) You can edit the name of your network here, and it will be displayed by the phone accordingly. The version supplied with the stock ROM seems outdated but Xiaomi.eu's version appears to be even more out of date, so I replace it with the stock version. Unfortunately, I don't have a good source for an up-to-date version of this file: Google's Android source code only includes a couple of entries, and not the worldwide list. CyanogenMod's version also doesn't seem very good. If you know a good source for the spn-conf.xml updates, please share.

/system/etc/system_fonts.xml

Xiaomi.eu has replaced the MIUI font entries here with Roboto but this is redundant because they also replaced the MIUI font files so that the MIUI font is in fact the Roboto font anyway. Besides, the font configuration is spread around several other files (/system/etc/fallback_fonts.xml, /system/etc/fonts.xml), so making such change in one place only seems to make even less sense. Revert to stock.