I opened the Terminal Emulator and typed:
$ su # logcat
Then I held 'Volume down' (a.k.a. Ctrl) and 'c' to stop the output. I scrolled a bit up in the output and found a line that said:
E/SQLiteOpenHelper( 5231): Couldn't open alarms.db for writing (will try read-only):
E/SQLiteOpenHelper( 5231): android.database.sqlite.SQLiteException: Can't downgrade database from version 7 to 5
OK, so this is where it's breaking. I wasn't really interested in finding out what should the proper combination of ownership/permissions for the file as I didn't really trust it would end just here, downgrading database version offers a range of situations that can go wrong. And since I don't really care for my past alarm clock times, I got rid of the old database:
# cd /data/data/com.android.deskclock/databases # mv alarms.db alarms.db.bak Problem solved.
amazing. nice work...
ReplyDeleteThank you!
ReplyDeletey my lg optimus 2x, always prompt this " Unfortunately, clock has stopped "...I already Use what you are showing above? I am using NOvaHD cm9
ReplyDeleteWow thank you so much! You just made my day.
ReplyDeleteThank you WOW it worked. Had exact same problem. Will use logcat more often for sure!
ReplyDeleteThx my friend~ it worked~
ReplyDeleteI once had the same problem on my AOKP hd2~
Just took a Nexus 10 with Jelly Bean on it getting the same error after about a day. I tried this and it didn't work. Wouldn't even recognize such and logcat. Am I messing up syntax in terminal emulator? H-e-l-p!
ReplyDeleteAwesome! Easiest fix yet for my Samsung Galaxy S2 running Cyanogenmod 10.
ReplyDeleteWow. A little peeved it was something so simple. CM10.1 Nightly on a Captivate.
ReplyDeleteExcellent fix for my HTC One S on JellyBam 3.3
ReplyDeleteThis worked for me (Xperia Arc S - CM9.1)
ReplyDeleteIt had never occurred to me to look at the log files; despite my being an embedded systems developer. I mustn't be very good :)
Great work. Renamed the alarm.db file and it did the trick
ReplyDeleteDeleted the old .bak file now.I had this issue on my Samsung Galaxy S2 after upgrading from Slim Bean 3.x to the latest version (at the time of this post) 4.2.1 RC1, I gather because the ROM changed the type of clock but used the same database. All good now, thanks.
Thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
ReplyDeleteTo clear the database and any data cached already, you can also find the Clock app in your app drawer, press and hold, then drag it up to the App Info icon. From here if you choose to Clear Data it will get rid of the ill-permissioned database and allow the app to create a new one with the appropriate permissions.
ReplyDeleteThumbs up Zoey!!!!!!
ReplyDeleteThanks Zoey!! That worked.
ReplyDeleteI have fought that problem for over a year and finally got annoyed enough to search for a fix. Thanks so much for posting!
ReplyDeleteHey Thanks, that did the trick.
ReplyDelete