[Miscellaneous Android Development] Dan in SA:
What specifically was the gallery problem reported earlier in this thread? All I could see was that it was not working - nobody said what the errors they received were, or what it was/was not doing. My daughter tried to use the camera this morning to record a video, and when she tried to save it, it threw an error. Unfortunately, I had not checked that before giving it to her, so I didn't know it wasn't working. The error I'm getting, in both nabi mode and parent mode, is "No external storage available."

Here's the logcat info of what happens when I start Gallery from parent mode:

E/KitModeFilter( 194): action = android.intent.action.MAIN data=null comp=ComponentInfo{com.android.gallery3d/com.android.gallery3d.app.Gallery} type=null
I/ActivityManager( 194): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.gallery3d/.app.Gallery} from pid 2264
I/ ( 194): SurfaceBufferHelper set buffer count 2
V/StateManager( 7839): startState class com.android.gallery3d.app.AlbumSetPage
W/ApplicationContext( 7839): Unable to create external cache directory
V/GalleryActionBar( 7839): showClusterMenu: runner=com.android.gallery3d.app.AlbumSetPage@410e29e8
D/OpenGLRenderer( 2264): Flushing caches (mode 1)
D/Gallery.MultiSetSync( 7839): onSyncDone: *********** #pending=2
D/Gallery.MultiSetSync( 7839): request sync: ***********
D/Gallery.MultiSetSync( 7839): onSyncDone: ************ #pending=1
D/Gallery.MultiSetSync( 7839): request sync: ************
D/ImmediateSync( 7839): sync album list:0 account(s)
D/OpenGLRenderer( 2264): Flushing caches (mode 0)
D/Gallery.MultiSetSync( 7839): onSyncDone: ************* #pending=0
D/Gallery.MultiSetSync( 7839): request sync: *************
I/ ( 7839): SurfaceBufferHelper set buffer count 2
D/PicasaAlbumSet( 7839): sync result: all: 0
I/ ( 7839): SurfaceBufferHelper set buffer count 2
I/GalleryEGLConfigChooser( 7839): Config chosen: R5 G6 B5 A0 D0 S8 ID8 CAVEAT12344
I/GLRootView( 7839): onSurfaceChanged: 1024x552, gl10: com.google.android.gles_jni.GLImpl@4112d9c0
I/GLRootView( 7839): layout content pane 1024x552
V/MtpDeviceSet( 7839): loadDevices: [], size=0
I/ActivityManager( 194): Displayed com.android.gallery3d/.app.Gallery: +250ms
W/ApplicationContext( 7839): Unable to create external cache directory
W/ApplicationContext( 7839): Unable to create external cache directory
W/Worker ( 7839): Exception in running a job
W/Worker ( 7839): java.lang.NullPointerException
W/Worker ( 7839): at com.android.gallery3d.util.CacheManager.getCache(CacheManager.java:49)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheService.<init>(ImageCacheService.java:41)
W/Worker ( 7839): at com.android.gallery3d.app.GalleryAppImpl.getImageCacheService(GalleryAppImpl.java:64)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:48)
W/Worker ( 7839): at com.android.gallery3d.data.LocalImage$LocalImageRequest.run(LocalImage.java:157)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:28)
W/Worker ( 7839): at com.android.gallery3d.util.ThreadPool$Worker.run(ThreadPool.java:124)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/Worker ( 7839): at java.lang.Thread.run(Thread.java:856)
W/Worker ( 7839): at com.android.gallery3d.util.PriorityThreadFactory$1.run(PriorityThreadFactory.java:43)
W/ApplicationContext( 7839): Unable to create external cache directory
W/Worker ( 7839): Exception in running a job
W/Worker ( 7839): java.lang.NullPointerException
W/Worker ( 7839): at com.android.gallery3d.util.CacheManager.getCache(CacheManager.java:49)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheService.<init>(ImageCacheService.java:41)
W/Worker ( 7839): at com.android.gallery3d.app.GalleryAppImpl.getImageCacheService(GalleryAppImpl.java:64)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:48)
W/Worker ( 7839): at com.android.gallery3d.data.LocalVideo$LocalVideoRequest.run(LocalVideo.java:146)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:28)
W/Worker ( 7839): at com.android.gallery3d.util.ThreadPool$Worker.run(ThreadPool.java:124)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/Worker ( 7839): at java.lang.Thread.run(Thread.java:856)
W/Worker ( 7839): at com.android.gallery3d.util.PriorityThreadFactory$1.run(PriorityThreadFactory.java:43)
W/Worker ( 7839): Exception in running a job
W/Worker ( 7839): java.lang.NullPointerException
W/Worker ( 7839): at com.android.gallery3d.util.CacheManager.getCache(CacheManager.java:49)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheService.<init>(ImageCacheService.java:41)
W/Worker ( 7839): at com.android.gallery3d.app.GalleryAppImpl.getImageCacheService(GalleryAppImpl.java:64)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:48)
W/Worker ( 7839): at com.android.gallery3d.data.LocalImage$LocalImageRequest.run(LocalImage.java:157)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:28)
W/Worker ( 7839): at com.android.gallery3d.util.ThreadPool$Worker.run(ThreadPool.java:124)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/Worker ( 7839): at java.lang.Thread.run(Thread.java:856)
W/Worker ( 7839): at com.android.gallery3d.util.PriorityThreadFactory$1.run(PriorityThreadFactory.java:43)
W/ApplicationContext( 7839): Unable to create external cache directory
W/ApplicationContext( 7839): Unable to create external cache directory
W/Worker ( 7839): Exception in running a job
W/Worker ( 7839): java.lang.NullPointerException
W/Worker ( 7839): at com.android.gallery3d.util.CacheManager.getCache(CacheManager.java:49)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheService.<init>(ImageCacheService.java:41)
W/Worker ( 7839): at com.android.gallery3d.app.GalleryAppImpl.getImageCacheService(GalleryAppImpl.java:64)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:48)
W/Worker ( 7839): at com.android.gallery3d.data.LocalImage$LocalImageRequest.run(LocalImage.java:157)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:28)
W/Worker ( 7839): at com.android.gallery3d.util.ThreadPool$Worker.run(ThreadPool.java:124)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/Worker ( 7839): at java.lang.Thread.run(Thread.java:856)
W/Worker ( 7839): at com.android.gallery3d.util.PriorityThreadFactory$1.run(PriorityThreadFactory.java:43)
W/Worker ( 7839): Exception in running a job
W/Worker ( 7839): java.lang.NullPointerException
W/Worker ( 7839): at com.android.gallery3d.util.CacheManager.getCache(CacheManager.java:49)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheService.<init>(ImageCacheService.java:41)
W/Worker ( 7839): at com.android.gallery3d.app.GalleryAppImpl.getImageCacheService(GalleryAppImpl.java:64)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:48)
W/Worker ( 7839): at com.android.gallery3d.data.LocalVideo$LocalVideoRequest.run(LocalVideo.java:146)
W/Worker ( 7839): at com.android.gallery3d.data.ImageCacheRequest.run(ImageCacheRequest.java:28)
W/Worker ( 7839): at com.android.gallery3d.util.ThreadPool$Worker.run(ThreadPool.java:124)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/Worker ( 7839): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/Worker ( 7839): at java.lang.Thread.run(Thread.java:856)
W/Worker ( 7839): at com.android.gallery3d.util.PriorityThreadFactory$1.run(PriorityThreadFactory.java:43)

