What's new? | Help | Directory | Sign in
Google
iphone-elite
iPhone Elite Development Team
  
  
  
  
    
Search
for
Updated Nov 12, 2007 by kiw...@gmx.net
Labels: Featured, 1.1.2
fix_crashing_phone_sms_apps  

#How to fix crashing MobilePhone.app and MobileSMS.app on firmware version 1.1.2

Introduction

After updating to 1.1.2, replacing lockdownd with proper one to get activation and signal, you might end up in having everything right except when you try to dial or send an SMS, the application crashes. This page explains why it crashes and how to fix it.

Crash of MobileSMS.app and MobilePhone.app

When dialing a number or sending an SMS and entering its number, both applications did crash in the same manner at the same locations in the code. The reason is it tries to format a dial-string to look nice and crashes because there is no format string found.

Here's my interpretation on what happens in Apple's code does:

1. A SIM is inserted

2. MNC/MCC are read out

3. Symlinks are being created

/private/var/root/Libraries/Preferences/com.apple.carrier.plist /private/var/root/Libraries/Preferences/com.apple.operator.plist

will point to

/System/Library/Frameworks/CoreTelephony.framework/Support/carriers-name.plist

or if the carrier is not found to

/System/Library/Frameworks/CoreTelephony.framework/Support/UnknownCarrier.plist

There is also a symlink from the MNC/MCC codes to the carrier in the same directory.

/System/Library/Frameworks/CoreTelephony.framework/Support/<mnc><mcc>

also points to

/System/Library/Frameworks/CoreTelephony.framework/Support/carriers-name.plist

Now if you dial, the number formatting string is being pulled out by looking up MCC/MNC in

/System/Library/Frameworks/UIKit.framework/PhoneFormats/UIMobileCountryCodes.plist

to find the country code. Then the country code is being looked up in

/System/Library/Frameworks/UIKit.framework/PhoneFormats/UIPhoneFormats.plist

for the string formatting rules.

When UnknownCarrier.plist is being used because of unknown MNC/MCC, the lookup in UIMobileCountryCodes.plist seems to fail and no country is found and then the lookup in UIPhoneFormats.plist returns NULL which then makes the formatting routine crash.

Fix: create your own MCCMNC.plist file (see http://en.wikipedia.org/wiki/Mobile_Network_Code#International for known MNC/MCC values)

So for example for a Swisscom Mobile file you create

SwisscomMobile.plist

edit it to include the right APN's etc. and then create a symlink 22801 to point to SwisscomMobile.plist

All this in directory /System/Library/Frameworks/CoreTelephony.framework/Support/ Then swap Simcard with other SIM (your unused AT&T SIM for example) and back. This will recreate the symlinks in /private/var/root/Library/Preferences. Now the code should remember 22801 as code and the mapping should properly work.


Comment by tim.schuerewegen, Nov 12, 2007

Even after having created the necessary files/symlinks MobilePhone? still crashes if you are located in a country where the iPhone is not officially for sale. To "fix" this you need to hex-edit AppSupport? and replace an official location with your location. For example if you are located in Belgium then replace "fr/33" (offset 0xA0AC) with "be/32". After this patch MobilePhone? will no longer crash.

Comment by sam.lorimer, Nov 12, 2007

Any hints on where to find the "official" location codes? I'm after the string to replace the USA location with an Australian one...

Comment by sam.lorimer, Nov 12, 2007

OK - someone pointed out that it's the country code followed by the international phone code. So Australia would be au/61. Cheers

Comment by hslpccus, Nov 12, 2007

Could anyone teach me how to edit the AppSupport??

With what program & how to find and edit the internation phone code?

Thank you

Comment by tim.schuerewegen, Nov 12, 2007

Search http://www.hiboo-mobile.com/freetool.txt for your country's name. The two last values on that line are "ISO code" (2 chars) and "ITU phone code" (2 or 3 digits). Open AppSupport? in a hex editor. Go to offset 0xA0AC. Overwrite the two chars "fr" with the two chars of your country's ISO code. Go to offset 0xA0B0. Overwrite the two chars "33" with the two (or three) chars of your country's ITU phone code. Done.

Comment by ryanwalklin, Nov 13, 2007

Nice, thanks. Working well on Vodafone NZ.

Comment by gadgets.freak.lover, Nov 13, 2007

can you tell me how to edit it to include the right APN's etc. and then create a symlink 22801 to point to SwisscomMobile?.plist???????

Comment by j.silute, Nov 13, 2007

To create symlink, SSH to the phone and run this: ln -s /System/Library/Frameworks/CoreTelephony?.framework/Support/CARRIERSNAME.plist /System/Library/Frameworks/CoreTelephony?.framework/Support/MCCMNC

Anyone got clue where is AppSupport? located?

Comment by lorenzo.diego, Nov 13, 2007

AppSupport? is located in /System/Library/Frameworks/AppSupport?.framework/

I have already patched AppSupport? and created custom plist but I still have no service and if I click on the carrier menu I only get a loading animation followed by Error. Any clues?

Comment by j.silute, Nov 13, 2007

Ok I found it in /System/Library/Frameworks/AppSupport?.framework Still: Anyone got original 1.1.2 lockdwon file, for use with iAsign?

Comment by j.silute, Nov 13, 2007

Lorenzo, I have lost signal when I used original lockdown from 1.0.2

Comment by lorenzo.diego, Nov 13, 2007

Hmm I used a hacked lockdownd using elite's instructions and still I get no service, the thing is I tried unlocking using anySIM 1.2 under FW 1.1.1 (after upgrading then downgrading to keep the baseband), I dont know if it might be corrupted because of that.

Any thoughts?

Comment by gadgets.freak.lover, Nov 14, 2007

how can i create a plist in windows xp and how to inlude thr right APN's etc.

Comment by nickwer...@mac.com, Nov 14, 2007

hey, I have the same question as gadgets.freak.lover, only, I use a mac. I don't really understand what is supposed to be in the CarrieName?.plist. Do I copy one of the iphones ones to my computer, alter it with updatet MNC/MCC, update services, apn's.. and then reupload it to iphone with different name? Do I delete all the stuff that is not needed in the new plist? Then, the symlink creation doesnt work with my iphone. Please help me, maybe with an extended example for noobs, since a lot of people seem to have the same problem. Thanks a lot!!

Comment by patvgFORZA, Nov 14, 2007

In case you are located in a country where the iPhone is not officially for sale. To "fix" this you need to hex-edit AppSupport? and replace an official location with your location. For example if you are located in Belgium then replace "fr/33" (offset 0xA0AC) with "be/32". After this patch MobilePhone? will no longer crash. The two last values on that line are "ISO code" (2 chars) and "ITU phone code" (2 or 3 digits). Open AppSupport? in a hex editor. Go to offset 0xA0AC. Overwrite the two chars "fr" with the two chars of your country's ISO code. Go to offset 0xA0B0. Overwrite the two chars "33" with the two (or three) chars of your country's ITU phone code. (thx Tim ...)

copy patched AppSupport? back to (overwrite !) : AppSupport? is located in

/System/Library/Frameworks/AppSupport?.framework/

3. make Proximus_Belgium?.plist (I used the Orange_France?.plist with plist-editor to create this one after changing data in it for simlink, APN etc.)

copy it to : /System/Library/Frameworks/CoreTelephony?.framework/Support/

create the symlink for Proximus_Belgium?.plist :

go into iPhone with SSH (have BSD subsystem on iPhone!) and issue following 2 lines:

cd /System/Library/Frameworks/CoreTelephony?.framework/Support/

ln -s Proximus_Belgium?.plist 20601

done

Comment by arnaldo.viegas, Nov 14, 2007

Since there is not define list of MCC-MNC, there is a very simple way to find out your current MCC-MNC: FieldTest?.app

Since it's a hidden app, you will have to resort to some trick to launch it (thur SSH, Finder, or unhide it with Customize or by changin M68AP.plist).

When your phone has service (before upgrading for example) run FieldTest?, let it do it's magic and the select Cell Information.

Each line displayed will end with: "CI:XXXXXX N:XX #:XXX"

CI: is the Cell number, ignore it N: is the MNC #: is the MCC

Now, the iPhone uses MCC-NMC in the following format:

XXX-Y -> XXX0Y XXX-YY -> XXXYY XXX-YYY -> XXXYYY

Have fun!

Comment by kuhnesito, Nov 14, 2007

could anyone possibly type a way to do this in a more n00b format? i have no idea what you guys are saying!

Comment by cyngapore, Nov 14, 2007

Sorry if i'm sound retarded asking these questions as i'm really new to this

Comment by patvgFORZA

3. make Proximus_Belgium???.plist (I used the Orange_France???.plist with plist-editor to create this one after changing data in it for simlink, APN etc.)

What is a simlink and what is an APN?

what data did you change for simlink , APN ,Etc? what are the rest of the Etc? Where can i find these data in the plist that i have to change?

where can i find infomation on the data that i have to change to suit it for my networks?

Thanks alot, I really wish my Iphone will stop crashing.

Comment by kuhnesito, Nov 14, 2007

I downloaded a hex editor.. im in windows, ive never done this before, how do i search for offset 0xA0AC

Comment by kuhnesito, Nov 14, 2007

btw i downloaded program called ultraedit32... after looking hard i managed to click something called hexedit and I found the letters "Fr" and the number "33# and i changed them to my country, mexico... so i put mx and 52 and i saved the file and put it back and replaced it with the original and now my phone wont reboot.. it stays in the apple logo..forever..

Comment by patvgFORZA, Nov 14, 2007

kuhnesito : you have to be VERY carefull changing stuff in hex editor ; you probably changed or deleted a bit too much ... the apple logo : try to get into your iPhone with ssh and issue reboot (remember, you have ssh !)

Comment by patvgFORZA, Nov 14, 2007

cyngapore : it can be much easier than what i first did : us a plist-editor transfer unknown_carrier.plist from iPhone to your disk, rename it Yourcarrier_Yourcountry?.plist just add your APN data in for EDGE/GPRS connection save to disk, transfer over to iPhone + issue command in ssh to generate the MCCMNNC

try it, not difficult

Comment by jmelett, Nov 15, 2007

Alright, I had to do following things for Orange (Switzerland):

- create the new carrier file + symlink

- patch AppSupport?? and add ch/41 (replaced japan) this solved the crash problem.

Now, how can I fix the international caller matching? any ideas?

Edit: Solved it. Just replaced fr (france) instead of jp (japan) with ch (switzerland). Does anyone know where the number-lenght is saved?

Comment by binshabib, Nov 15, 2007

worked perfectly.. just needed to patch AppSupport?..

Comment by binshabib, Nov 15, 2007

worked perfectly.. just needed to patch AppSupport?..

Comment by khedr30000, Nov 15, 2007

i don't know about these details but can't u people try to change the bootloader and make it just like the version 1.1.1 then unlock .... i don't know but may be its an idea its the same hardware so any of those bootloaders will work ok its something like satelite recievers you can put any bootloader for the same hardware .... sorry if i don't understand like u people but any way thanks a lot for ur efforts and the i phone is a great phone i don't know why apple is doing all of that things i am using macintosh from the age of SE and SE30 i think i have the right to use the iphone unlocked with any sim card i want i am an apple user for 15 years isn't that enough for them !!!!!!

Comment by onitake, Nov 16, 2007

wtf!? japan is there but switzerland isn't??? japan has no gsm operator, how the hell did apple think this could be useful?

Comment by simonemexico, Nov 18, 2007

Can someone help me....i have an ORANGE (DOMINICAN) chip!!!

Comment by edelaparra, Nov 18, 2007

After all that process, now I can only recieve calls (I have carrier logo and signal), but cant dial O obtain Call Failed, any ideas or can anyone help please, my carrier is telcel mexico, I changed fr 33 to mx 52, then used a france carrier.plist, changed to telcel parameters, i included in the permited sims string 33402, 334020 and 33402000. then i create symlink as follows ln -s TELCEL.plist 334020, finally changed my sim to att and back to telcel, no changes, by the way no youtube neither bluetooth. HELP APPRECIATTED

Comment by u...@aregger.name, Nov 19, 2007

I know Orange doesn’t offer EDGE in Switzerland. Instead of the “E” symbol I have only a little blue square. How can I eliminate it or exchange with a better looking sign? Or may I get back the “E” although there’s is no EDGE service but only GPRS?

Comment by maridpm09, Nov 19, 2007

Hi! Can anyone please share how to patch 1.1.2 AppSupport? to have CallerId? matching back? I would really like to hexeditit only once. Many thanks.

Comment by maridpm09, Nov 19, 2007

Just to add to my previous post: I saw tim.schuerewegen post about getting CallerID working with 1.1.2 AppSupport?. I am just hoping that someone could share the offset that needs to be changed, and what the valid values are (to have 7, 8, 9 or 10 number matching).

Thanks!

Comment by galvinkf, Nov 20, 2007

Hi - I have a question regarding hexedit of the Appsupport file

I am in Ireland so the ITU is 353 a 3 digit value so I change the 'fr' to 'ie' that is ok however how do I change he '33' value is it :

fr..33..00.0 -> ie..353.00.0 (adds 1 byte to filesize!) or fr..33..00.0 -> ie.353..00.0

just need to be careful :)

