views:

169

answers:

1

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!

A: 

Ok - this one was a bit tricky. Turns out that my "USB Connection Type" was "Disk drive", and so even though I had unmounted the sdcard from Ubuntu, I guess there was still a lock in place. The trick is to just switch back to "Charge Only"

Max