Jump to content


Photo

[HOW TO] BASIC THEMING GUIDE

* * * * * 1 votes

  • Please log in to reply
22 replies to this topic

#1
tillaz

tillaz

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 5,859 posts
  • Gender:Male
  • Location:Rockstar North
  • Interests:Alien Life
  • Devices:Moto X
first) learning to decompile and recompile .apk

extract the apk manager.rar to your desktop, you should now have an apk manager folder

LINK

open the apk manager folder, drag and drop the apk you want to theme in to the "place-apk-here-for-modding" folder,

start with framework-res.apk

this can be found in your rom at > system / framework

now double click > "script.bat" to open the interface of apk manager

before you start you should do the following, press 20 and hit enter.... now 500 press enter (every time you open the interface)
(this sets the heap size to 500mb to avoid out of memory errors)

press 22 then enter

enter the number of the apk you want to decompile, in this case it should be 1, then press enter

now enter the number 9 and press enter to start decompiling

wait for it to Finnish

open the projects folder, find and open the folder of the apk you just decompiled, in this case its the "framework-res"



second) making theme changes before recompiling

if you navigate to: res / drawable-hdpi

you will find all of the .png images that make up most of the graphics in android

you should make a new folder on you desktop and start to drag and drop the png's you want to change the colour of into it

now when you have all the .png you want to change the colour of you can follow this to batch change colour
http://www.modaco.co...les-in-seconds/

(or you can change them manually in GIMP, if so use HUE, do not alter lightness, it brakes .9.png's)


third) recompiling your apk with changes

now that you have changed the colour of all your png files you should select them all (hold left click and drag over all items)
and copy them.

now paste them back into the drawable-hdpi folder (import that you paste them, not move)

now from the apk manager interface select 11 and press enter.

wait for it to prompt you > yes or no

select yes, press enter

again select yes, press enter

now it will ask you to navigate to the "keep" folder and delete all files you have modified

navigate to keep / res / drawable-hdpi

now paste those files again in here, select to overwrite, now the pasted files should be highlighted...
right click on one of them and select delete

this should deleted all the files you just coped (all the modified files) now back out of the folder to the root of apk manager

from the apk manager interface press any button

done...

now you will find in the folder "place-apk-here-for-modding"

unsignedframework-res.apk, remove the unsigned part from the name

add this to the flashable zip, flash and test

EMPTY FLASHABLE ZIP





=====================================================
IF YOU HAVE PROBLEMS COMPILING, POST YOUR LOG.TXT FILE
=====================================================

=====================================================
NEXT I WILL COVER .XML THEMING (WHEN I HAVE MORE TIME)
=====================================================

  • 3

#2
Potatoes

Potatoes

    Regular

  • Members
  • PipPip
  • 138 posts
Thanks for this tillaz, this is going to come in very handy

  • 0
Posted Image

#3
krishang3

krishang3

    Addict

  • Members
  • PipPipPipPipPip
  • 581 posts
  • Gender:Male
  • Location:Auckland
  • Interests:lots
  • Devices:Huawei Ascend G300
gr8 but what i want to know is how to enable Notification toggles, its a challenge for me :L

  • 0
Thanks, If I helped in anyway don't forget to rep me :)

#4
tillaz

tillaz

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 5,859 posts
  • Gender:Male
  • Location:Rockstar North
  • Interests:Alien Life
  • Devices:Moto X

gr8 but what i want to know is how to enable Notification toggles, its a challenge for me :L


i would love to explain how its done but its a really complicated thing to write a guide on as code can be different depending on the systemUI.apk

the way i did it was by first porting the AOSP systemUI.apk from the stock ICS nexus s rom...

huawei have there code all over the systemUI found in there stock roms, (for there own power widgets) making it to hard to work with


so my advice for doing this in general (most ics roms / devices ) is to first port the above...

so you will need a basic idea of how stuff is ported... which in this case is not very hard, but would be rather hard to explain in text / take to much time

  • 0

#5
elperroderoke

elperroderoke

    Regular

  • Members
  • PipPip
  • 113 posts
  • Devices:Defy+; U8650; U8815

gr8 but what i want to know is how to enable Notification toggles, its a challenge for me :L


What is your "original" phone, or tell me if you have flashed any vendor package ?
What is the ROM you are using ?
Regards.

  • 0

#6
andy.hyde4

andy.hyde4

    Enthusiast

  • Members
  • PipPipPip
  • 260 posts
  • Gender:Male
  • Location:UK
  • Devices:Huawei G300, Nexus 5

What is your "original" phone, or tell me if you have flashed any vendor package ?
What is the ROM you are using ?
Regards.


No he wants to add them into his own rom

  • 0

#7
Rico_89

Rico_89

    Addict

  • Members
  • PipPipPipPipPip
  • 767 posts
  • Gender:Male
  • Location:London, UK
  • Devices:Huawei Ascend G300, Vowney V5.
  • Twitter:@Rico_89_
Thanks, as soon as I get some time I'll have ago at this. I've been using Nova Launcher and Desktop visualizer to modify my android UI experience, but it would be interesting to see if I can make it into a theme that's flashable in CWM.

Edited by Rico_89, 30 September 2012 - 08:27 AM.

  • 0

#8
krishang3

krishang3

    Addict

  • Members
  • PipPipPipPipPip
  • 581 posts
  • Gender:Male
  • Location:Auckland
  • Interests:lots
  • Devices:Huawei Ascend G300

i would love to explain how its done but its a really complicated thing to write a guide on as code can be different depending on the systemUI.apk

the way i did it was by first porting the AOSP systemUI.apk from the stock ICS nexus s rom...

huawei have there code all over the systemUI found in there stock roms, (for there own power widgets) making it to hard to work with


so my advice for doing this in general (most ics roms / devices ) is to first port the above...

so you will need a basic idea of how stuff is ported... which in this case is not very hard, but would be rather hard to explain in text / take to much time


But will it be possible if I just add your systemui.apk to mine or will it simply not boot?

  • 0
Thanks, If I helped in anyway don't forget to rep me :)

#9
pee_bee

pee_bee

    Newbie

  • Members
  • Pip
  • 13 posts
  • Devices:ascend g300
Thanks for this, but which option should I be using for decompiling - 9 or 10

  • 0

#10
elperroderoke

elperroderoke

    Regular

  • Members
  • PipPip
  • 113 posts
  • Devices:Defy+; U8650; U8815

No he wants to add them into his own rom


It depens how much you mod the ROM. The toggles will be there in most oficial modded and repacked Roms, and is easy to have them back to live, depens on your phone.
Regards.

Edited by elperroderoke, 30 September 2012 - 02:25 PM.

  • 0

#11
haxxbaxx

haxxbaxx

    Regular

  • Members
  • PipPip
  • 111 posts
you say about only changing the hue of icons because it will causes problems, what do i need to do if I want to totally change the icon

  • 0

#12
tillaz

tillaz

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 5,859 posts
  • Gender:Male
  • Location:Rockstar North
  • Interests:Alien Life
  • Devices:Moto X

But will it be possible if I just add your systemui.apk to mine or will it simply not boot?


that really wont learn you anything... or help you do it to future rom's

  • 0

#13
tillaz

tillaz

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 5,859 posts
  • Gender:Male
  • Location:Rockstar North
  • Interests:Alien Life
  • Devices:Moto X

you say about only changing the hue of icons because it will causes problems, what do i need to do if I want to totally change the icon


then you would name the new icon the same as the icon you what to swap it with, do not do this with a ".9.png" though
unless the one your are replacing it with is a proper "9.png"

  • 0

#14
tillaz

tillaz

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 5,859 posts
  • Gender:Male
  • Location:Rockstar North
  • Interests:Alien Life
  • Devices:Moto X

It depens how much you mod the ROM. The toggles will be there in most oficial modded and repacked Roms, and is easy to have them back to live, depens on your phone.
Regards.


we are taking about the customizable toggles with more buttons from my rom, not stock huawei

  • 0

#15
haxxbaxx

haxxbaxx

    Regular

  • Members
  • PipPip
  • 111 posts

  • 0

#16
tillaz

tillaz

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 5,859 posts
  • Gender:Male
  • Location:Rockstar North
  • Interests:Alien Life
  • Devices:Moto X

http://forum.xda-dev...ad.php?t=580351

found this


yeah, if you scroll down in my post here http://www.modaco.co...les-in-seconds/ i explain .9.png's (exact post)


my point was that you cant just replace a .9.png with a normal .png (well you can but it will be distorted and streched)

  • 0

#17
krishang3

krishang3

    Addict

  • Members
  • PipPipPipPipPip
  • 581 posts
  • Gender:Male
  • Location:Auckland
  • Interests:lots
  • Devices:Huawei Ascend G300

yeah, if you scroll down in my post here http://www.modaco.co...les-in-seconds/ i explain .9.png's (exact post)


my point was that you cant just replace a .9.png with a normal .png (well you can but it will be distorted and streched)


Then how else am I suppose to do this. Is there any thread that has these Info I've searched everywhere but no luck.

  • 0
Thanks, If I helped in anyway don't forget to rep me :)

#18
tillaz

tillaz

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 5,859 posts
  • Gender:Male
  • Location:Rockstar North
  • Interests:Alien Life
  • Devices:Moto X

Then how else am I suppose to do this. Is there any thread that has these Info I've searched everywhere but no luck.



i told you, start by porting the systemUI.apk from the stock nexus S ics rom (the code is untouched and easy to work with)
you can grab it from here http://forum.xda-dev...d.php?t=1569509


you probably wont find guide's because its like i said, the code used differs depending on the .smali code inside the systemUI.apk in your stock rom
(making guides rare)

and this is why i say first port the systemUI from a stock AOSP rom... then you can compare the code from my version to learn how its done

  • 1

#19
krishang3

krishang3

    Addict

  • Members
  • PipPipPipPipPip
  • 581 posts
  • Gender:Male
  • Location:Auckland
  • Interests:lots
  • Devices:Huawei Ascend G300

i told you, start by porting the systemUI.apk from the stock nexus S ics rom (the code is untouched and easy to work with)
you can grab it from here http://forum.xda-dev...d.php?t=1569509


you probably wont find guide's because its like i said, the code used differs depending on the .smali code inside the systemUI.apk in your stock rom
(making guides rare)

and this is why i say first port the systemUI from a stock AOSP rom... then you can compare the code from my version to learn how its done


Thank you very much tillaz

  • 0
Thanks, If I helped in anyway don't forget to rep me :)

#20
Rostilj xD

Rostilj xD

    Enthusiast

  • Members
  • PipPipPip
  • 188 posts
  • Gender:Male
  • Devices:Huawei Ascend G300
  • Twitter:@Milos_Zx
Good job!

Edited by Rostilj xD, 01 October 2012 - 02:18 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users