Page 1 of 2

Backup failed! on SD Card

Posted: Wed Jun 22, 2011 10:02 am
by Rebel
Hi,

I'm using the SmartKeyboard Pro app, and find it very nice. However, a small problem appears if I want to backup my settings with the built-in option in "Save > Save on SD card", the message "Backup Failed!" is always shown.

I used logcat to see a bit what's happened and here is the traces I got:

Code: Select all

06-22 11:58:45.340 I/SmartKeyboard(20426): Backup file /data/data/net.cdeguet.smartkeyboardpro/databases/autotext.db
06-22 11:58:45.344 I/SmartKeyboard(20426): Backup file /data/data/net.cdeguet.smartkeyboardpro/databases/userdic.db
06-22 11:58:45.346 I/SmartKeyboard(20426): Backup file /data/data/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml
[b]06-22 11:58:45.346 W/System.err(20426): java.io.FileNotFoundException: /data/data/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml (No such file or directory)[/b]
Indeed the file "net.cdeguet.smartkeyboardpro_preferences.xml" is not there. It is stored somewhere else, in: /dbdata/databases/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml

It seems to be a bug with the last version: the app isn't looking at the right place for this file, because I'm pretty sure I was able to do a save on SD card before.

By the way, my settings seem to be saved properly anyway.

Hope you can fix it fast (or give me any clue on it).

Thanks in advance.

Re: Backup failed! on SD Card

Posted: Wed Jun 22, 2011 11:18 am
by cyril
Hi
This is a useful bug report ;)
Actually I didn't change anything in the latest version, except adding this toast "backup failed!" so that the user is aware of the problem. Before, the backup failed silently and could lead to corrupted zip files and a crash during the restore.

I didn't know some phones used /dbdata/databases instead of /data/data !!
Can you tell me which phone/ROM you use?

Re: Backup failed! on SD Card

Posted: Wed Jun 22, 2011 11:28 am
by Rebel
No problem! Happy to have such a fast answer. If you want we can even communicate by instant messaging! I'm a bit free!

I'm using a Samsung Galaxy S phone, with a 2.3.4 ROM (custom one, but this was the same directory for my stock ROM before) GingerReal 6.1.

In fact, I have DB files in the /data/data (that's why there's no error for the backup of it) and the "preferences" file is in /dbdata/databases... :)

EDIT : I understand why my previous backup couldn't be restored saying it was "corrupted" now! If the message "failed" wasn't shown before, it was created but one file was missing!
I will continue to check this topic during the day, if you need more information or more details.

Re: Re: Backup failed! on SD Card

Posted: Wed Jun 22, 2011 6:50 pm
by fvs114
Rebel wrote:No problem! Happy to have such a fast answer. If you want we can even communicate by instant messaging! I'm a bit free!

I'm using a Samsung Galaxy S phone, with a 2.3.4 ROM (custom one, but this was the same directory for my stock ROM before) GingerReal 6.1.

In fact, I have DB files in the /data/data (that's why there's no error for the backup of it) and the "preferences" file is in /dbdata/databases... :)

EDIT : I understand why my previous backup couldn't be restored saying it was "corrupted" now! If the message "failed" wasn't shown before, it was created but one file was missing!
I will continue to check this topic during the day, if you need more information or more details.
That is what I was talking about one week ago.... I said I will change rom but I'm still on 2.3.4. Ginger and I've solved backups with titanium backup. My backup pro didn't work either. But I'm also very quick with manual setting it up I can do it in less than a minute.:-)

Sent from my GT-I9000 using Tapatalk

Re: Backup failed! on SD Card

Posted: Wed Jun 22, 2011 10:49 pm
by Rebel
Indeed! I did it too with Titanium, but that's just because I don't like a feature is not working in a program I'm using! :mrgreen:

Re: Backup failed! on SD Card

Posted: Thu Jun 23, 2011 12:31 pm
by cyril
It's normal that MyBackupPro doesn't work either, as it uses the same method as the built-in backup.

Anyway, this path issue is specific to Samsung phones, see http://stackoverflow.com/questions/5531 ... ice-failed.

Re: Backup failed! on SD Card

Posted: Thu Jun 23, 2011 4:00 pm
by Rebel
Ok happy to know it now!

Sent from my GT-I9000 using Tapatalk

Re: Backup failed! on SD Card

Posted: Thu Jun 23, 2011 8:58 pm
by cyril
By the way this is also linked to the issue of preferences never being saved on Galaxy S with Froyo. When you uninstall the app for some reason, the preferences file is not cleaned as it's not in the standard location, and when you reinstall the app it cannot any more write to this file as the user ID has changed! Thanks Samsung.

Re: Backup failed! on SD Card

Posted: Fri Jun 24, 2011 12:48 pm
by cyril
I tried to do a workaround to this Samsung issue in the latest beta, can you check it?

Re: Backup failed! on SD Card

Posted: Fri Jun 24, 2011 1:51 pm
by fvs114
It's working for me for now. I haven't tested it fully but I will and let you know if I find anything
___________________________________

FVS114

SGS GT-I9000 - Gingerbread 2.3.4