[Q] Samsung Galaxy S apps not remembering their settings?

Search This thread

extorian

Senior Member
Aug 4, 2010
64
14
So a friend of mine updated his T-Mobile UK Samsung Galaxy S to the official 2.2.1 JPY firmware using Odin a few weeks ago. This went well, and is the same firmware that I've had on my unbranded SGS since December.

However, he has an interesting problem. Some of his apps (Handcent, Dolphin HD, plus a few others) seem to forget all of their settings every time the app is exited. For example, every time he goes back into Dolphin it enters the setup wizard as it it's being ran for the first time. This doesn't happen on every app, and it doesn't happen every time.

I noticed there are a couple of other threads on here with people reporting similar issues on custom ROMs (with no solution), but this is a stock ROM from samsungfirmware.com and certainly doesn't happen on my SGS, so it's not the ROM to blame.

Anyone know of a fix?
 

extorian

Senior Member
Aug 4, 2010
64
14
As I said in my post "I noticed there are a couple of other threads on here with people reporting similar issues ... (with no solution)". I wasn't being lazy and just starting another thread without doing some research first. I've read the other threads and they do not contain a solution that will work for him.

I'm assuming you're referring specifically to this thread? http://forum.xda-developers.com/showthread.php?t=992335 In my friend's case, rooting is not an option, so this solution won't work for him.

However, based on that it looks like a factory reset may fix it. If I don't come back people reading this can assume it worked.
 

gtl92

Member
Jul 9, 2008
13
1
OPPO Find X2 Pro
Hello
I experimented the same issue.
Looking at some log traces event it reported some permissions errors on intestinal filesystem like database location access write errors. This can explain setting persistence trouble.
After various workaround, bypass or others kind of fallback I did a full reinstallation of filesystem including a wipe data of the system. Take care to backup application and sensible data SMS, photo...

Since all is working fine and no more problems with settings

I don't know if it's helping you.
This is just my personal experience on this same problem.
Perhaps more simple solution is possible

Regards
Gilles
 

extorian

Senior Member
Aug 4, 2010
64
14
Thanks. So far so good after a Factory Reset. If it were my phone I'd be looking at Logcat, etc, too, but it's a bit hard to do remotely.

It's odd how some apps saved their settings fine, but some don't.
 

extorian

Senior Member
Aug 4, 2010
64
14
A factory reset did fix it... for a while. But then other apps started suffering from the problem.

So I've been researching this a bit more today. Here's what I've discovered:

The problem is unique to Samsung Galaxy S phones, and appears to be only ones running 2.2.1 (but maybe 2.2. too?).

Samsung have renamed /data/data to /dbdata/databases, and shared preferences for applications are persisting in this folder even if the application is uninstalled. If you install the app again, the app becomes a different user from the one that owns the shared preferences.

For example - If you install some random application and you look at its process running with the ps command, it will show as "app_XX", where XX is some number. For our example here let's say it shows as "app_55". When it then saves its settings in /dbdata/databases the folder the settings are saved in will have owner (shown by ls -l) as "app_55" too. That's fine, and normal.

The seed of the problem is sewn when you uninstall the app. Those shared preferences are not removed. Even using the "Clear data" option before uninstalling doesn't seem to help. If you then install the app again and look at the output of ps you'll see the new app is "app_56". The shared preferences are still there from last time with owner "app_55", hence the permissions error when it tries to save its settings, as user app_56 cannot modify user app_55's files.

A factory reset obviously cures it as this, at least temporarily, as it wipes the data in /dbdata/databases.

If you're rooted, you can go into /dbdata/databases and delete the relevent folder for the application that's having the problem. It will be recreated with the correct owner next time the app saves its settings.

I didn't try chown to change the owner to the correct one, but maybe that's a way to keep the old settings and correct the problem.
 
Last edited:

DPSK

Senior Member
Nov 27, 2010
128
2
Bingo. No wonder my titanium backup is not remembering the preference settings.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    A factory reset did fix it... for a while. But then other apps started suffering from the problem.

    So I've been researching this a bit more today. Here's what I've discovered:

    The problem is unique to Samsung Galaxy S phones, and appears to be only ones running 2.2.1 (but maybe 2.2. too?).

    Samsung have renamed /data/data to /dbdata/databases, and shared preferences for applications are persisting in this folder even if the application is uninstalled. If you install the app again, the app becomes a different user from the one that owns the shared preferences.

    For example - If you install some random application and you look at its process running with the ps command, it will show as "app_XX", where XX is some number. For our example here let's say it shows as "app_55". When it then saves its settings in /dbdata/databases the folder the settings are saved in will have owner (shown by ls -l) as "app_55" too. That's fine, and normal.

    The seed of the problem is sewn when you uninstall the app. Those shared preferences are not removed. Even using the "Clear data" option before uninstalling doesn't seem to help. If you then install the app again and look at the output of ps you'll see the new app is "app_56". The shared preferences are still there from last time with owner "app_55", hence the permissions error when it tries to save its settings, as user app_56 cannot modify user app_55's files.

    A factory reset obviously cures it as this, at least temporarily, as it wipes the data in /dbdata/databases.

    If you're rooted, you can go into /dbdata/databases and delete the relevent folder for the application that's having the problem. It will be recreated with the correct owner next time the app saves its settings.

    I didn't try chown to change the owner to the correct one, but maybe that's a way to keep the old settings and correct the problem.