2

My application takes a picture and saves to the sdcard. It worked fine on Android 2.1, but I just upgraded to Froyo and now I'm getting:

ERROR/CameraPreview(28216): Problem taking picture
WARN/System.err(28216): java.io.FileNotFoundException: /mnt/sdcard/silviaterra/temp.jpg (Permission denied)
WARN/System.err(28216):     at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method)
WARN/System.err(28216):     at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152)
WARN/System.err(28216):     at java.io.FileOutputStream.<init>(FileOutputStream.java:97)
WARN/System.err(28216):     at java.io.FileOutputStream.<init>(FileOutputStream.java:69)

When I open up adb shell (as root user), I get:

$ cd sdcard
cd: can't cd to sdcard
$ cd mnt/sdcard
cd: can't cd to mnt/sdcard

I've tried killing and restarting the adb server, but no luck. Any ideas on what's going on? Thanks!

4

1 回答 1

8

好的 - 这个有点棘手。原来我的“USB 连接类型”是“磁盘驱动器”,所以即使我已经从 Ubuntu 上卸载了 sdcard,我想还是有一个锁。诀窍是切换回“仅收费”

于 2010-09-06T19:08:45.003 回答