[Android Themes] aureljared:
Documentation

Things to remember​

Compile your res/smali/etc files first before you put them in your theme!

You can use APKtool for that, then just extract the files from the resulting APK.

Theming user apps is not supported, because modifying the contents breaks the signature.

Remember to properly edit .9.png files, or else you might get a bootloop!

You

do not

need to put theme files in a subfolder inside the main APK folder, e.g. /system/priv-app/SystemUI/SystemUI.apk. EVilTheme automatically does that for you.

Do I need to download the official Magisk module template?​

Nope! EVilTheme includes post-fs-data.sh, service.sh, and system.prop. Look for them in META-INF/tk/aureljared/magisk-common and edit them to your liking. The module.prop is automatically generated from information you put in eviltheme.prop.

In the event that the official module template is updated, I will update EVilTheme to ensure compatibility as soon as I can.

How do I theme an app (or apps) using EVilTheme?​

Inside the ZIP, there are three folders that you can modify as needed; namely, data, system, and vrtheme.

Your patches/theme files go in vrtheme, while APK files that you want to install onto the device go in data and system.

For example, you want to theme Settings.apk, which is located in /system/priv-app.

Let's say your theme replaces res/drawable-hdpi/battery_icon_50.png in the APK, and also replaces classes.dex because you changed some smali files.

These are the steps you need to follow to make a flashable theme ZIP:

Ensure you've downloaded the appropriate template ZIP. Make a folder somewhere you can remember and extract the ZIP there.

The folder should now contain the folders META-INF, data, system, vrtheme, and a file called eviltheme.prop.

Open eviltheme.prop in a text editor (please use Notepad++ if you are on Windows!) and add your theme information there.

In the vrtheme folder, go to system and make a new folder called priv-app. Inside it, make another folder called Settings.apk.

Make sure you capitalized correctly!

Now make folders as necessary, according to the location of the files you want to theme. For example, battery_icon_50.png is located in res/drawable-hdpi, so make a folder named res inside Settings.apk. Inside it, create a folder named drawable-hdpi, then paste your new battery_icon_50.png inside.

Repeat step 5 until you've placed your theme files in their appropriate locations.

When you're done, go back to the root folder of the theme (the one that contains new, vrtheme, etc.) and put all 5 objects in a ZIP file. You should use Deflate compression method

only.

Any compression level will work.[/u]

If the recovery that the theme is intended to be used with requires signing, sign the ZIP now.

Test your theme! :victory:

How do I uninstall a theme?​

If the theme was installed systemlessly, remove it in Magisk Manager.

Otherwise, flash the relevant zip in /data/eviltheme-backup.

How do I delete files inside APKs to be themed?​

To delete files, add the filenames to a text file named "delete.list" inside the APK theme folder.

This is an example of a delete.list:

res/drawable-hdpi/ic-launcher.png
res/drawable-xxhdpi/battery_full.9.png

How do I delete files that aren't inside APKs?​

You will also need a "delete.list". Remember to use full paths:

/system/app/Bloatware/Bloatware.apk
/system/etc/hosts

Put that in the "vrtheme" folder.

How can I exclude deleted files from being backed up?​

Eviltheme versions 3 and up will automatically back up files that your theme deletes (in non-systemless mode).

To exclude a file, add "no-backup" to the end of the corresponding line in vrtheme/delete.list.

/system/app/Bloatware/Bloatware.apk [B]no-backup[/B]

How do I force installation on /system?​

Eviltheme versions 3 and up will automatically install in systemless mode with Magisk 13.1+, but if you want to force your theme to install to /system, create a file named .eviltheme-force-system (notice the preceding dot) in /sdcard before installing.

I need to execute some commands during the theme (un)installation.​

Inside META-INF/tk/aureljared/eviltheme, there are files named "pre-install.sh-example", "post-install.sh-example", "pre-uninstall.sh-example", and "post-uninstall.sh-example". Remove the "-example" part from the file name of your desired script, and edit that file in the text editor (please please please use Notepad++ if you're on Windows).

Use the comments in that file as a guide.