Converting YAPS to KeePassDroid

When moving from Palm to Android, one of my big concerns was password management. I had about a hundred passwords stored in YAPS, which is a great Palm password store.

I looked around and decided that KeePassDroid would suit nicely. It’s open source, does decent encryption, and is free.

That brought up the question: how do I convert from YAPS to KeePassDroid? I didn’t want to retype everything – and I eventually did manage to get things working. It was a bit of an effort, though – here’s what I did.

  1. First, get the required components. I used YapsView (not strictly necessary, but it makes things easier), cygwin perl, GNU emacs, and KeePass 2.16
  2. Export the Palm database into a file called Yaps.txt. I used YapsView to do this, but in theory you could use Yaps to export it to the Palm notepad and then cut & paste that to a file on your desktop.
  3. Once the file has been exported, convert all instances of \ to \\. I used emacs to do this.
  4. Convert all instances of ” to \” using emacs as well. (Do this after doing \ so you don’t expand the \ in \”.)
  5. Save the modified Yaps.txt.
  6. Next, I found a perl script that converted Yaps to KeePassX here. I hacked that up to create a script I called convertcsv.perl that convertes Yaps to CSV in the KeePass 1.0 format. It is convertcsv-perl.odt. (Sorry it’s an .odt file – WordPress doesn’t want you to upload .perl files. You’ll need to open it in LibreOffice and copy it into a text file called convertcsv.perl yourself, I’m afraid.)
  7. Run “perl convertcsv.perl” in the same directory as Yaps.txt. This will create yaps.csv.
  8. Create a new databse in KeePass 2.0. I set it to encrypt notes (under the “Protection” tab) and used defaults for the rest.
  9. Import yaps.csv into the database you just created. File -> Import… KeePass 1.x CSV. I said “Overwrite existing” but I don’t think it makes a difference at this point.
  10. Now move all the passwords to the proper categories in KeePass. This is dull. If you exported only a category at a time, this might be easier.
  11. Finally, export the 2.0 database into a KeePass 1.x file. Although KeePassDroid can read KeePass 2.x files, it can’t write them. I usually update passwords on my device, so I needed to be able to edit. I use KeePass 2.0 as the master on my desktop, but import from the 1.0 file from the device whenever I update a password.

That’s it. Your mileage may vary – especially if you have strange characters in your Yaps password file. I did have a few passwords with ” marks in them, and they appeared to migrate OK. A few minor edits was way better than retyping everything!

2 Responses to Converting YAPS to KeePassDroid

  1. Todd Gee says:

    Thanks a lot — worked like a charm.

    FWIW: I performed steps #3 and #4 with the following command:
    $ cat yaps-initial.txt | sed ‘s/\\/\\\\/g’ | sed ‘s/”/\\”/g’ > yaps.txt

  2. imranuk says:

    Hi Andrew, glad my script helped at least 2 other people 🙂

    Protip: keep your KeepPass database in Dropbox and then you have a central place to manage all your passwords – accessable with desktop and mobile clients.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: