[Galaxy S II Themes and Apps] Troubadour666:
Pattern to only flash mods+vrthemes

You will need to MIX some MODs (VRthemes too) in AllInOne ZIP.

I give you complete structure of ZIP + aroma-config + updater-script to mix 1, 2 or 3 mods you want to flash in one step. Soon , i explain here how to add more MODs in your new managed ZIP.

Now, imagine you have 2 or 3 MODs.zip and you want to mix them in one ZIP and have choice to flash both in one step.

- Decompile each mods in a folder on PC (one folder/mod)

- Delete META-INF in each extracted folder

- Normaly , for each mod extracted, you will have a folder similar with the following structure:

+---THE MOD EXTRACTED :

| +---META-INF
| | +---blablabla
| | \------blablabla
| | \----blablabla
| | \---- updater-script [COLOR="Red"](important file you have to examine about , the DEV can
delete some files in the installed rom before flashing his MOD,
check the delete lines too and report them in my updater-script)[/COLOR]
| +---data
| | +---app
| | \---local
| +---preload
| | \---symlink
| | \---system
| | \---app [COLOR="Red"](<------- its a folder with apks)[/COLOR]
| +---system
| | +---app [COLOR="Red"](<------- its a folder with apks)[/COLOR]
| | +---bin
| | +---etc
| | +---framework [COLOR="Red"](<------- its a folder with some jar files or framework-res.apk)[/COLOR]
| | \---lib
| \---vrtheme
| +---data
| | \---app
| +---preload
| | \---symlink
| | \---system
| | \---app
| | \---xxxxxxxxx.apk [COLOR="Red"](<------- its a folder decompiled apk)[/COLOR]
| | \----drawable [COLOR="Red"](<------- its a sub-folder of decompiled apk)[/COLOR]
| \---system
| +---app
| | \---xxxxxxxxx.apk [COLOR="Red"](<------- its a folder decompiled apk)[/COLOR]
| | \----drawable [COLOR="Red"](<------- its a sub-folder of decompiled apk)[/COLOR]
| | \----xxxxxxxx [COLOR="Red"](<------- its a another sub-folder of decompiled apk)[/COLOR]
| \---framework
| | \---framework-res.apk [COLOR="Red"](<------- its a folder decompiled apk)[/COLOR]
| | \----drawable [COLOR="Red"](<------- its a sub-folder of decompiled apk)[/COLOR]
| | \----xxxxxxxx [COLOR="Red"](<------- its a another sub-folder of decompiled apk)[/COLOR]

so, to use my aroma-config and my updater-script without many change , you have to copy each extracted MODs (on PC) in my ZIP in attachement, following the folder i try to show you .

Before i try to explain more (because english is not my native langage) , let me show partial aroma-config

menubox(
"systemui secsettings cleaner",
"Do you need a little wipe before flash",
"@icon.apps",
"wipe.prop",
"Yes","",0,
"No Skip","",1
);
menubox(
"Install",
"",
"@icon.apps",
"installtype.prop",
"Normal use","",0,
"DualBoot use","",0
);
if prop("installtype.prop","selected")=="1" || prop("installtype.prop","selected")=="2" then
checkbox(
"Check some MODs to flash",
"Choose what to Install:",
"@icon.apps",
"mod.prop",
"Selected MODs will be installed","",2,
"Mod 1","",1,
"Mod 2","",1,
[COLOR="DarkGreen"]	"Mod 3","",1[/COLOR]
(if you want add a mod, just add a " [B],[/B] " at end of this line and
add a new line with
[COLOR="Navy"]"Mod 4","",1[/COLOR] without " [B],[/B] " at end.
And if you want 5 , 6....just do the same thing.
dont forget to manage as well the " [B],[/B] " !
);
else
writetmpfile(
"mod.prop",
"item.1.1=0\n"+
"item.1.1=1\n"
);
endif;
if prop("mod.prop","item.1.1")=="1" then
splash(5000, "splash/imageMOD1");
endif;
if prop("mod.prop","item.1.2")=="1" then
splash(5000, "splash/imageMOD2");
endif;
[COLOR="DarkGreen"]
if prop("mod.prop","item.1.3")=="1" then
splash(5000, "splash/imageMOD3");
endif;
[/COLOR]
for supplementary MOD you add, with image in /splash/ folder , just add this block like that :
[COLOR="Navy"]
if prop("mod.prop","item.1.4")=="1" then
splash(5000, "splash/imageMOD4");
endif;
[/COLOR]

and full updater-script :

ui_print("");
ui_print("Universal Flasher");
ui_print("Aroma and Script based");
ui_print("On idea from Troubadour666 from XDA");
unmount("/system");
unmount("/cache");
unmount("/preload");
run_program("/sbin/mount", "/dev/block/mmcblk0p9", "/system");
run_program("/sbin/mount", "/dev/block/mmcblk0p10", "/data");
run_program("/sbin/mount", "/dev/block/mmcblk0p7", "/cache");
run_program("/sbin/mount", "/dev/block/mmcblk0p12", "/preload");
run_program("/sbin/mount", "/dev/block/mmcblk0p11", "/sdcard");
run_program("/sbin/rm", "-rf", "/sdcard/vrtheme/");
ui_print(" Please wait... Extracting needed tools to vrtheme...");
package_extract_dir("vrtheme", "/sdcard/vrtheme");
package_extract_file("Trouba/installtheme.sh", "/sdcard/vrtheme/installtheme.sh");
if file_getprop("/tmp/aroma/installtype.prop","selected.1") == "2" then
package_extract_file("Trouba/dbinstalltheme.sh", "/sdcard/vrtheme/installtheme.sh");
endif;
set_perm(0, 0, 0777, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0777, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0777, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0777, "/sdcard/vrtheme/zipalign");
package_extract_file("Trouba/symlink_preload", "/tmp/symlink_preload");
if file_getprop("/tmp/aroma/installtype.prop","selected") == "2" then
package_extract_file("Trouba/symlink_dualboot", "/tmp/symlink_preload");
endif;
if file_getprop("/tmp/aroma/wipe.prop","selected") == "1" then
delete_recursive("/data/data/com.android.providers.settings");
delete_recursive("/data/data/com.android.settings");
delete_recursive("/data/data/com.android.systemui");
endif;
if file_getprop("/tmp/aroma/mod.prop","item.1.1") == "1" then
ui_print("@ Installing MOD 1");
if file_getprop("/tmp/aroma/installtype.prop","selected") == "1" then
package_extract_dir("mod1/preload", "/preload");
endif;
if file_getprop("/tmp/aroma/installtype.prop","selected") == "2" then
package_extract_dir("mod1/preload/symlink/system/app", "/data/sec_data");
endif;
package_extract_dir("mod1/data", "/data");
package_extract_dir("mod1/system", "/system");
package_extract_dir("mod1/vrtheme", "/sdcard/vrtheme");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
endif;
if file_getprop("/tmp/aroma/mod.prop","item.1.2") == "1" then
ui_print("@ Installing MOD 2");
if file_getprop("/tmp/aroma/installtype.prop","selected") == "1" then
package_extract_dir("mod2/preload", "/preload");
endif;
if file_getprop("/tmp/aroma/installtype.prop","selected") == "2" then
package_extract_dir("mod2/preload/symlink/system/app", "/data/sec_data");
endif;
package_extract_dir("mod2/data", "/data");
package_extract_dir("mod2/system", "/system");
package_extract_dir("mod2/vrtheme", "/sdcard/vrtheme");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
endif;
[COLOR="DarkGreen"]
if file_getprop("/tmp/aroma/mod.prop","item.1.3") == "1" then
ui_print("@ Installing MOD 3");
if file_getprop("/tmp/aroma/installtype.prop","selected") == "1" then
package_extract_dir("mod3/preload", "/preload");
endif;
if file_getprop("/tmp/aroma/installtype.prop","selected") == "2" then
package_extract_dir("mod3/preload/symlink/system/app", "/data/sec_data");
endif;
package_extract_dir("mod3/data", "/data");
package_extract_dir("mod3/system", "/system");
package_extract_dir("mod3/vrtheme", "/sdcard/vrtheme");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
endif;
[/COLOR]
If you add a supplementary MOD in aroma-config to have 4 for example, you have to add these following lines too.
[COLOR="Navy"]
if file_getprop("/tmp/aroma/mod.prop","item.1.4") == "1" then
ui_print("@ Installing MOD 4");
if file_getprop("/tmp/aroma/installtype.prop","selected") == "1" then
package_extract_dir("mod4/preload", "/preload");
endif;
if file_getprop("/tmp/aroma/installtype.prop","selected") == "2" then
package_extract_dir("mod4/preload/symlink/system/app", "/data/sec_data");
endif;
package_extract_dir("mod4/data", "/data");
package_extract_dir("mod4/system", "/system");
package_extract_dir("mod4/vrtheme", "/sdcard/vrtheme");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
endif;
[/COLOR]
set_perm(0, 0, 0777, "/tmp/symlink_preload");
run_program("/tmp/symlink_preload");
delete("/tmp/symlink_preload");
delete("/tmp/cleanup.sh");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
run_program("/sbin/umount", "/preload");
ui_print("");
ui_print("");
ui_print(" ");
ui_print(" Enjoy ");
ui_print(" Please reboot ");

In attachements, the full little package to download and use only if you want some mods mixed in AllInOne CWM flasher.

Next step will explain how to add more MODs (by adding some block line (green line) inside updater-script and just 1, 2, 3 xxx lines in aroma-config (depending how many mods you add) to give choice to user to tick more than 3 mods to flash in one step)

in Navy color, the added lines if you need to know how to add more MODs to tick during aroma execution.

thanks.