New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
luxxx123
Old
(Last edited by luxxx123; 27th April 2013 at 12:08 AM.)
#1  
Senior Member - OP
Thanks Meter 305
Posts: 219
Join Date: Jun 2012
Default [WIN][SCRIPT] ThemeMachine 1.0 - Theming never was that easy [13.02.2013]


About
The ThemeMachine is a theming tool, which makes it easier to port a theme.
Its writen in batch and executeable on every Windows since XP.
What it does is told easy but wasn´t that easy to implement.
It copies all PNG-files (this includes .9.png) from one APK into another one, preconditioned the file exists in the destination APK.
You´re interested in the complete process of the tool? Take a look in the attached flowchart or click here.


Preparation
  1. Be aware you have cmd and powershell on your PC (which are both components of every Windows since XP)
  2. Download the attached file or click here and extract it to any place you want. E.g. like this:
     
  3. Get a BASE and a THEME APK. Both have to be deodexed.
    BASE: Its an APK that you want to theme with the contents of the THEME apk. That could be the framework-res.apk that you currently use.
    THEME: Its an APK that contains the theme that you want to copy. That could be the framework-res.apk of CM7.2 for Motorola defy.


Using it the right way
Navigate to the folder where you´ve extracted the archive. Enter the folder and you´ll see a foldercontent like this:
 

Double click on "start.cmd" to execute the batch script.
Drag&drop the first file, the BASE apk, into the window.
Exactly do the same with the second file, the THEME apk.
Now the script will do its best to get a good theme out of it.
You also get some infos in the window. For example the info how much files got copied (see picture below)
 

At the end of the script when it shows "Press any key to get into folder that contains the new file"
press a any key on your keyboard then the explorer will opens the folder with your new themed APK.


Example / Result
I´m using MotoSwitchUI 2.0 on my Motorola XT615 (a.k.a Motoluxe) with Gingerbread on it.
Sadly we don´t have more options like using CM because of locked bootloader.
In my opinion you can´t make a GUI more ugly then the MotoSwitchUI
So i thought.. well i can´t make it worser.. so i decided to theme it with the AOSP/CM-Style.
First i´ve downloaded CM7.2 for Motorola Defy. So i remain on the same API-Level, which means more compatible filenames.
Further i have the same imagesizes in this szenario: HDPI.
Files i´ve used: Framework-res.apk, SystemUI.apk, Browser.apk, Settings.apk, DeskClock.apk, DownloadProviderUI.apk, Email.apk, Mms.apk, Music.apk, Phone.apk, SettingsProvider.apk
As BASE i´ve used my stock files from MotoSwitchUI and as THEME the files out of CM7.2 for defy.
After theming them with ThemeMachine + about 10 .xmls edits + using launcher of CM7.2 (which suprisingly works fine) i reached the following result.
And gess me thats not all You should see the rest!



Tips
  • APKs share their PNGs with other APKs. Most used: framework-res.apk.
    To get a good copy of a theme its a must to theme it too.
  • As theme-APK you should use a APK with the same API-level as the base-APK.
    Reason for this: APKs with the same API-Level most likely have the same PNG-filenames.
  • As theme-APK you should use a APK with the same Android image size (xdpi, hdpi,...)


Credits
  • Igor Pawlow: 7zip is a mighty tool and used for extracting and adding contents
  • pieh-ejdsch/bastla (@administrator.de): For helping me to find the right command for comparing contents
  • jevan24 (@xda-developers.com): For excessive testing and reporting
  • imageshack.us: For hosting my images
  • gliffy.com: Used for creating flowcharts. Realy good service.

Attached Thumbnails
Click image for larger version

Name:	flowchart.jpg
Views:	1406
Size:	131.3 KB
ID:	1709308  
Attached Files
File Type: zip ThemeMachine-1.0.zip - [Click for QR Code] (378.4 KB, 553 views)
The Following 24 Users Say Thank You to luxxx123 For This Useful Post: [ Click to Expand ]
 
luxxx123
Old
(Last edited by luxxx123; 22nd February 2013 at 12:03 PM.)
#2  
Senior Member - OP
Thanks Meter 305
Posts: 219
Join Date: Jun 2012
Question: after finishing the new apk..will i sign it or not?
Answer: No you don´t have to sign it.
The Following 3 Users Say Thank You to luxxx123 For This Useful Post: [ Click to Expand ]
 
luxxx123
Old
(Last edited by luxxx123; 7th April 2013 at 07:53 PM.)
#3  
Senior Member - OP
Thanks Meter 305
Posts: 219
Join Date: Jun 2012
The Following 3 Users Say Thank You to luxxx123 For This Useful Post: [ Click to Expand ]
 
MaartenXDA
Old
#4  
MaartenXDA's Avatar
Senior Member
Thanks Meter 986
Posts: 1,753
Join Date: Oct 2012
Location: Amsterdam

 
DONATE TO ME
Default Re: [WIN][SCRIPT] ThemeMachine 1.0 - Theming was never that easy

Great work man! Trying!

 
Sent from my awesome fridge
The Following 3 Users Say Thank You to MaartenXDA For This Useful Post: [ Click to Expand ]
B.PUNEETH Old
#5  
Guest
Thanks Meter
Posts: n/a
Default Re: [WIN][SCRIPT] ThemeMachine 1.0 - Theming was never that easy

Great Work man !! .

Sent from my GT-S5830i using xda app-developers app
The Following User Says Thank You to For This Useful Post: [ Click to Expand ]
 
rkmiks
Old
#6  
Senior Member
Thanks Meter 109
Posts: 405
Join Date: Jul 2012
Wonderful. Probably the best theming tool I ever came across.
The Following User Says Thank You to rkmiks For This Useful Post: [ Click to Expand ]
 
soumya_digi
Old
#7  
soumya_digi's Avatar
Recognized Themer
Thanks Meter 1343
Posts: 1,021
Join Date: May 2011
Location: Kolkata
Handy tool, going to try this now!
The Following User Says Thank You to soumya_digi For This Useful Post: [ Click to Expand ]
 
Hpsgill
Old
#8  
Hpsgill's Avatar
Senior Member
Thanks Meter 1197
Posts: 1,813
Join Date: Aug 2012
Location: +31° 21' 8.94", +75° 35' 1.34
nice tool!!
My work
Sense 5 EX
The Following User Says Thank You to Hpsgill For This Useful Post: [ Click to Expand ]
 
Mr Impossible
Old
#9  
Mr Impossible's Avatar
Senior Member
Thanks Meter 130
Posts: 222
Join Date: Dec 2012
Default Re: [WIN][SCRIPT] ThemeMachine 1.0 - Theming was never that easy

Sweet

Sent from my SGH-T889 using Tapatalk 2
The Following User Says Thank You to Mr Impossible For This Useful Post: [ Click to Expand ]
 
Rittik
Old
#10  
Rittik's Avatar
Senior Member
Thanks Meter 431
Posts: 952
Join Date: Nov 2011
Location: kolkata
Default Re: [WIN][SCRIPT] ThemeMachine 1.0 - Theming was never that easy

Ability to theme stock roms?

-Rik[Rittik]
"Tere liye hi toh signal tod taad ke
Aaya Bombay wali girlfriend chhod chhad ke!"
My Projects For Huawei Ideos X5pro