Go Back   MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 27, 2009, 07:25 AM   #1
iannufc
macrumors newbie
 
Join Date: Jul 2009
Location: Newcastle, UK
SSH'ing Contacts and SMS

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.
__________________
Rolex, iPhone 4. What more could a man want?
iannufc is offline   0 Reply With Quote
Old Oct 27, 2009, 10:13 AM   #2
bytethese
macrumors 68030
 
bytethese's Avatar
 
Join Date: Jun 2007
Location: Cranford, NJ
Quote:
Originally Posted by iannufc View Post
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.
__________________
So I prison break my phone, use Chlamydia to install un-John Hancock'd apps, then I somehow use a Surfboard to change the way my African Safari looks
bytethese is offline   0 Reply With Quote
Old Oct 27, 2009, 11:21 AM   #3
scottuf
macrumors 6502
 
Join Date: Feb 2009
Location: Jupiter, 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.
scottuf is offline   0 Reply With Quote
Old Oct 27, 2009, 11:25 AM   #4
iannufc
Thread Starter
macrumors newbie
 
Join Date: Jul 2009
Location: 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.
__________________
Rolex, iPhone 4. What more could a man want?
iannufc is offline   0 Reply With Quote
Old Oct 27, 2009, 12:08 PM   #5
scottuf
macrumors 6502
 
Join Date: Feb 2009
Location: Jupiter, FL
Quote:
Originally Posted by iannufc View Post
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
scottuf is offline   0 Reply With Quote
Old Oct 27, 2009, 12:39 PM   #6
iannufc
Thread Starter
macrumors newbie
 
Join Date: Jul 2009
Location: 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!
__________________
Rolex, iPhone 4. What more could a man want?
iannufc is offline   0 Reply With Quote
Old Oct 28, 2009, 06:01 AM   #7
zigmondski
macrumors newbie
 
Join Date: Jul 2009
Excuse my n00bness, but how exactly do I run these commands?

Thanks.
zigmondski is offline   0 Reply With Quote
Old Oct 28, 2009, 07:44 AM   #8
Pimptastic
macrumors regular
 
Join Date: Nov 2006
Location: 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
Pimptastic is offline   0 Reply With Quote
Old Oct 28, 2009, 10:10 AM   #9
medicscott
Banned
 
Join Date: Aug 2009
Location: san diego
Quote:
Originally Posted by zigmondski View Post
Excuse my n00bness, but how exactly do I run these commands?

Thanks.
check out the tutorials on hackthatphone.com buddy. look for the ssh one, really good one, this is how i learned how to.
medicscott is offline   0 Reply With Quote

Reply
MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone contacts NOT sync'ing to iCloud A4orce84 iCloud and Apple Services 0 Oct 24, 2013 10:56 AM
iPhone: SSH-ing framework files saint berkut Jailbreaks and iOS Hacks 4 Mar 29, 2013 09:56 AM
iPhone: HELP! Deleted files using SSH - can't open SMS messages! janamiriams Jailbreaks and iOS Hacks 13 Feb 27, 2013 04:03 PM
IOS Contacts not sync'ing with Snow Leopard McCarthy Forest iPad Tips, Help and Troubleshooting 0 Jun 28, 2012 12:30 PM

Forum Jump

All times are GMT -5. The time now is 09:13 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC