[REF]How to theme - Samsung Vibrant[02/03/2011]

Search This thread

Master™

Senior Member
Sep 24, 2010
3,250
1,230
How to theme
Samsung Vibrant Edition

Disclaimer: this guide is not idiot proof! You must have 1/2 a brain, 1/4 a brain will not work! Currently we have no way to know if you actually have 1/4 a brain or 1/2 so please take caution!
If you have extra images in your framework folders, it may cause problems later.. so try not to copy & paste or add extra images! - jumaaneface

What you will need:
-Apk Manager (Click)
-Android SDK (Click)
-An image editor, Adobe Photoshop is recommended!
-One brain.. (Edit: Half a brain is needed, not the full thing)
-Two hands..
-Fingers, 10 of them recommended!
-framework-res.apk
-twframework-res.apk
-services.jar (If you want to change the clock color)


How-to edit the apks:
1.) Get your two apk files (framework-res.apk & twframework-res.apk)
2.) Place them in apk-manager/place-apk-here-for-modding/
3.) Open apk-manager/script.bat
4.) Select option 22
5.) Select framework-res.apk
6.) Select option 1
7.) Select option 22
8.) Select twframework-res.apk
9.) Select option 1
10.) Go to apk-manager/projects/framework-res.apk/res/drawable-hdpi (or /drawable-hdpi-v4)
11.) Edit the .png files that you would like to change
12.) Go to apk-manager/projects/twframework-res/apk/res/drawable-hdpi (or /drawable-hdpi-v4)
13.) Edit the .png files that you would like to change
14.) Go back to script.bat
15.) Select option 22
16.) Select framework-res.apk
17.) Select option 3
18.) Select option 22
19.) Select twframework-res.apk
20.) Select option 3
(Don't zipalign)
21.) There will be two files in your place-here-for-modding folder.. They are called unsingedframework-res.apk & unsingedtwframework-res.apk just backup the originals, and delete the unsinged from part from the two new files.

How-to edit services.jar, clock color:
1.) Go to your SDK folder.. example: C:\android-sdk-windows\tools
2.) Get your services.jar file & open it with winrar
3.) Take the classes.dex from it & put it in your android-sdk-windows\tools\ folder
4.) Open CMD
5.) Run the following command: "CD C:\android-sdk-windows\tools" (directory may not be the same)
6.) Run the following command: "java -jar baksmali.jar -o classout/ classes.dex"
7.) Go to classout\com\android\server\status\StatusBarIcon.smali
8.) On line 34 it will look something like: "const/4 v7, -0x1"
9.) On line 34 change the above to: "const v7, 0xffffff" (That will be black)
10.) Compile the classes.dex by using this command: "java -Xmx512M -jar smali.jar classout/ -o new-classes.dex"
11.) Get the new-classes.dex from android-sdk-windows\tools\ folder & move it to your desktop
12.) Rename new-classes.dex to classes.dex
13.) Re-open the services.jar using winrar & past your new classes.dex in there
(Notice: After editing the clock color, it will take longer to boot the first time! Be patient!)


I may update this if people need an even easier guide...
I wrote this a while ago, and just had it on my forums.

Original: Click here

Helpful things:
"How to change colors from standard hex to smali code" - Tonicacid
"How to use html colors for changing the clock" - Master (me)
 
Last edited:

junkdruggler

Senior Member
Jun 27, 2009
1,073
10
Georgia
Yeah, you can change it to whatever you want.. When I get home I'll add the directions to change the text color in the pull down and market downloads...
 

r6kid

Member
Aug 7, 2010
46
1
stuck

Hey I'm new to this and first of all thank you so much for this!

Second I'm having a problem, I'm stuck at "java -Xmx512M -jar smali.jar classout/ -o new-classes.dex"

I keep getting "classout\com\android\server\status\StatusBarIcon.smali[0,0] 10145074 connot fit into a short"

I'm trying to change the status bar clock to Green.

Thank you again.
 

Tonicacid

Senior Member
Nov 6, 2010
622
212
St. Augustine, Florida
Hey I'm new to this and first of all thank you so much for this!

Second I'm having a problem, I'm stuck at "java -Xmx512M -jar smali.jar classout/ -o new-classes.dex"

I keep getting "classout\com\android\server\status\StatusBarIcon.smali[0,0] 10145074 connot fit into a short"

I'm trying to change the status bar clock to Green.

Thank you again.

What hex code are you using

Sent from my SGH-T959 using XDA App
 
  • Like
Reactions: r6kid

r6kid

Member
Aug 7, 2010
46
1
Sorry I wasn't using my half a brain I found my mess up I over looked the "const/4"
 

toeshot

Senior Member
Jul 29, 2008
948
22
Aurora, Near Chicago
I will take it that I don't need apk manager. Just need to unpack, repack, and sign. I could also just use a Hex editor to change the colors on the things I would like to change such as date, notification text, etc.. Just like I did with the G1.
 

Master™

Senior Member
Sep 24, 2010
3,250
1,230
I will take it that I don't need apk manager. Just need to unpack, repack, and sign. I could also just use a Hex editor to change the colors on the things I would like to change such as date, notification text, etc.. Just like I did with the G1.

I am pretty sure you can't use Hexedit to edit the Clock. You need to decompile it.
Also, you don't sign /system apks
 

xxxman999

Senior Member
Dec 2, 2010
139
23
Awesome! I barely qualify as a 1/2 brain. ApkManager is sweet simple program that does the job. In the many times I have used it, I noticed that recompilation of the files are not clean after images have been change/edit. So I always optimize images inside (option 2) everytime I recompile. Does this help and worth doing?

BTW: what xml editor are you guys using? Some of the ones that I downloaded are crap.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    How to theme
    Samsung Vibrant Edition

    Disclaimer: this guide is not idiot proof! You must have 1/2 a brain, 1/4 a brain will not work! Currently we have no way to know if you actually have 1/4 a brain or 1/2 so please take caution!
    If you have extra images in your framework folders, it may cause problems later.. so try not to copy & paste or add extra images! - jumaaneface

    What you will need:
    -Apk Manager (Click)
    -Android SDK (Click)
    -An image editor, Adobe Photoshop is recommended!
    -One brain.. (Edit: Half a brain is needed, not the full thing)
    -Two hands..
    -Fingers, 10 of them recommended!
    -framework-res.apk
    -twframework-res.apk
    -services.jar (If you want to change the clock color)


    How-to edit the apks:
    1.) Get your two apk files (framework-res.apk & twframework-res.apk)
    2.) Place them in apk-manager/place-apk-here-for-modding/
    3.) Open apk-manager/script.bat
    4.) Select option 22
    5.) Select framework-res.apk
    6.) Select option 1
    7.) Select option 22
    8.) Select twframework-res.apk
    9.) Select option 1
    10.) Go to apk-manager/projects/framework-res.apk/res/drawable-hdpi (or /drawable-hdpi-v4)
    11.) Edit the .png files that you would like to change
    12.) Go to apk-manager/projects/twframework-res/apk/res/drawable-hdpi (or /drawable-hdpi-v4)
    13.) Edit the .png files that you would like to change
    14.) Go back to script.bat
    15.) Select option 22
    16.) Select framework-res.apk
    17.) Select option 3
    18.) Select option 22
    19.) Select twframework-res.apk
    20.) Select option 3
    (Don't zipalign)
    21.) There will be two files in your place-here-for-modding folder.. They are called unsingedframework-res.apk & unsingedtwframework-res.apk just backup the originals, and delete the unsinged from part from the two new files.

    How-to edit services.jar, clock color:
    1.) Go to your SDK folder.. example: C:\android-sdk-windows\tools
    2.) Get your services.jar file & open it with winrar
    3.) Take the classes.dex from it & put it in your android-sdk-windows\tools\ folder
    4.) Open CMD
    5.) Run the following command: "CD C:\android-sdk-windows\tools" (directory may not be the same)
    6.) Run the following command: "java -jar baksmali.jar -o classout/ classes.dex"
    7.) Go to classout\com\android\server\status\StatusBarIcon.smali
    8.) On line 34 it will look something like: "const/4 v7, -0x1"
    9.) On line 34 change the above to: "const v7, 0xffffff" (That will be black)
    10.) Compile the classes.dex by using this command: "java -Xmx512M -jar smali.jar classout/ -o new-classes.dex"
    11.) Get the new-classes.dex from android-sdk-windows\tools\ folder & move it to your desktop
    12.) Rename new-classes.dex to classes.dex
    13.) Re-open the services.jar using winrar & past your new classes.dex in there
    (Notice: After editing the clock color, it will take longer to boot the first time! Be patient!)


    I may update this if people need an even easier guide...
    I wrote this a while ago, and just had it on my forums.

    Original: Click here

    Helpful things:
    "How to change colors from standard hex to smali code" - Tonicacid
    "How to use html colors for changing the clock" - Master (me)
    3
    Guide for Noobs

    LET ME START OFF BUY SAYING THIS IS HOW I DO IT, it may vary from person to person



    Phone Requirements
    Latest Busy Box (can be found in Market)
    Have USB Debugging enabled (Settings>Applications>Development>Check Usb Debugging)
    Astro
    Root Explorer
    NinjaMorph


    Programs required (maybe not now but along the future)
    Droid Explorer (like ADB but sooo much easier, for me atleast)
    Apk Manager found here http://xdaforums.com/showthread.php?t=695701
    A zip manager (Win Zip or w.e. your preference is)


    Im going to use the Frameworks as an example in this Tutorial but it works with any Apk and the theme we are Porting is the Tangerine theme from the I9000 section





    Start off with a fresh flash of the Rom you want to work with

    In my case i want to theme Bionix 1.2.1 so i would flash that rom

    then go to Ninja Morph (basically this decompiles the apk so that u can see all the goodies inside)

    Open Ninja Morph and select Start Checks>New Project>System>Framework>framework-res.apk or twframework-res.apk

    Your apks are decompiled on your phone..

    Connect Phone to PC

    While in your PC your going to take your Theme that your porting over
    Ex Tangerine

    Open up APK Manager

    Locate the Tangerine Zip and open it using the zip manager of your choice

    Once in the zip folder locate the framework.apk

    Drag it to the Apk Manager in the place apk here (or something like that)

    When running the script select option 22 to locate the file and then the # of the file
    Ex 1 for framework

    Then hit 1 to extract the apk (some ppl like to use 9)

    The script will do its thing

    in the projects folder you will see the decompiled framework

    ***** WHAT WE ARE LOOKING FOR IS THE DRAWABLE-HDPI FOLDER... OPEN THE FLODER CLICK ON RES AND VIOLA YOU HAVE THE GOLD!!!******

    Now connect your phone to the PC and locate your phones storage and look for the AndroidThemes Folder
    go to Androidthemes>Workspace and choose the framework

    Now open up the APK Manager Projects window side-by-side with

    lOOK at all the images to make sure they are named the same... also pay attention to the actual images themselves, you will see 2 types PNGs and .9PNGS

    Things to pay attention to is the Pixel size.. you dont want something too big in size to replace a tiny icon...

    Copy the images you wish to copy from the tangerine framework over to the framework drawable folder inside the Android Themes Folder in your phone


    Once you're content disconnect phone from PC and open up NinjaMorph

    Choose Finish Project, Select the project your working on... Some pop ups are going to pop up, click yes, yes, then no.. reboot

    Enjoy

    Once you can handle this its easy to create flashable zip files... PM when ready or if you have any questions



    Thank to buddahlou for trying my method....
    3
    Heres how to change the colors from standard hex to smali code.

    To pick a color you first start with the Hex color code you want to use. You will have to first convert your number into
    binary, instead of making you have to look that up, I have included tables below. You will then invert the
    binary digit (0 becomes 1 and 1 becomes 0) and then you will want to convert this back into Hex. This is
    the color you want to use in the smali file.

    hexcodes.png

    or..

    for red:
    const v7, 0xffff0000

    for light blue:
    const v7, 0xff0000ff

    for yellow:
    const v7, 0xffffff00

    You get the point. I have always had it always work (for colors that aren't black/white) take the following:
    const v7, 0xff
    and add your html color code behind that.

    I have not tested your way, but both should work. I for some reason find the way above, slightly more easier.

    I added your post to the "helpful things" at the bottom of the OP
    1
    shouldnt you be able to change the ffffff in "const v7, 0xffffff" to whatever color you want?

    It would actually be

    "const v7, 0xffff0000" for red, etc. But yes, you can change that value.
    1
    What your looking for is the dialer.apk

    Ive been able to modify every .apk's launcher icon but the Phone.

    I modified the ic_launcher_phone in the phone.apk/res/drawable (there was no launcher icon in hdpi) I modified the contacts.apk Ic_launcher_phone but nothing I've done has changed the phone icon at all.

    I'm trying this on Bi-Winning Rom (2.2.1) jpj.

    ANY HELP GREATLY APPRECIATED in finding how to finally modify the darned phone launcher icon!



    Sent from my SGH-T959 using XDA App