Archived forum. This is a read-only copy of the Smart Keyboard community forum (2010–2015), kept for its history and its skins. Posts are shown as they were written, so some answers are out of date — see Help for current information. Want a post of yours removed? Email contact@smartkeyboardpro.com.

Backup failed! on SD Card

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:
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.
cyril Developer
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?
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.
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
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:
Rebel
Ok happy to know it now!

Sent from my GT-I9000 using Tapatalk
cyril Developer
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.
cyril Developer
I tried to do a workaround to this Samsung issue in the latest beta, can you check it?
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
chepoxxx
Samsung Galaxy S I-9000 with Froyo 2.2.1 (Darky ROM).
I have tried the beta cyril posted with no luck. Still have the same issue where it says "Backup Failed".
I went into /dbdata/databases/ and erased both net.cdeguet.smartkeyboardpro and net.cdeguet.smartkeyboardtrial. I then reinstalled without a change in results. Sill the "Backup failed!" comes up everytime I try to backup settings.
I really liked this app, but it is a deal breaker when I have to set every setting about every 2 hours. (asked for refund... sorry).
Maybe somebody has a workaround we can do in the meantime? As soon as this is fixed am definitely repurchasing.


One strange thing though. This is recent, since I installed a few months ago and I never had to tinker with the settings except for the first time, so something definitely changed.
cyril Developer
You are mixing two different problems:
- backup on SD card failure
- preferences not being saved

