Data migration is completed, the process of using crash occurred


#1

I want to use sqlcipher moved into the encrypted version from the old unencrypted version of my APP,my App unencrypted database will be data migration to new encrypted database before the login, Now the migration is successful, But the user login to use the new database the following problems will happen.

03-11 00:54:58.213: E/Database(22744): Error updating using for friends
03-11 00:54:58.223: W/dalvikvm(22744): threadid=44: thread exiting with uncaught exception (group=0x41817d58)
03-11 00:54:58.223: E/BaiduHi(22744): pool-28-thread-4:CrashHandler [CONNECTION_OK]:
03-11 00:54:58.223: E/BaiduHi(22744): BaiDuHi caught one exception 2015-03-11 00:54:58
03-11 00:54:58.223: E/BaiduHi(22744): 4.6.0.0BOARD=MSM8974
03-11 00:54:58.223: E/BaiduHi(22744): BOOTLOADER=unknown
03-11 00:54:58.223: E/BaiduHi(22744): BRAND=Xiaomi
03-11 00:54:58.223: E/BaiduHi(22744): CPU_ABI=armeabi-v7a
03-11 00:54:58.223: E/BaiduHi(22744): CPU_ABI2=armeabi
03-11 00:54:58.223: E/BaiduHi(22744): DEVICE=cancro
03-11 00:54:58.223: E/BaiduHi(22744): DISPLAY=KTU84P
03-11 00:54:58.223: E/BaiduHi(22744): FINGERPRINT=Xiaomi/cancro/cancro:4.4.4/KTU84P/5.3.6:user/release-keys
03-11 00:54:58.223: E/BaiduHi(22744): HARDWARE=qcom
03-11 00:54:58.223: E/BaiduHi(22744): HOST=qh-miui-ota-bd57
03-11 00:54:58.223: E/BaiduHi(22744): ID=KTU84P
03-11 00:54:58.223: E/BaiduHi(22744): IS_DEBUGGABLE=true
03-11 00:54:58.223: E/BaiduHi(22744): MANUFACTURER=Xiaomi
03-11 00:54:58.223: E/BaiduHi(22744): MODEL=MI 3W
03-11 00:54:58.223: E/BaiduHi(22744): PRODUCT=cancro
03-11 00:54:58.223: E/BaiduHi(22744): RADIO=unknown
03-11 00:54:58.223: E/BaiduHi(22744): SERIAL=34505e1b
03-11 00:54:58.223: E/BaiduHi(22744): TAGS=release-keys
03-11 00:54:58.223: E/BaiduHi(22744): TIME=1425593214000
03-11 00:54:58.223: E/BaiduHi(22744): TYPE=user
03-11 00:54:58.223: E/BaiduHi(22744): UNKNOWN=unknown
03-11 00:54:58.223: E/BaiduHi(22744): USER=builder
03-11 00:54:58.223: E/BaiduHi(22744): net.sqlcipher.database.SQLiteException: error code 8: attempt to write a readonly database
03-11 00:54:58.223: E/BaiduHi(22744): at net.sqlcipher.database.SQLiteStatement.native_execute(Native Method)
03-11 00:54:58.223: E/BaiduHi(22744): at net.sqlcipher.database.SQLiteStatement.execute(SQLiteStatement.java:58)
03-11 00:54:58.223: E/BaiduHi(22744): at net.sqlcipher.database.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1795)
03-11 00:54:58.223: E/BaiduHi(22744): at net.sqlcipher.database.SQLiteDatabase.update(SQLiteDatabase.java:1725)
03-11 00:54:58.223: E/BaiduHi(22744): at com.baidu.hi.database.FriendsDBUtil.updateFriendsUFlag(FriendsDBUtil.java:466)
03-11 00:54:58.223: E/BaiduHi(22744): at com.baidu.hi.logic.FriendLogic.updateFriendsUFlag(FriendLogic.java:480)
03-11 00:54:58.223: E/BaiduHi(22744): at com.baidu.hi.logic.LoginLogic.loginSuccess(LoginLogic.java:594)
03-11 00:54:58.223: E/BaiduHi(22744): at com.baidu.hi.logic.LoginLogic.doLoginSuccessProcess(LoginLogic.java:1829)
03-11 00:54:58.223: E/BaiduHi(22744): at com.baidu.hi.logic.SqliteCipherLogic.doUserEncryptedProcess(SqliteCipherLogic.java:310)
03-11 00:54:58.223: E/BaiduHi(22744): at com.baidu.hi.net.NetManager$2$2.run(NetManager.java:624)
03-11 00:54:58.223: E/BaiduHi(22744): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-11 00:54:58.223: E/BaiduHi(22744): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-11 00:54:58.223: E/BaiduHi(22744): at java.lang.Thread.run(Thread.java:841)