If you have not done so already, post this information to http://b.android.com.
On Sat, Mar 5, 2011 at 5:09 PM, Kevin TeslaCoil Software <[email protected]> wrote: > The CTS needs to be updated to test that shared_prefs (and all app > data) is actually deleted during an uninstall. Especially if the > vendor randomly picked /dbdata/databases rather than /data/data. Or > maybe just ban Samsung. > > I finally got my hands on an affected phone. This one is a Galaxy S > i9000-T running 2.2.1. > > I installed my app and it got app_81, then I uninstalled using "adb > uninstall com.teslacoilsw.widgetlocker" then reinstalled and found my > preferences had persisted across the uninstall, but no permission > denied error. I uninstalled again in the same way, this time I went to > the Market and installed Androidify. This is when things got > interesting: > ps shows: > app_81 3366 2376 242568 31012 ffffffff afd0ee48 S > com.google.android.apps.androidify > > but ls -l /dbdata/databases shows: > drwxrwx--x app_81 app_81 2011-03-05 18:44 > com.teslacoilsw.widgetlocker > > So Androidify got my uid and my preferences now are belong to them. > > I then reinstalled widgetlocker and got this in ps: > app_84 3582 2376 243124 36396 ffffffff afd0ee48 S > com.teslacoilsw.widgetlocker > > So WidgetLocker is now app_84. But /dbdata/databases still has: > drwxrwx--x app_81 app_81 2011-03-05 18:44 > com.teslacoilsw.widgetlocker > > And we are screwed... > > My (unreleased) work around is to check for this and then use root to > chown /dbdata/databases/packagename and /dbdata/databases/packagename/ > shared_prefs and /dbdata/databases/packagename/ > packagename_preferences.xml . I do this once at first run and I do it > every time the PreferenceActivity is opened. Obviously this will only > cure rooted phones and I verified the problem on my own phone without > root, so those users are still screwed. > > -Kevin > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