Comment by galvinkf, Nov 20, 2007

Just to let you know there is an app now to do this automatically - can be found in the installer app under Tweaks (1.1.2) and it is called iWorld :)

Comment by jiradett, Nov 21, 2007

I tried the iWorld but it make my iPhone unbootable, and I have to restore from the beginning.

Anyone can make it work?
Comment by maridpm09, Nov 21, 2007

jiradett, I used iWorld after using anySIM 1.2u on 1.1.1 and jailbreaking 1.1.2, and now I have a fully functional 1.1.2 jailbreaked activated and unlocked iPhone. Don't know what could have gone wrong with yours - was your SIM unlock trouble-free?

Try using iBrickr and/or iDemocracy 2.x to see if it boots your phone back to a functional state.

Good luck.

Comment by elcaifo, Dec 19, 2007

To maridpm09. I have unlocked successfully with anySIM 1.2u by downgrading from 1.1.2 to 1.0.2 (after upgrading through iTunes by mistake).

Do you know if I can upgrade to 1.1.2 again without losing the unlock? my baseband is already 04.02.13_G. I used INDependence 1.3 to jailbreak, and it's known to work in 1.1.2.

Thanks a lot and I hope my english is not too messy :D

Comment by fhamatanga, Dec 19, 2007

I used iNdependence 1.3.1 and anySim 1.2u to jailbreak and unlock the iphone, but how can I install iworld? is there a standalone iworld application? Thanks

Comment by onahum, Dec 20, 2007

I have a 1.1.2 ootb iPhone from the US, its jailbroken, activated and unlocked using stealthSIM (same as TurboSIM), followed the process of creating a new plist file and symlink for vodafone.nl (netherlands) but the mobilephone.app and mobilesms.app still crash :( I read that appsuuport needs to be hex edit / patched, can some help with this ? what values need to change ?

thx

-Oded

Comment by toreyazgi, Jan 24, 2008

Do you know is this problem fixed by 1.1.3

Comment by atopotts, Feb 05, 2008

I have iphone that is jailbroken and unlocked with xsim, i'm living in Trinidad and Tobago my mobilephone.app and mobilesms.app still crashes.. i have downloaded iworld onto my phone and installed however trinidad and tobago (Bmobile or Digicel) is not on the list of countries...

I have read through this entire post but i'm unsure where to start with doing this manually....

i'm pretty good with computers but where to i start if i want to do this manually or is there another program i can use to do it automatically that includes all countries...

Please help

Comment by namjam105, Feb 07, 2008

Add Source installer : http://iphonebaidu.com/app/ Test iPhone - iPhone Simulator : http://iphonebaidu.com/test/ All Software for Apple MAC : http://iphonebaidu.com/mac-iphone/ All Software for Apple iPhone : http://iphonebaidu.com/mac-iphone/iphone.html

Install iTransformy (.swf) view for iPhone : http://iphonebaidu.com/beta/ Forum, DOwnload Themes, Apps for iPhone. http://iphonebaidu.com/forum/

Copyright © 2008 iPhone Baidu! Inc. All rights reserved


Sign in to add a comment