commit 052749bc0a9b960238dc748ff53ba6ed3dfd7871 Author: Guillaume Castagnino Date: Tue May 19 16:32:39 2015 +0200 package to customize cm12.1 diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary new file mode 100644 index 0000000..440b56f Binary files /dev/null and b/META-INF/com/google/android/update-binary differ diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script new file mode 100644 index 0000000..6a70480 --- /dev/null +++ b/META-INF/com/google/android/updater-script @@ -0,0 +1,15 @@ +# ensure /system is NOT mounted +ifelse(is_mounted("/system"), unmount("/system")); + +#unpack our data dir +package_extract_dir("cm-data", "/tmp/cm-data"); +package_extract_file("cm.sh", "/tmp/cm.sh"); +set_metadata("/tmp/cm.sh", "uid", 0, "gid", 0, "mode", 0755); + +# mount system and run our script +mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", ""); +run_program("/tmp/cm.sh"); + +# finish +unmount("/system"); + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..51d40b0 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +ZIPFILE = cm-12.1-custom.zip +ZIPFILE_SIGNED = cm-12.1-custom-signed.zip +KEYSTORE = tools/key.keystore +PRIVKEY = tools/testkey.pk8 +PUBKEY = tools/testkey.x509.pem + +DIRS = META-INF cm-data +FILES = cm.sh $(shell find $(DIRS) -type f) + +.PHONY: clean keystore + +all: zip + +zip: $(ZIPFILE) + +clean: + rm -f "$(ZIPFILE)" + +keystore: + keytool -genkey -v -keystore key.keystore -alias cert -keyalg RSA -keysize 2048 -validity 10000 + +$(ZIPFILE): clean $(FILES:%=%.zipped) + java -jar tools/SignApk.jar -w -a 4 $(PUBKEY) $(PRIVKEY) $(ZIPFILE) $(ZIPFILE_SIGNED) + @echo "$(ZIPFILE) / $(ZIPFILE_SIGNED) are ready" + +$(FILES:%=%.zipped): %.zipped : % + @zip "$(ZIPFILE)" "$<" + diff --git a/cm-12.1-custom-signed.zip b/cm-12.1-custom-signed.zip new file mode 100644 index 0000000..a4efc1f Binary files /dev/null and b/cm-12.1-custom-signed.zip differ diff --git a/cm-12.1-custom.zip b/cm-12.1-custom.zip new file mode 100644 index 0000000..58ab5b7 Binary files /dev/null and b/cm-12.1-custom.zip differ diff --git a/cm-data/libjni_latinimegoogle.so b/cm-data/libjni_latinimegoogle.so new file mode 100644 index 0000000..33e3bef Binary files /dev/null and b/cm-data/libjni_latinimegoogle.so differ diff --git a/cm-data/tzdata b/cm-data/tzdata new file mode 100644 index 0000000..7577016 Binary files /dev/null and b/cm-data/tzdata differ diff --git a/cm.sh b/cm.sh new file mode 100755 index 0000000..616949d --- /dev/null +++ b/cm.sh @@ -0,0 +1,69 @@ +#!/sbin/sh + +set -e + +cd "$(dirname $0)" + +export PATH="${PATH}:/system/bin:/system/xbin" + +# fix swype +echo "Fixing SWYPE" +rm -f /system/lib/libjni_latinime.so +cp cm-data/libjni_latinimegoogle.so /system/lib/libjni_latinimegoogle.so +chown root:root /system/lib/libjni_latinimegoogle.so +chmod 644 /system/lib/libjni_latinimegoogle.so + +# update timezone infos +echo "Upgrading timezones" +cp cm-data/tzdata /system/usr/share/zoneinfo/tzdata +chown root:root /system/usr/share/zoneinfo/tzdata +chmod 644 /system/usr/share/zoneinfo/tzdata + +# disable goolge leaks (204 fetch for captive portal detection, google ntp) +echo "Fix google data leaks" +# this only work on live android +#settings put global captive_portal_server 127.0.0.1 +#settings put global captive_portal_detection_enabled 0 +#settings put global ntp_server 127.0.0.1 +# in recovery, hack into sqlite db +sqlite3 /data/data/com.android.providers.settings/databases/settings.db <