Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,222 Members 45,241 Now Online
XDA Developers Android and Mobile Development Forum

[HOW TO] Theme ALL keyboards without FCs! [A guide for beginners]

Tip us?
 
rompnit
Old
(Last edited by rompnit; 4th October 2012 at 06:43 AM.)
#1  
rompnit's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 15984
Posts: 2,671
Join Date: Aug 2008
Location: Granger, IN

 
DONATE TO ME
Tutorial [HOW TO] Theme ALL keyboards without FCs! [A guide for beginners]

Theming a keyboard may be common knowledge to some of the amazing Devs here. But to a noob like me, it took some research and time to get it working without breaking the original signature (That's the trick!). I searched the forum and it doesn't look like anyone has posted a "How To" on theming a keyboard, so I thought I'd share my experience with you all.
**Some of these steps may seem elementary, but I tried to explain everything in layman's terms so even a beginner can theme a keyboard.


// Before you get started:
You must have a working environment setup. Check out QBKing77's awesome video "How to install the android-sdk" to get that going.http://forum.xda-developers.com/show....php?t=1614922

Make sure you also have installed:
// This method has worked with every keyboard that I have encountered so far. I will use 'LatinIME.apk' for reference, as that is the stock ICS keyboard. //

WARNING.. DO NOT POST DISTRIBUTION LINKS TO ANY MODDED 'Swype.apk'. XDA HAS A STANDING ORDER FROM NUANCE (MAKERS OF SWYPE), THAT DOES NOT ALLOW SUCH LINKS TO BE POSTED.

1) To start make sure you have a working copy of your keyboard apk; grab it out of a ROM, download it, or use a file manager with root access (like Root Explorer) to copy it to your SD card then to your computer.
**I would suggest dropping the keyboard apk into a folder on the desktop, seperate from anything else, and making a backup of the original so that you have a spare copy.

2) Using 7zip extract the 'res\drawable-xhdpi' folder into the folder you created. This folder will contain the pngs that control some of the keys, outlined in red on this pic:

Color these pngs to match using your favorite editor and save (bucket fill with Paint.Net is a breeze!)

3) Now that your pngs are themed.. Within the folder that you created containing your apk, hold down shift and right click. Select "Open Command Window Here" to fire up command prompt.

4) Next to decompile the keyboard apk with apktool (again using 'LatinIME.apk' for reference, but the apk may be of a different name; SamsungIME.apk, HTC_IME.apk, etc.).
Type this command:
Code:
apktool d LatinIME.apk
When it's done, you will see a folder with the apk name appear, within the folder you created. Click into it and you should see at minimun a 'res' folder and a 'smali' folder.

5) Navigate to 'res\values' folder. Depending on the keyboard you are working on, the xml controlling the remaining key colors will be contained in the 'colors.xml' or 'styles.xml' file. Open with Notepad++, and change the color codes as needed. Save and close.

6) Go back to the root of the folder containing your apk, and fire up command prompt (if it's not still open). Now it's time to build using this command (again using 'LatinIME.apk' for reference, but the apk may be of a different name; SamsungIME.apk, HTC_IME.apk, etc.)
Code:
apktool b LatinIME
7) When it's done building, you should have 4 folders minimum now (res, smali, build, dist) and it's time for the key to success. Navigate into the 'dist' folder and you will see the "Built" apk. Open it with 7zip, and extract the 'resources.arsc' file to your folder. Close 7zip.

8) Now it's time to pull it all together. Navigate back to the ORIGINAL keyboard apk, and open with 7zip.
Copy (you can drag and drop with 7zip) the 'resources.arsc' that you extracted from your "Built" apk, into the "ORIGINAL" apk overwriting the file. Then with 7zip still open and the apk loaded, navigate (within 7zip) into the 'res\drawable-xhdpi' folder where you should see the list of unthemed pngs. Simply drop your edited pngs into this folder. Close 7zip and you're done here!

9) Finally, take your "ORIGINAL" but themed apk, and push it back the 'system\app' folder on your phone.
Fix permissions to 'rw-r--r--' (only check everything under 'read' and Owner under 'write')
Reboot, and bask in the glory of your new themed keyboard!
**Alternatively, grab my empty zip installer here: http://d-h.st/oKG to flash in recovery. You must drop your themed apk into the system\app folder of the zip and save. Also, the zip already contains the 'LatinImeDictionaryPack.apk'

Please hit THANKS if I helped!! And please keep this thread alive!
The Following 44 Users Say Thank You to rompnit For This Useful Post: [ Click to Expand ]
 
Naddict
Old
#2  
Naddict's Avatar
Forum Moderator
Thanks Meter 13644
Posts: 8,318
Join Date: Nov 2011
Location: 28.2S, 92.1W
Nice,

Now, we need a simple guide on how to theme Jelly Bean...all of it ... (tapping foot patiently)

Thanks!

Every time you don't use search, a kitten, bunny, baby turtle, and fuzzy Harp Seal are killed.

Read the Rules! -- Search Before You Post! -- Learn about XDA -- Need A Moderators Help? -- Get the Most out of XDA! -- Curious about GPL?
The Following 2 Users Say Thank You to Naddict For This Useful Post: [ Click to Expand ]
 
dazednconfused
Old
#3  
dazednconfused's Avatar
Recognized Themer / Recognized Developer
Thanks Meter 20127
Posts: 6,299
Join Date: Jan 2011
Location: Charleston, WV

 
DONATE TO ME
Quote:
Originally Posted by Naddict View Post
Nice,

Now, we need a simple guide on how to theme Jelly Bean...all of it ... (tapping foot patiently)

Thanks!

Themed the same just new xml and some new images. I got everything to decompile and recompile, just some of the xml's have changed.

---------- Post added at 09:41 PM ---------- Previous post was at 09:39 PM ----------

Thanks rompnit. I can there a whole Rom but always have issues with the keyboard. I'll try this tomorrow night.

Wicked Sensations Rom
 
shehroze3
Old
#4  
shehroze3's Avatar
Senior Member
Thanks Meter 215
Posts: 496
Join Date: Oct 2011
Location: Katy
Sorry i'm a nub but does the apktool jar file have to be in the same folder as android-sdk?
If I helped you, PLEASE press the THANKS button!
 
rompnit
Old
#5  
rompnit's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 15984
Posts: 2,671
Join Date: Aug 2008
Location: Granger, IN

 
DONATE TO ME
Quote:
Originally Posted by shehroze3 View Post
Sorry i'm a nub but does the apktool jar file have to be in the same folder as android-sdk?
I actually created a folder 'C:\apktool' where I dropped everything, then added that folder to the Path system variable; same method as you would add the SDK. Otherwise, drop it into the 'platform-tools' folder within the android-sdk. When configured properly, you should be able to open command prompt in any directory, simply type 'apktool' and see a list of commands.
The Following 2 Users Say Thank You to rompnit For This Useful Post: [ Click to Expand ]
 
shehroze3
Old
#6  
shehroze3's Avatar
Senior Member
Thanks Meter 215
Posts: 496
Join Date: Oct 2011
Location: Katy
Quote:
Originally Posted by rompnit View Post
I actually created a folder 'C:\apktool' where I dropped everything, then added that folder to the Path system variable; same method as you would add the SDK. Otherwise, drop it into the 'platform-tools' folder within the android-sdk. When configured properly, you should be able to open command prompt in any directory, simply type 'apktool' and see a list of commands.
ok i did what u said and put the apktool jar file into the platform-tool folder, but when i type apktool in cmd prompt nothing happens.
If I helped you, PLEASE press the THANKS button!
 
rompnit
Old
#7  
rompnit's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 15984
Posts: 2,671
Join Date: Aug 2008
Location: Granger, IN

 
DONATE TO ME
Quote:
Originally Posted by shehroze3 View Post
ok i did what u said and put the apktool jar file into the platform-tool folder, but when i type apktool in cmd prompt nothing happens.
Did you also grab the "wrapper" script from the link as well? It contains a few more necessary files that go with apktool.

Sent from my SPH-L710 using xda app-developers app
The Following User Says Thank You to rompnit For This Useful Post: [ Click to Expand ]
 
Naddict
Old
#8  
Naddict's Avatar
Forum Moderator
Thanks Meter 13644
Posts: 8,318
Join Date: Nov 2011
Location: 28.2S, 92.1W
time for dazed and rompnit to collaborate. maybe a simple guide for us wannabees...

recompiling never works for me, I read somewhere about empty folders being my problem...oh well, I can use 7zip though! and notepad+...
Every time you don't use search, a kitten, bunny, baby turtle, and fuzzy Harp Seal are killed.

Read the Rules! -- Search Before You Post! -- Learn about XDA -- Need A Moderators Help? -- Get the Most out of XDA! -- Curious about GPL?
The Following 2 Users Say Thank You to Naddict For This Useful Post: [ Click to Expand ]
 
shehroze3
Old
#9  
shehroze3's Avatar
Senior Member
Thanks Meter 215
Posts: 496
Join Date: Oct 2011
Location: Katy
Quote:
Originally Posted by rompnit View Post
Did you also grab the "wrapper" script from the link as well? It contains a few more necessary files that go with apktool.

Sent from my SPH-L710 using xda app-developers app
I'll check it out when I get home. Thanks

Sent from my SPH-L710 using xda premium
If I helped you, PLEASE press the THANKS button!
 
shehroze3
Old
#10  
shehroze3's Avatar
Senior Member
Thanks Meter 215
Posts: 496
Join Date: Oct 2011
Location: Katy
ok i got it to work. All i had to do was rename apktool_1.5.0 to apktool. I'm a noob, i know, try not to laugh to hard lmao
If I helped you, PLEASE press the THANKS button!

Tags
keyboard, keyboards, latinime, theme
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes