[General Paranoid Android Discussion] thegidz:
Problems with Gallery when upgrading on maguro

Hi,

Not sure if this issue has been brought up yet, but I have observed some problem with Google Gallery disappearing from the apps list when upgrading ROM (cm11 nightlies) on my Galaxy Nexus (maguro) since around May.

So just a few hours ago, I just of tinkering with the my phone and saw that the reason why Google Gallery is missing after a ROM update is that the files are trucated. That is after an upgrade GalleryGoogle.apk is just around 500kb (it's supposed to be around 1000kb) and the lib*.so files are both 0 bytes.

So after observing that, I thought to myself that maybe the addon.d backup scripts ran out of space just at the part where it is making a back up of the Google Gallery. So I dedcided to make the following modifications to 74-googlecamera.sh and 75-googlegallery.sh

backup)
list_files | while read FILE DUMMY; do
backup_file $S/$FILE
echo $file >> /sdcard/cam-free.txt
du -B1 /tmp >> /sdcard/cam-free.txt
done

Got the following:

app/GoogleCamera.apk
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 349069312 14663680 96% /tmp
lib/libgcam.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 352870400 10862592 97% /tmp
lib/libgcam_swig_jni.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 353091584 10641408 97% /tmp
lib/libjni_tinyplanet.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 353107968 10625024 97% /tmp
lib/libjpeg.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 353300480 10432512 97% /tmp
lib/liblightcycle.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 355663872 8069120 98% /tmp
lib/libnativehelper_compat_libc++.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 355741696 7991296 98% /tmp
lib/librefocus.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 357994496 5738496 98% /tmp
lib/librs.layered_filter_f32.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 358006784 5726208 98% /tmp
lib/librsjni.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 358027264 5705728 98% /tmp
lib/libRSSupport.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 358424576 5308416 99% /tmp
app/GalleryGoogle.apk
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 363732992 0 100% /tmp
lib/libjni_eglfence.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 363732992 0 100% /tmp
lib/libjni_filtershow_filters.so
Filesystem 1-blocks Used Available Use% Mounted on
tmpfs 363732992 363732992 0 100% /tmp

So as you can see here, just before GalleryGoogle.apk, I only have 5308416 bytes of free space on /tmp, which not enough.

For now my workaround is to:

Re-flash PA-GAPPS

Manually copy the files to /system/app and /system/lib

I am currently thinking of modifying 75-googlegallery.sh to add "export C=/data/local/tmp/backupdir" at the beginning, but not sure if that may have side effects with other addon.d scripts.

Another alternative though is to have a separate flashable Google Gallery package, so that I won't have to flash he whole PA-GAPPS package.

Thanks for taking time to read this.