Back to Top

Restore not working on Android 2.3 Gingerbread

39 posts / 0 new
Last post
Unconn
Offline
Last seen: 11 years 5 months ago
Joined: 02/03/2011 - 13:20
Restore not working on Android 2.3 Gingerbread

DETAILS:
DoggCatcher Version: 1.1.1740
Device: HTC HD2 NAND
Android Build: FRG83D
Carrier: T-Mobile USA

SUMMARY: Restore not working on Android 2.3 Gingerbread

STEPS TO REPRODUCE:
1. Backup Current podcasts
2. Flash your phone to Android 2.3
3. Install the newest DC available from the Market
4. Try to restore. DC restarts and default feeds are still loaded.

WHAT HAPPENS: Nothing. Restore not working on Android 2.3 Gingerbread

WHAT SHOULD HAPPEN: backup should restore

FREQUENCY: 100%

SEVERITY: meh.

Further INFO: I can roll back to Android 2.2 and things are fine again. I have tried the whole process from the start a few times. I also install a fresh clean 2.2 ROM and it restores just fine.

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
Restore on 2.3

On the backup/restore screen, do you see a date under the 'last backup'?

If so, we're seeing the backup there.

Can you do a restore and then send me the log (in the dc menu).

Thanks.

Unconn
Offline
Last seen: 11 years 5 months ago
Joined: 02/03/2011 - 13:20
Correction

I have emailed you and I omitted some edits above, it should read:

DoggCatcher Version: 1.1.1851
Android Build: GRH78C

Sorry.

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
2.3 and restore

I'm seeing the same problem on the emulator. I created an issue for this - http://mantis.snoggdoggler.com/view.php?id=803

Thanks for the log, I'll try to get it fixed at quickly as possible.

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
I take back what I said

I've tested this a few times and it's working fine on the emulator.

Can you please do the following in 2.3

-Click on restore and then confirm (but don't click ok on the restart prompt)
-Verify that this file *does not* exist
/sdcard/DoggCatcher/export/done.txt
-Click ok to confirm, let DC restart
-Verify that this file *does* exist
/sdcard/DoggCatcher/export/done.txt

Thanks.

Unconn
Offline
Last seen: 11 years 5 months ago
Joined: 02/03/2011 - 13:20
You are right. This is what

You are right. This is what happens. There is no Done.txt before clicking restart. After I click restart there is a Done.txt

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
2.3 restore

Android is reporting that the database that's getting restored is corrupt. Can you email it to me and I'll see if I can load it in the emulator.

The file is:

/sdcard/doggcatcher/export/databases/rss

Thanks

Unconn
Offline
Last seen: 11 years 5 months ago
Joined: 02/03/2011 - 13:20
Done

I have sent the files, but as I said in the e-mail you do not have to spend any more time on this if it is caused by custom ROMs and not your application.

Jay

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
Restore on CM

I think this is a problem with the 2.3 CM ROM since I was able to restore from this db in a 2.3 emulator.

If anyone with a nexus S runs into this let me know.

Unconn
Offline
Last seen: 11 years 5 months ago
Joined: 02/03/2011 - 13:20
NON - CM ROM

I will give a non-CM7 2.3 ROM a try at some point and let you know.

acroanidd
Offline
Last seen: 11 years 6 months ago
Joined: 02/10/2011 - 01:19
I did end up with the same

I did end up with the same problem, I went to 2.3 CM... that said, I went back to Bugless Beast 6.2.1 which I didn't have any problems with previously, it may be that CM7 breaks the file some how, I'm not too sure. As far as the steps I have gone through:

I went from bugless, backed up the feeds, then went to CM7 when it was in its earlier stages, restored everything perfectly fine, I then chose to update CM7 like 2 weeks later and backed up, when everything was back up and running chose to restore again and that's when i noticed that nothing was backed up. It might just be CM7 breaking the backup file when it is saving it.

Unconn
Offline
Last seen: 11 years 5 months ago
Joined: 02/03/2011 - 13:20
non-CM7

I tried a non-CM7 build and you are correct, DC restores just fine. I am not sure what they are doing, but I guess I will have to stay away from the full CM7 builds for a while.

Thanks for your help.

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
CM7 restore

Sounds good, please do post back if you find a CM build that resolves this. We've got quite a few people running CM.

Unconn
Offline
Last seen: 11 years 5 months ago
Joined: 02/03/2011 - 13:20
Manual

It needs more testing, but just for anyone else trying this, I was able to get a restore to work by doing the following (It assumes you have root and know what you are doing):

- Start DC
- Open applications and clear data. This should also stop DC
- Optional: browse to /data/data/ and delete(or rename or move) com.snoggdoggler.android.applications.doggcatcher.v1.0. I did this step but I am not sure it is necessary.
- browse to [/mnt/sdcard]/DoggCatcher/Export/ and delete the Done.txt
- Start DC.

That did it. If I was to guess, a file (maybe shared_prefs.xml, maybe the RSS DB) is being created when DC is run the first time and is not being allowed to be over-written when DC is started the next time.

-Jay

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
Pretty clever

Great idea.

That confirms what I suspected. When there are already database and preference files in DC's directory on the device, the restore is not allowed to overwrite them. But DC is allowed to copy the backup to DC's directory when there are no files already there.

It's possible that this may work for people that don't have root.

-Uninstall DC
-Delete /sdcard/DoggCatcher/export/done.txt
-Install DC and launch it

It should restore the backup into the empty DC directory on the device upon first launch.

Unconn
Offline
Last seen: 11 years 5 months ago
Joined: 02/03/2011 - 13:20
Probably no need to uninstall

Thanks.

Probably no need for un-install for most. I cleared settings from the app by using Settings->Applications->All Apps->DC and then clear settings. Then then went and checked the /data/data/ directory and all of the files were gone. There was only one dir left 'lib' and it is empty. Deleting the Done.txt allows DC to copy at that point. (just tested it again)

So, an uninstall should not be necessary, just a 'clear data'

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
Agreed

That's a better way of doing it.

mysterious1der
Offline
Last seen: 11 years 5 months ago
Joined: 02/21/2011 - 22:29
Worked for me

Thanks to Eric and everyone. I've been running the CM7 nightlies since they started and have been backing up DC faithfully whenever I added a feed. Never needed to restore until tonight (bad flash). Restore reported success, but nothing changed (showed default feeds, didn't show mine) until I stopped the app, cleared data, and removed done.txt. I'm not sure if clearing the data was necessary or not.

Thanks again to all!

KimH
Offline
Last seen: 2 years 9 months ago
Joined: 06/10/2009 - 16:46
CM7 no problems here

I have been running CM7 on my HTC Desire GSM since they started the nightly builds. I never had a problem exporting/importing my DC Database.

GimpyEstrada
Offline
Last seen: 3 years 1 month ago
Joined: 02/28/2011 - 16:45
I can confirm that this

I can confirm that this problem also exists on Liquid Gingerbread 1.2 (Droid 1), which is supposed to be an AOSP build (with some CM7 goodies sprinkled in).

I have been pulling my hair out trying to figure out what the heck was going wrong. I am glad to see someone has a solution.

So is this a problem with DC or with Gingerbread or with the ROMs?

Edit: I am not sure I follow the instructions correctly. Is the fix supposed to be applied to be able to do the Backup or to do the Restore?

I am trying to switch from one GB rom to another but I can't get my DC settings to restore so I can't make the switch. Here is what I just tried and failed:

Boot into LGB1.2, clear settings for DC, delete the done.txt file, start DC, perform a backup, exit.
Reboot/restore into Project Elite 5.0.2, clear settings for DC, delete done.txt file, start DC, perform restore, reboot.
And my settings were not restored.

Did I miss something?

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
Steps are for restore

This seems to be limited to custom roms. It works fine on the 2.3 emulator and a real 2.3 device.

These steps are for the restore process, but it sounds like from the steps you went through that you cleared the dc settings (which deleted the feeds database) and then did a backup, which backed up a clean database (not one with your feeds in it). If that's the case, it would be unfortunate unless you have another backup somewhere because I think your backup got clobbered.

