Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,629 Members 41,577 Now Online
XDA Developers Android and Mobile Development Forum

[Tutorial] White Notification Bar [Updated 5/13/10]

Tip us?
 
stopxstart
Old
(Last edited by stopxstart; 14th May 2010 at 07:17 PM.)
#1  
Senior Member - OP
Thanks Meter 5
Posts: 152
Join Date: Apr 2010
Location: Richmond, VA
Default [Tutorial] White Notification Bar [Updated 5/13/10]

Here is a pack of 3 files that, if pushed to your rom will give you the white task bar. This will change status icons and is just a work in progress "fill in the the gap" type of thing until I can write a proper update script for an update.zip. Currently this has only been tested to work 100% with:

Evil Eris 2.0.1 (It will, however, break the Sense launcher. So if you want the white bar, use another launcher)
Ic3Rom 2.0

It DOES NOT work on

TaintedVanilla 1.3.1
Or any rom that has it's System/Framework apk's and jar's odexed.

Please let me know if it works with any others.

Also, please not that this will change the status bar highlights to green.

Just push the three files and reboot. Reboot will take about 5 min, so don't freak out if it takes forever. If you get into a boot loop, however, it didn't work.


Quote:
DISCLAIMER: I'm not responsible if this bricks your phone. Please don't yell at me if it does. Also, be smart: do a nandroid backup before you try this.
This tutorial is for a white menu bar. It's still kind of a work in progress, but it works for the most part. When done, it looks like this:



Ok. Here is the extremely long way to do this, but it should work with any rom and will give you a full (date/time/notifications) white/vanilla task bar.

