[Nexus One Android Development] britoso:
I seem to have a badly permissioned (or corrupt) .db file after moving the /data/data filesystem to ext. (datasd)

This caused media (com.android.providers.media) and vending to FC.

Log:

D/szipinf ( 9026): Initializing inflate state
I/ActivityThread( 9026): Pub downloads: com.android.providers.downloads.DownloadProvider
I/ActivityThread( 9026): Pub drm: com.android.providers.drm.DrmProvider
W/IInputConnectionWrapper( 8714): showStatusIcon on inactive InputConnection
I/ActivityThread( 9026): Pub media: com.android.providers.media.MediaProvider
V/MediaProvider( 9026): Attached volume: internal
V/MediaProvider( 9026): /mnt/sdcard volume ID: 1727493762
I/Database( 9026): sqlite returned: error code = 14, msg = cannot open file at line 26973 of [042a1abb03]
I/Database( 9026): sqlite returned: error code = 14, msg = unable to open database file
E/Database( 9026): sqlite3_exec to set journal_mode = WAL failed
I/Database( 9026): sqlite returned: error code = 14, msg = cannot open file at line 26973 of [042a1abb03]
I/Database( 9026): sqlite returned: error code = 14, msg = unable to open database file
E/Database( 9026): CREATE TABLE android_metadata failed
E/Database( 9026): Failed to setLocale() when constructing, closing the database
E/Database( 9026): android.database.sqlite.SQLiteException: unable to open database file
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1967)
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1835)
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:854)
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:847)
E/Database( 9026): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:560)
E/Database( 9026): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)
E/Database( 9026): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
E/Database( 9026): at com.android.providers.media.MediaProvider.query(MediaProvider.java:1304)
E/Database( 9026): at com.android.providers.media.MediaProvider.attachVolume(MediaProvider.java:3121)
E/Database( 9026): at com.android.providers.media.MediaProvider.onCreate(MediaProvider.java:311)
E/Database( 9026): at android.content.ContentProvider.attachInfo(ContentProvider.java:798)
E/Database( 9026): at android.app.ActivityThread.installProvider(ActivityThread.java:3683)
E/Database( 9026): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3438)
E/Database( 9026): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3394)
E/Database( 9026): at android.app.ActivityThread.access$2200(ActivityThread.java:123)
E/Database( 9026): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:974)
E/Database( 9026): at android.os.Handler.dispatchMessage(Handler.java:99)
E/Database( 9026): at android.os.Looper.loop(Looper.java:123)
E/Database( 9026): at android.app.ActivityThread.main(ActivityThread.java:3812)
E/Database( 9026): at java.lang.reflect.Method.invokeNative(Native Method)
E/Database( 9026): at java.lang.reflect.Method.invoke(Method.java:507)
E/Database( 9026): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/Database( 9026): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/Database( 9026): at dalvik.system.NativeStart.main(Native Method)
[B][COLOR="Red"]E/SQLiteOpenHelper( 9026): Couldn't open external-66f77682.db for writing (will try read-only):[/COLOR][/B]
E/SQLiteOpenHelper( 9026): android.database.sqlite.SQLiteException: unable to open database file
E/SQLiteOpenHelper( 9026): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
E/SQLiteOpenHelper( 9026): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1967)
E/SQLiteOpenHelper( 9026): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1835)
E/SQLiteOpenHelper( 9026): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
E/SQLiteOpenHelper( 9026): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:854)
E/SQLiteOpenHelper( 9026): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:847)
E/SQLiteOpenHelper( 9026): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:560)
E/SQLiteOpenHelper( 9026): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)
E/SQLiteOpenHelper( 9026): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
E/SQLiteOpenHelper( 9026): at com.android.providers.media.MediaProvider.query(MediaProvider.java:1304)
E/SQLiteOpenHelper( 9026): at com.android.providers.media.MediaProvider.attachVolume(MediaProvider.java:3121)
E/SQLiteOpenHelper( 9026): at com.android.providers.media.MediaProvider.onCreate(MediaProvider.java:311)
E/SQLiteOpenHelper( 9026): at android.content.ContentProvider.attachInfo(ContentProvider.java:798)
E/SQLiteOpenHelper( 9026): at android.app.ActivityThread.installProvider(ActivityThread.java:3683)
E/SQLiteOpenHelper( 9026): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3438)
E/SQLiteOpenHelper( 9026): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3394)
E/SQLiteOpenHelper( 9026): at android.app.ActivityThread.access$2200(ActivityThread.java:123)
E/SQLiteOpenHelper( 9026): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:974)
E/SQLiteOpenHelper( 9026): at android.os.Handler.dispatchMessage(Handler.java:99)
E/SQLiteOpenHelper( 9026): at android.os.Looper.loop(Looper.java:123)
E/SQLiteOpenHelper( 9026): at android.app.ActivityThread.main(ActivityThread.java:3812)
E/SQLiteOpenHelper( 9026): at java.lang.reflect.Method.invokeNative(Native Method)
E/SQLiteOpenHelper( 9026): at java.lang.reflect.Method.invoke(Method.java:507)
E/SQLiteOpenHelper( 9026): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/SQLiteOpenHelper( 9026): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/SQLiteOpenHelper( 9026): at dalvik.system.NativeStart.main(Native Method)
I/Database( 9026): sqlite returned: error code = 14, msg = cannot open file at line 26973 of [042a1abb03]
I/Database( 9026): sqlite returned: error code = 14, msg = unable to open database file
E/Database( 9026): sqlite3_exec to set journal_mode = WAL failed
I/Database( 9026): sqlite returned: error code = 14, msg = cannot open file at line 26973 of [042a1abb03]
I/Database( 9026): sqlite returned: error code = 14, msg = unable to open database file
E/Database( 9026): SELECT locale FROM android_metadata failed
E/Database( 9026): Failed to setLocale() when constructing, closing the database
E/Database( 9026): android.database.sqlite.SQLiteException: unable to open database file
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1967)
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1835)
E/Database( 9026): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
E/Database( 9026): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:197)
E/Database( 9026): at com.android.providers.media.MediaProvider.query(MediaProvider.java:1304)
E/Database( 9026): at com.android.providers.media.MediaProvider.attachVolume(MediaProvider.java:3121)
E/Database( 9026): at com.android.providers.media.MediaProvider.onCreate(MediaProvider.java:311)
E/Database( 9026): at android.content.ContentProvider.attachInfo(ContentProvider.java:798)
E/Database( 9026): at android.app.ActivityThread.installProvider(ActivityThread.java:3683)
E/Database( 9026): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3438)
E/Database( 9026): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3394)
E/Database( 9026): at android.app.ActivityThread.access$2200(ActivityThread.java:123)
E/Database( 9026): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:974)
E/Database( 9026): at android.os.Handler.dispatchMessage(Handler.java:99)
E/Database( 9026): at android.os.Looper.loop(Looper.java:123)
E/Database( 9026): at android.app.ActivityThread.main(ActivityThread.java:3812)
E/Database( 9026): at java.lang.reflect.Method.invokeNative(Native Method)
E/Database( 9026): at java.lang.reflect.Method.invoke(Method.java:507)
E/Database( 9026): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/Database( 9026): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/Database( 9026): at dalvik.system.NativeStart.main(Native Method)
D/AndroidRuntime( 9026): Shutting down VM
W/dalvikvm( 9026): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 9026): FATAL EXCEPTION: main
E/AndroidRuntime( 9026): java.lang.RuntimeException: Unable to get provider com.android.providers.media.MediaProvider: android.database.sqlite.SQLiteException:
unable to open database file
E/AndroidRuntime( 9026): at android.app.ActivityThread.installProvider(ActivityThread.java:3686)
E/AndroidRuntime( 9026): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3438)
E/AndroidRuntime( 9026): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3394)
E/AndroidRuntime( 9026): at android.app.ActivityThread.access$2200(ActivityThread.java:123)
E/AndroidRuntime( 9026): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:974)
E/AndroidRuntime( 9026): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 9026): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 9026): at android.app.ActivityThread.main(ActivityThread.java:3812)
E/AndroidRuntime( 9026): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 9026): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 9026): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/AndroidRuntime( 9026): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/AndroidRuntime( 9026): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 9026): Caused by: android.database.sqlite.SQLiteException: unable to open database file
E/AndroidRuntime( 9026): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
E/AndroidRuntime( 9026): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1967)
E/AndroidRuntime( 9026): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1835)
E/AndroidRuntime( 9026): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
E/AndroidRuntime( 9026): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:197)
E/AndroidRuntime( 9026): at com.android.providers.media.MediaProvider.query(MediaProvider.java:1304)
E/AndroidRuntime( 9026): at com.android.providers.media.MediaProvider.attachVolume(MediaProvider.java:3121)
E/AndroidRuntime( 9026): at com.android.providers.media.MediaProvider.onCreate(MediaProvider.java:311)
E/AndroidRuntime( 9026): at android.content.ContentProvider.attachInfo(ContentProvider.java:798)
E/AndroidRuntime( 9026): at android.app.ActivityThread.installProvider(ActivityThread.java:3683)
E/AndroidRuntime( 9026): ... 12 more

I renamed the offending file to see if that would fix it. Also did a fixapk for good measure ;)

ls -l /data/data/com.android.providers.media/databases/external-66f77682.db
-rw-rw---- 1 app_18 app_18 78848 Feb 9 17:34 /data/data/com.android.providers.media/databases/external-66f77682.db
mv /data/data/com.android.providers.media/databases/external-66f77682.db /data/data/com.android.providers.media/databases/external-66f77682.db1

Will edit if I still get FCs...

edit: seems to have fixed it, a new file/db was created on restart.