Change Carrier Name In Android With Root
Get a Boost Mobile SIM, it's the T-Mobile variant with carrier name "BSTM", it's "Boost T-Mobile" or "BooSTMobile"? To add more frustration, the exact same SIM shows "Boost" on iPhone.
I usually don't care much about carrier name displayed but they should really come up with something at least better than this BS™.
With Shizuku
A quick search found this nice CarrierVanityName on github. Pretty cool as it doesn't require root but Shizuku instead.
Can stop here if you have Shizuku or don't mind trying it.
With Root: Failed Attempt
The phone is already rooted and I don't want to bother with Shizuku, so I tried to get it work with root. Turns out it's not that easy. Checking the source code, it set
1 | p.putBoolean(CarrierConfigManager.KEY_CARRIER_NAME_OVERRIDE_BOOL, true) |
which, translated to carrier_name_override_bool
and carrier_name_string
.
Searching these keywords landed to this guide
1 | adb root |
Unfortunately(obviously) it doesn't work. The first line adb root
already gives a good hint because
1 | C:\>adb root |
Now things get interesting: running the lines directly as root also fails.
1 | # cmd phone cc set-value -p carrier_name_string "T-Mobile" |
Well, it's all in source code.
1 | // Verify that the user is allowed to run the command. Only allowed in rooted device in a |
With Root Working Solution
There're some old guides about editing apn-conf.xml
-- so old that /system was even supposed to be R/W. Some more search finds this. It's about changing 4G symbols, however the xml file can be used to do the carrier name override.
Find the file, it's under
/data/user_de/0/com.android.phone/files
in my phone.
There may be multi files in this folder, for all SIM cards ever used in the phone, as
carrierconfig-com.google.android.carrier-ICCID-CarrierID.xml
So to match the current SIM card, one can pull the card and check the numbers on the back, or, dial
*#*#4636#*#*
, find "IMSI" under "Phone Information", the "IMSI" is a partial match to ICCID, should be enough to locate the xml.Edit the file, with either vi/nano or a rooted file explorer.
Search
carrier_name_string
Mine is
1
<string name="carrier_name_string">T-Mobile</string>
or if it's missing, add a new line. Change the value:
1
<string name="carrier_name_string">Boost</string>
Also, search
carrier_name_override_bool
set it to "true".
1
<boolean name="carrier_name_override_bool" value="true" />
Save the file.
To add line(s), put them before the ending
</bundle>
line.To make the change take effect, reboot the phone or run
su -c pkill -TERM -f com.android.phone
In my Android 11, the change is semi-permanent, surviving both SIM card removal/install and reboot. If it doesn't stick during reboot, a possible (untested) solution is to add a Magisk bootup script in
/data/adb/service.d
, and do the override.
Bonus hack: Display ICCID in Settings
The xml is used for all kinds of settings, field names and their meaning can be found in source code.
Set show_iccid_in_sim_status_bool
to true.
1 | /** |
Some phone has it already, mine isn't. Using
1 | <boolean name="show_iccid_in_sim_status_bool" value="true" /> |
to display ICCID in SIM status menu. This can be helpful as recent Android versions block ICCID reading from user apps.