(Seriously, this may take 30 minutes or more if you're unfamiliar with some of these commands)

DOWNLOAD: http://www.multiupload.com/VZWCE0A0FN


Unzip the files and there should be 4 folders and 1 file: framework-res, com.htc.resources, PCSCII, Tools, and StatusBarIcon.smali.

Also included are the tools needed to crack open the .dex file from services.jar, smali.jar and backsmali.jar

First you'll need to pull the proper files to modify from whatever rom you're using. Open up your command line program of choice and do this:

Quote:
cd [your tools folder in the android sdk]
adb remount
adb pull /system/framework/framework-res.apk framework-res.apk
adb pull /system/framework/com.htc.resources.apk com.htc.resources.apk
adb pull /system/app/PCSCII.apk PCSCII.apk
adb pull /system/framework/services.jar services.jar
Copy all these files into a new folder.

Things can get messy so name them whatever you'd like to keep things organized.

After all this you can start copying files. First we need to open up services.jar. Easiest way is to change the .jar ending to .zip and expand it with whatever program you'd like. Copy the classes.dex into a new folder. Keep the original folder of the expanded services.jar, it makes things easier in a few minutes.

Here is where things get a little complicated. You'll need to open up the classes.dex file with backsmali.jar. First, make sure Backsmali.jar is in the same folder as classes.dex. Next enter this command into the terminal:

Quote:
cd [the folder with backsmali and classes.dex file]
java -Xmx512M -jar baksmali.jar -o classes/ classes.dex
This will expand classes.dex into a folder. Click through this folder until you find a folder called Status. Now drag the StatusBarIcon.smali into the Status folder. Allow the replacement.

Now we need to close the classes.dex file back up. Make sure smali.jar is in the same folder as the classes folder (make a new folder just to avoid a conflict with your original files) and use these commands:

Quote:
cd [the folder with smali and the classes folder]
java -Xmx512M -jar smali.jar -o classes.dex classes/
You should have a fresh classes.dex file now. Now put this new classes.dex file into the original services.jar folder (that you expanded from a zip) and rezip that file. Then change the name from a .zip to .jar.

Step 1: done.

The next few parts are a lot easier, so stick with me here.

Now we need to open up the Framework-res.apk and replace all of the image files needed for a sexy white menu bar. All of the needed files are in the folder named (you guessed it) framework-res. First, you'll need to expand this .apk, do so by changing it into a .zip. After you expand it, copy the files from my folder to the matching folders. Don't drag and drop the folders, it won't work. Select all inside them and paste/drag/whatever over to the one from your phone. There should be a folder of image files, and a folder with two xml files. Once done return to the top folder of the framework-res.zip you expanded and re-zip the contents. Make sure you select the contents and zip them.

**DO NOT ZIP THE FRAMEWORK-RES FOLDER ITSELF, SELECT THE FILES INSIDE THE FOLDER AND RE-ZIP THEM**

You should now how have a new archive. Rename it to framework-res.apk and set it aside for later use.

The last parts are essentially the same things, but with the other two folders I've included: PCSCII and com.htc.resources. Copy the files, and re-zip them into .apk files.

Ok. Almost done.

Now it's time to send the files back to your phone. Place the new versions of these files into your Tools folder in the Android SDK.

Now let's push them back to your phone:

Quote:
cd [your tools folder... again]
adb remount
adb push PCSCII.apk /system/app/PCSCII.apk
adb push framework-res.apk /system/framework/framework-res.apk
adb push com.htc.resources.apk /system/framework/com.htc.resources.apk
adb push services.jar /system/framework/services.jar
adb reboot
Reboot can take a while, so be patient. I'm thinking rebooting into recovery and clearing your dalvik cache may help, but haven't tried it.

If everything worked correctly, you should have a brand spankin' new notification bar.

Just a note, I have tested this on Evil Eris 2.0 and IceRom 2.0 and it works perfectly. However, it should work with whatever rom you're using. Also, this will change some of your icons to Vanilla ones. If you don't want them changed, don't copy the files that will change them. Those should be apparent when copying the image files from the folders I've included.

If you have any questions, feel free to ask.

Also, if anyone knows how to wrap this all up into a nice little update.zip, please do it or let me know how to do it. It would be greatly appreciated.
 
hoban_eris
Old
#2  
Senior Member
Thanks Meter 6
Posts: 237
Join Date: Jan 2010
Hello, I appreciate the tutorial! I'm attempting to get this set up for my Tainted Vanilla rom and ran into a snag at the beginning. Our services.jar file contains no classes.dex file. All it contains is MANIFEST.MF. Any ideas about how I should proceed?
 
stopxstart
Old
(Last edited by stopxstart; 12th May 2010 at 07:56 AM.)
#3  
Senior Member - OP
Thanks Meter 5
Posts: 152
Join Date: Apr 2010
Location: Richmond, VA
Ok, I think I've figured it out.

The .odex file is basically the .dex file in an uncompressed format. To break it open you do the same thing you would do with a dex file. Plug it into baksmali and it should yield you a Classes folder. You do have to reassemble it though, which requires you to first deodex it... and it's kind of a pain in the ass. I've figured out the first portion of it, but deodexing the file is decently complicated for a n00b like me. I'll continue to work on it and will hopefully have a solution tomorrow.

Here's where I'm stuck if anyone wants to figure it out:

Quote:
$ java -Xmx512m -jar baksmali.jar -x services.odex
Error while disassembling method Lcom/android/server/ConnectivityService;-><init>(Landroid/content/ContextV. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: class Lcom/htc/connectivity/DummyStateTracker; cannot be resolved.
at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedCl assDef.unresolvedValidationException(ClassPath.jav a:535)
at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedCl assDef.getClassDepth(ClassPath.java:543)
at org.jf.dexlib.Code.Analysis.ClassPath.getCommonSup erclass(ClassPath.java:383)
at org.jf.dexlib.Code.Analysis.RegisterType.merge(Reg isterType.java:274)
at org.jf.dexlib.Code.Analysis.AnalyzedInstruction.me rgeRegister(AnalyzedInstruction.java:199)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.propaga teRegisterToSuccessors(MethodAnalyzer.java:479)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.setPost RegisterTypeAndPropagateChanges(MethodAnalyzer.jav a:459)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze InvokeDirectCommon(MethodAnalyzer.java:2968)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze InvokeDirectRange(MethodAnalyzer.java:2927)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze Instruction(MethodAnalyzer.java:856)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze (MethodAnalyzer.java:202)
at org.jf.baksmali.Adaptors.MethodDefinition.getMetho dItems(MethodDefinition.java:290)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo( MethodDefinition.java:130)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMeth ods(ClassDefinition.java:322)
at org.jf.baksmali.Adaptors.ClassDefinition.writeDire ctMethods(ClassDefinition.java:291)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(C lassDefinition.java:135)
at org.jf.baksmali.baksmali.disassembleDexFile(baksma li.java:187)
at org.jf.baksmali.main.main(main.java:277)
opcode: invoke-direct/range
CodeAddress: 811
Method: Lcom/android/server/ConnectivityService;-><init>(Landroid/content/ContextV
I know that in order for successfully deodex, all the file paths have to be correct. I, however, do not have them yet.

More info here for anyone interested: http://code.google.com/p/smali/wiki/DeodexInstructions
 
andrew8806
Old
#4  
andrew8806's Avatar
Retired Forum Moderator
Thanks Meter 170
Posts: 424
Join Date: Jan 2010
Location: Dallas

 
DONATE TO ME
Good work, this should be an update.zip once we have confirmed it working successfully.....
If my post was helpful, please say thanks!




Samsung Google Galaxy Nexus (Verizon): Android 4.3 AOSP/CM 10.2
 
Chevelle1768
Old
(Last edited by Chevelle1768; 12th May 2010 at 06:46 PM.)
#5  
Chevelle1768's Avatar
Senior Member
Thanks Meter 262
Posts: 363
Join Date: Mar 2010

 
DONATE TO ME
Quote:
Originally Posted by stopxstart View Post
Ok, I think I've figured it out.

The .odex file is basically the .dex file in an uncompressed format. To break it open you do the same thing you would do with a dex file. Plug it into baksmali and it should yield you a Classes folder. You do have to reassemble it though, which requires you to first deodex it... and it's kind of a pain in the ass. I've figured out the first portion of it, but deodexing the file is decently complicated for a n00b like me. I'll continue to work on it and will hopefully have a solution tomorrow.

Here's where I'm stuck if anyone wants to figure it out:



I know that in order for successfully deodex, all the file paths have to be correct. I, however, do not have them yet.

More info here for anyone interested: http://code.google.com/p/smali/wiki/DeodexInstructions
I get the same error. I posted a issue about this on the project page.

EDIT: Figured it out. Add -c :com.htc.resources.jar
You will need to deodex it first thou.
 
iloveandroid
Old
#6  
iloveandroid's Avatar
Senior Member
Thanks Meter 0
Posts: 311
Join Date: Jan 2010
Can we see screenshots of this notification bar
Droid Eris: Verizon Wireless
ROM: Ic3Rom 1.0
Version: 2.1 rooted
I've been an Android user since 12/25/09
 
gritts
Old
(Last edited by gritts; 12th May 2010 at 09:25 PM.)
#7  
Member
Thanks Meter 1
Posts: 52
Join Date: Apr 2010
If you look at the IC3 rom screenshots, this should be the same.

Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
 
iloveandroid
Old
#8  
iloveandroid's Avatar
Senior Member
Thanks Meter 0
Posts: 311
Join Date: Jan 2010
Quote:
Originally Posted by gritts View Post
If you look at the ICQ rom screenshots, this should be the same.

Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
ICQ ROM do you mean IC3 ROM?
Droid Eris: Verizon Wireless
ROM: Ic3Rom 1.0
Version: 2.1 rooted
I've been an Android user since 12/25/09
 
gritts
Old
#9  
Member
Thanks Meter 1
Posts: 52
Join Date: Apr 2010
Yes, thanks, I corrected it.
 
stopxstart
Old
#10  
Senior Member - OP
Thanks Meter 5
Posts: 152
Join Date: Apr 2010
Location: Richmond, VA
Quote:
Originally Posted by gritts View Post
If you look at the IC3 rom screenshots, this should be the same.

Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
It's easy just to keep it connected but it's not required. Just make sure you adb remount before pushing and pulling the files.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Hide Numbers on Your SMS and Call Logs with Reflection

How many times have you given your device to someone else in order to show them a … more

Implement Split View in Your LG G2 KitKat Rom with Automated Installer

Some of you may have remembered a story on the Portal a few weeks back … more

Cast Your Device Screen the Way it Was Meant to be with Second Screen

Not too long ago here on the XDA Portal, we covered how Google had made … more

Samsung Gear Live Unboxed the XDA Way – XDA Developer TV

XDA Developer TV Producer AdamOutleris known for his XDA Unboxingseries where … more