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

Search This thread

ZeuBug

Senior Member
Aug 31, 2007
817
504
Nantes
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.

Reboot and tried with another launcher, no success... :-(
Hope one day it would be possible...
I had enough to theme each app of my phone... :D

I have an UOT kitchen battery theme in my framework/twframework/systemUI apks. I have difficulties to find the good files to add to the template (without speaking of xml/png battery files in framework-res.apk).
I have made tests with all files inside these 3 apks.... f...... % battery theme....


Any idea?

Thanks!

Sent from my GT-I9100 using XDA Premium App
 

wewoapsiak

Senior Member
Sep 12, 2009
483
185
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.


Works as advertised! Simply put the bootanimation.zip in the /raw/data/local/ folder and it was good to go. Thanks to all of you for this.
 

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,544
11,630
Hmmm... We might need to remove /data/app support for theming, as it's a horrendous idea tbh, since it will break market signatures... You need to resign data apps, as they won't work with "broken" sigs, while system apps WILL work (hence this theming method works).

So I think what's best is that we remove /data/app theming support, though insertion of full signed APKs into /raw/data/app would be possible... But doing so needs a new sig, so anyone using the old original APK won't see the newo ne until packages database was purged of the old sig...

So summary? If app is on /data, don't go near it :)
 
  • Like
Reactions: ecs1984

ZeuBug

Senior Member
Aug 31, 2007
817
504
Nantes
Hmmm... We might need to remove /data/app support for theming, as it's a horrendous idea tbh, since it will break market signatures... You need to resign data apps, as they won't work with "broken" sigs, while system apps WILL work (hence this theming method works).

So I think what's best is that we remove /data/app theming support, though insertion of full signed APKs into /raw/data/app would be possible... But doing so needs a new sig, so anyone using the old original APK won't see the newo ne until packages database was purged of the old sig...

So summary? If app is on /data, don't go near it :)

With playing a lot with data/apps for theming, I think same as you.
Not possible to play with that! :-(
Another thing: it will be the same bad result with system apps with market updates, gmail, vending, etc... I have also had the problem because almost each app of my rom is themed....

edit: and for % battery theme too!

Sent from my GT-I9100 using XDA Premium App
 

explodingboy70

Inactive Recognized Developer
Oct 20, 2010
2,990
1,575
Southwest Florida
First off I love the idea, love it.

Now I'm not sure if this is supposed to work on other phones, in my case Vibrant SGH-T959. If it is supposed to work on different platforms can someone tell me what I'm doing wrong? Heres what I've done...

Decompiled all apk's from the theme I want to use, in this case Matted Blues.
Deleted everything from within the files that I don't want or need including xml's. I did it that way to keep my file structure and names proper.
Next I opened my APk's with 7zip and copied the non-decompiled xmls (basically just the color file) that I wanted to my newly created files.
I then moved all of these files to the template provided.
When in recovery it flashes and tells me that it is doing everything that it says in the updater script. I am not, however, seeing anything related to either of the sh files so no install or cleanup.

Any help would be greatly appreciated. If my problem is the fact that it isn't supported across other devices then how can I do that. BTW I am running the latest leaked I9000 JVR build.
 

seshmaru

Senior Member
Aug 22, 2009
1,294
374
First off I love the idea, love it.

Now I'm not sure if this is supposed to work on other phones, in my case Vibrant SGH-T959. If it is supposed to work on different platforms can someone tell me what I'm doing wrong? Heres what I've done...

Decompiled all apk's from the theme I want to use, in this case Matted Blues.
Deleted everything from within the files that I don't want or need including xml's. I did it that way to keep my file structure and names proper.
Next I opened my APk's with 7zip and copied the non-decompiled xmls (basically just the color file) that I wanted to my newly created files.
I then moved all of these files to the template provided.
When in recovery it flashes and tells me that it is doing everything that it says in the updater script. I am not, however, seeing anything related to either of the sh files so no install or cleanup.

Any help would be greatly appreciated. If my problem is the fact that it isn't supported across other devices then how can I do that. BTW I am running the latest leaked I9000 JVR build.

What works for most devices is simply grabbing another updater-binary file from another .zip made for your device, since this has given multiple1 issues on multiple devices so far.
 

dully79

Senior Member
Apr 29, 2010
2,844
3,395
res/drawable
droidcandy.weebly.com
I'm running VR2.4.2 on a SGS2 and after ALOT of playing around iv'e come to the conclusion this does'nt support multiple apk's being modified.:(
I tried time and again to flash a theme with no changes what so ever.
I tried flashing just one apk mod and it worked.

Unless i'm being a spacker and missing something blatantly obvious can anyone confirm this please?
 

seshmaru

Senior Member
Aug 22, 2009
1,294
374
I'm running VR2.4.2 on a SGS2 and after ALOT of playing around iv'e come to the conclusion this does'nt support multiple apk's being modified.:(
I tried time and again to flash a theme with no changes what so ever.
I tried flashing just one apk mod and it worked.

Unless i'm being a spacker and missing something blatantly obvious can anyone confirm this please?

Multiple APKs in the same folder?
 

trailblazer101

Senior Member
Dec 17, 2010
926
782
Pennsylvania
Hmm... I can't quite figure out why, but it is not working right for me.. My framework-res.apk file is exactly the same after flashing....
I managed to do some debugging, and i found out that the file file is actually created, but it doesn't copy it over for some reason...
within the VRTheme folder (which i prevented from being deleted so i could check out the contents) the framework-res.apk file is in apply/system/framework/framework-res.apk...
So i tried editing the install script, all the way down at the bottom, and i changed the code from from cd /cache/vrtheme/apply/system/framework/aligned/ to cd /cache/vrtheme/apply/system/framework/ and it worked!

All i can guess is that the file isn't getting aligned for some reason, so that folder/file is never created, but the script is still calling for it...

Can you please let me know if my fix is acceptable, or if there is something off with it that can be fixed and would allow it to be aligned therefore creating the folder and the file? :)

-trailblazer101


Sent from my SCH-I400 using XDA Premium App
 

dully79

Senior Member
Apr 29, 2010
2,844
3,395
res/drawable
droidcandy.weebly.com
The layout is as follows


vrtheme/system/app/

*Browser.apk/res/drawable-hdpi
*Contacts.apk/res/drawable-hdpi
*Email.apk/res/drawable-hdpi
*Mms.apk/res/drawable-hdpi
etc.
you get the idea

Looking inside the "modified" apk's in the system/app directory there are 2x res folders, each res folder containing 2x drawable-hdpi folders, is this right:confused:
snap20110809_220229.png
snap20110809_220238.png
 

seshmaru

Senior Member
Aug 22, 2009
1,294
374
The layout is as follows


vrtheme/system/app/

*Browser.apk/res/drawable-hdpi
*Contacts.apk/res/drawable-hdpi
*Email.apk/res/drawable-hdpi
*Mms.apk/res/drawable-hdpi
etc.
you get the idea

Looking inside the "modified" apk's in the system/app directory there are 2x res folders, each res folder containing 2x drawable-hdpi folders, is this right:confused:

What device was this on? On both my SGS2 and transformer only 1 of each folder is present.
 

D.O.C

Inactive Recognized Developer / Retired Senior Mod
Jun 24, 2006
3,134
4,011
44
HTC One X
Samsung Galaxy Tab Plus
Sesh, that has happened to me too, and it happens with metamorph aswell....I believe that it is replacing existing pngs on drawablle-hdpi or whatever folder, but, when adding a new one (that previously did nkt exist (ex a new png file) it creates a new res folder with all structures inside the apk, thus duplicating the /res folder.....that is my theory.
 

explodingboy70

Inactive Recognized Developer
Oct 20, 2010
2,990
1,575
Southwest Florida
What works for most devices is simply grabbing another updater-binary file from another .zip made for your device, since this has given multiple1 issues on multiple devices so far.

Thank you. The tip was a start. I did however have to modify the updater script as well as the installtheme.sh and cleanup.sh. Removed the word "cache" from all three and replaced with "tmp".

The only other thing I'm seeing is that 9.png images aren't working proper, popup windows and such. Not sure if this has to do with the zip or zipalign files or not (they were good pulled from properly decompiled APKs). I'm also getting FCs on a lot, ones that I did like email and galley3D, and ones that I didn't touch, Quickboot.

Like I said this does look very promising. I'm going to play with it more and see if I can eliminate some of my issues. Any input is greatly appreciated.
 

seshmaru

Senior Member
Aug 22, 2009
1,294
374
Sesh, that has happened to me too, and it happens with metamorph aswell....I believe that it is replacing existing pngs on drawablle-hdpi or whatever folder, but, when adding a new one (that previously did nkt exist (ex a new png file) it creates a new res folder with all structures inside the apk, thus duplicating the /res folder.....that is my theory.

Well that's easy enough to test, I'll check it out if I can find some time :)
 

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,544
11,630
If you have issues with actual applying of themes, please post your zip and the device it is for.

Also, if you are testing things, you can set this up in the device and run it via adb shell :)

I think that there is good potential here, but I am not a themer and don't know what you change in a theme, other than some png files...

But afaik the system should work ok with multiple apk files in each folder...

For error 0 things, put in updater-binary from a zip working on your device :)
 
  • Like
Reactions: wewoapsiak

wewoapsiak

Senior Member
Sep 12, 2009
483
185
If you have issues with actual applying of themes, please post your zip and the device it is for.
Also, if you are testing things, you can set this up in the device and run it via adb shell :)
I think that there is good potential here, but I am not a themer and don't know what you change in a theme, other than some png files...
But afaik the system should work ok with multiple apk files in each folder...
For error 0 things, put in updater-binary from a zip working on your device :)

