[ATTN][DEV] VillainROM and Partners Presents VillainTheme System 0.4.1 [THEMERS ONLY]

Search This thread

seshmaru

Senior Member
Aug 22, 2009
1,294
374
VillainTheme System 0.4.1, aka VRTheme.

http://www.villainrom.co.uk/forum/showthread.php/4971-About-VillainTheme-System

OK, so I think it's time to explain what this is about. It's born from the idea that came about on IRC, for a way to make a theme once for a ROM, rather than have to adjust it for each incremental update for a given ROM or ROMs.

As a user, you don't need to know much - just flash this zip like a regular zip, and you'll get your theme running. But you should be able to apply themes to any device, ROM, and version of the ROM, without it causing adverse effects. That means less time spent by themers making the original theme, and less time spent modifying it constantly for new versions of ROMs.

As a themer? Well, here is the information:

  • Inside the zip, in the vrtheme folder, you can create a folder called "system" and "data". The former is required, the latter is not required unless you wanted to theme a data app (strongly not recommended, unless you know the app will be there on every phone)
  • Inside the system or data folder, create a subfolder "app", and in these, make subfolders named EXACTLY after the APK name. For example, to theme the Browser, you need a folder called "Browser.apk". It must be correctly capitalised.
  • Within there, place the files you require for your theme, in the relevant locations. So most PNGs will be in res/drawable-hdpi/. You can put in xml files too (those which are not in resources.arsc), if you compile them via apktool, and extract them with a zip tool.
  • In the vrtheme folder, as well as system and data folder, one called "raw" can exist. Within here, you can place files to be copied verbatim to the ROM (for example, modified JAR files). Note that using this may make the theme device dependent (read WILL make it device dependent)
  • And that's about it. :)

Features
  • Will modify APKs in a ROM, without changing signatures, and can be used on any ROM where the filenames of themed files is the same.
  • Should not need updated between versions of a ROM
  • Zipaligns all APKs before installation
  • Stores a backup of all files being modified in /cache/vrtheme-backup/
  • Requires no coding abilities or editing of files - just drag and drop :)
  • Can copy "raw" files, though at risk of not working on other devices (well, let's face it, it won't work on likely a slightly different ROM, so this feature is not recommended or encouraged)
Credits

D.O.C for the original idea in a discussion on IRC
Stericson for the original idea of metamorph. While totally different, it's a shared goal to separate themes from ROMs
Matt from the Metamorph team, for the zip binary compiled for Android
Seshy

EULA

Nothing evil or complicated - just a few little things. You should not charge for access to this code. That includes a zip containing this, or a derivative of it. So please don't sell themes using it. That's not particularly cool. If you want to use it commercially for some reason, get in touch with us.

If you spot a bug or error, and find a fix, please reply in this thread and let us know, or post the changes you made. If you're going to distribute the changed version, it is expected that you share the change made by contacting us, or posting it here.

Finally, don't be a douche - don't rip this off or call it your own, and leave all headers and comments identifying the origin of the code in place. Don't rename this to match your ROM or "team" name - it's not cool, and it's not yours to go and adjust. I chose to make this a readable "plain" script, but can easily obfuscate and encrypt it if you want to be a douche.

Copyright VillainROM (2011). All rights reserved
Download VillainTheme 0.4.1 TWRP compatible (Thanks to Dees_Troy)

Download VillainTheme 0.4.1 (thanks D.O.C)

Download VillainTheme 0.4.0 (thanks D.O.C)

Download VillainTheme 0.3.6 experimental
Template for phones: http://www.mediafire.com/?9nxxuagdj4o72k4

Template for Android 3.0+ Tablets: http://www.mediafire.com/?5gyr1g0xgd05t70


Download VillainTheme 0.3.4
Template for phones V0.3.4: http://www.mediafire.com/?ugjaj89i5oxb2nh

Template for Android 3.0+ Tablets V0.3.3: http://www.mediafire.com/?xxucc8xyt2x3k9s
(WP 7 Theme to show where everything goes.)

If any of the templates get updated I will make sure to post the updated version with a changelog.

This was posted with permission from Pulser_g2 as he is on vacation.
If you have any issues you can PM me and I will try to solve them, you can also drop by on the VillainROM.co.uk IRC channel and see if someone can help.

Also will state this again, all credit should go to Pulser, I am just posting this since he was away on vacation.
 

Attachments

  • Universal-VRTheme-template-v.0.4.1.zip
    516.6 KB · Views: 7,891
  • TWRP-VRTheme-template-v.0.4.1.zip
    563.4 KB · Views: 6,802
Last edited:

seshmaru

Senior Member
Aug 22, 2009
1,294
374
Changelog

Changelog

0.4.1 TWRP compatibility

  • Added TWRP Recovery compatible vrtheme (thanks to TWRP developers for compiling the zipalign binary, and again, thanks to androidphone2012 for pointing it out)
0.4.1 compatibility issues

  • Removed mounting partitions as blocks from updaterscript.
  • Removed bootlogo flasher from updaterscript

0.4.0 bugfix
  • Fixed permissions privileges in installtheme.sh

0.3.6 experimental
  • Different handling of raw files.

0.3.5 experimental
  • Fixed ASCII art in updater script.
  • Minor clean up of installtheme.sh
  • Added preview.png to template.

0.3.4
  • Changed the way the .zip handles raw files again. Just put them in the raw folder.

0.3.3
  • Modified installtheme.sh as it was giving possible problems.

0.3.2
  • Fixed a problem with raw folder copying. Put contents of /raw in /system now on the root of the .zip
  • Fixed some status 0 errors.
Currently known bugs:

You might need to grab an updater-binary fit for your device (just grab it from any .zip that will flash on your device.
 
Last edited by a moderator:

Jocutz1987

Senior Member
Oct 29, 2008
666
216
tampa
Nice work hope to see this development go along way....and support other phones

Sent from my LG-LS670 using Tapatalk
 

Noonski

Inactive Recognized Developer / Moderator Emeritus
Apr 18, 2005
5,326
149
Amsterdam
noonski.nl
In case someone in the future or near future makes an app to choose the themes.
Maybe an idea to put a theme preview.png somewhere in there.

Kudos, great idea guys.
 
  • Like
Reactions: Osioko

wewoapsiak

Senior Member
Sep 12, 2009
483
185
Would you mind if themers edited the lines in updater-script:
ui_print("Preparing to theme...");
ui_print("Thanks for using VillainTheme Flasher");

To something that states the name of the theme, ie:
ui_print("Preparing to install xxx theme...");
ui_print("Thanks for using VillainTheme Flasher");
ui_print("To install xxx theme");

Also, could the function be added to copy a bootanimation.zip over to /data/local/ or is the plan to keep copying over to the /system/ folder?
Works great on the G2x running CM7 BTW.
 

seshmaru

Senior Member
Aug 22, 2009
1,294
374
Would you mind if themers edited the lines in updater-script:
ui_print("Preparing to theme...");
ui_print("Thanks for using VillainTheme Flasher");

To something that states the name of the theme, ie:
ui_print("Preparing to install xxx theme...");
ui_print("Thanks for using VillainTheme Flasher");
ui_print("To install xxx theme");

Also, could the function be added to copy a bootanimation.zip over to /data/local/ or is the plan to keep copying over to the /system/ folder?
Works great on the G2x running CM7 BTW.

As for the credits, not a 100% sure what pulser wanted, but I think you can edit the updater script UI print however you want as long as you give credit where credit is due.

Yes, for anyone searching, that's fine to add the theme name etc to the updater-script :) ^P

Also I'll add in a feature for /data later today.
 
Last edited by a moderator:
  • Like
Reactions: wewoapsiak

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,537
11,595
Would you mind if themers edited the lines in updater-script:
ui_print("Preparing to theme...");
ui_print("Thanks for using VillainTheme Flasher");

To something that states the name of the theme, ie:
ui_print("Preparing to install xxx theme...");
ui_print("Thanks for using VillainTheme Flasher");
ui_print("To install xxx theme");

Also, could the function be added to copy a bootanimation.zip over to /data/local/ or is the plan to keep copying over to the /system/ folder?
Works great on the G2x running CM7 BTW.

That is cool to adjust to add the xxxx theme :) It's just to stop people going "thanks for using bob's theming system". You can go add your theme name into the updater-script if you wish (and that is indeed a good idea).

Also, seshy, can we add to the template a "preview.png" as Noonski said, as I have an idea like he said - we could use an app to search the sdcard for /sdcard/themes, look into the preview.png in each, and then auto-flash them :)

The boot animation - you can do that easily - just add it to /raw/data/local and it will copy :)
 

seshmaru

Senior Member
Aug 22, 2009
1,294
374
Also, could the function be added to copy a bootanimation.zip over to /data/local/ or is the plan to keep copying over to the /system/ folder?
Works great on the G2x running CM7 BTW.

Updated the template: http://www.mediafire.com/?ugjaj89i5oxb2nh

just make a /data folder in the /raw folder, or if you want to copy over things for /system, just make a /system folder in the /raw folder.

can't actually test it at the moment so you'll have to report back on if it works.
 

ZeuBug

Senior Member
Aug 31, 2007
817
504
Nantes
Updated the template: http://www.mediafire.com/?ugjaj89i5oxb2nh

just make a /data folder in the /raw folder, or if you want to copy over things for /system, just make a /system folder in the /raw folder.

