I just spent the last couple of hours fixing my phone, maybe this saves you some time.

Out of the blue the (software) keyboard on my HTC G1 / Dream stopped working. Basically I got force-close messages as soon as I booted the device. Re-flashing Cyanogenmod (5.0.8) didn't help. After running the log collector and sending myself the logs and spotted the following:

07-04 17:08:13.770 E/Database( 558): android.database.sqlite.SQLiteException: file is encrypted or is not a database
07-04 17:08:13.770 E/Database( 558): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
07-04 17:08:13.770 E/Database( 558): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1759)
07-04 17:08:13.770 E/Database( 558): at android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:1709)
07-04 17:08:13.770 E/Database( 558): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
07-04 17:08:13.770 E/Database( 558): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:761)
07-04 17:08:13.770 E/Database( 558): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:754)
07-04 17:08:13.770 E/Database( 558): at android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:473)
07-04 17:08:13.770 E/Database( 558): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98)
07-04 17:08:13.770 E/Database( 558): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:158)
07-04 17:08:13.770 E/Database( 558): at com.android.providers.userdictionary.UserDictionaryProvider.query(UserDictionaryProvider.java:133)
07-04 17:08:13.770 E/Database( 558): at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:117)
07-04 17:08:13.770 E/Database( 558): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:98)
07-04 17:08:13.770 E/Database( 558): at android.os.Binder.execTransact(Binder.java:287)
07-04 17:08:13.770 E/Database( 558): at dalvik.system.NativeStart.run(Native Method)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): Couldn't open user_dict.db for writing (will try read-only):
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): android.database.sqlite.SQLiteException: file is encrypted or is not a database
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1759)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:1709)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:761)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:754)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:473)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:158)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at com.android.providers.userdictionary.UserDictionaryProvider.query(UserDictionaryProvider.java:133)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:117)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:98)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at android.os.Binder.execTransact(Binder.java:287)
07-04 17:08:13.840 E/SQLiteOpenHelper( 558): at dalvik.system.NativeStart.run(Native Method)

With adb I was able to pull the file from the device but still unable to open it. SQLite on my Laptop gave me the same error message Unable to open database "olddict.db": file is encrypted or is not a database. Looks like something messed up my dictionary-file, but since I did not use the software-keyboard much anyway and my dictionary wasn't even remotely useful I decided to just delete it.

Voila, everything went back to normal. No more force-close-messages all the time, software-keyboard works again.

This should also be fixable with a full-wipe, but I didn't want to go through the hassle of setting up all my apps again. Also right now I don't see any suggestions when typing with the software keyboard, I don't know if they will ever come back (I for one don't care), but keep that in mind before trying this.