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

wildonrio

macrumors 6502
Original poster
Aug 15, 2008
435
7
This is my plan:

1. On jailbroken 7.1b3, SSH in and copy the entire directory of var/mobile/Library/SMS onto my PC.
2. Restore my phone as new to 7.0.4.
3. Jailbreak and SSH back in.
4. Overwrite var/mobile/Library/SMS with the same directory structure on my PC.
5. Back up to iCloud.

Will iCloud backup my text messages from then on without issue?
 

darricksailo

macrumors 601
Dec 18, 2012
4,353
113
This is my plan:

1. On jailbroken 7.1b3, SSH in and copy the entire directory of var/mobile/Library/SMS onto my PC.
2. Restore my phone as new to 7.0.4.
3. Jailbreak and SSH back in.
4. Overwrite var/mobile/Library/SMS with the same directory structure on my PC.
5. Back up to iCloud.

Will iCloud backup my text messages from then on without issue?

Not sure. As long as apple didn't change the structure, then you can use your 7.1 beta SMS file on 7.0.4 and it'll work fine

If they changed it (like they did for 6.0.x vs 6.1.2), then your messages app won't even show all the messages from the SMS.db (it'll just overwrite it with a new one)

And make sure the permissions are mobile and not root after you transfer it over or else it won't work
 

wildonrio

macrumors 6502
Original poster
Aug 15, 2008
435
7
How do I get all the permissions the same? There are a ton of files in there with all different permission settings...
 

darricksailo

macrumors 601
Dec 18, 2012
4,353
113
How do I get all the permissions the same? There are a ton of files in there with all different permission settings...

what do you mean? by design, all of the files/folders in there should be with the owner permission as mobile

oops, i should've specified that i meant only the owner permission
 

wildonrio

macrumors 6502
Original poster
Aug 15, 2008
435
7
what do you mean? by design, all of the files/folders in there should be with the owner permission as mobile

oops, i should've specified that i meant only the owner permission

Oh, I'm talking access permissions. Whether the user, group, or world can read, write, or execute. Every folder and file all over iPhone has different settings here, and if I copy the SMS folder to my computer and back again, I believe all of those settings will be reset.
 

darricksailo

macrumors 601
Dec 18, 2012
4,353
113
Oh, I'm talking access permissions. Whether the user, group, or world can read, write, or execute. Every folder and file all over iPhone has different settings here, and if I copy the SMS folder to my computer and back again, I believe all of those settings will be reset.

i never had a problem with that. i just needed to make sure the owner permissions was mobile. i don't think the access permissions would make much of a difference. by default, i believe they're assigned read and write permissions

messages is run in a sandboxed environment anyways
 

wildonrio

macrumors 6502
Original poster
Aug 15, 2008
435
7
i never had a problem with that. i just needed to make sure the owner permissions was mobile. i don't think the access permissions would make much of a difference. by default, i believe they're assigned read and write permissions

messages is run in a sandboxed environment anyways

Pardon my ignorance but doesn't putting the files on the var/mobile directory automatically assign the owner permissions to mobile?
 

darricksailo

macrumors 601
Dec 18, 2012
4,353
113
Pardon my ignorance but doesn't putting the files on the var/mobile directory automatically assign the owner permissions to mobile?

if you ssh into the device as root, then it'll assign items with the owner permission of root
 

darricksailo

macrumors 601
Dec 18, 2012
4,353
113
Oh. I had no idea. How does one learn which one is more appropriate case by case?

depends on what you're trying to modify. most stock apple or appstore apps require owner as mobile whereas, most tweaks don't care if the owner permission is root or mobile

as for me, i always ssh as root and then i change the owner permissions as needed
 

Trevornewell

macrumors member
Mar 27, 2011
68
0
Canada
Isn't this kina like trying to copy part of a program from one PC to another? Just here me out for a sec.

I'm no expert, but isn't there registry keys Thrace have to added as well wor this to work? I don't know a lot about the program side of ios but I know this is how it works on PC in my experience.
 

darricksailo

macrumors 601
Dec 18, 2012
4,353
113
Isn't this kina like trying to copy part of a program from one PC to another? Just here me out for a sec.

I'm no expert, but isn't there registry keys Thrace have to added as well wor this to work? I don't know a lot about the program side of ios but I know this is how it works on PC in my experience.

Don't think so since all the information is inside the SMS.db and messages is already programmed to look for that file to read/write texts

I've done it the numerous time I've restored last year on 6.1.2
 

wildonrio

macrumors 6502
Original poster
Aug 15, 2008
435
7
depends on what you're trying to modify. most stock apple or appstore apps require owner as mobile whereas, most tweaks don't care if the owner permission is root or mobile

as for me, i always ssh as root and then i change the owner permissions as needed

THIS ENTIRE PROCESS WORKED! I'm on a fresh install and my messages are there. Thanks so much!
 

Samanosuke

macrumors 6502
Mar 21, 2013
339
29
Don't think so since all the information is inside the SMS.db and messages is already programmed to look for that file to read/write texts



I've done it the numerous time I've restored last year on 6.1.2


Can you give a step by step write up of this please?
 

wildonrio

macrumors 6502
Original poster
Aug 15, 2008
435
7
That's great!

----------



Yea, mms will work. Previous mms will show as long as you transfer the Attachments folder as well

One frightening problem for a while was that iCloud wouldn't back up my hacked file structure. It was saying something like "The last backup was not completed successfully" or something. I thought I was screwed. Then once I got my first new text, that somehow fixed everything and iCloud decided to back up again. Now just to see if it will restore my texts the next time I do a restore.
 

darricksailo

macrumors 601
Dec 18, 2012
4,353
113
Can you give a step by step write up of this please?

browse to /var/mobile/media/SMS

backup everything inside that folder (as for me, I always delete my MMS after saving the ones I want to keep to my camera roll because they can add up to taking up a lot of space over time so I only backup my sms.db)

note: This transfer of text messages is best done if the starting and receiving device will be on the same iOS version

on the new device, replace the existing SMS folder with the one you backed up
make sure all the folders and files have the owner permission of mobile

respring device and your text messages should've been restored


i would advise making a backup just in case anything goes wrong (that way, you at least have a backup/copy of everything)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.