Page 1 of 3 123 LastLast
Results 1 to 10 of 24
Discuss remove sms.db with shell script at the iPhone "2G" (Rev. 1) - Hackint0sh.org; Hi all, maybe this can save some time if your SMS application crash when you ...
  1. #1
    Advanced Array

    Join Date
    Sep 2007
    Posts
    47
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default update/remove/restore sms.db with shell script

    Hi all,
    maybe this can save some time if your SMS application crash when you receive 2FA or flash SMS from banks.
    if done manually, u need to actually go to the folder [/var/root/Library/SMS/sms.db] to delete it manually and if you are on the move with no computers around, you can't use your SMS application.
    I wrote a shell script that does that manual work of deleting the sms.db
    u can upload to your iphone via iBricker ( do not need to go to any subfolder to upload it)
    applications needed:
    1. iBricker (i tested it on windows)
    2. Mobile Terminal

    if you want to test it, dl the file here,
    1. delete the sms.db to resolve the sms application crash (fixsms.sh) -> http://download.yousendit.com/A490FE350123A829 (updated new file)
    2. backup sms (backupsms.sh)-> http://download.yousendit.com/45E01A346ADCBE32
    3. restore sms IF you have done a backup prior to this (restoresms.sh)-> http://download.yousendit.com/759733CF7C3AB537

    4. upload it using iBricker

    5. Go to your MobileTerminal, type
    # # chmod +x fixsms.sh (change file permission only for the 1st time, subsequently, you can skip this step)
    # # ./fixsms.sh

    OR

    # # chmod +x backupsms.sh (change file permission only for the 1st time, subsequently, you can skip this step)
    # # ./backupsms.sh

    OR

    # # chmod +x restoresms.sh (change file permission only for the 1st time, subsequently, you can skip this step)
    # # ./restoresms.sh


    6. turn off and turn on your iphone

    REMEMBER IF YOU ARE TESTING THE SCRIPT, BACK UP UR SMS.DB FIRST. RUNNING THE FIXSMS SCRIPT WILL DELETE ALL YOUR MESSAGES
    Last edited by simplyjustken; 09-30-2007 at 05:54 PM.



  2. #2
    Advanced Array

    Join Date
    Sep 2007
    Posts
    35
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Hello. Great Idea!

    Is it possible that you create another shell script to create a backup of sms.db, and one that restores that sms.db? I would really appreciate it.

  3. #3
    Advanced Array

    Join Date
    Sep 2007
    Posts
    35
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    HI, i just made up a simple script.. but not sure if these will work.

    (using textedit or notepad, copy these into backup.sh)

    #!/bin/bash
    cd /var/root/Library/SMS/
    rm sms.backup
    cp sms.db sms.backup

    (for the restore, copy into restore.sh)

    #!/bin/bash
    cd /var/root/Library/SMS/
    rm sms.db
    cp sms.backup sms.db

    Same as what simplyjustken said earlier,

    Go to your MobileTerminal, type
    # # chmod +x fixsms.sh (change file permission only for the 1st time, subsequently, you can skip this step)
    # # ./restore.sh or ./backup.sh


  4. #4
    Advanced Array

    Join Date
    Sep 2007
    Posts
    47
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by doopsie View Post
    Hello. Great Idea!

    Is it possible that you create another shell script to create a backup of sms.db, and one that restores that sms.db? I would really appreciate it.
    sure, no prob. will work on it =)

  5. #5
    Advanced Array

    Join Date
    Sep 2007
    Posts
    35
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by simplyjustken View Post
    sure, no prob. will work on it =)
    I just made one, i think it should be alright. Could you give it a check?


  6. #6
    Advanced Array

    Join Date
    Sep 2007
    Posts
    47
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by doopsie View Post
    HI, i just made up a simple script.. but not sure if these will work.

    (using textedit or notepad, copy these into backup.sh)

    #!/bin/bash
    cd /var/root/Library/SMS/
    rm sms.backup
    cp sms.db sms.backup

    (for the restore, copy into restore.sh)

    #!/bin/bash
    cd /var/root/Library/SMS/
    rm sms.db
    cp sms.backup sms.db

    Same as what simplyjustken said earlier,

    Go to your MobileTerminal, type
    # # chmod +x fixsms.sh (change file permission only for the 1st time, subsequently, you can skip this step)
    # # ./restore.sh or ./backup.sh

    i tink it gona work, but i tried writing the script in windows and i got an error when i tried to run it on mobileTerminal, so what i did was run linux in VM and wrote the script.

  7. #7
    Advanced Array

    Join Date
    Sep 2007
    Posts
    35
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by simplyjustken View Post
    i tink it gona work, but i tried writing the script in windows and i got an error when i tried to run it on mobileTerminal, so what i did was run linux in VM and wrote the script.
    great! could you make the scripts from linux and post them up here as well? I have trouble writing them in my mac, and currently too lazy to try downloading any software textedit can't seem to save it as sh haha

    btw, how many smses can the iphone store?

  8. #8
    Advanced Array

    Join Date
    Sep 2007
    Posts
    47
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by doopsie View Post
    great! could you make the scripts from linux and post them up here as well? I have trouble writing them in my mac, and currently too lazy to try downloading any software textedit can't seem to save it as sh haha

    btw, how many smses can the iphone store?
    i just wrote it, but im testing it 1st, will be up shortly.
    im nt too sure how much sms can the iphone store =)

  9. #9
    Rookie Array

    Join Date
    Sep 2007
    Location
    Currently stationed in the Middle East....live in VA.
    Posts
    25
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Hi there,

    I am script dumb.......

    Can I upload this to my iPhone via iNdependence on a mac and get the same results?

    Would the mobile terminal commands be the same?

    Thanks.

    kris
    Last edited by SandyClaws; 09-30-2007 at 05:14 PM.

  10. #10
    Advanced Array

    Join Date
    Sep 2007
    Posts
    47
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by SandyClaws View Post
    Hi there,

    I am script dumb.......

    Can I upload this to my iPhone via iNdependence on a mac and get the same results?

    Would the mobile terminal commands be the same?

    Thanks.

    kris
    sorry, im not too sure for mac platform.


 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Custom URL scheme and shell script question
    By fubaya in forum iPhone Developer Exchange
    Replies: 2
    Last Post: 10-29-2009, 05:09 AM
  2. Run shell Script from Xcode
    By Mitali in forum iPhone Developer Exchange
    Replies: 0
    Last Post: 09-16-2009, 11:15 AM
  3. iPhone icon for shell script?
    By mooselander in forum iOS 3.x (iPhone OS 3.x)
    Replies: 0
    Last Post: 08-12-2009, 05:29 PM
  4. Running a shell script from Ipod Touch App
    By rocomotion in forum iPhone Developer Exchange
    Replies: 0
    Last Post: 06-24-2009, 07:25 PM
  5. Question: Run shell script from an icon?
    By KennX in forum Free Toolchain Software (Cydia App's)
    Replies: 3
    Last Post: 08-11-2007, 11:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 11:10 PM.
twitter, follow us!