UPDATE: this patch will not modify a single byte of your current SpringBoard binary, it just interposes a library to override a method named operatorIconForName:, which is the method to retrieve the carrier logo. This patch can be applied to a patched or un-patched SpringBoard, it will not affect anything except will allow you to add/remove/change carriers and logos, it also enables the multipage scrolling which is disabled by Apple by default.
I’ve finally managed to let SpringBoard display customized carrier logo without patching the binary. The method is known as interposing, the basic idea is to load a dynamic shared library along with the SpringBoard (before any other libraries being loaded), and override the logo retrieving method to implement my own checking algo.
The method described in this article is tested on iPhone 1.1.1 (UPDATE: also tested on 1.1.2 with a slightly different source because a required method has changed interface). The benefits of this method include but not limited to:
- No need to patch SpringBoard binary, have no side effects (shows correct logo while roaming)
- Easy to add new carriers, no limits on number of carriers
- Same trick works on other applications/libraries
How To Use
To apply the patch, you need to take the following steps (NOTICE: all plist files need to be in Mac proper list binary format or UNIX text file format):
1. Upload the extSpringBoard.dylib library file to a folder on iPhone, eg. /usr/lib, then make it executable:
chmod 755 /usr/lib/extSpringBoard.dylib
2. Create a carrier definition file:
/System/Library/CoreServices/SpringBoard.app/Carriers.plist
This file is a standard XML file, it defines all the carrier names and their logos. The <key></key> defines the carrier name, the <string></string> defines the carrier logo name (without the prefix and suffix). You may put in as many items as you want, of course, too many items may slow down the reading process. Here’s an example:
[sourcecode language='xml']
[/sourcecode]
ChinaMobile
CARRIER_CHINAMOBILE
CHINAUNICOM
CARRIER_CHINAUNICOM
at&t
CARRIER_ATT
cingular
CARRIER_CINGULAR
t-mobile
CARRIER_TMOBILE
vodafone
CARRIER_VODAFONE
orangeF
CARRIER_Orange F
o2-uk
CARRIER_O2-UK
TIM
CARRIER_TIM
3. Edit the launch daemon file (NOTICE: this file is in Mac binary format, if you want to convert it to plain text, read This Post to learn how to do it):
/System/Library/LaunchDaemons/com.apple.SpringBoard.plist
The file is similar to the following:
[sourcecode language="xml"]
[/sourcecode]
MachServices
com.apple.springboard.migserver
Label
com.apple.SpringBoard
OnDemand
ProgramArguments
/System/Library/CoreServices/SpringBoard.app/SpringBoard
ServiceIPC
Now insert the following lines right under the first <dict> line:
[sourcecode language="xml"]
EnvironmentVariables
[/sourcecode]
DYLD_INSERT_LIBRARIES
/usr/lib/extSpringBoard.dylib
So that the file looks like this:
[sourcecode language="xml"]
[/sourcecode]
EnvironmentVariables
DYLD_INSERT_LIBRARIES
/usr/lib/extSpringBoard.dylib
MachServices
com.apple.springboard.migserver
Label
com.apple.SpringBoard
OnDemand
ProgramArguments
/System/Library/CoreServices/SpringBoard.app/SpringBoard
ServiceIPC
NOTE: if there has already been a <key>DYLD_INSERT_LIBRARIES</key> there (eg. the SummerBoard and iCosta also interpose libraries), then simply insert the /usr/lib/extSpringBoard.dylib into the <string></string> and use a colon (:) to seperate it from other libraries.
UPDATE: if you wanna use SummerBoard’s ‘Skip Last Row’ feature, please put the extSpringBoard.dylib AFTER SummerBoard.dylib, as both this patch and SummerBoard override a same method, whichever comes first will take control.
4. Restart the SpringBoard and you’re done!
Oh wait! You need to create logos for your carrier :) If the logo name in your Carriers.plist file is MY_LOGO, then you need to make two PNG files, named Default_MY_LOGO.png and FSO_MY_LOGO.png. The FSO_ one is used when the status bar is dark, while the Default_ one is used in other situations.
How to Know the Active Carrier Name
It’s in your Settings -> Carrier. NOTE: The carrier name is case-sensitive, and you must remove any spaces, e.g. for “China Mobile”, use “ChinaMobile”.
What If Something’s Wrong
Check your /var/log/syslog (NOTE: If there isn’t such a file, you need to redirect the syslogd output, read the article Redirect Syslogd Output to a File), the patch logs some info in syslog, if it finds the matched carrier logo, it writes the following lines to syslog:
>>> Carrier is China Mobile
>>> Logo is CARRIER_CHINAMOBILE
If it can’t find the appropriate logo, the logged info is like this:
>>> Carrier is China Mobile
>>> No associated logo
Then you can add a new item into your Carriers.plist for the carrier “China Mobile”. NOTICE: you must remove the spaces from carrier names, or it’ll not be recognized. So in my case, the “China Mobile” becomes “ChinaMobile”.
UPDATE: I think this string comparison behavior can be changed by overriding the _operatorName:isEqualToName: method.
UPDATE: Another way is to look at the carrier name displayed on the status bar. In case there’s no logo for the active carrier, SpringBoard will display the carrier name in text on the status bar, be careful to record the full name (if carrier name is too long to fit, SpringBoard will animate the full name for once, then will only display the truncated part).
Acknowledgement
Thanks Arnaldo who showed me various valuable tips.
Attachment
UPDATE: the patch has been reworked, and it now offers both the SpringBoard multipage scrolling as well as the customized carrier logo features. You can download the new patch here:
1.1.1 SpringBoard Scrolling and Carrier Logo Patch (Interposing Library) Binary Only
1.1.2 SpringBoard Scrolling and Carrier Logo Patch (Interposing Library) Binary Only
If you’d like to build the library by yourself, please contact me to get the source, modify the Makefile to reflect your own toolchain’s path, then simply type make to build it.
NOTE: The carrier name comparing method is slightly different in 1.1.1 (_operatorName:isEqualToName:) and in 1.1.2 (_operatorName:isEqualToName:allowPrefixMatch:), so we have to write two different versions. If you really want to use the same source, you may write your own method to compare the carrier names.

19 Comments
1.1.2 下失败“没漏了什么啊
Please carefully follow the instructions in the article. The patch has been confirmed working, also tested in roaming.
其他的都是按照步骤来的
com.apple.SpringBoard.plist用记事本打开是乱码,我直接在SpringBoard后面加上.sh
?_8/System/Library/CoreServices/SpringBoard.app/SpringBoard.sh
不知道是不是这里的问题,但是不知道怎么转换这个plist文件
还一个问题,SpringBoard.sh文件,是不是只要在记事本里面复制上以下内容,保存为SpringBoard.sh就可以了?
#!/bin/sh DYLD_INSERT_LIBRARIES=/usr/lib/extSpringBaord.dylib exec /System/Library/CoreServices/SpringBoard.app/SpringBoard
1. .plist文件用plutil可以在iPhone上直接转换成文本文件(在BLOG搜索一下),转换后再下载编辑
2. SpringBoard.sh内容按”view plain”,然后复制保存,或者手工输入(要与教程中的完全一样,包括分行)
3. .plist及.sh文件必须采用UNIX格式换行符,在Windows下编辑要用UltraEdit之类的,Notepad不行
没用 :(
不知道是不是漏了什么
英文不太好,能否发篇中文得到我邮箱
主要想尝试一下,谢了
很抱歉,所有需要的内容都写在这里了,不打算再写一次了。
Works great, thanks! One thing though: there is a typo in the SpringBoard.sh script on this page (you typed extSpringBaord.dylib, not extSpringBoard.dylib - a and o reversed)
Ron,
Thanks for pointing that out, fixed!
修改了新的SpringBoard.sh文件,不至于白苹果了,但Logo还是没有改变
严格按照步骤来做的,不知道哪里出了问题
extSpringBoard.dylib和SpringBoard.sh也改了755权限
我把我的文件发你邮箱,帮我检查下吧,谢了
到日志/var/log/syslog里面找包含>>>的行,根据记录的信息判断是哪里出问题了。
看了,没有相关的纪录,没有包含>>>的行
如果没有日志纪录,那么补丁根本就没有启动。
那这种情况一般是什么原因呢?
你邮箱是多少啊或者MSN,我发给你帮我看看
Do any of the files mentioned above need to be compiled, or should they be uploaded to the phone in plain text format?
You don’t have to compile anything, just download the binary and follow the How To Use instructions. The plist files are in Mac’s binary format, so you need to edit them using Property List Editor or convert them to plain text files (try searching plutil) then edit. Since Mac OS X is UNIX, you have to make sure the your edited plist files are in UNIX format, aka the newline character is LF (0×0A), not CRLF (0×0D,0×0A). I would suggest editing under any Unix/Linux.
可以麻烦你看一下这个帖子吗? 我把你的教程翻译了一下,发到了weiphone..出现了一些白苹果,问题不明.我自己是修改成功的..
这是帖子的地址http://www.weiphone.com/thread-51101-1-1.html
出现不能进入SpringBoard的问题多半是因为com.apple.SpringBoard.plist文件出问题,导致SpringBoard无法正常启动,所以才会有这种现象:系统服务启动正常,只是不出现主菜单,假如这个时候用SSH登录去看syslog,一定会发现SpringBoard在反复启动,并反复崩溃,同时生成崩溃日志文件。至于Load failed,有两个可能的原因,一是Carriers.plist不存在,二是Carriers.plist格式错误(比如不是UNIX格式,或者文件内容有错误),但是Carriers.plist的错误不会导致系统崩溃。
解决方法就是要保证文件是UNIX格式或者苹果Binary格式,别无他法。
非常感谢.原因已经明了..
Hi, I was wondering if it is possible to emulate the home key in software. for example can we place a semi-transparent button near the bottom which if pressed for 5 seconds returns the phone to the home screen? OR can we remap the home key to the volume control key?
Basically my iphone fell in water and now the home key is not responding!
Thanks!