When I upgraded my xperia ray from CM7 to CM9(FXP128), I was greeted by the message 'Unfortunately, Clock has stopped' whenever the phone started and anytime I touched the Clock widget. Apart from being annoying it meant I couldn't set my alarms so this became a priority one issue :-)
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.
Thanks Pavel!
Worked perfectly!
ReplyDeleteThank you for sharing c:
It really works :)
ReplyDeleteWell done. You're saying to simply delete the app's cache (if any) and data. I can't tell you how often that exact fix could fix problems that cause people unknowable frustration, yet many just don't think of it for some reason.
ReplyDeleteExcellent fix, thank you!
ReplyDeleteI'm using stock unrooted galaxy grand duos running on android 4.1.2. any way to fix it? terminal emulator doesnt seem to help since I dont have root access. tried clearing cache and rebooting. still doesnt work. -_-
ReplyDeleteI couldn't say for sure what happened in your case, but one thing is for sure... You'll need to root the phone and install the terminal emulator if you want to fix it. As another commenter pointed out, it doesn't matter if the situation leading up to the error is the same, the fix will be.
DeleteMy clock stopped working and I cannot set the alarms. This method worked once for me, but the problem returned, and I could not fix it anymore. Nevertheless, there is something strange I saw. I deleted the caches, the data, do junk cleansing on the my phone, disabled the phone and re-enabled it. After these steps, I saw that the most current alarm settings disappeared, and the alarm settings of some time ago returned. I suspect there are hidden backup/cache/whatever files that the clock is clinging to, that prevents the clock from going back to normal, that I need to delete. Can anybody help?
ReplyDeleteLegend of a solution - thanks!
ReplyDelete