Results 1 to 2 of 2

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

Thread: editing SMS.db

  1. #1
    What's Jailbreak?
    Join Date
    Jul 2009
    reno, nv
    Thanked 0 Times in 0 Posts

    Default editing SMS.db
    i'm trying to get texts from my old (non-i)phone to my iphone. i've figured that the only way to do this is to edit SMS.db manually in sqlite database browser (or similar, but that's what i'm using - i'm on osx 10.4). i know how to do this, and to make sure the tables match up. but i get an error. i searched the internet and found this post at hackint0sh about it, but dropping the triggers and then re-creating them doesn't seem to work with SMS.db in FW 3.0. (the code he wrote works fine, but after you drop the triggers you still get the error)

    if that workaround is still working for anyone else on 3.0 can you tell me how you got it to work or any other ideas you may have??

    (also, i should note, i was finding it easier to create a new conversation the real way [i was using my mom's phone to text myself], and then change the address, timestamp, and message in SQLite so that i didn't have to worry about numbering problems as the phone was creating the numbering scheme for me - not super relevant i know, but if this creates any other numbering problems i'm not forseeing let me know...)

    [EDIT] aha the workaround works in razorSQL...not sure what sqlite browser is doing weird, but yeah, working now.

    EXCEPT! when i reboot the phone, it all shows up right (with the manually added texts and all) but as soon as i send a text (to anyone), it says i have 1 new text. but i don't. so i pull the sms.db off my phone again, edit the new message count in msg_group back to 0 (they all say they're read in the message table), reupload and reboot again...but then it just goes back to saying i have 1 new text as soon as i send another one. i'm really lost as to what could be causing this but it has to be something simple?!?! i know someone else in that hackint0sh thread mentioned that problem, but the guy with the workaround didn't (and the one with this problem never got it working apparently). any ideas?? (fyi - i have a thread going over there but have yet to get any input with them so i thought i'd try a different group of people)

    [EDIT 2] i did it! the code provided in that post is not quite right (i'm guessing the code changed slightly in FW 3.0, just enough to make that message count bug). if anyone cares and wants to do this themselves:
    first i (obviously) copied sms.db to my computer via openssh. then i copied the triggers to a text file, just to put them aside (used view -> view trigger in razor SQL). then went to edit the message table, dropped the triggers. edited the message table to put in the messages i wanted there from my sim card. then i pasted the CREATE TRIGGER commands back in, executed the SQL, closed that table. opened the group_member table, edited the group member to match the message ID. then re-uploaded sms.db to my iphone via openssh...and ta-da! old sim card texts in my iphone.

    ....the really really hard way, but still. there's only a few texts i really really want from my old phone, so i'm just bringing those over.

    now if only someone could write a program to do that work...! (i imagine it would be easier to write a program where you could just enter the info from the old texts on your computer to edit sms.db then upload it to your phone than to write an app to pull those messages off the sim card and insert them in the db...but if someone could do THAT they would probably be the switching-to-iphone crowd's new hero. i know nothing about programming really so eh idk)
    Last edited by manyeels; 2009-07-04 at 12:32 PM.

  2. #2
    Default editing SMS.db
    I made a mess, do you have the original triggers?
    I need to re-create them...

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts