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

iannufc

macrumors newbie
Original poster
Jul 7, 2009
27
0
Newcastle, UK
Folks.

Apologies if this has been discussed earlier, but I did search with the above terms and received no hits, so have decided to post here.

It isn't a question as such, just reassurance/opinions/experiences of what it is that I want to do. The issue is as follows:

I'd like to re-JB my phone using a cooked firmware this time, as opposed to Blackra!n this time, as I'm having problems with regards to Apps crashing, especially Facebook which I use all the time.

After that, I'd like to restore my Contacts and SMS's that I have previously backed up, by SSH'ing them back on the phone.

I'm confident with SSH, but I was just wondering if anyone had done this before, and was it successful, or if there are any issues with it, or if it really is as straightforward as it appears to be?

Many thanks in advance. :)
 

bytethese

macrumors 68030
Jun 20, 2007
2,707
120
Folks.

Apologies if this has been discussed earlier, but I did search with the above terms and received no hits, so have decided to post here.

It isn't a question as such, just reassurance/opinions/experiences of what it is that I want to do. The issue is as follows:

I'd like to re-JB my phone using a cooked firmware this time, as opposed to Blackra!n this time, as I'm having problems with regards to Apps crashing, especially Facebook which I use all the time.

After that, I'd like to restore my Contacts and SMS's that I have previously backed up, by SSH'ing them back on the phone.

I'm confident with SSH, but I was just wondering if anyone had done this before, and was it successful, or if there are any issues with it, or if it really is as straightforward as it appears to be?

Many thanks in advance. :)
I'm not sure why you would want to. You just said you have a previous backup, why not restore that?

You couldn't simply SCP (SSH is the tunnel, SCP is the secure copy. :)) the files over as the Contacts and SMS messages are databases I believe.
 

scottuf

macrumors 6502
Feb 2, 2009
364
21
NPB, FL
if you copied the databases off of the phone prior to restore, you can put them back in the same place, same way. BUT - it will only work if you fix permissions and ownership.

chmod -R 0755 directoryname
and
chown -R mobile:mobile directoryname

directory name are CaSeSenSiTive

if you don't do this, the app will either crash or won't save any of the messages.
 

iannufc

macrumors newbie
Original poster
Jul 7, 2009
27
0
Newcastle, UK
Hi, thanks for the reply.

I didn't explain that one very well, so I'll try to clear it up.

I want to set my phone up as a new phone, without restoring a backup from iTunes, but don't want to lose my SMS messages.

The backups I mention were done with SCP, as my phone is jailbroken.

I copied sms.db from /private/var/mobile/Library/SMS and both files from /private/var/mobile/Library/AddressBook as I have read that it is a simple case of copying them back onto a new phone. I realise that the contacts don't really matter, as I can sync them with my Exchange account, but I'd like to keep my SMS messages.

Do the chmod and chown both need to be run on each directory (AddressBook and SMS) and when you refer to mobile:mobile, what do you mean exactly?

Many thanks.
 

scottuf

macrumors 6502
Feb 2, 2009
364
21
NPB, FL
Hi, thanks for the reply.

I didn't explain that one very well, so I'll try to clear it up.

I want to set my phone up as a new phone, without restoring a backup from iTunes, but don't want to lose my SMS messages.

The backups I mention were done with SCP, as my phone is jailbroken.

I copied sms.db from /private/var/mobile/Library/SMS and both files from /private/var/mobile/Library/AddressBook as I have read that it is a simple case of copying them back onto a new phone. I realise that the contacts don't really matter, as I can sync them with my Exchange account, but I'd like to keep my SMS messages.

Do the chmod and chown both need to be run on each directory (AddressBook and SMS) and when you refer to mobile:mobile, what do you mean exactly?

Many thanks.

you explained it fine. that will work just as you want. type it in exactly like:

chmod -R 0755 /private/var/mobile/Library/SMS

and


chown -R mobile:mobile /private/var/mobile/Library/SMS

this will ensure the owner is "mobile" and the permissions are correct. When you copy using SSH (at least for me) it copies it as owner "root" which disallows the SMS app (or whatever) from writing to the file, so you need to set "mobile" as the owner.

run it on each directory, just changing the dir name, and make sure the case is correct. you can verify by entering

ls -la
you should get a listing that looks like:

-rwxrw-rw- 1 mobile mobile 10240 Oct 27 12:28 filename
 

iannufc

macrumors newbie
Original poster
Jul 7, 2009
27
0
Newcastle, UK
Thanks very much for that, very helpful.

Mine does also copy over as root, so thanks for clearing that one up.

I should be able to manage that one OK now, that's all I was after!

Thanks again! :)
 

Pimptastic

macrumors regular
Nov 27, 2006
136
11
Up North, UK
Great stuff, i was wondering how you setup a new iPhone but kept your SMS.

@zigmondski: Use putty or something similar to SSH into your phone, then run the commands from there
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.