[MOD][TUTORIAL][CM10]Transparent-colored statusbar drawer

reaper61616

Senior Member
Nov 23, 2010
663
747
0
Brodnica
Hi!

I figureout how to set transparent background color in CM10 :)



1. Decompile SystemUI.apk (I'm using apktool 1.4.9)

2. Go to: %apktool_folder%\SystemUI\smali\com\android\systemui\statusbar\phone

3. Open in text editor file: PhoneStatusBar$FastColorDrawable.smali

4. replace whole line:

Code:
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;->mColor:I
with

Code:
const v0, 0x6033b5e5
6033b5e5 => aarrggbb (a=alpha, r=red, g=green, b=blue) => this is semi-transparent ICS-blue color :)

After this method draw looks like:
Code:
.method public draw(Landroid/graphics/Canvas;)V
    .locals 2
    .parameter "canvas"

    .prologue
    .line 2632
    const v0, 0x6033b5e5

    sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V

    .line 2633
    return-void
.end method
4a. For 'HighEndGfx' devices (like HTC One X) need to make something more:

4aa. Open file: %apktool_folder%\SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali

4ac. Replace tree lines of code ( do not copy numbers!!):
Code:
1. invoke-static {v0}, Landroid/app/ActivityManager;->isHighEndGfx(Landroid/view/Display;)Z
2. 
3. move-result v0
wiht one line of code ( do not copy numbers!!):

Code:
1. const v0, 0x0
4ad. Now fragment of method makeStatusBarView() looks like:

Code:
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisplay:Landroid/view/Display;
    
    const v0, 0x0

    if-nez v0, :cond_0
5. Open SystemUI.apk with WinRAR or 7zip.

6. Compile SystemUI folder and go to %apktool_folder%\SystemUI\build\apk

7. Copy only classes.dex to SystemUI.apk.

8. Move SystemUI.apk to /system/app in phone.

9. Reboot.

10. Set permissions to rw-r-r (644)

11. ... and be happy to have transparent notification drawer. :)

This is 100% working in CM10, don't know what about others JB roms.
 
Last edited:

virus007

Member
Aug 2, 2009
40
23
0
London
Great News , Have been working on this for a couple of days, only getting errors i hope this works ! Nice one:)

Hmmm i have tried your method 6 times but still not getting any transparency , i am using apktool 1.4.9 , ive installed frameworke-res.apk correctly , then decompiled systemUI.apk correctly , gone into the folder changed

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;->mColor:I

too

const v0, 0x6033b5e5

compiled systemUI folder - stole classes.dex (only) copied to SystemUI.apk , pushed to phone , but nuffing happens ????????
im not sure how im getting this wrong as i am familiar with decompiling and compiling apks ????
 
Last edited:
  • Like
Reactions: Admeisterz

reaper61616

Senior Member
Nov 23, 2010
663
747
0
Brodnica
Great News , Have been working on this for a couple of days, only getting errors i hope this works ! Nice one:)

Hmmm i have tried your method 6 times but still not getting any transparency , i am using apktool 1.4.9 , ive installed frameworke-res.apk correctly , then decompiled systemUI.apk correctly , gone into the folder changed

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;->mColor:I

too

const v0, 0x6033b5e5

compiled systemUI folder - stole classes.dex (only) copied to SystemUI.apk , pushed to phone , but nuffing happens ????????
im not sure how im getting this wrong as i am familiar with decompiling and compiling apks ????
What phone you have and which CM compilation do you use? Paste your PhoneStatusBar$FastColorDrawable.smali.

Better if someone want to have transparent status bar, please upload for me SystemUI.apk . Think different compilations have different code so there is no same way to make transparent status bar for every rom.
 
Last edited:

Admeisterz

Senior Member
Jun 1, 2010
93
64
0
London
What phone you have and which CM compilation do you use? Paste your PhoneStatusBar$FastColorDrawable.smali.

Better if someone want to have transparent status bar, please upload for me SystemUI.apk . Think different compilations have different code so there is no same way to make transparent status bar for every rom.

He uses This Build - http://forum.xda-developers.com/showthread.php?t=1786696 For the HTC ONE X....

Ive uploaded the SystemUI Below mate?
 

Attachments

Last edited:

virus007

Member
Aug 2, 2009
40
23
0
London
What phone you have and which CM compilation do you use? Paste your PhoneStatusBar$FastColorDrawable.smali.

Better if someone want to have transparent status bar, please upload for me SystemUI.apk . Think different compilations have different code so there is no same way to make transparent status bar for every rom.

Hi Reaper ....Admeistarz has uploaded the systemUI.apk as we are both using the one x , cm10 Rom

Thanks
 
  • Like
Reactions: Admeisterz

reaper61616

Senior Member
Nov 23, 2010
663
747
0
Brodnica
Try this.

Open Zip and unpack folder to desktop.
Connect phone in usb debugging mode.

Go into folder and double click on 'install.bat'.
Wait until phone reboot and see if it is different from previous mod...

If something goes wrong you need to run 'restore.bat'.
 

Attachments

virus007

Member
Aug 2, 2009
40
23
0
London
Try this.

Open Zip and unpack folder to desktop.
Connect phone in usb debugging mode.

Go into folder and double click on 'install.bat'.
Wait until phone reboot and see if it is different from previous mod...

If something goes wrong you need to run 'restore.bat'.
Lol nice Batch File , but it still didnt work, its a tricky one, we have been fighting with this for a few days now!

Thanks