Categories
Geeky/Programming

iPhone: Firmware 1.1.4 – Mobile Safari – Login/Password won't save – Cookie Permission Issue

When I first picked up my iPhone, I unlocked/jailbroke using SSH (yikes!), and then after a few firmware updates and revirginzings, there were tools. I have been using Independence (on my Mac) lately, and then getting Installer.app on there over SSH, and then unlocking, etc from there.

With 1.1.4 I decided to try the new kid on the block, Ziphone. It worked, flashed, activated, jailbroke, unlocked. Now with the new Pwnage Tool that was released today, I will probably use that from now on, but looking back to the first firmware OTB to now, I have probably used 5 different methods, all resulting in the same thing, and unlocked iPhone.

Now, I after putting 1.1.4 on, I noticed my cookies weren’t working. Or in other words, logins/passwords weren’t saving in Mobile Safari. Basically, I had to put in my Facebook, Google Reader, etc login/password every time I hit the site – which really sucks.

My first guess is.. Cookie folder can’t be written to for some reason. I did some research, and yes, people with 1.1.4 unlocked or not are having this issue. Seems like a random issue with 1.1.4 on all iPhones.

Well, you can wait for the next firmware from Apple, try downgrading back to 1.1.3 (no way!) or , just fix it yourself.

What you need to do is either set the owner on the Cookies folders to “mobile” instead of “root”,

chown mobile /var/mobile/Library/Cookies/
chown mobile /var/mobile/Library/Cookies/Cookies.plist

or you need to allow write/modify access to the Cookies to all users.

chmod 777 /var/mobile/Library/Cookies
chmod 666 /var/mobile/Library/Cookies/Cookies.plist

 

What I did was change the owner to “mobile”. Your phone must be jailbroken, and have SSH installed. You can use Putty to SSH to your phone and do the fix. Here is the screencast:

You can tell that it works if you the go to a site, like Facebook, login, then in the Cookies directory on your phone, do a

ls -lat

you can see the last modified time and it should be updated to the time you just logged into your site.

Headache… resolved!

By Steve Novoselac

Director of Digital Technology @TrekBikes, Father, Musician, Cyclist, Homebrewer

17 replies on “iPhone: Firmware 1.1.4 – Mobile Safari – Login/Password won't save – Cookie Permission Issue”

sure, in mac you already have ssh client installed by default. Just run terminal (Applications->Utilities: Terminal, or just use spotlight, type terminal..)

Then,

ssh -l root

then its the same commands as the screencast and post , as windows

Like

Hey Steve, great write up and way to solve the issue! I’m using 1.1.4 aswell unlocked with iPlus 2.0 and am stuck with the iPhone not remembering passwords and its pretty frustrating haha. So I’ve logged in before with winSCP since I’m a windows user but I get lost at the part where you say to change the premissions. I’m typing from my phone right now so I can see the screencast, but I hope once I check using my desktop it explains the process. Thanks again for posting the fix!

Like

I’m having tough time with setting the Cookie of an Exchange OWA web page to remember my password, it does remember my email but not my password 😦

I did exactly as you without succcess… any thoughts?

Like

Thank you so much! This was so damn annoying! I was really hoping I wouldn’t have to resort to another wipe!

Like

I found another solution that should be suitable to people not having jailbreaked iPhone, and therefore not able to ssh into it.

The culprit file is corrrupted into your backup, so no matter how many time you restore your iphone, it will be restored as-is, and wrong.

The solution is to delete it from your iphone backup before restoring :

Open a terminal window, and type :

grep “Library/Cookies/Cookies.plist� ~/Library/Application Support/MobileSync/Backup/*/*

If you have one backup, as most people do, you should have only one line as a result. delete this file from the mentioned directory, and restore again.

Like

Thanks Steve! I know this is over a year old but it works beautifully with 2.2.1 firmware. Damn it was starting to annoy me and that Safari Cookie Fix in Cydia kept coming up half-installed (it’s a known issue) but this is one less package to install. Bookmarked!

Like

Leave a reply to Happy Bushra Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.