views:

26

answers:

0

Hello everyone

Im building my custom android build.

I have an two different applications, one that writes the sharedPreferences with "MODE_WORLD_READABLE" and the other application that reads from there. When I install trough "adb install" the application that writes the sharedPreferences everything works fine. I can see with "adb shell" that it generates the folder shared_prefs and inside the file with linux user permissions: "-rw-rw-r--" .

But im building my own android build, and want that this application is preinstalled. So i made this android.mk file and added the line "LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)" so that my application is installed under /data/app. This works fine, when i install trough fastboot the img files i can find my application under /data/app..

But now my problem, when i first start my application in this way it generates me again the folder shared_prefs and inside the sharedPreference file. But now the user permissions are: "-rw-rw----". As consequence i cant read the preferences from my other app... And this only happens when i install my app with the build script.

Does anybody know why this is happening?

thanks a lot

-- edit --

ok i've found out, that when i reboot my phone, then the shared_preference file is always "-rw-rw----", even if i installed the with adb install...