For several days I suffered from one problem. I am currently running the "Settings" source code on Android2.2.
In AdroidMenifest.xml we can see:
android:sharedUserId="android.uid.system"
With this, you can access many permissions for actions in the settings. But with this statement, the sd card cannot be read / write, I tried to read the files in the directory
File f = new File("/mnt/sdcard/"+filename);
or
File f = new File("/sdcard/"+filename);
But they all do not work, I got an exception saying that the file does not exist (I already put the file there).
If I remove android:sharedUserId="android.uid.system" , I can access the file successfully. However, I need android:sharedUserId="android.uid.system" for other actions to work well.
Has anyone encountered the same problem, and have you resolved this? Thanks!
source share