I installed the earlier recommended External 2 Internal app from the play store, and have followed the instructions provided...but it doesn't do a darned thing as far as I can tell.

I've dug through, and found that the actual sdcard directory is based at /data/media - it's remapped as a fuse FS by the /system/bin/sdcard application to /mnt/sdcard, and a link is setup at /sdcard in the init.mt799.rc file. In /data/media, owner and group are set as media_rw (again, done in the init script), and in /mnt/sdcard it is set as system:sdcard_rw - also defined as part of the script when the sdcard app is run. As /mnt/sdcard is essentially bound to /data/media and accessed as a fuse file system, it can have different permissions.

The links created at /data/media are seen in /mnt/sdcard, but they are seen as actual directories and not links. The symlink is stripped in the binding and it appears as a hardlink.

In /data/media, I've linked Alarms, Android, Music, and MxBrowser to the external sdcard, and things seem to be working OK there. I'm wondering if the gallery is not working due to a UID/GID or permission issue.

I'll keep digging, but if anyone has any pointers for me I'd appreciate it. I haven't had a chance to start tinkering with the custom ROM yet - I just signed up for the nVidia Tegra Developer group today which will give me access to a VM to test it on, and as soon as that goes through I'll get to work on it.

---------- Post added 27th December 2012 at 12:04 AM ---------- Previous post was 26th December 2012 at 11:29 PM ----------

never mind....i went through the steps with the External 2 Internal app again and rebooted, and it appears to have worked this time. Gallery now works as far as I can tell.

Now to see if link2sd will install stuff to the sdcard, and get the internal 4GB cleaned up for a bit more space.