User Tag List

  1. gusutabo's Avatar
    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!
    2011-10-15 03:56 AM
  2. arhitekt's Avatar
    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!
    2011-10-15 03:45 PM
  3. codvisp's Avatar
    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; 2011-12-30 at 09:53 PM. Reason: UPDATE 4
    2011-10-16 12:35 AM
  4. codvisp's Avatar
    sqlitedb-wal is for iMessage and not normal SMS, which is still the same file sms.db
    2011-10-16 01:40 AM
  5. zodiac9's Avatar
    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..

    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; 2011-10-16 at 07:37 AM.
    2011-10-16 07:30 AM
  6. arhitekt's Avatar
    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?

    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; 2011-10-16 at 08:32 AM.
    2011-10-16 08:26 AM
  7. codvisp's Avatar
    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...

    Does iMessage work also?
    Yes! Everything works like a charm :P

    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 (http://modmyi.com/forums/general/783...-problems.html).

    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; 2011-10-17 at 03:15 PM.
    2011-10-17 02:59 PM
  8. gerstemann's Avatar
    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 !

    2011-10-17 10:36 PM
  9. choungz's Avatar
    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

    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
    2011-10-18 12:10 AM
  10. gusutabo's Avatar
    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!
    2011-10-18 03:15 AM
  11. codvisp's Avatar
    my pleasure guys
    2011-10-18 02:38 PM
  12. arhitekt's Avatar
    Yap, got it working also. thanks
    2011-10-18 06:42 PM
  13. Breizh's Avatar
    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 ?
    2011-10-19 03:46 AM
  14. behind_da_sun's Avatar
    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?
    2011-10-20 10:46 AM
  15. bhubiz's Avatar
    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
    2011-10-23 05:17 AM
  16. Naushad123's Avatar
    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
    2011-10-25 12:05 AM
  17. tahirkhan's Avatar
    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
    2011-10-26 02:58 PM
  18. benkapel's Avatar
    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.
    2011-11-03 09:24 AM
  19. nietvoorniks's Avatar
    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; 2011-12-20 at 12:25 AM. Reason: Add question
    2011-12-20 12:22 AM
  20. codvisp's Avatar
    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...
    2011-12-22 09:01 AM
43 123
LINK TO POST COPIED TO CLIPBOARD