can't actually test it at the moment so you'll have to report back on if it works.

Very great idea this project! ;)
I'm trying to port my theme with your 0.3.4 zip, but it doesn't want to flash ... (error (Status 6) Installation aborted)
Could you take a look to my package? I'm sending you a PM.
Thanks!

edit: oups, it starts well, my script is full of mistakes ...
 
Last edited:

ZeuBug

Senior Member
Aug 31, 2007
817
504
Nantes
Working very well for system apps! I've tried with root explorer (vrtheme/data/app/com.speedsoftware.rootexplorer-1.apk), and after flashing, the app has disappeared... I did a retore with titanium and now I have "com.speedsoftware.rootexplorer-1.apk" and "com.speedsoftware.rootexplorer-2.apk"...
 

seshmaru

Senior Member
Aug 22, 2009
1,294
374
Very great idea this project! ;)
I'm trying to port my theme with your 0.3.4 zip, but it doesn't want to flash ... (error (Status 6) Installation aborted)
Could you take a look to my package? I'm sending you a PM.
Thanks!

edit: oups, it starts well, my script is full of mistakes ...

Any log? Also so the first apk is still there just not showing up?
 

ZeuBug

Senior Member
Aug 31, 2007
817
504
Nantes
Any log? Also so the first apk is still there just not showing up?

It was very complicated because without Root explorer, I can do anything! :D
I think I was just not able to launch root explorer and too, it did not appear in my app drawer (GoLauncher Ex). And after restore via Titanium, there was 2 apks. Now, I have made a nand restore for make another test with another data/app, with less "dead end"! :D
 

ZeuBug

Senior Member
Aug 31, 2007
817
504
Nantes
OK, here is my log.

I just tried with a freeware, "pagesjaunes", and same result: the apk is still in data/app/ but not showed in my app drawer. When I try to install it by clicking on it in data/app/, I have "app non installed". Signature pb?
 

Attachments

  • last_log.zip
    32.6 KB · Views: 22

seshmaru

Senior Member
Aug 22, 2009
1,294
374
OK, here is my log.

I just tried with a freeware, "pagesjaunes", and same result: the apk is still in data/app/ but not showed in my app drawer. When I try to install it by clicking on it in data/app/, I have "app non installed". Signature pb?

Seeing as signature is left intact, it's not a signature problem. Have you rebooted to check if it popped up after a reboot?

Also as stated modifying apps in /data IS discouraged.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 150
    VillainTheme System 0.4.1, aka VRTheme.

    http://www.villainrom.co.uk/forum/showthread.php/4971-About-VillainTheme-System

    OK, so I think it's time to explain what this is about. It's born from the idea that came about on IRC, for a way to make a theme once for a ROM, rather than have to adjust it for each incremental update for a given ROM or ROMs.

    As a user, you don't need to know much - just flash this zip like a regular zip, and you'll get your theme running. But you should be able to apply themes to any device, ROM, and version of the ROM, without it causing adverse effects. That means less time spent by themers making the original theme, and less time spent modifying it constantly for new versions of ROMs.

    As a themer? Well, here is the information:

    • Inside the zip, in the vrtheme folder, you can create a folder called "system" and "data". The former is required, the latter is not required unless you wanted to theme a data app (strongly not recommended, unless you know the app will be there on every phone)
    • Inside the system or data folder, create a subfolder "app", and in these, make subfolders named EXACTLY after the APK name. For example, to theme the Browser, you need a folder called "Browser.apk". It must be correctly capitalised.
    • Within there, place the files you require for your theme, in the relevant locations. So most PNGs will be in res/drawable-hdpi/. You can put in xml files too (those which are not in resources.arsc), if you compile them via apktool, and extract them with a zip tool.
    • In the vrtheme folder, as well as system and data folder, one called "raw" can exist. Within here, you can place files to be copied verbatim to the ROM (for example, modified JAR files). Note that using this may make the theme device dependent (read WILL make it device dependent)
    • And that's about it. :)

    Features
    • Will modify APKs in a ROM, without changing signatures, and can be used on any ROM where the filenames of themed files is the same.
    • Should not need updated between versions of a ROM
    • Zipaligns all APKs before installation
    • Stores a backup of all files being modified in /cache/vrtheme-backup/
    • Requires no coding abilities or editing of files - just drag and drop :)
    • Can copy "raw" files, though at risk of not working on other devices (well, let's face it, it won't work on likely a slightly different ROM, so this feature is not recommended or encouraged)
    Credits

    D.O.C for the original idea in a discussion on IRC
    Stericson for the original idea of metamorph. While totally different, it's a shared goal to separate themes from ROMs
    Matt from the Metamorph team, for the zip binary compiled for Android
    Seshy

    EULA

    Nothing evil or complicated - just a few little things. You should not charge for access to this code. That includes a zip containing this, or a derivative of it. So please don't sell themes using it. That's not particularly cool. If you want to use it commercially for some reason, get in touch with us.

    If you spot a bug or error, and find a fix, please reply in this thread and let us know, or post the changes you made. If you're going to distribute the changed version, it is expected that you share the change made by contacting us, or posting it here.

    Finally, don't be a douche - don't rip this off or call it your own, and leave all headers and comments identifying the origin of the code in place. Don't rename this to match your ROM or "team" name - it's not cool, and it's not yours to go and adjust. I chose to make this a readable "plain" script, but can easily obfuscate and encrypt it if you want to be a douche.

    Copyright VillainROM (2011). All rights reserved
    Download VillainTheme 0.4.1 TWRP compatible (Thanks to Dees_Troy)

    Download VillainTheme 0.4.1 (thanks D.O.C)

    Download VillainTheme 0.4.0 (thanks D.O.C)

    Download VillainTheme 0.3.6 experimental
    Template for phones: http://www.mediafire.com/?9nxxuagdj4o72k4

    Template for Android 3.0+ Tablets: http://www.mediafire.com/?5gyr1g0xgd05t70


    Download VillainTheme 0.3.4
    Template for phones V0.3.4: http://www.mediafire.com/?ugjaj89i5oxb2nh

    Template for Android 3.0+ Tablets V0.3.3: http://www.mediafire.com/?xxucc8xyt2x3k9s
    (WP 7 Theme to show where everything goes.)

    If any of the templates get updated I will make sure to post the updated version with a changelog.

    This was posted with permission from Pulser_g2 as he is on vacation.
    If you have any issues you can PM me and I will try to solve them, you can also drop by on the VillainROM.co.uk IRC channel and see if someone can help.

    Also will state this again, all credit should go to Pulser, I am just posting this since he was away on vacation.
    17
    Changelog

    Changelog

    0.4.1 TWRP compatibility

    • Added TWRP Recovery compatible vrtheme (thanks to TWRP developers for compiling the zipalign binary, and again, thanks to androidphone2012 for pointing it out)
    0.4.1 compatibility issues

    • Removed mounting partitions as blocks from updaterscript.
    • Removed bootlogo flasher from updaterscript

    0.4.0 bugfix
    • Fixed permissions privileges in installtheme.sh

    0.3.6 experimental
    • Different handling of raw files.

    0.3.5 experimental
    • Fixed ASCII art in updater script.
    • Minor clean up of installtheme.sh
    • Added preview.png to template.

    0.3.4
    • Changed the way the .zip handles raw files again. Just put them in the raw folder.

    0.3.3
    • Modified installtheme.sh as it was giving possible problems.

    0.3.2
    • Fixed a problem with raw folder copying. Put contents of /raw in /system now on the root of the .zip
    • Fixed some status 0 errors.
    Currently known bugs:

    You might need to grab an updater-binary fit for your device (just grab it from any .zip that will flash on your device.
    14
    I've rewritten & updated the VRTheme template so that it'll work on Android 5, Lollipop roms.

    Devices\roms tested and working:
    • Nexus 7 2012/LRX21P Android 5.0
    • HTC One M8/GPE Android 5.0
    • SGS3 i9300/Resurrection Remix 5.2.2 Android 5.0.1
    Theme files need to be added to the vrtheme folder using the same directory structure as on your rom.
    e.g. to change a png in SystemUI.apk\res\drawable-hdpi-v4, the modified png should go in the vrtheme\system\priv-app\SystemUI\SystemUI.apk\res\drawable-hdpi-v4 folder.

    I've also added a couple of things:

    Prints progress to the screen whilst processing apks.
    Selectively deletes dalvik-cache files for themed apks (if they're present).
    Creates a vrtheme_restore.zip in \data\vrtheme-backup\ so that all themed apks can be reverted back to their pre-themed versions.

    Lollipop_VRTheme_Template.zip

    Feedback appreciated ;)
    5
    Has anyone used this to theme values folder in the SystemUI.apk.

    Sent from my SGH-T999 using Tapatalk 2

    Yep. Just make your changes to the values folder, compile the apk and then put resources.arsc from the apk into the vrtheme folder. Note it goes alongside the res folder, not inside it

    Sent from my HTC One X using xda premium
    5
    JB_KK_L_VRTheme_Template.zip

    Modified version of the Lollipop VRTheme Template. Should work on JellyBean, KitKat & Lollipop roms by setting folder paths depending on the value of ro.build.version.release in build.prop. Creates a vrtheme_restore.zip in \sdcard\vrtheme-backup\ so that all themed apks can be reverted back to their pre-themed versions.

    Feedback appreciated ;)