Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ipsofacto73

macrumors newbie
Original poster
Jan 15, 2010
7
0
I'm attempting to duplicate the functionality exposed by Apple’s signature server, by entering (/private/etc/hosts) into the command line of Terminal Bash. I'm doing this to downgrade the firmware in my iphone 3gs from 3.1.2 to 3.0.1. I've been receiving a (permission denied) response for my efforts. I've gone into "Disk Utility and added myself as a "root user". However, that doesn't seem to correct the permission denied issue. Perhaps I didn't correctly add myself as a root user. Any help that you all can provide will be greatly appreciated.

Thank You
Peace
ipsofacto73
 
An easier way of downgrading iPhone Firmware would be to use the built-in iTunes Custom Restore functionality. To do this, download the iPhone OS 3.0.1 firmware from somewhere on the internet and click Restore while holding Option. This should bring up a file browser and then select the firmware you downloaded in the .IPSW file format.

I know this does not directly answer your question but hopefully it can help you out a little. To get a better answer to your original question you may want to post this thread in the Mac OS X section of this Forum.

DPA
 
To DPA:

With the 3GS, you CAN'T just downgrade. Like with the iPod Touch 3rd generation, Apple's servers have to "sign off" (cryptographically) on whatever firmware you are using to conduct the restore. Apple has stopped signing any firmware versions older than 3.1.2 for the iPhone 3GS and iPod Touch 3rd-gen. The OP sounds like he is trying to get around this issue by editing his local 'hosts' file to repoint iTunes to a different signature server somewhere else.

To the OP:

If you want to edit the 'hosts' file inside of /private/etc, you can't just type the name of that file at the shell. If you do, the system thinks you're trying to execute that file, and not only is the file not 'executable' (there's no executable computer code contained in there...it's just a text file), but because it's not executable, the executable permissions bits have not been set on the file. That's why you are getting "permission denied."

You need to edit the file using a text editor of some kind. You also need to do this as a superuser/root otherwise the system won't allow you to make changes to the file. Try this:

1. Make sure you are logged in to the system as an account that is set to be an Administrator.

2. At the shell, type 'sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /private/etc/hosts'

3. The 'sudo' part asks the system to run the application (in this case, TextEdit) as root/superuser. When you do this, you will be promped for a password. It's asking you for your account password. Enter it.

4. After you type the correct password, TextEdit will start up and open the hosts file. You can make your changes in here, and save.

Of course, in order for the downgrade to be successful, you either have to have 3.0(.1) signatures from Apple stored on Saurik's Apple Signature Replay server, or you need to have managed to capture a copy of the signatures yourself from back when Apple was still signing 3.0(.1), and then use the TinyTSS server locally. For more information on this, please see the ModMyi 3GS downgrade forums.

-- Nathan
 
To DPA:

With the 3GS, you CAN'T just downgrade. Like with the iPod Touch 3rd generation, Apple's servers have to "sign off" (cryptographically) on whatever firmware you are using to conduct the restore. Apple has stopped signing any firmware versions older than 3.1.2 for the iPhone 3GS and iPod Touch 3rd-gen. The OP sounds like he is trying to get around this issue by editing his local 'hosts' file to repoint iTunes to a different signature server somewhere else.

Thanks for the clarification Nathan. It is much appreciated. And my apologies to the OP and any other viewers for any confusion I caused.

DPA
 
To DPA:

With the 3GS, you CAN'T just downgrade. Like with the iPod Touch 3rd generation, Apple's servers have to "sign off" (cryptographically) on whatever firmware you are using to conduct the restore. Apple has stopped signing any firmware versions older than 3.1.2 for the iPhone 3GS and iPod Touch 3rd-gen. The OP sounds like he is trying to get around this issue by editing his local 'hosts' file to repoint iTunes to a different signature server somewhere else.

To the OP:

If you want to edit the 'hosts' file inside of /private/etc, you can't just type the name of that file at the shell. If you do, the system thinks you're trying to execute that file, and not only is the file not 'executable' (there's no executable computer code contained in there...it's just a text file), but because it's not executable, the executable permissions bits have not been set on the file. That's why you are getting "permission denied."

You need to edit the file using a text editor of some kind. You also need to do this as a superuser/root otherwise the system won't allow you to make changes to the file. Try this:

1. Make sure you are logged in to the system as an account that is set to be an Administrator.

2. At the shell, type 'sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /private/etc/hosts'

3. The 'sudo' part asks the system to run the application (in this case, TextEdit) as root/superuser. When you do this, you will be promped for a password. It's asking you for your account password. Enter it.

4. After you type the correct password, TextEdit will start up and open the hosts file. You can make your changes in here, and save.

Of course, in order for the downgrade to be successful, you either have to have 3.0(.1) signatures from Apple stored on Saurik's Apple Signature Replay server, or you need to have managed to capture a copy of the signatures yourself from back when Apple was still signing 3.0(.1), and then use the TinyTSS server locally. For more information on this, please see the ModMyi 3GS downgrade forums.


-- Nathan

Thanks for your instructions, however, When I type the commands into the mac shell program, I receive the following message: "No such file or directory"

Thanks again ***
 
Thanks for your instructions, however, When I type the commands into the mac shell program, I receive the following message: "No such file or directory"

Hmm. I'm not sure what could be going wrong to cause that error. If the location of the hosts file was incorrect, TextEdit would simply launch and present you with a blank document. If I had either given you the wrong location for the TextEdit binary or you had managed to typo it, it would have told you "sudo: command not found", not "No such file or directory".

Did you try opening up a Terminal window and then copying and pasting in my exact command from this post into the Terminal window? (Select and copy everything in between the single 'quotemarks' in step 2...don't include the quotemarks themselves.)

Aha!...I just tried it with the quotemarks intact, and I got "No such file or directory." You need to leave those off. I only included them so that it would be obvious where the command you needed to type started and ended without resorting to putting it on a line in the post by itself (which I guess I should have done in retrospect for extra clarity).

-- Nathan
 
Hmm. I'm not sure what could be going wrong to cause that error. If the location of the hosts file was incorrect, TextEdit would simply launch and present you with a blank document. If I had either given you the wrong location for the TextEdit binary or you had managed to typo it, it would have told you "sudo: command not found", not "No such file or directory".

Did you try opening up a Terminal window and then copying and pasting in my exact command from this post into the Terminal window? (Select and copy everything in between the single 'quotemarks' in step 2...don't include the quotemarks themselves.)

Aha!...I just tried it with the quotemarks intact, and I got "No such file or directory." You need to leave those off. I only included them so that it would be obvious where the command you needed to type started and ended without resorting to putting it on a line in the post by itself (which I guess I should have done in retrospect for extra clarity).

-- Nathan

Thanks for the cut and paste suggestion, it WORKED. Now I will have to research what code I must type into the command line, to get my iphone 3GS 3.1.2 jailbroken
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.