Results 1 to 12 of 12
  1.    #1  
    I'm following the excellent directions at the following post for using sqlite to remove all of my contacts from com_palm_pim_Person table within the PalmDatabase.db3 database (I'm on WebOS 2.2.4).

    Remove All Palm Pre Contacts - Asymptomatic

    1. log into the Pre via shell
    2. sqlite3 /var/luna/data/dbdata/PalmDatabase.db3
    3. .load /usr/lib/sqlite3_palm_extension.so
    4. DELETE FROM com_palm_pim_Person;
    I'm able to successfully login to my Pre2 as root via a shell window, and I'm also able to successfully start an interactive session with SQLite, opening the contacts database:

    sqlite3 /var/luna/data/dbdata/PalmDatabase.db3

    However, after that I get a few errors, which are pasted below:


    Example Error 1: "Select From"

    root@Pre:/# sqlite3 /var/luna/data/dbdata/PalmDatabase.db3
    sqlite3 /var/luna/data/dbdata/PalmDatabase.db3
    SQLite version 3.6.20
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"

    sqlite> SELECT * FROM com_palm_pim_Person;
    SELECT * FROM com_palm_pim_Person;

    sqlite> Error: unable to open database "/var/luna/data/dbdata/PalmDatabase.db3":
    unable to open database file


    Example Error 2: "load sqlite3_palm_extension"

    root@Pre:/# sqlite3 /var/luna/data/dbdata/PalmDatabase.db3
    sqlite3 /var/luna/data/dbdata/PalmDatabase.db3
    SQLite version 3.6.20
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"

    sqlite> .load /usr/lib/sqlite3_palm_extension.so

    .load /usr/lib/sqlite3_palm_extension.so

    sqlite> Error: unable to open database "/var/luna/data/dbdata/PalmDatabase.db3":
    unable to open database file
    root@Pre:/#

    Error 3: I also tried to DELETE FROM com_palm_pim_Person, but that also threw an error.
    Does anyone know why I can't "open the database" when using the sqlite commands?

    I'd appreciate any suggestions from the forum.

    Thanks in advance.
    Last edited by mypalmpred; 12/21/2011 at 04:44 PM.
  2.    #2  
    I'm just wondering, is PalmDatabase.db3 natively in read only mode, could that be the reason why I am getting db access errors?
  3.    #3  
    Do I need to perform the following command in Novaterm BEFORE I can make this modification?

    root@Pre:/# mount -o remount,rw /
  4. #4  
    there is another thread about deleting all contacts. If I remember well,contacts cannot be deleted this way in 2.x.
  5. Tib
    Tib is offline
    Tib's Avatar
    Posts
    30 Posts
    #5  
    Do you know any other way of deleting contacts in webOS 2.x and/or the Touchpad?
  6. #6  
    +1 ... I'm trying to clean up a mess resulting from a bad interaction between Companionlink and Synergy on my Touchpad. I would like to clean out the native contacts database on the Touchpad without having to do a full erase or something equally destructive.

    ...ken...
  7. #7  
    This can be done with the Internalz Pro app on your device or novaterm, Internalz is easier IMO.

    As of webOS 2.x and above, there is no more PalmDatabase.db3 file in var/luna/data/dbdata/ directory, just do the ls command there and you'll find it aint there. In webOS 2 and above, this data is located in a batch of 5 files found in the /var/db/main/ directory:

    indexes.db
    indexlds.db
    kinds.db
    objects.db
    sequences.db

    They are db5 files now. I think the OS would repopulate them if they get deleted but to be on the safe side move them to your /media/internal directory first and reboot the phone, NOT a luna restart. Also prior to this, do remove ALL synergy accounts from the device in the accounts app for this purge may get wired. I dont think its possible to reasonably fiddle specifically the contact entries in those databases so it will be an all or none deal with the palm profile contacts, calendar, and memos.

    For those that are now willing to dive into this stuff can turn off backup on the device and then do a partial erase.

    Hope this helps you get in the right patch to clear out the junk data.
    Try diplomacy first. You can always conquer them later...

    www.webos-internals.org, read it, use it, love it, and donate to it.....
  8. #8  
    I don't know if this helps anyone, but Companionlink (which is a paid app)does have an option to purge all contacts. I use Companionlink on 1.4.5.
  9. #9  
    Quote Originally Posted by fahzz View Post
    I don't know if this helps anyone, but Companionlink (which is a paid app)does have an option to purge all contacts. I use Companionlink on 1.4.5.
    The problem with that approach is that my trial has run out so I can't try it with a newer build that might work (the purge and rewrite option did not help in the build I was trying). And there's no way I'm going to pay for the PC app with no assurance it won't just screw things up again.

    For the record, the first time I tried it and it screwed up the Contacts app I did the total erase of the Touchpad to clean things up. I didn't have much on it yet so it was no biggy. Then I started fresh and ended up with exactly the same results.

    @addiarmadar, Thanks for the description. I tried to find that db3 file. Now I know why I couldn't find it. :-)

    I may give your suggestion a try. If I hose something up really badly, worst case is to fire up the Doctor and start over. I've already done that once on the TP and three times on my Pre3 so I'm quite familiar with the surgical procedure.

    ...ken...
  10. #10  
    Indeed these directions really works..
  11. #11  
    Here's a bit of an update. First, getting rid of those *.db files messed some things up so I had to put them back. But at least now I know where they are. And have a better idea, by inference from all the things that were affected, about what is in them.

    I did some more testing and without going into gory details it's pretty clear that the problem is in webOS ... probably in Synergy ... not in CompanionLink. After a full erase and reinstalling accounts, I can get the same sort of Contacts problems with online accounts that have nothing to do with CompanionLink's sync.

    Before resorting to a full erase I got an extension of the CompanionLink Palm Desktop trial and downloaded/installed the latest build. I removed the CL account and app. Then I reinstalled the app, let it recreate the account, and did a full sync using the "reload all contacts" option to force everything to be overwritten. [device (not Luna) restarts at every point where it might be useful, probably more than were necessary]

    At that point I was able to see all the contact info in the right pane when I clicked on a contact in the left pane.

    Great! Problem solved!!

    NOT!!

    When I scrolled to what should have been the bottom of the list of 600+ contacts, there was an even longer list below. All of the broken contacts from the previous load were still there. In addition to that, there were still more what looked like fragments of those broken contacts.

    The upside was that by linking any of these busted entries to the profile of one of the "good" entries I could then delete both entries. I could even link a bunch of the broken entries with the profile of a single good entry and delete them all at once.

    But there was no way I was going to sit there and go through what now amounted to well over 1,000 busted contacts and fragments and link/delete them one by one.

    So I removed all accounts, including the CL account, removed the CL app and did a full data erase. Then I reinstalled the CL app, let it create the account and did a sync to the clean machine.

    It all seems to be working as well as might be expected. But there are still gremlins in the Contacts. It appears that there is one or more bugs in Synergy's handling of the Contacts database because the only way these weird things can be happening to contacts AFTER all of your accounts have been removed from the Touchpad is by the crap being stuck in Synergy's database. That's the only way I can figure this junk can still display in the Contacts app when there are no accounts active.

    And once you get the crap in the Synergy database there is no apparent way to get rid of it short of an erase of all the data (using the Device Info app).

    Until Synergy's contacts handling is fixed it sure would be nice if someone would come up with an app that would let you just do a bulk erase of the contacts entries from the Synergy database rather than having to use the data erase from the Device Info app. The data erase is a blunt instrument. And it's not even a very good one. Using it leaves the Touchpad in a somewhat indeterminate state that can make it difficult to get everything working again even if you've done your best to do backups.

    Speaking of which, I would pay a bunch of money if someone could come up with a proper backup/restore app for webOS that worked globally, similar to Cardbkup or NVBackup do in PalmOS. E.g. backs up EVERYTHING .. ALL apps, ALL their data, ALL their preference settings, AND all the system settings, etc. And then allows a complete or selective restore.

    I tried to do something like that with the Homebrew tools that are available. But, although someone has gone to a lot of effort to try to be helpful, they don't come anywhere near being what is needed to do the job, even for someone who is technically knowledgeable. We need simple backup/restore apps like the two mentioned above or similar and there's nothing even close at this point.

    So I'll probably Docter the Touchpad this weekend and start fresh from a reliable starting point. Trying to get things sorted after the data erase is just making me tear out what little hair I have left.....

    ...ken...
  12. #12  
    I know this is an old article, but I wanted to add an important step in case anyone is actually still using a 1.4.5 device and needs to clear out the contacts from their device and start over (note this article actually deletes ALL contacts, not just the Palm Profile contacts). There is an important step missing from the list in the article. You must also delete from the contact table, as the person table is only used to link contacts, and it leaves orphaned contact data in the database that will be re-attached if that same contact is added again.

    Note, it's not a bad idea to create a backup of the PalmDatabase.db3 file before making changes, in case something goes wrong.

    1. log into the Pre via shell
    2. sqlite3 /var/luna/data/dbdata/PalmDatabase.db3
    3. .load /usr/lib/sqlite3_palm_extension.so
    4. DELETE FROM com_palm_pim_Person;
    5. DELETE FROM com_palm_pim_Contact;

    You can verify them with the following queries:
    select count(*) from com_palm_pim_Person;
    select count(*) from com_palm_pim_Contact;

    For reference, the original article is here: Remove All Palm Pre Contacts - Asymptomatic

    I wish he had given some hint of *how* he knew about adding the Palm library and how, because that is critical yet very non-obvious. I'm guessing he was a Palm insider or knew one, or is just a super-genius.

Posting Permissions