[Galaxy Note GT-N7000 Themes and Apps] tkari4:
Third part include VillainTheme system

First some info about the VillainTheme System: http://xdaforums.com/showthread.php?t=1207017

With the VillainTheme System each image can be replaced in any app.

Edited xml or smali files must be used for the same firmware like XXLT?

Preparation

1.) Decompile your apk

2.) Modify the images

3.) Modify xml files

4.) Build the modified apk

5.) Take the modified files out

Don't change the 9.png files with normal png picture if possible.

Use instead this website: Android Asset Studio :good:

Don't add the values folder contents to your theme, because they are in the resources.arsc.

Changing pictures: add the pictures only

Changing colors in the xml files: add the modified xml files and resources.arsc to your project

Adding edited smali files: add only the classes.dex to your project

9.png must be token from compiled source, or will looks ugly...

As theming example chosen the HelpHub.apk

Can be themed to white, or back to black.

I think almost nobody use the HelpHub.apk so installation is included.

Uninstall will remove all remain.

if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "3"
then
ui_print("HelpHub Uninstalled");
delete("/system/app/HelpHub.apk");
delete_recursive("/data/data/com.samsung.helphub");
delete("/data/dalvik-cache/system@app@HelpHub.apk@classes.dex");
endif;

For example the script for white theme:

# White Theme

if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "2"
then
ui_print("White Theme");
package_extract_dir("vrtheme/white", "/emmc/vrtemp");
package_extract_dir("vrtheme/white", "/emmc/vrtemp/preload/symlink");
package_extract_dir("vrscript/", "/emmc/vrtemp");
set_perm(0, 0, 0755, "/emmc/vrtemp/install.sh");
set_perm(0, 0, 0755, "/emmc/vrtemp/zip");
set_perm(0, 0, 0755, "/emmc/vrtemp/cleanup.sh");
set_perm(0, 0, 0755, "/emmc/vrtemp/zipalign");
run_program("/emmc/vrtemp/install.sh");
run_program("/emmc/vrtemp/cleanup.sh");
endif;

Just as Info:

Original file name for install.sh => installtheme.sh

Original file name for vrtemp => vrtheme

1.) The first line will copy the modified files from the white theme folder to emmc/vrtemp folder:

package_extract_dir("vrtheme/white", "/emmc/vrtemp");

- So, we will have emmc / vrtemp / system / app folders

2.) The second line will copy the modified files from the white theme folder to emmc/vrtemp/preload/symlink folder:

Don't need to include the files two times! (one for system app and one for preload apps, forget it)

Can do it with the script.

package_extract_dir("vrtheme/white", "/emmc/vrtemp/preload/symlink");

- So, we will have emmc / vrtemp / preload / symlink / system / app folders

3.) The third line will copy the vrtheme script files to the emmc/vrtemp folder

package_extract_dir("vrscript/", "/emmc/vrtemp");

here they are:

4.) With line 4, 5, 6, 7 setting permissions for vrtheme files

set_perm(0, 0, 0755, "/emmc/vrtemp/install.sh");
set_perm(0, 0, 0755, "/emmc/vrtemp/zip");
set_perm(0, 0, 0755, "/emmc/vrtemp/cleanup.sh");
set_perm(0, 0, 0755, "/emmc/vrtemp/zipalign");

5.) Line 8 it's the "Magic" the vrtheme script

run_program("/emmc/vrtemp/install.sh");

6.) With Line 9 we will clean all remain

run_program("/emmc/vrtemp/cleanup.sh");

Because I don't need the apps from the backup folder will be all folders deleted.

(Using Aroma instead)

cleanup.sh

#!/sbin/sh
rm -rf /emmc/vrtemp/
rm -rf /emmc/vrtemp-backup/
echo "Cleanup complete"

If you want to keep the backup folder, then delete the third line. (over echo command)

In the app folders must make on new folder with the app name.

In this case HelpHub.apk

In the root directory of the HelpHub.apk folder copy the modified classes.dex or resources.arsc or make res folder.

If you want to change pictures, colors, etc., then make the same folder names such as where you want to take them off:

How to use "or" command in the aroma-config or in the updater-script

[B][SIZE="3"]or = ||[/SIZE][/B]

"or" in the aroma-config:

[COLOR="blue"]if (prop("selectbox.prop","selected.1")=="2" || prop("selectbox.prop","selected.1")=="3")
then[/COLOR]

selectbox("","<b>Select what you want</b>","@alert","selectbox1.prop",
"Select what you want", "", 2,
"<b>Test 1</b>", "Only placeholder", 0,
"<b>Test 2</b>", "Only placeholder", 1);

[COLOR="blue"]endif; [/COLOR]

It's useful if want to make the same task after different selections in the Aroma.

Can save some lines with it.

"or" in the updater-script:

[COLOR="blue"]if
(file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "2" ||
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "3")
then [/COLOR]
if
file_getprop("/tmp/aroma-data/selectbox1.prop", "selected.1") == "1"
then
ui_print("Test 1 selected");
# Do something extract, delete,..
endif;
if
file_getprop("/tmp/aroma-data/selectbox1.prop", "selected.1") == "2"
then
ui_print("Test 2 selected");
# Do something extract, delete,..
endif;
[COLOR="Blue"]endif; [/COLOR]

and = &&

The attached zip file installs the HelpHub.apk to system.

The included HelpHub.apk it's multi language. Black or White theme can be selected.

If it's already installed, then skip the installation.

The icons are removed from the help text, had some problem with them.