iPhone Will this method word to backup and restore *just* my messages?

Discussion in 'Jailbreaks and iOS Hacks' started by wildonrio, Jan 25, 2014.

  1. wildonrio macrumors 6502

    Joined:
    Aug 15, 2008
    #1
    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?
     
  2. darricksailo macrumors 601

    darricksailo

    Joined:
    Dec 18, 2012
    #2
    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
     
  3. wildonrio thread starter macrumors 6502

    Joined:
    Aug 15, 2008
    #3
    How do I get all the permissions the same? There are a ton of files in there with all different permission settings...
     
  4. darricksailo macrumors 601

    darricksailo

    Joined:
    Dec 18, 2012
    #4
    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
     
  5. wildonrio thread starter macrumors 6502

    Joined:
    Aug 15, 2008
    #5
    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.
     
  6. darricksailo macrumors 601

    darricksailo

    Joined:
    Dec 18, 2012
    #6
    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
     
  7. wildonrio thread starter macrumors 6502

    Joined:
    Aug 15, 2008
    #7
    Pardon my ignorance but doesn't putting the files on the var/mobile directory automatically assign the owner permissions to mobile?
     
  8. darricksailo macrumors 601

    darricksailo

    Joined:
    Dec 18, 2012
    #8
    if you ssh into the device as root, then it'll assign items with the owner permission of root
     
  9. wildonrio thread starter macrumors 6502

    Joined:
    Aug 15, 2008
    #9
    Oh. I had no idea. How does one learn which one is more appropriate case by case?
     
  10. darricksailo macrumors 601

    darricksailo

    Joined:
    Dec 18, 2012
    #10
    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
     
  11. Trevornewell macrumors member

    Joined:
    Mar 27, 2011
    Location:
    Canada
    #11
    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.
     
  12. darricksailo macrumors 601

    darricksailo

    Joined:
    Dec 18, 2012
    #12
    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
     
  13. wildonrio thread starter macrumors 6502

    Joined:
    Aug 15, 2008
    #13
    THIS ENTIRE PROCESS WORKED! I'm on a fresh install and my messages are there. Thanks so much!
     
  14. Trevornewell macrumors member

    Joined:
    Mar 27, 2011
    Location:
    Canada
  15. Samanosuke macrumors 6502

    Joined:
    Mar 21, 2013
    #15
    Can you receive mms and it shows up as mms not as an icon or downloading?
     
  16. wildonrio thread starter macrumors 6502

    Joined:
    Aug 15, 2008
  17. darricksailo macrumors 601

    darricksailo

    Joined:
    Dec 18, 2012
    #17
    That's great!

    ----------

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

    Joined:
    Mar 21, 2013
    #18

    Can you give a step by step write up of this please?
     
  19. wildonrio thread starter macrumors 6502

    Joined:
    Aug 15, 2008
    #19
    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.
     
  20. darricksailo macrumors 601

    darricksailo

    Joined:
    Dec 18, 2012
    #20
    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)
     

Share This Page