For the second problem there is nothing I can do, this is a bug in Samsung firmware (I don't know about your ROM). The only workaround is to uninstall the app and remove the databases directory as you did, so I'm surprised this doesn't work.
For the backup failure, the beta is supposed to fix it; can you show me your phone logs as Rebel did, at the time you try to backup? This is the only way you can expect a workaround from me.
chepoxxx
Ok. I rebooted my phone after I installed the beta and it remembered my settings. I tried to do a backup to the SD as I did before and now it worked! The log does not show any errors, only info that smartkeboardpro tried to backup files:
06-28 09:26:07.578 I/SmartKeyboard( 4227): Try to backup file /data/data/net.cdeguet.smartkeyboardpro/databases/autotext.db
06-28 09:26:07.597 I/SmartKeyboard( 4227): Try to backup file /data/data/net.cdeguet.smartkeyboardpro/databases/userdic.db
06-28 09:26:07.605 I/SmartKeyboard( 4227): Try to backup file /dbdata/databases/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml
Tried a Restore as well and it worked. Log says those 3 files where restored. It is now working correctly. Maybe it had something to do with the uninstall/reinstall I did previously? Anyway thanks for your help. Awesome app.
duckdany
I have couldn't backup settings on SD Card.
I have Samsung Galaxy S XWJS8 2.2.1 Froyo. Full Smart keyboard 4.3.0.

Please help!

Thanks
cyril Developer
I cannot tell you unless you provide me with your phone logs showing what is the error.
duckdany
cyril wrote:I cannot tell you unless you provide me with your phone logs showing what is the error.
I/SmartKeyboardPro( 3291): Trying to load dictionary: EN
I/ActivityManager( 2465): Displayed activity net.cdeguet.smartkeyboardpro/.Settings: 373 ms (total 373 ms)
V/WindowManager( 2465): Dsptch > Window{48617238 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
D/dalvikvm( 3291): GC_EXTERNAL_ALLOC freed 1386 objects / 80848 bytes in 37ms
V/WindowManager( 2465): Dsptch > Window{48617238 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
V/WindowManager( 2465): Dsptch > Window{48617238 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
V/WindowManager( 2465): Dsptch > Window{48617238 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
I/SmartKeyboardPro( 3291): Trying to load dictionary: EN
V/WindowManager( 2465): Dsptch > Window{48653b58 Beállítások mentése… paused=false}
V/WindowManager( 2465): Dsptch > Window{48653b58 Beállítások mentése… paused=false}
V/WindowManager( 2465): Dsptch > Window{486579b0 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
V/WindowManager( 2465): Dsptch > Window{486579b0 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
I/SmartKeyboard( 3291): Try to backup file /data/data/net.cdeguet.smartkeyboardpro/databases/autotext.db
I/SmartKeyboard( 3291): Try to backup file /data/data/net.cdeguet.smartkeyboardpro/databases/userdic.db
I/SmartKeyboard( 3291): Try to backup file /dbdata/databases/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml
I/SmartKeyboard( 3291): Could not find file. Trying in other directory...
I/SmartKeyboard( 3291): Try to backup file /data/data/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml
W/System.err( 3291): java.io.FileNotFoundException: /data/data/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml (No such file or directory)
W/System.err( 3291): at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method)
W/System.err( 3291): at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152)
W/System.err( 3291): at java.io.FileInputStream.<init>(FileInputStream.java:82)
W/System.err( 3291): at net.cdeguet.smartkeyboardpro.Backup.a(Unknown Source)
W/System.err( 3291): at net.cdeguet.smartkeyboardpro.Backup.a(Unknown Source)
W/System.err( 3291): at net.cdeguet.smartkeyboardpro.Settings$1.onClick(Unknown Source)
W/System.err( 3291): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:161)
W/System.err( 3291): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 3291): at android.os.Looper.loop(Looper.java:123)
W/System.err( 3291): at android.app.ActivityThread.main(ActivityThread.java:4627)
W/System.err( 3291): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 3291): at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err( 3291): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
W/System.err( 3291): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
W/System.err( 3291): at dalvik.system.NativeStart.main(Native Method)
E/imdg81 ( 2465): IsShutDownStarted()
E/imdg81 ( 2465): IsShutDownStarted()
I/SmartKeyboardPro( 3291): Trying to load dictionary: EN

On every reboot I have to rearrnage the settings!
duckdany
duckdany wrote:
cyril wrote:I cannot tell you unless you provide me with your phone logs showing what is the error.
I/SmartKeyboardPro( 3291): Trying to load dictionary: EN
I/ActivityManager( 2465): Displayed activity net.cdeguet.smartkeyboardpro/.Settings: 373 ms (total 373 ms)
V/WindowManager( 2465): Dsptch > Window{48617238 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
D/dalvikvm( 3291): GC_EXTERNAL_ALLOC freed 1386 objects / 80848 bytes in 37ms
V/WindowManager( 2465): Dsptch > Window{48617238 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
V/WindowManager( 2465): Dsptch > Window{48617238 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
V/WindowManager( 2465): Dsptch > Window{48617238 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
I/SmartKeyboardPro( 3291): Trying to load dictionary: EN
V/WindowManager( 2465): Dsptch > Window{48653b58 Beállítások mentése… paused=false}
V/WindowManager( 2465): Dsptch > Window{48653b58 Beállítások mentése… paused=false}
V/WindowManager( 2465): Dsptch > Window{486579b0 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
V/WindowManager( 2465): Dsptch > Window{486579b0 net.cdeguet.smartkeyboardpro/net.cdeguet.smartkeyboardpro.Settings paused=false}
I/SmartKeyboard( 3291): Try to backup file /data/data/net.cdeguet.smartkeyboardpro/databases/autotext.db
I/SmartKeyboard( 3291): Try to backup file /data/data/net.cdeguet.smartkeyboardpro/databases/userdic.db
I/SmartKeyboard( 3291): Try to backup file /dbdata/databases/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml
I/SmartKeyboard( 3291): Could not find file. Trying in other directory...
I/SmartKeyboard( 3291): Try to backup file /data/data/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml
W/System.err( 3291): java.io.FileNotFoundException: /data/data/net.cdeguet.smartkeyboardpro/shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml (No such file or directory)
W/System.err( 3291): at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method)
W/System.err( 3291): at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152)
W/System.err( 3291): at java.io.FileInputStream.<init>(FileInputStream.java:82)
W/System.err( 3291): at net.cdeguet.smartkeyboardpro.Backup.a(Unknown Source)
W/System.err( 3291): at net.cdeguet.smartkeyboardpro.Backup.a(Unknown Source)
W/System.err( 3291): at net.cdeguet.smartkeyboardpro.Settings$1.onClick(Unknown Source)
W/System.err( 3291): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:161)
W/System.err( 3291): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 3291): at android.os.Looper.loop(Looper.java:123)
W/System.err( 3291): at android.app.ActivityThread.main(ActivityThread.java:4627)
W/System.err( 3291): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 3291): at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err( 3291): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
W/System.err( 3291): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
W/System.err( 3291): at dalvik.system.NativeStart.main(Native Method)
E/imdg81 ( 2465): IsShutDownStarted()
E/imdg81 ( 2465): IsShutDownStarted()
I/SmartKeyboardPro( 3291): Trying to load dictionary: EN

On every reboot I have to rearrnage the settings!
I have made a factory reset and now it's ok?! :-S