How to Root and Unlock the Google Nexus 6 on a Mac – XDA TV

In the past, XDA Developer TV Producer droidmodd3rx has shown you how to … more

Set Up Your MediaTek Device with Comprehensive Beginner’s Guide

As can be seen with the use of MediaTek chips in Android One devices … more

Sony Updates AOSP Sources to Android 5.0.1

Just a few days ago, Sony did an utterly fantastic job by pushing out numerous device trees for … more

Stop Your Screen From Turning Off with KeepItOn

We all know the feeling of reading a news article orrather longdocument, when our screen … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP stopxstart

12th May 2010, 07:45 AM   |  #1  
OP Senior Member
Richmond, VA
Thanks Meter: 5
 
152 posts
Join Date:Joined: Apr 2010
More
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.
Last edited by stopxstart; 14th May 2010 at 08:17 PM.
12th May 2010, 08:14 AM   |  #2  
Senior Member
Thanks Meter: 6
 
237 posts
Join Date:Joined: 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?
12th May 2010, 08:47 AM   |  #3  
OP Senior Member
Richmond, VA
Thanks Meter: 5
 
152 posts
Join Date:Joined: Apr 2010
More
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
Last edited by stopxstart; 12th May 2010 at 08:56 AM.
12th May 2010, 09:22 AM   |  #4  
andrew8806's Avatar
Retired Forum Moderator
Flag Dallas
Thanks Meter: 170
 
424 posts
Join Date:Joined: Jan 2010
Donate to Me
More
Good work, this should be an update.zip once we have confirmed it working successfully.....
12th May 2010, 03:31 PM   |  #5  
Chevelle1768's Avatar
Senior Member
Thanks Meter: 315
 
398 posts
Join Date:Joined: Mar 2010
Donate to Me
More
Quote:
Originally Posted by stopxstart

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.
Last edited by Chevelle1768; 12th May 2010 at 07:46 PM.
12th May 2010, 09:36 PM   |  #6  
iloveandroid's Avatar
Senior Member
Thanks Meter: 0
 
311 posts
Join Date:Joined: Jan 2010
More
Can we see screenshots of this notification bar
12th May 2010, 09:47 PM   |  #7  
Member
Thanks Meter: 1
 
52 posts
Join Date:Joined: 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!
Last edited by gritts; 12th May 2010 at 10:25 PM.
12th May 2010, 10:06 PM   |  #8  
iloveandroid's Avatar
Senior Member
Thanks Meter: 0
 
311 posts
Join Date:Joined: Jan 2010
More
Quote:
Originally Posted by gritts

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?
12th May 2010, 10:25 PM   |  #9  
Member
Thanks Meter: 1
 
52 posts
Join Date:Joined: Apr 2010
Yes, thanks, I corrected it.
12th May 2010, 10:42 PM   |  #10  
OP Senior Member
Richmond, VA
Thanks Meter: 5
 
152 posts
Join Date:Joined: Apr 2010
More
Quote:
Originally Posted by gritts

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.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes