Permalink
Browse files

star: Move some non-essencials outside of /system

Free about 35M, which is enough to fully load pittpatt
  • Loading branch information...
1 parent 3821b45 commit 8d0ef9f53b9a7f7b1b1457fc2197a8c97fdfd78a @rmcc rmcc committed Dec 18, 2012
Showing with 49 additions and 0 deletions.
  1. +19 −0 Android.mk
  2. +22 −0 prebuilt/10-movestuff.sh
  3. +8 −0 star.mk
View
@@ -1,3 +1,22 @@
ifneq ($(filter p990 p999, $(TARGET_BOOTLOADER_BOARD_NAME)),)
include $(call first-makefiles-under,$(call my-dir))
+
+## Do not let gapps packages install this. It uses a lot of room,
+## move it to data and symlink it
+include $(CLEAR_VARS)
+LOCAL_MODULE := srec-en
+LOCAL_MODULE_CLASS := FAKE
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_SYSTEM)/base_rules.mk
+$(LOCAL_BUILT_MODULE): TARGET := /cache/srec/
+$(LOCAL_BUILT_MODULE): SYMLINK := $(TARGET_OUT)/usr/srec/en-US
+$(LOCAL_BUILT_MODULE):
+ $(hide) echo "Symlink: $(SYMLINK) -> $(TARGET)"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) mkdir -p $(dir $(SYMLINK))
+ $(hide) rm -rf $@
+ $(hide) rm -rf $(SYMLINK)
+ $(hide) ln -sf $(TARGET) $(SYMLINK)
+ $(hide) touch $@
+
endif
View
@@ -0,0 +1,22 @@
+#!/sbin/sh
+# Free some system space by clearing non-essentials for p99x
+#
+
+case "$1" in
+ backup)
+ if [ -d /system/usr/srec/en-US ] ; then
+ mount /data/
+ if [ ! -d /cache/srec ]; then
+ mv /system/usr/srec/en-US /cache/srec
+ ln -s /cache/srec /system/usr/srec/en-US
+ fi
+ umount /data
+ fi
+ ;;
+ restore)
+ if [ ! -d /cache/srec ]; then
+ mkdir -p /cache/srec
+ fi
+ ln -s /cache/srec /system/usr/srec/en-US
+ ;;
+esac
View
@@ -65,6 +65,14 @@ $(call inherit-product, build/target/product/full_base_telephony.mk)
PRODUCT_LOCALES += hdpi
+## Ugly space-saving hack
+PRODUCT_PACKAGES += \
+ srec-en
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/prebuilt/10-movestuff.sh:system/addon.d/10-movestuff.sh
+
+
+
## LGE stuffs
PRODUCT_PACKAGES += \
bridgeutil \

0 comments on commit 8d0ef9f

Please sign in to comment.