Discuss [SOLVED for firmware 2.2] GPS Banned in Egypt at the iPhone 3G - Hackint0sh.org; What I did was the following;
Restore my iPhone using iTunes and the new 2.2 ...
What I did was the following;
- Restore my iPhone using iTunes and the new 2.2 FW.
- It, then asked me to activate, which I knew would turn GPS off, so I didnt, I fired up QuickPWN
- I chose the same 2.2 FW, then attempted JailBreak.
- Now I had the phone working (I hadnt placed the sim inside yet) and GPS working.
- I tried to put the sim inside, got NO service whatsoever, no network (GSM), no 3G, nothing!
- I then restored my iPhone backup from iTunes, it disabled GPS while NOT enabling me to connect to mobinil (GSM or 3G)
My phone is now showing the USB-to-iTunes image which means its waiting for a restore, I'm currently downloading hacked firmwares (essentially 2.2 w/o BB upgrade) to install and see. Will report back progress.
Hey,am i invisible to you or something?
cause i asked a question and nobody answered me...
and i'm still waiting for an answer.
The modem application
Please let me contribute into this,
From the code submitted by iTarek who happened to disappear after his discovery and from information published on Apple support pages (http://support.apple.com/kb/TS2432)submitted on I expect the following scenario happens:
1- The coe shows there is a function called
, when this function returns true as it is a bool value then the OS executes the following commands
which actually gives a message to the user (who is roaming in Egypt) telling him that the GPS is prohibited in %03d country and shuts off the modem of GPS
subscriber country %03d prohibits GPS
serving country %03d prohibits GPS
We need to find where the CLDaemonModemModel::isGpsProhibitedByNetwork() runs (I mean which binary) then replace this Binary with an older framework version of it, I suggests this would work for us.
Of course it will, the proplem that Mr.Tarek dont wanna tell us where did he find it so we have 2 search again and i did a lot of search but i found nothing thats why i have asked volkspost to help us. Thanks Volkspost
Originally Posted by SecretVacancy
IMHO, this mean that GPS is disabled during activation, and once it is, its not re-enabled even if you put other sim cards in there.
# An iPhone purchased in Egypt that is used outside of Egypt does not have GPS enabled
This means that the iPhone actively checks if its on an Egyptian network, hence disabling GPS.
# Any iPhone used while roaming in Egypt does not have GPS enabled
# An unlocked iPhone used with an Egyptian carrier's SIM does not have GPS enabled
My Current Thoughts
- You ARE right about your assumption.
- Perhaps iTarek was captured by Apple, or worse the egyptian government
- The code above mentions a daemon, that means its ALWAYS lurking. Or at least when it detects a network change.
- This means that there is ANOTHER peace of code/binary that disables GPS during activation, while this method above merely executes when a network changes.
- Either the iPhone actively checks for egyptian carriers, or iTunes does that for it always, OR it only happens during updates.
- It'd be intresting to see how roamers get their GPS functionality back when they leave Egypt.
- We need to find the code that SHUTS OFF GPS during activation.
- Speaking of code, how the heck do we have access to the iPhone's source code anyway???!
- We may also find a method or a way to code a method and execute it that'd enable GPS (prolly the inverse of the one that turned it off).
We're getting closer
Ok so here is what I am thinking of right now.
1. The update must have to do with carrier settings. Remember on FW2.1 when you were activating the iPhone on Mobinil it came back with a message that there were new carrier settings found.
2. I slept over this a while and the conclusion I am leaning to is that the check is conducted every time the Maps application is launched. It would be very "unapple" to have the GPS modem active all the time. Hence what I think is happening is that on launching maps it checks the condition and then decides to do a modem on or modem off.
3. From the way it checks the condition for subscriber country and serving country, it must be holding the information in based on the network currently selected as well as the SIM card prefix.
4. I think what we need to do now is find out where it points to Egypt as being a country where GPS is banned. One crazy idea I got last night was the Time Zones file in the new firmware since there is a specific entry for Egypt.
What we need to do now is to SSH into a WORKING (not GPS just activated and working on Mobinil) 3G iphone and dump /library and system/library for starters. If someone can do that and post a rapidshare then we can all start looking at how those files interact.
Shouldn't be very difficult to then change that particular entry and away we go :-)
Some information - some questions
I did some research on this one, even not beeing in Egypt and not beeing able to try out anything.
One question upfront: GPS worked up to firmware 2.0.2 then quit working starting at firmware 2.1 and still not working at fw 2.2, right?
Thats what I think is happening:
In any country with any simcard, once you insert a simcard and the simcard connects to a network it gets a "Mobile Country Code" and "Mobile Network Code" (MCC/MNC). The MCC for Egypt is 602, MNC for Mobinil is 1, MNC for Vodafone_EG is 2.
This happens not only if you are using one of their simcards, but aswell if you are roaming with a simcard from another country.
You can test it: Open the phone app, goto the keypad and type *3001#12345#* This will open the (hidden) app FieldTest on the iPhone. Goto "MM Info" -> "Serving PLMN" and look for "Mobile Country Code" and "Mobile Network Code".
Seems to me that once the iPhone gets the MCC 602, you wont get GPS.
I dont know, what is happening to that value on its way to locationd, the daemon that is handeling GPS location and the modem. But this is the place where the mentioned code is in:
I have been looking up the locationd of firmware 2.1 and 2.2. Even thought it is in different places (line 2640 in 2.2 and 8214:8665 in 2.1) it is there in both versions. So your finding make sense, GPS is probably disabled since 2.1.
subscriber country %03d prohibits GPS
serving country %03d prohibits GPS
BTW: locationd is to be found at /usr/libexec
Be careful, it is an executable (programm) that is binary, playing around with it if you dont know what you are doing might leave you with a non-functional iPhone and you'd have at least to restore the firmware!
In firmware 2.0.2 the daemon is called locationd82 - different name. All versions have different sizes aswell.
locationd82 2.0.2 788 KB
locationd 2.1 828 KB
locationd 2.2 856 KB
locationd82 does not contain the above code so this is probably why GPS worked in Egypt up to firmware 2.0.2.
I do have tons of work at this time in my real life job, cant do much more investigation on this topic for a while (at least the next 10 days), just wanted to share my ideas.
I have been looking where "%03d" is from in this code fragment, still have no clue. This would be my first try to find a fix. Messing around with the daemons might not lead to much fun. Renaming the 2.0.2 locationd82 to locationd and replacing the one in fw 2.2 probably wont work, i have not tried it though.
If you guys want to check the system AND you have a Mac, this is the way to go:
Use Pwnagetool 2.2.1 to produce custom firmware files for 2.0.2, 2.1 and 2.2 - the iPhone does not have to be connected to the Mac while you do so.
The files end *.ipsw and are sitting on your desktop. In the Mac's finder rename them to *.ipsw.zip. finder will ask if you really want .zip, choose it. You will se a zip file on your desktop, doubleclick it. It will be expanded, open the folder. In there - among other stuff - you'll find two .dmg images. Mount the bigger one, thats where the system stuff and daemons are sitting in.
Last note: if you fiddle around with the daemon and find something, don't post download links here, this is copyrighted software and we dont allow that, Use mail instead.
Very last note: playing around with those files might turn your iPhone none-functional. Even though I have been doing this several times and never ended with a brick, I had to DFU restore manymany times - so, you are on your own.
hope that helps
Last edited by volkspost; 11-25-2008 at 09:41 AM.
Read the stickies and search the forum before posting!
If you want to become a Hackint0sh supporter click here
---------- iPhone 4 factory unlocked, iOS 4.3.1, jailbroken
iPad Wi-Fi + 3G (1G), iOS 4.3.1, jailbroken
guys i dont think its a good idea to enable the GPS even if you do its not a good a idea to post howto around because the egyptian military will take action (this is for real) allahoma balaght allahoma fash-had
i don't agree with you omashhour,i don't think the "military" will do anything about it...
ya ostaz omashhour,ya3ni homa hayseebo kol el mashakel w yo2fo 3ala el GPS beta3 el iPhone 3G el f masr?
By guchuguchu in forum iOS 3.x (iPhone OS 3.x)
Last Post: 01-16-2010, 08:11 PM
By GSMsystem in forum iPhone 3G
Last Post: 03-03-2009, 07:06 PM
Last Post: 09-26-2008, 09:17 PM
By leeb1977 in forum Winpwn
Last Post: 09-20-2008, 10:48 AM
By noreason4nothing in forum General
Last Post: 10-17-2007, 10:05 PM
Tags for this Thread