Page 1 of 3 123 LastLast
Results 1 to 20 of 43

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Addressbook.sqlitedb and sms.db on iOS 5. Upgrading problems.

  1. #1
    What's Jailbreak?
    Join Date
    Oct 2010
    Location
    Japan
    Posts
    9
    Thanks
    1
    Thanked 2 Times in 1 Post
    Default Addressbook.sqlitedb and sms.db on iOS 5. Upgrading problems.
    Hi,

    Yesterday I just tried to update my iPhone 4 4.3.3 (jailbroken with Jailbreakme) to iOS 5 but had some problems with corrupt iTunes backup and couldn't restore my old data back into iOS 5. Thankfully I had a manual backup of some of the most important files I had on the phone (address book and sms data) which I'm trying restore to iOS 5 now.

    When I migrated from iPhone 3G 3.1.2 to iPhone 4 4.1 I had a similar problem and just cutting and pasting the old files to the new OS (on /var/root/library/addressbook and /sms respectively) worked just fine.

    However, address book data used to consist of only two files: AddressBook.sqlitedb and AddressBookImages.sqlitedb. And SMS had only sms.db. However on iOS 5 there are three "versions" for each of those file (AddressBook.sqlitedb, AddressBook.sqlitedb-shm, AddressBook.sqlitedb-wal, AddressBookImages.sqlitedb, AddressBookImages.sqlitedb-shm, AddressBookImages.sqlitedb-wal, sms.sqlitedb, sms.sqlitedb-shm, sms.sqlitedb-wal)
    It seems the actual contacts/sms are storred on the .sqlitedb-wal files and not the .sqlitedb ones.

    Trying to replace the .sqlitedb files or renaming them to sqlitedb-wal and replacing doesn't work.

    Does anyone have any clues on how to proceed on this?
    Thanks!

  2. The Following 2 Users Say Thank You to gusutabo For This Useful Post:

    arhitekt (10-15-2011), D2V1D (03-08-2012)

  3. #2
    What's Jailbreak?
    Join Date
    Oct 2011
    Location
    Estonia
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Hi everybody,
    I`ve got exactly the same problem with my 3GS. Google shows that these -shm and -wal extensions are cookies.

    Has anyone restored those files without any problems and how?


    Thanks!

  4. #3
    What's Jailbreak?
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    8
    Thanked 5 Times in 1 Post
    Default SMS.db Backup SOLVED!!!
    UPDATE 4: December 30 2011: For those who are having problems restoring contacts: TURN OFF iCloud contacts Backup before performing this:
    AddressBook restored successfully by deleting everything, copying the backups AddressBook.sqlitedb and AddressBookImages.sqlitedb (images as it says) then respring.

    Doing the same for sms.db works partially, since it seams that all previous messages appear in the list but when u go into one, it's empty...

    Still working on it, so i'll update you guys if i find a solution

    UPDATE 1: SMS.db successfully imported! (using iphonebrowser & iFile - you may use others...):

    1. Using iphonebrowser delete all files in /var/mobile/library/sms
    2. drop sms.db in same directory
    3. Open iFile change owner from "root" to "mobile"
    4. Restart iPhone using "Just Boot" in Redsn0w of course.
    and voila!

    UPDATE 2: It seems that there's a flow i can't receive SMS. Still working on a fix, feel that i'll solve it pretty soon...

    UPDATE 3: 100% Working. I'm able to send, receive and all my previous SMS are here! Whooohooo!
    The fix: reboot once more
    Last edited by codvisp; 12-30-2011 at 03:53 PM. Reason: UPDATE 4

  5. The Following 5 Users Say Thank You to codvisp For This Useful Post:

    DaMan05 (12-28-2011), It's Mi (01-06-2012), nietvoorniks (12-19-2011), tahirkhan (10-26-2011), Xipro786 (01-20-2012)

  6. #4
    What's Jailbreak?
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    8
    Thanked 5 Times in 1 Post
    sqlitedb-wal is for iMessage and not normal SMS, which is still the same file sms.db

  7. #5
    first drop your backup sms.db file into the sms folder via ifile... change its owner to "mobile".. remember do not open the message app.. then backup in itunes.. and then restore from the same backup.. and youre done.. it worked for me..

    Quote Originally Posted by zodiac9 View Post
    first drop your backup sms.db file into the sms folder via ifile... change its owner to "mobile".. remember do not open the message app.. then backup in itunes.. and then restore from the same backup.. and youre done.. it worked for me..
    Remember to delete those -shm and -wal files along with the original sms.db file before dropping the backup file..
    Last edited by zodiac9; 10-16-2011 at 01:37 AM.

  8. #6
    What's Jailbreak?
    Join Date
    Oct 2011
    Location
    Estonia
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Quote Originally Posted by codvisp View Post
    AddressBook restored successfully by deleting everything, copying the backups AddressBook.sqlitedb and AddressBookImages.sqlitedb (images as it says) then respring.
    What to do if those other files keep appearing after respringing?

    Quote Originally Posted by codvisp View Post
    UPDATE 3: 100% Working. I'm able to send, receive and all my previous SMS are here! Whooohooo!
    The fix: reboot once more
    Does iMessage work also?
    Last edited by arhitekt; 10-16-2011 at 02:32 AM.

  9. #7
    What's Jailbreak?
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    8
    Thanked 5 Times in 1 Post
    Quote Originally Posted by arhitekt View Post
    What to do if those other files keep appearing after respringing?
    They should reappear with your old contacts restored! iOS recreates all missing files and sets the right permissions...

    Quote Originally Posted by arhitekt View Post
    Does iMessage work also?
    Yes! Everything works like a charm :P

    Quote Originally Posted by choungz
    Hi codvisp,

    I just restored to iOS 5 with the redsn0w tethered jailbreak, and had kept manual backups of all my data by means of SSH. I was having issues with the contacts DB and found this thread (Addressbook.sqlitedb and sms.db on iOS 5. Upgrading problems.).

    I saw your post detailing what you did for the address book:
    AddressBook restored successfully by deleting everything, copying the backups AddressBook.sqlitedb and AddressBookImages.sqlitedb (images as it says) then respring.

    I tried that with no luck. Is there anything more specific you did to restore the address book this way? I've tried several permutations of this method, and keep getting an apple logo with a progress bar (looks like it's rebuilding the database each time), but then my phone list and contacts app remains empty. Any advice?

    *The SMS database restore (with iFile "mobile" setting) worked PERFECTLY though, thanks for that one!!
    1.Upon rebooting your iOS, don't open any app, especially the phone or contacts apps.
    2. Copy into /var/mobile/addressbook your AddressBook.sqlitedb and AddressBookImages.sqlitedb using iFile (since your using it...) and set the permissions of "Owner" for both of the copied files to "mobile" if it's set as "root".
    3. Respring
    Last edited by codvisp; 10-17-2011 at 09:15 AM.

  10. #8
    Cool ** Adressbook working now **
    Hi Folks,

    got it working. My Adressbook is back !

    How did I got it working? Just use ifunbox and search for the adressbook sql database. There are 2 or 3 different locations. just copy your copy to all locations and reboot. Works for me like a charm. The other ways didnt work so far !


  11. The Following User Says Thank You to gerstemann For This Useful Post:

    crashnburn_in (04-07-2013)

  12. #9
    If anyone is having problems going from 4.x.x to 5.0 and manually restoring the contacts database follow codvisp's instructions here! I was frustrated SSH'ing files and not having it work correctly but the instructions below worked 100%! Thanks codvisp you are a lifesaver

    Quote Originally Posted by codvisp View Post
    1.Upon rebooting your iOS, don't open any app, especially the phone or contacts apps.
    2. Copy into /var/mobile/addressbook your AddressBook.sqlitedb and AddressBookImages.sqlitedb using iFile (since your using it...) and set the permissions of "Owner" for both of the copied files to "mobile" if it's set as "root".
    3. Respring

  13. #10
    What's Jailbreak?
    Join Date
    Oct 2010
    Location
    Japan
    Posts
    9
    Thanks
    1
    Thanked 2 Times in 1 Post
    Quote Originally Posted by codvisp View Post
    AddressBook restored successfully by deleting everything, copying the backups AddressBook.sqlitedb and AddressBookImages.sqlitedb (images as it says) then respring.

    Doing the same for sms.db works partially, since it seams that all previous messages appear in the list but when u go into one, it's empty...

    Still working on it, so i'll update you guys if i find a solution

    UPDATE 1: SMS.db successfully imported! (using iphonebrowser & iFile - you may use others...):

    1. Using iphonebrowser delete all files in /var/mobile/library/sms
    2. drop sms.db in same directory
    3. Open iFile change owner from "root" to "mobile"
    4. Restart iPhone using "Just Boot" in Redsn0w of course.
    and voila!

    UPDATE 2: It seems that there's a flow i can't receive SMS. Still working on a fix, feel that i'll solve it pretty soon...

    UPDATE 3: 100% Working. I'm able to send, receive and all my previous SMS are here! Whooohooo!
    The fix: reboot once more

    Thanks! This worked like a charm!

  14. #11
    What's Jailbreak?
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    8
    Thanked 5 Times in 1 Post
    my pleasure guys

  15. #12
    What's Jailbreak?
    Join Date
    Oct 2011
    Location
    Estonia
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Yap, got it working also. thanks

  16. #13
    Quote Originally Posted by codvisp View Post
    3. Open iFile change owner from "root" to "mobile"
    Hey !
    Can you give more explanation about that step ? I don't have iFile... Is there an SSH command line ?

  17. #14
    Default contacts
    Contacts restore does not work for me

    I did exactly like codevisp said but all i get is empty contacts. I was using iexplore because i am on a mac and i did not find that owner and root option, maybe thats the problem? No luck with ssh or ifile either.

    Should i try it on a pc with iphonebrowser?

  18. #15
    i have a problem i am on ios 5 on my ip4. when i use iphonebrowser i cannot find /var/mobile...... all i see is root and then inside root there are acouple of folders like :
    airfair, airlock, books, DCIM, Downloads, Gerneral Storage, HighlandPark, iTunes_Control, PhotoData, Photos, Recordings, and safari.

    thats it ... so where to i put my backed up "AddressBook.sqlitedb" and "sms.db"???


    please help

  19. #16
    Quote Originally Posted by bhubiz View Post
    i have a problem i am on ios 5 on my ip4. when i use iphonebrowser i cannot find /var/mobile...... all i see is root and then inside root there are acouple of folders like :
    airfair, airlock, books, DCIM, Downloads, Gerneral Storage, HighlandPark, iTunes_Control, PhotoData, Photos, Recordings, and safari.

    thats it ... so where to i put my backed up "AddressBook.sqlitedb" and "sms.db"???


    in


    please help
    install afcadd from cydia u should have now file systtem

  20. #17
    Quote Originally Posted by codvisp View Post
    AddressBook restored successfully by deleting everything, copying the backups AddressBook.sqlitedb and AddressBookImages.sqlitedb (images as it says) then respring.

    Doing the same for sms.db works partially, since it seams that all previous messages appear in the list but when u go into one, it's empty...

    Still working on it, so i'll update you guys if i find a solution

    UPDATE 1: SMS.db successfully imported! (using iphonebrowser & iFile - you may use others...):

    1. Using iphonebrowser delete all files in /var/mobile/library/sms
    2. drop sms.db in same directory
    3. Open iFile change owner from "root" to "mobile"
    4. Restart iPhone using "Just Boot" in Redsn0w of course.
    and voila!

    UPDATE 2: It seems that there's a flow i can't receive SMS. Still working on a fix, feel that i'll solve it pretty soon...

    UPDATE 3: 100% Working. I'm able to send, receive and all my previous SMS are here! Whooohooo!
    The fix: reboot once more
    working great...thanks

  21. #18
    Can i just add a couple things

    - If you are stuck in the cycle where it keeps respringing automatically. Just delete the contents of SMS/ and then start the above process once booted AND BEFORE ANY APPS ARE LOADED

    - In my particular situation, i could restore the SMS database fine, and see all the messages, but when i tried to send one, or receive one, the phone would crash and wipe the database again. There is a point above that rebooting fixed this. However, my situation is also this, once restored, if i re-boot, the phone hangs on the lock screen, and then refreshes, with no SMS. So rebooting in my case, no matter what sequence i tried, with all the correct permissions, my database just wanted to wipe!

    If you find yourself in my situation, i used this free tool at iPhone SMS Database Merger for iOS 3.x and 4.x to merge my database to itself (i.e. used the same file for both). There were no duplicates, and it essentially re-wrote the database from scratch. As mentioned, group messages no longer appear as groups but as individual items, but ONLY for the group messages in the file. If you send a group message AFTER this process, it still does it, just the re-write merge process splits them up into individual conversations. (i can't see this being even a minute problem for anyone...can you??)

    Once the process was complete, i immediately backed up to iTunes, and now I can now restore from iTunes to any iPhone (4.x and 5.x JB or non JB) and it's perfectly fine.

    Obviously some people are having success with just dropping the old sms.db in, and that's good, but for anyone who's just, won't, work. Try the merger. I'm very happy that 4 years of SMS are still accessible by the phone.

  22. #19
    Quote Originally Posted by codvisp View Post
    AddressBook restored successfully by deleting everything, copying the backups AddressBook.sqlitedb and AddressBookImages.sqlitedb (images as it says) then respring.

    Doing the same for sms.db works partially, since it seams that all previous messages appear in the list but when u go into one, it's empty...

    Still working on it, so i'll update you guys if i find a solution

    UPDATE 1: SMS.db successfully imported! (using iphonebrowser & iFile - you may use others...):

    1. Using iphonebrowser delete all files in /var/mobile/library/sms
    2. drop sms.db in same directory
    3. Open iFile change owner from "root" to "mobile"
    4. Restart iPhone using "Just Boot" in Redsn0w of course.
    and voila!

    UPDATE 2: It seems that there's a flow i can't receive SMS. Still working on a fix, feel that i'll solve it pretty soon...

    UPDATE 3: 100% Working. I'm able to send, receive and all my previous SMS are here! Whooohooo!
    The fix: reboot once more
    I officially scribbled your name on my iPhone-trouble-solving-hero list. If only I had found this post a couple of hours earlier
    On a side note: how do you know what to set the owner and permissions to? Except for checking the original file ofcourse..is there a general rule for setting those values?
    Last edited by nietvoorniks; 12-19-2011 at 06:25 PM. Reason: Add question

  23. #20
    What's Jailbreak?
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    8
    Thanked 5 Times in 1 Post
    Quote Originally Posted by nietvoorniks View Post
    I officially scribbled your name on my iPhone-trouble-solving-hero list. If only I had found this post a couple of hours earlier
    On a side note: how do you know what to set the owner and permissions to? Except for checking the original file ofcourse..is there a general rule for setting those values?

    When the owner is root, effectively you prevent any (but root) from changing the file. Naturally, when you set it to mobile, changes are allowed to the file by any...
    To clarify further, all saves or changes (as an example of a save game file) has to be set as mobile to have access to the read & write...

Page 1 of 3 123 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •