FORUMS
Remove All Ads from XDA

[3.0.0 beta] EVilTheme: VRTheme Reborn

876 posts
Thanks Meter: 608
 
Post Reply Email Thread
About
Eviltheme (Enhanced VillainROM Theme Engine) is an Android system modification platform meant for use with custom Android recoveries.
It allows modification of application resources without the need to replace the whole app or install a new operating system.
Eviltheme is based on the VRTheme Engine from 2011, though versions 3.x.x and up heavily differ from the original VillainROM code.

Disclaimer
Eviltheme is provided to you without warranty. You are free to try it on your device, but you are doing so at your own risk. I will not be responsible for bricked devices, wiped devices, etc.

Features
  • Automatic systemless mode with version 3.x.x+ (Magisk required, version 13.1+ recommended)
  • System mode fallback in case Magisk is not present
  • Supports both Dalvik and ART platforms
  • Smart bytecode refresh (delete classes.dex/classes.art only if it is replaced by the theme)
  • Easy uninstallation via automatically generated flashable ZIP or through Magisk Manager (if installed systemlessly)
  • Delete files (even inside APKs)
  • Support for pre/post-(un)installation scripts
  • Support for dual /system partitions

Downloads
Latest beta: 3.0.0-beta4
Last 2.x release (no systemless support): 2.0.6

Changelogs
GitHub

Documentation
Second post

Help
Third post

Credits
Source code (GPLv3)
Eviltheme main repo
Eviltheme restore ZIP repo
The Following 15 Users Say Thank You to aureljared For This Useful Post: [ View ] Gift aureljared Ad-Free
 
 
6th June 2014, 08:03 AM |#2  
aureljared's Avatar
OP Senior Member
Flag Quezon City
Thanks Meter: 608
 
More
Arrow 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:
  1. Ensure you've downloaded the appropriate template ZIP. Make a folder somewhere you can remember and extract the ZIP there.
  2. The folder should now contain the folders META-INF, data, system, vrtheme, and a file called eviltheme.prop.
  3. Open eviltheme.prop in a text editor (please use Notepad++ if you are on Windows!) and add your theme information there.
  4. 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!
  5. 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.
  6. Repeat step 5 until you've placed your theme files in their appropriate locations.
  7. 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]
  8. If the recovery that the theme is intended to be used with requires signing, sign the ZIP now.
  9. Test your theme!

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:
Code:
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:
Code:
/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.
Code:
/system/app/Bloatware/Bloatware.apk no-backup
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.
The Following 7 Users Say Thank You to aureljared For This Useful Post: [ View ] Gift aureljared Ad-Free
6th June 2014, 08:03 AM |#3  
aureljared's Avatar
OP Senior Member
Flag Quezon City
Thanks Meter: 608
 
More
Help section
The theme wasn't successful, and I believe that the problem lies in the engine itself.

Post here describing the problem. Be as descriptive as possible. I will ignore all bug reports without an attached logcat dump and/or recovery.log. I'll try to look into the problem when time permits.
I am just a student, not a full-time developer. I may not be able to provide a fix for some bugs, so feel free to help me and everyone else out. If you know how to work with Git, an upstream patch to the project would be highly appreciated


The theme was / wasn't successful, but I am stuck in a bootloop.

Try wiping your Dalvik cache. If the problem is still there, uninstall the theme and post a bug report in this thread. Include the relevant /cache/recovery.log and the theme you installed.


The theme was successful, but the app I was theming does not reflect my changes.

This is a tough one to solve. Try recompiling the APK itself with your theme files. If it works, it's either the problem lies in how you put the theme files in the ZIP, or maybe it's the script that's buggy. Try to make a ZIP again, following the instructions to the letter. If it still doesn't work, you can file a bug report here and attach your logcat dump, recovery.log, and (if you want) the themed APK.


The theme was successful, and now I'm ready to release my theme to the public.

All I ask for is some credit and a link back to this thread.


The theme wasn't successful, and I found a problem in your engine script(s).

If you're familiar with Git, you can make a pull request to the EVilTheme repository.
If you don't know how to use Git, you can just edit the script(s) you need and send me a PM containing the fixed script(s). I'll add you to the credits list in the first post if your bugfix is effective!
The Following 4 Users Say Thank You to aureljared For This Useful Post: [ View ] Gift aureljared Ad-Free
6th June 2014, 06:58 PM |#4  
Spannaa's Avatar
Recognized Contributor / Themer
Flag Cardiff
Thanks Meter: 15,508
 
Donate to Me
More
Great work

I particularly like the smart selective dalvik-cache wiping
Maybe it could be even smarter if the script only wipes an apk's dalvik-cache if the apk has had it's classes.dex replaced by the theme...

I'm working on something like this myself but mine is based on the unreleased GS2XFormROM by @hawkerpaul
I'll throw you a link when it's ready
The Following User Says Thank You to Spannaa For This Useful Post: [ View ] Gift Spannaa Ad-Free
6th June 2014, 08:10 PM |#5  
hawkerpaul's Avatar
Senior Member
Flag UK
Thanks Meter: 6,320
 
Donate to Me
More
Quote:
Originally Posted by Spannaa

Great work

I particularly like the smart selective dalvik-cache wiping
Maybe it could be even smarter if the script only wipes an apk's dalvik-cache if the apk has had it's classes.dex replaced by the theme...

I'm working on something like this myself but mine is based on the unreleased GS2XFormROM by @hawkerpaul
I'll throw you a link when it's ready

Let me know if you need any help on the scripting side of things butty.


Sent from my GT-I9505G using XDA Free mobile app
The Following User Says Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
6th June 2014, 10:00 PM |#6  
Spannaa's Avatar
Recognized Contributor / Themer
Flag Cardiff
Thanks Meter: 15,508
 
Donate to Me
More
Quote:
Originally Posted by hawkerpaul

Let me know if you need any help on the scripting side of things butty.

I will - cheers mate

Got it working but I'm sure you'd do a better job - .sh scripting isn't my thing at all.

Apologies to the OP for the OT...

Sent from my GT-I9300...
7th June 2014, 12:29 AM |#7  
aureljared's Avatar
OP Senior Member
Flag Quezon City
Thanks Meter: 608
 
More
Quote:
Originally Posted by Spannaa

Great work

I particularly like the smart selective dalvik-cache wiping
Maybe it could be even smarter if the script only wipes an apk's dalvik-cache if the apk has had it's classes.dex replaced by the theme...

I'm working on something like this myself but mine is based on the unreleased GS2XFormROM by @hawkerpaul
I'll throw you a link when it's ready

Hmm, yes I think I'll implement this in v1.1. Thanks for the suggestion!

Sent from my GT-I8730 using Tapatalk
7th June 2014, 03:55 AM |#8  
aureljared's Avatar
OP Senior Member
Flag Quezon City
Thanks Meter: 608
 
More
Version 1.1 released!

v1.1: Link
Quote:


What's new?
- Even smarter Dalvik wiping: delete dex files only for those apps whose classes.dex were changed (thanks @Spannaa)
- Corrected a typo in the restore script (please delete 'restore-vr' inside your /system/xbin, if any!)
- Removed unused methods in installtheme.sh

18th June 2014, 03:38 PM |#9  
Spannaa's Avatar
Recognized Contributor / Themer
Flag Cardiff
Thanks Meter: 15,508
 
Donate to Me
More
Quote:
Originally Posted by aureljared

Version 1.1 released!

v1.1: Link

How about making this TWRP compatible too - then it'd be even more useful

Reference 1
Reference 2
20th June 2014, 01:19 PM |#10  
aureljared's Avatar
OP Senior Member
Flag Quezon City
Thanks Meter: 608
 
More
Quote:
Originally Posted by Spannaa

How about making this TWRP compatible too - then it'd be even more useful

Reference 1
Reference 2

Version 1.2 released!

v1.2: Link

Quote:

What's new?
- Refinements to Smart Dalvik Wipe
- Switch to Linus Yang's BusyBox 1.21.1, which will hopefully make theming TouchWiz < 4.2 possible
- TWRP compatibility: switch to a static zipalign binary, grep method for OUTFD to look for updater binary
- Cleaner zip hierarchy: new apps to be installed to /system and /data are now in their respective folders in a folder named 'new'

Sent from my GT-I8730 using Tapatalk
The Following User Says Thank You to aureljared For This Useful Post: [ View ] Gift aureljared Ad-Free
14th July 2014, 03:10 PM |#11  
deuce_biggins's Avatar
Senior Member
Flag Detroit
Thanks Meter: 2,196
 
More
Quote:
Originally Posted by aureljared

Version 1.2 released!

v1.2: Link



Sent from my GT-I8730 using Tapatalk

Very good job on this...one thing, in kitkat 4.4.2 touchwiz roms half of the apps that need to be themed are in /system/priv-app. This folder location does not seem to be in your installtheme.sh script. I can manually change everything myself but if you would like other users to take advantage of your work, you may want to consider updating for these users.
The Following User Says Thank You to deuce_biggins For This Useful Post: [ View ] Gift deuce_biggins Ad-Free
Post Reply Subscribe to Thread

Tags
eviltheme, flash, recovery, theme, vrtheme

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes