Post Reply

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

1st October 2012, 10:58 PM   |  #1  
rompnit's Avatar
OP Recognized Contributor / Themer
Flag Granger, IN
Thanks Meter: 17,026
 
2,810 posts
Join Date:Joined: Aug 2008
Donate to Me
More
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!
Last edited by rompnit; 4th October 2012 at 06:43 AM.
The Following 46 Users Say Thank You to rompnit For This Useful Post: [ View ]
2nd October 2012, 12:00 AM   |  #2  
Naddict's Avatar
Senior Member
Flag 28.2S, 92.1W
Thanks Meter: 13,807
 
8,469 posts
Join Date:Joined: Nov 2011
More
Nice,

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

Thanks!

The Following 2 Users Say Thank You to Naddict For This Useful Post: [ View ]
2nd October 2012, 02:41 AM   |  #3  
dazednconfused's Avatar
Recognized Themer / Recognized Developer
Flag Charleston, WV
Thanks Meter: 20,346
 
6,352 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by Naddict

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.
2nd October 2012, 03:22 AM   |  #4  
shehroze3's Avatar
Senior Member
Flag Katy
Thanks Meter: 216
 
504 posts
Join Date:Joined: Oct 2011
More
Sorry i'm a nub but does the apktool jar file have to be in the same folder as android-sdk?
2nd October 2012, 03:47 AM   |  #5  
rompnit's Avatar
OP Recognized Contributor / Themer
Flag Granger, IN
Thanks Meter: 17,026
 
2,810 posts
Join Date:Joined: Aug 2008
Donate to Me
More
Quote:
Originally Posted by shehroze3

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: [ View ]
2nd October 2012, 04:04 AM   |  #6  
shehroze3's Avatar
Senior Member
Flag Katy
Thanks Meter: 216
 
504 posts
Join Date:Joined: Oct 2011
More
Quote:
Originally Posted by rompnit

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.
2nd October 2012, 12:08 PM   |  #7  
rompnit's Avatar
OP Recognized Contributor / Themer
Flag Granger, IN
Thanks Meter: 17,026
 
2,810 posts
Join Date:Joined: Aug 2008
Donate to Me
More
Quote:
Originally Posted by shehroze3

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: [ View ]
2nd October 2012, 12:09 PM   |  #8  
Naddict's Avatar
Senior Member
Flag 28.2S, 92.1W
Thanks Meter: 13,807
 
8,469 posts
Join Date:Joined: Nov 2011
More
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+...
The Following 2 Users Say Thank You to Naddict For This Useful Post: [ View ]
2nd October 2012, 12:38 PM   |  #9  
shehroze3's Avatar
Senior Member
Flag Katy
Thanks Meter: 216
 
504 posts
Join Date:Joined: Oct 2011
More
Quote:
Originally Posted by rompnit

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
2nd October 2012, 08:38 PM   |  #10  
shehroze3's Avatar
Senior Member
Flag Katy
Thanks Meter: 216
 
504 posts
Join Date:Joined: Oct 2011
More
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

Post Reply Subscribe to Thread

Tags
keyboard, keyboards, latinime, theme
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Sprint Galaxy S III Themes and Apps by ThreadRank