Just an FYI, so far I've used this to edit 4 apk files in the /system/app/ directory and the framework-res.apk, also added a bootanimation.zip, all at the same time. This is change png files, xml files, and the resources.arsc files. Everything has went smoothly, no doubles.

As far as running via adb shell, how would one do that?
 

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,544
11,630
Just an FYI, so far I've used this to edit 4 apk files in the /system/app/ directory and the framework-res.apk, also added a bootanimation.zip, all at the same time. This is change png files, xml files, and the resources.arsc files. Everything has went smoothly, no doubles.

As far as running via adb shell, how would one do that?

Unzip your theme zip. Push the entire vrtheme folder, so that inside /cache/vrtheme you see the installtheme.sh and other folders.

Then you can do

adb shell
cd /cache/vrtheme/
./installtheme.sh

:)

That will do the trick I believe, unless seshy has changed anything since I last looked :)
 

ZeuBug

Senior Member
Aug 31, 2007
817
504
Nantes
First, here is an updater-script with a different ASCII text, which, I think, appears better while flashing.

I have made some concessions about my theme, especially 1% battery theme, and some system apps as Gmail 2.3.5, MMS, etc... Here is my results:

- "FULL" wipe and fresh install of Villain 2.4.2
- made a 0.3.4 version with only framework-res.apk (318 pngs, 1 xml), twframework.apk (25 pngs) and SystemUI.apk (141 pngs) : SUCCESS !!!
- added in vrtheme/system/app: Contacts.apk, Gallery3D.apk, GoogleQuickSearchBox.apk, MediaProvider.apk, Phone.apk, Settings.apk, SystemUI.apk, Talk2.apk, TouchWizCalendar.apk + some audio UI oggs, bootanimation, camera+video player from villain tweak, KE7 MMS.apk themed: ERRORS !!!
- "FULL" wipe and fresh install of Villain 2.4.2
- ... I spend a dozen of tests...
- made a 0.3.4 version with everything above with the exception of "Talk2.apk" and "Gallery3D.apk": SUCCESS !!!

I am near to post my version in SGS2 Theme thread! ;-)

I'm waiting for your comments about that. PM me if you want to test this theme on your SGS2, before release into the wild...

Cheers!

ZeuBug
 

Attachments

  • updater-script.zip
    582 bytes · Views: 32
Last edited:

seshmaru

Senior Member
Aug 22, 2009
1,294
374
Unzip your theme zip. Push the entire vrtheme folder, so that inside /cache/vrtheme you see the installtheme.sh and other folders.

Then you can do

adb shell
cd /cache/vrtheme/
./installtheme.sh

:)

That will do the trick I believe, unless seshy has changed anything since I last looked :)

Nope, that should work fine.

First, here is an updater-script with a different ASCII text, which, I think, appears better while flashing.

I have made some concessions about my theme, especially 1% battery theme, and some system apps as Gmail 2.3.5, MMS, etc... Here is my results:

- "FULL" wipe and fresh install of Villain 2.4.2
- made a 0.3.4 version with only framework-res.apk (318 pngs, 1 xml), twframework.apk (25 pngs) and SystemUI.apk (141 pngs) : SUCCESS !!!
- added in vrtheme/system/app: Contacts.apk, Gallery3D.apk, GoogleQuickSearchBox.apk, MediaProvider.apk, Phone.apk, Settings.apk, SystemUI.apk, Talk2.apk, TouchWizCalendar.apk + some audio UI oggs, bootanimation, camera+video player from villain tweak, KE7 MMS.apk themed: ERRORS !!!
- "FULL" wipe and fresh install of Villain 2.4.2
- ... I spend a dozen of tests...
- made a 0.3.4 version with everything above with the exception of "Talk2.apk" and "Gallery3D.apk": SUCCESS !!!

I am near to post my version in SGS2 Theme thread! ;-)

I'm waiting for your comments about that. PM me if you want to test this theme on your SGS2, before release into the wild...

Cheers!

ZeuBug

Thanks for the info. Any log?
 
Last edited:

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 ;)