GimpyEstrada
Offline
Last seen: 3 years 1 month ago
Joined: 02/28/2011 - 16:45
So the problem described is

So the problem described is only with the restore process? So I should be able to backup from anywhere. I'll give that a shot and report back.

GimpyEstrada
Offline
Last seen: 3 years 1 month ago
Joined: 02/28/2011 - 16:45
That didn't work for me. I

That didn't work for me. I backed up from a good source that had all of my current feeds (though it was Gingerbread) and I rebooted into another Gingerbread ROM that I want to try. I delete the done file, then I clear the settings from Settings->applications, then I start up DC and choose Restore and I got nothing. Just the default feeds.

It seems that the above fix isn't quite bulletproof.

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
Restore

The DC restore part isn't necessary really. When you do a DC restore, what is does is delete the done.txt file and then restart DC.

But it seems like from the steps you did, if it had worked, you would have seen you feeds prior to doing the DC restore.

GimpyEstrada
Offline
Last seen: 3 years 1 month ago
Joined: 02/28/2011 - 16:45
So does DC recognize that

So does DC recognize that there is backup data available in /sdcard/DoggCatcher automatically? If so, what could cause the newly installed DC on a new ROM to be unable to recognize the backup that is in /sdcard/DoggCatcher?

Is there anything in the /sdcard that would let you see if there is anything wrong with the backup?

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
Restore

I'm pretty sure the backup is fine.

The problem seems to be that DC is not allowed to replace an existing database on the device, but it is able to copy the database to an empty database directory on the device...that's why clearing the setting works.

daoist
Offline
Last seen: 5 years 8 months ago
Joined: 12/29/2010 - 11:30
I'm getting the same

I'm getting the same problem.

Was running CM7 nightlies, decided to go back to CM6.1.2

Used doggcatcher to backup the data
used Titanium Backup to backup doggcatcher (just in case)

installed CM6.1.2. Wiped data and cache.
DC's restore won't restore.
Titanium can't restore either!

Tried the steps in this thread:
1. force stop DC
2. clear DC's data
3. use Astro to delete done.txt
4. start DC

-> still default feeds :(

Since I have root on this device, can I just copy the backedup database right into DC's data directory? I want to help debug this problem, but I want to listen to my podcasts even more :-/

daoist
Offline
Last seen: 5 years 8 months ago
Joined: 12/29/2010 - 11:30
I manually replaced the rss

I manually replaced the rss database and chmod and chowned it to be the same as the rss that was already there.

DC is replacing it on startup. There must be something corrupt in it.

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
Database

I expected that to work because that's exactly what DC does for a restore, just copies that db over the one on the device. It also copies the two nearby xml files which are the app preferences.

It looks like DC can't open the database. If you're feeling adventurous, You might trying opening it up on your PC. it's just a standard sqlite database.
==================

03-04 16:06:06.358 E/AndroidRuntime( 3553): android.database.sqlite.SQLiteException: unable to open database file
03-04 16:06:06.358 E/AndroidRuntime( 3553): at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:1812)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:817)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:851)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:844)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:540)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:112)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at com.snoggdoggler.rss.RssDbAdapter.open(RssDbAdapter.java:259)
03-04 16:06:06.358 E/AndroidRuntime( 3553): at com.snoggdoggler.rss.RssManager$1.run(RssManager.java:284)

GimpyEstrada
Offline
Last seen: 3 years 1 month ago
Joined: 02/28/2011 - 16:45
Would you be willing to let

Would you be willing to let me send you my backup files and you could take a look at them to see if you see a problem? If so where would they need to go? And specifically which files would you like to see.

daoist
Offline
Last seen: 5 years 8 months ago
Joined: 12/29/2010 - 11:30
I opened the backed up rss db

I opened the backed up rss db and it looked fine. I created a dump of it, and used that dump to populate a new rss db.

The error I'm getting now is that dc can't create the channels table because it already exists. so it dies on open. What triggers DC to try to recreate the database? Can I stop that from happening?

daoist
Offline
Last seen: 5 years 8 months ago
Joined: 12/29/2010 - 11:30
I opened both the backed-up

I opened both the backed-up and the default feeds rss databases in sqlitespy and they seem to be structured the same. I don't know if there's some metadata changes or something.

I'm going to try copying the data from my rss db into the default one and seeing if it can open that one.

GimpyEstrada
Offline
Last seen: 3 years 1 month ago
Joined: 02/28/2011 - 16:45
Not that it actually makes a

Not that it actually makes a difference, but ADW.Ex seems to be having pretty much the same problem with Gingerbread as DC. They have both a settings xml file and a configuration db file. The xml file loads correctly and the db file does not.

Could it be that something in Gingerbread AOSP has changed some way that databases are accessed or created?

AshtonBRSC
Offline
Last seen: 9 years 2 months ago
Joined: 11/30/2008 - 11:41
I think this could be caused

You may want to check if this is caused by the new WAL journal mode in SQLite. I know the app SQLite Editor had this problem.

This Stack Overflow question may help: http://stackoverflow.com/questions/4718934/sqlite-issues-with-htc-desire-hd

GimpyEstrada
Offline
Last seen: 3 years 1 month ago
Joined: 02/28/2011 - 16:45
I tried to follow the Stack

I tried to follow the Stack Overflow article but I couldn't find anything marked read only. That said I also don't know what I'm doing when it comes to databases.

GimpyEstrada
Offline
Last seen: 3 years 1 month ago
Joined: 02/28/2011 - 16:45
Update

It appears that this problem only exists with ROMs that say that they are built purely off of the 2.3 AOSP source. ROMs that are built using Cyanogen 7 as a source don't have the problem.

Ray Perkins
Offline
Last seen: 7 years 12 months ago
Joined: 05/03/2009 - 10:44
update ?

Does anyone know if there is a work around for this issue?

I am running CM7 nightly on my phone. I notice this problem when I go from a stock rom to a rooted rom. I can usually backup and restore when I go from one stock rom to another stock rom or if I go from one cyanogen rom to another.

Any help would be greatly appreciated.

earljg
Offline
Last seen: 10 years 10 months ago
Joined: 03/21/2011 - 02:53
Same Problem

I recently updated to CM7 and am having the same issues. I've tried everything suggested here. Even copied the backup files myself. Doggcatcher still loads up with the default feeds. It's worked great up until now. Anyone get a final solution for this?

eric
Offline
Last seen: 2 years 4 months ago
Joined: 11/06/2008 - 22:02
This thread may be dead, but

This thread may be dead, but I have some new info.

From re-reading this post, there may be more than one issue going on. I can confirm for sure one issue, and sadly one I can't find a workaround for.

There's an incompatibility between the sqlite db formats used across some different android devices.

A backup and restore on a g2x (2.3.4 I think) works fine
A backup and restore on a nexus s (2.3.6) works fine
A backup from the g2x will not restore to the nexus S

The failure looks something like the message below. The newer android device cannot open a database created on a device with an earlier version of android.

I don't have too much more to add but wanted to at least include this so that people experiencing this wouldn't waste to much time. If you are migrating from one device to another with a similar situation with the above error msg, then we're kind of stuck.

Honeycomb introduces a new api that lets us attempt to repair the database when there's a corruption but that won't help us with this 2.3 problem.

11-14 22:55:32.234: I/DoggCatcher(2310): RssManager::Opening Database
11-14 22:55:32.261: I/Database(2310): sqlite returned: error code = 11, msg = database corruption found by source line 40107
11-14 22:55:32.261: I/Database(2310): sqlite returned: error code = 11, msg = database disk image is malformed
11-14 22:55:32.261: E/Database(2310): CREATE TABLE android_metadata failed
11-14 22:55:32.265: E/Database(2310): Failed to setLocale() when constructing, closing the database
11-14 22:55:32.265: E/Database(2310): android.database.sqlite.SQLiteDatabaseCorruptException: database disk image is malformed
11-14 22:55:32.265: E/Database(2310): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)