Posts filed under 'Tips'
[Update 1] Good news for all those iPhone aficionados who visit my blog: there is now a relatively simple jailbreak procedure that also handles activation for those of you looking to use an unlocked iPhone on unsanctioned networks. The older version only handled jailbreaking, but not the very important activation step, something I found out the hard way. Thankfully I was able locate instructions for manually cracking activation by replacing the /usr/libexec/lockdownd file with a hacked version via SSH/SFTP. Not fun. So do yourself a favor and use the new, improved jailbreak/activation method and save yourself the hassle. Instructions are in the included README.txt file.
Please note that I have not tested the new version myself, so run it at your own risk. I’d suggest reading through the comments on this TUAW article and maybe scanning the posts in the Hackint0sh forums to see if anyone is having any problems before proceeding. Please note that this jailbreak/activation solution DOES NOT handle unlocking. This will require an extra step using an unlocking program such as iPhoneSimFree.
Now I say it’s relatively simple because it is somewhat lengthy, with many steps to follow, but the hard stuff is automated, so as long as you are comfortable following step by step instructions and are fairly familiar with your OS of choice (Mac OS X or Windows), you should be OK. Whether or not it’s worth upgrading to the latest firmware really depends on who you are and how you want to use your iPhone, or more specifically, in what language. Besides the likely bug and security fixes (like the Safari TIFF file exploit, which has been closed), the only new features seem to be better support for typing and using your iPhone in other languages. So unless you want/need the better language support, have bought a new iPhone that came with firmware 1.1.2 out of the box, or, like me, you absolutely have to know you’re running the latest firmware “just because”, you may want to just sit this one out and wait for the next firmware update.
Update 1 - 12/22/2007: Please note that as of this writing, there is no software unlocking solution for out of box version 1.1.2 iPhones. The above article is referring to iPhones that are updated to firmware 1.1.2 from earlier versions. Thanks to reader “TM” for bringing this to my attention.
November 19th, 2007
[Update 1] Just a quick warning to anyone who may have followed my exploits and unlocked their iPhone to work with non-AT&T SIM cards: DO NOT update your unlocked iPhone’s firmware past version 1.0.2 until you’ve confirmed that it’s either safe to do so, or find verified instructions detailing what steps need to be taken to avoid permanent damage to the device.**
You’ve most likely heard Apple’s warning that the next firmware update (rumored to be version 1.1.1), will likely cause permanent damage to any iPhone that has been unlocked. Furthermore, they have stated that any such damage will not be covered under the iPhone’s warranty. OK, before you panic, take a moment and breath. This isn’t such a big deal, and should not have been unexpected. You should have already known the risks that are involved in hacking your iPhone, and been prepared to take the necessary steps to void them, namely not updating your firmware until you know it’s safe to do so.
But hot on the heels of Apple’s statement, the iPhone Dev Team has responded:
Based on download numbers, the iPhone Dev Team believes that, worldwide, several hundred thousand people have unlocked their iPhones. That number continues growing every day. The removal of the lock, a bug, was a major step forward in the iPhone development. It made the iPhone free and useful to anyone, not only to those in certain countries.
Apple now announces that the next firmware update, expected later this week, will possibly break the handset of all of us free users in the World. It speaks of “damage” done to the firmware and “unauthorized access” to our own property, The removal of those firmware problems, which were built in in favor for AT&T, does not cause “damage” as they want to make us believe.
We will provide you with a tool in the next week which will be able to recover your nck counter and seczones and even enables you to restore your phone to a Factory-like state.
In the meantime we advise you not to update your free iPhone with the upcoming firmware. Wait for the next version to be fixed to work properly with your carrier and not break your phone.
So there you have it. Be patient, don’t rush to install the new firmware when it comes out, and keep an eye on this space (or any other useful source of iPhone hacking/unlocking news) for updated information on how to proceed. I recommend against trying any of the premature manual re-lock methods. There’s no need to rush. You have control over when you update your iPhone’s firmware, so there’s no sense rushing to implement a risky hack that may do real permanent damage to your iPhone. An easy solution will come in time, so relax and enjoy your iPhone in the meantime.
Worst case scenario I foresee is you’ll need to re-lock your iPhone, install the new firmware update, then unlock it again using a new version of the unlock tool that will no doubt be released shortly after the new firmware hits the interwebs.
Update 1 - 9/29/2007, 12:55 pm: It is
NOT safe to update your unlocked iPhone to firmware 1.1.1! DON’T DO IT unless you want to end up with an expensive brick. I suggest disabling “Check for updates automatically” in iTunes preferences, and do not click the “Check for Update” button on the iPhone screen in iTunes. I also recommend NOT updating iTunes past version 7.4.2 until we know what it does exactly. If you have to restore your iPhone’s 1.0.2 firmware, disable your network connection first so iTunes can’t check for the update. If iTunes has already downloaded the updated firmware, deleting the 1.1.1 .ipsw files from
~/Library/Application Support/iTunes/iPhone Software Updates (that’s the Library in your home folder, not the one at the top level of your hard drive) should allow you to install the older 1.0.2 version as long as it’s files exist in that directory already. I make no guarantees though, so proceed at your own risk.
September 26th, 2007
I have been on a quest for the ‘perfect’ mobile phone for several years now, buying a new one every 6-9 months, but never being quite satisfied with any of them. I think the quest started back in 2003 when I bought a Sony Ericsson T68i, my first BlueTooth equipped phone, and was able to synchronize it wirelessly with my Mac using iSync. Every phone I bought since then could sync contact names and phone numbers with Mac OS X’s Address Book, and appointments with iCal but I have been forever plagued by a desire for a phone that can sync full addresses and contact notes with the same simplicity. In other words, I wanted something that could finally allow me to ditch my Palm PDA in the garbage forever.
Back in November of last year, a friend of mine IM’d me and told me about this new smartphone he had purchased. I told him what I was looking for in a phone, and he told me his phone would do all that, and synchronize contact photos to boot. I was skeptical, because I was starting to give up hope that any device could live up to my high expectations, short of Apple making a phone of their own*. But I was curious to see what benevolent creation my friend possessed. That phone was a Nokia E61, and after a short demonstration and a bit of a test drive, I was convinced. The next day I bought an unlocked Nokia E61 from a local reseller, and kissed my Motorola RAZR V3i and Palm TX goodbye.
The latest version of Mac OS X’s iSync at the time didn’t directly support the Nokia E61, but a free plugin available off the Internet quickly solved that problem. I just had to drag the plugin into a specific location on my hard drive, and iSync suddenly recognized and worked with my phone, like they were designed for each other from the beginning.
So last night, the Mac OS X 10.4.9 update dropped via Software Update, and I quickly went about downloading and installing it. The installation went without issue as expected and I was quickly back up and running with no muss or fuss. But this morning, when I went to launch iSync to sync up my phones with my MacBook Pro, I was greeted with this message:

My first thought was, “where the heck did I install that plugin?” My second was, “oh no, I might not be able to sync my E61 until an updated plugin gets released!” Well, looks like Apple’s iSync developers read my mind because they seem to have anticipated my concerns and dealt with them ahead of time. I proceeded to click on the little arrow to the right of the plugin name in the dialog box, and was pleasantly surprised to see a Finder window pop open with the offending plugin highlighted. All I had to do was drag the file to my Desktop to disable it. Then I relaunched iSync, re-added the Nokia E61 to the list and it was instantly recognized. Seconds later, I was syncing it without issue. I no longer need to use a third party plug-in because iSync now has built-in support for the Nokia E61.
Once again, Apple has exceeded my expectations by obsessing over the little details so I don’t have to waste my time. After this positive experience, I couldn’t help but wonder what it would have been like had I gone through the same ordeal on Windows or Linux. Having used and supported the former for years, and dabbled a bit with the latter, I think I’ve got a pretty good idea what that would have been like.
*Of course, we all know Apple has decided to make their own smartphone, the iPhone, which is slated for release in the US in June. No firm release date has been given for Canada, although Rogers Wireless has apparently said they would be the exclusive carrier in the Great White North. For the record, as much as I do like my Nokia E61, I do plan on replacing it with an iPhone as soon as they arrive north of the border. A mobile phone that is as well thought out as Apple’s other products is, will be utter mobile nirvana.
March 14th, 2007
Any Mac user knows you can display the current time in the right side of the menu bar. Most even know you can set it to also display the day of the week, and that clicking the clock will pull down a menu which displays today’s date.
If you’re like me, you often want to know what today’s date is, and you find having to click the clock or bring up Dashboard to check the Calendar widget to be a tad inconvenient. Sure you could leave iCal running, which will display today’s date in it’s Dock icon, and you can’t be sure you’ll leave it running all the time.
Today I came across a great hint on Macinstruct (by way of MacDailyNews), which explains how to get the date to display with the time in the menu bar, by customizing the time format in the International preference pane. Click the following link to read the full step-by-step instructions.
Macinstruct Tutorial: How to Display the Date in the Menu Bar
Macinstruct seems to be a new website, so they don’t have too much content up yet, but I’m going to keep my eye on it as it looks like it might be a great resource for useful Mac OS X hints in the future. They have a few other hints and tutorials in their How-Tos section, so check it out!
February 20th, 2007
Mac OS X is a very powerful OS. One of it’s most amazing traits is how well it scales from being dead easy to use for novice users to allowing power users near unlimited capabilities. The former comes from the excellent UI design and GUI tools that Apple has built, the latter from Mac OS X’s FreeBSD Unix underpinnings. While most users will never have to touch the Mac OS X Terminal application to go about their day to day computing, those who like to push the limits of what they can do will most likely spend at least a bit of time at the command prompt. This article is for those aspiring command line gurus, like myself.
I’ve been using Mac OS X since the Public Beta was released in 2000. Over the years, as I’ve delved further into learning about the operating system’s Unix underpinnings, I’ve always kept a Stickies note handy where I would paste terminal commands that I thought might come in handy at some point in the future. Every one of these commands required countless Google searches and time scouring the results to find solutions to the problem I had at the time. It’s in the interest of saving others from spending too much time searching that I present my Stickies Mac OS X terminal command list. I hope these help all of you as much as they have helped me.
A warning for newbies:
If you’re not familiar with the Mac OS X Terminal, it’s an application that allows a user to directly execute Unix commands by typing them into text based command prompt. You can find the Terminal application in /Applications/Utilities on your hard disk. Please be aware that the terminal and Unix commands are very unforgiving. A simple typo or misplaced punctuation can mean the difference between your command working and you deleting or overwriting something important, especially when executing commands with administrator rights (via the sudo command). If you aren’t sure what you’re doing, it’s better to take the time to research the answer than to simply guess and possibly mess something up you won’t know how to fix. This article is not meant to be a tutorial on how to use the Terminal. If have never used the terminal, may I suggest you visit O’Reilly’s MacDevCenter which has some good tutorials to get you started.
The Commands
Disclaimer: Please note that I cannot be held responsible for anything bad you do to your computer while attempting to use any of these commands. Use them at your own risk!
Eject Stubborn CDs
I found myself one day with a CDROM stuck in my CDROM drive, but no way to eject it. It didn’t show up in the Finder or on the Desktop, and hitting the “Eject” button on the keyboard did nothing. I found and tried two or three other terminal and GUI based solutions from sites like Mac OS X Hints, but none of them worked except this little gem. I haven’t had to use it for years and it may not work for every stuck CD, but this one saved me from having to reboot my computer to get a bad CD out. Type disktool by itself to get help.
Unmount Stubborn Network Volumes
umount -f /Volumes/volumename
Like the stuck CD issue above, I have once or twice come across a network volume that I could not disconnect. Substitute the stuck network share’s name in place of “volumename” in this command. You can view the pdisk man page to get help by typing man umount at the prompt and hitting return.
Delete partition table on iPod
This menu based terminal app saved a dead iPod. I once made the mistake of formatting my iPod as an external FireWire drive as some non-standard format (maybe NTFS or Unix File System). After doing that, I couldn’t re-initialize the iPod using the latest iPod updater. While I don’t remember exactly the steps I used to get the iPod working again (it had to do with deleting the partition table), this tool is what did the trick for me. You can view the pdisk man page to get help by typing man pdisk at the prompt and hitting return.
Restart Bonjour service
Stop Bonjour service:
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
Start Bonjour service:
sudo launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
A while back I had a problem where one of my Macs would periodically fail to broadcast it’s Bonjour name for things like print and file serving. Rebooting the computer would resolve the problem for a time, but it would always come back. Rather than having to reboot my computer all the time, I searched for and found this handy set of commands for stopping and starting the Bonjour service which would do the trick until the problem occurred again. Since this was a service, it was great not having to reboot. I eventually solved the problem, which if memory serves was caused by my router, but I felt it was handy to hold onto this in case I ever needed to stop or restart the Bonjour service again. These commands need to be run as administrator, which is why they are prefixed with the sudo command. You will be prompted to enter your admin password to execute them.
Restart Apple Remote Desktop (ARD) service
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -menu
Note: This is a very long command that should all be typed or copied/pasted as one line.
I had a problem with Apple Remote Desktop once where if I left a remote control session running for too long (say overnight), the remote display would no longer refresh automatically. In my quest to avoid rebooting my server, I found this handy command that restarts the ARD service, which listens for and manages remote control requests. This has to be run on the machine you want to control normally. Since I was having problems remote controlling said computer, I would log in remotely via SSH by typing ssh ip_address and execute the command while logged in remotely. Very handy indeed. Being able to remotely login via SSH is no doubt one of the most useful reasons to learn the command line. All terminal commands that are covered in this article can be executed remotely. You can view the SSH man page to get help by typing man ssh at the prompt and hitting return.
Reset Network Interface
Shut down network interface:
sudo ifconfig en0 down
Start up network interface:
sudo ifconfig en0 up
Note: Substitute en0 for appropriate network interface id (a.k.a. BSD device name). You can use System Profiler (in the /Applications/Utilities folder) to find the BSD device name for the network connection you want to reset.
I can’t remember why I needed to do this. Might have been while I was troubleshooting that Bonjour service issue, or maybe I was trying to change the connection’s MAC hardware address. Doesn’t really matter. The point is you can use this combination of commands to restart a network interface. These commands use the SUDO command to run using administrator rights and so you will be prompted for your admin password.
[Edit: Thanks to commenter "why o why" for pointing out, "it should be noted that if you remotely shutdown the ethernet interface you are using, it will be difficult to get it back up remotely
"]
Restart Apache Webserver
While restarting Mac OS X’s built-in Apache web server is as easy as toggling the “Personal Web Sharing” service’s status in the Sharing preference pane, you can’t do this easily remotely unless you can remote control the server in question. Over a modem connection, this can be near impossible or at least very painful. This command comes in handy if you’ve modified the Apache configuration file via a remote SSH connection as the changes only take effect after the Apache service is restarted.
Restart MySQL Server
Stop MySQL Server
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
Start MySQL Server
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Not so long ago I installed the MySQL open source SQL database on my web server so I could run a phpBB based forum site. MySQL also happens to be the database that runs the Art Of Geek blog. These two commands are useful for stopping or restarting the MySQL service via SSH, or if like me you have ever broken your MySQL installation just enough for the MySQL preference pane to stop working.
Change a file’s type code to make an AAC file an iTunes/iPod audio book
/Developer/Tools/SetFile -t 'm4b ' filename.m4b
Note: You must have the Mac OS X developer tools installed for this command to work!
This gem of a command will set the type code of a file to ‘m4b ‘ (there is a space after the ‘b’), which tells iTunes it’s an audio book. This is required if you have ever ripped an audio book from CD, and want iTunes to see it as an audio book. The file must be an AAC file, and you need to change the file extension to .m4b. The truth is, this command can come in handy any time you need to implicitly set a file’s ‘type’ or ‘creator’ codes. You can view the SetFile man page for help by typing man SetFile at the terminal prompt and hitting return.
That’s all the time (and commands) we have for today folks! I’ll post more in a future article!
September 22nd, 2006
Next Posts