[Galaxy S II Android Development] Troubadour666:
gain space on system

Hi,

i made a little pack to gain space on system then we can flash open gapps pico. i have now 28Mo on system free, is too much :)

my tool change the LatinIME KB (48Mo) with a little version (dont remember in which rom i picked it) , delete some lang_pico, move the big lib chrome to /data/ , change bootanimation with little one (no RR sorry) and install the keyboard with IOs 9.1 emoticons, thanks to [MENTION=6807580]Qu3ntin0[/MENTION] , from this thread : http://xdaforums.com/general/general/mod-google-keyboard-updated-ios-9-1-t3232213

here is my updater-script code (on the pic you can see contents of my tool)

as i have 28Mo free on system after flashing my tool + open gapps pico from 24102015 , i suggested user to keep some files safe with touching my updater-script before use (like removing some lang_pico lines) , you can re-imput the bootanimation from RR (10Mo) on my zip too. just test it.

assert(getprop("ro.product.device") == "galaxys2" || getprop("ro.build.product") == "galaxys2" || getprop("ro.product.device") == "i9100" || getprop("ro.build.product") == "i9100" || getprop("ro.product.device") == "GT-I9100" || getprop("ro.build.product") == "GT-I9100" || getprop("ro.product.device") == "GT-I9100M" || getprop("ro.build.product") == "GT-I9100M" || getprop("ro.product.device") == "GT-I9100P" || getprop("ro.build.product") == "GT-I9100P" || getprop("ro.product.device") == "GT-I9100T" || getprop("ro.build.product") == "GT-I9100T" || getprop("ro.product.device") == "SC-02C" || getprop("ro.build.product") == "SC-02C" || abort("This package is for device: galaxys2,i9100,GT-I9100,GT-I9100M,GT-I9100P,GT-I9100T,SC-02C; this device is " + getprop("ro.product.device") + "."););
run_program("/sbin/busybox", "mount", "/system");
unmount("/system");
show_progress(0.500000, 0);
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
delete("/system/tts/lang_pico/it-IT_ta.bin");
delete("/system/tts/lang_pico/it-IT_cm0_sg.bin");
delete("/system/tts/lang_pico/fr-FR_ta.bin");
delete("/system/tts/lang_pico/fr-FR_nk0_sg.bin");
delete("/system/tts/lang_pico/es-ES_zl0_sg.bin");
delete("/system/tts/lang_pico/es-ES_ta.bin");
delete("/system/tts/lang_pico/en-GB_ta.bin");
delete("/system/tts/lang_pico/en-GB_kh0_sg.bin");
delete("/system/tts/lang_pico/de-DE_ta.bin");
delete("/system/tts/lang_pico/de-DE_gl0_sg.bin");
delete("/system/lib/libwebviewchromium.so");
delete("/system/font/NotoColorEmoji.ttf");
delete_recursive("/data/app/com.google.android.inputmethod.latin-1");
delete_recursive("/data/app/com.google.android.inputmethod.latin-2");
delete_recursive("/data/app/com.google.android.inputmethod.latin-3");
delete_recursive("/data/data/com.google.android.inputmethod.latin");
delete("/data/dalvik-cache/arm/data@app@com.google.android.inputmethod.latin-1@base.apk@classes.dex");
delete("/data/dalvik-cache/profiles/com.google.android.inputmethod.latin");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
set_metadata("/system/bin/linker", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/data/fonts/NotoColorEmoji.ttf", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/data/fonts/libwebviewchromium.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
symlink("/data/fonts/NotoColorEmoji.ttf", "/system/fonts/NotoColorEmoji.ttf");
symlink("/data/lib/libwebviewchromium.so", "/system/lib/libwebviewchromium.so");
set_metadata_recursive("/system/fonts", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/fonts.xml", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/fallback_fonts.xml", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/data/app/com.google.android.inputmethod.latin-1", "uid", 1000, "gid", 1000, "dmode", 0755, "fmode", 0644);
set_metadata("/data/app/com.google.android.inputmethod.latin-1/base.apk", "uid", 1000, "gid", 1000, "fmode", 0644);
set_metadata("/data/app/com.google.android.inputmethod.latin-1/lib/arm/libjni_keyboarddecoder.so", "uid", 1000, "gid", 1000, "fmode", 0644);
set_metadata("/data/app/com.google.android.inputmethod.latin-1/lib/arm/libjni_unbundled_latinimegoogle.so", "uid", 1000, "gid", 1000, "fmode", 0644);
unmount("/system");
unmount("/data");

the link of the tool :

RR5.5.9-I9100-AndroidKB-GoogleKeyboardWithUpdated_iOS_9.1_Emojis-Signed.zip - 66.12 MB

voilà ;)

you can try it or not. i just made it to help those who want to keep their system partition as it is from the Origin ;)

thanks

EDIT : i dont remember what ton i used to replace 2 ogg on media, but you can re-imput to those from the RR 5.5.9 in my tool before flash if you want to keep then too.

remember to calculate space you will un-free on system if you change all the things by thier original from the rom. i mean (bootanimation+2 ogg rongtone)