Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,801 Members 44,242 Now Online
XDA Developers Android and Mobile Development Forum

[HOW-TO][MOD][JB] Transparent Statusbar & NavBar [upd:10.05.2013]

Tip us?
 
Spaun_Studio
Old
(Last edited by Spaun_Studio; 10th May 2013 at 11:44 AM.) Reason: The new part of the instruction
#1  
Spaun_Studio's Avatar
Member - OP
Thanks Meter 574
Posts: 70
Join Date: Nov 2011
Default [HOW-TO][MOD][JB] Transparent Statusbar & NavBar [upd:10.05.2013]

So..My friends asked me to write a manual how to make a transparent virtual buttons and status bar on JB. Ready?

Screenshots from my Sola JB ():
 

1. Decompile android.policy.jar and open android.policy\smali\com\android\internal\policy\i mpl\PhoneWindowManager.smali

Blue- and to find through search
Red - Remove
Green- Add
 
Code:
Select Code
 .line 2552
    iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I

    iput v0, p1, Landroid/graphics/Rect;->top:I

    .line 2553
    iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I

    iput v0, p1, Landroid/graphics/Rect;->right:I

   .line 2554
    iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I

    iput v0, p1, Landroid/graphics/Rect;->bottom:I

     .line 2555
    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;

    invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I

    move-result v0

    .line 2557
    :goto_0
    return v0

    .line 2556
    :cond_0
    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;

    invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I

    move-result v0

    goto :goto_0

    .line 2557
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
    const/4 v0, 0x0

    return v0
.end method

Compile android.policy.jar

2. Decompile SystemUI.apk and...
Open \SystemUI\res\values\drawables.xml
 
Code:
Select Code
<item type="drawable" name="status_bar_background">#5a000000</item>

5A - Transparency.

Open \SystemUI\res\layout\navigation_bar.xml and correct the same
 
Code:
Select Code
<item type="drawable" name="status_bar_background">#5a000000</item>


3. Open SystemUI\smali\com\android\systemui\statusbar\phon e\PhoneStatusBar.smali and find "IIIII", near the code should be.
Green- Add, Red- Remove:
 
Code:
Select Code
const/16 v3, 0x7e3

 const v4, 0x4800068

 const/4 v5, -0x3

 move v2, v1

 move v5, v1

 invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V


Find "showNav" (second result in Notepad++) or "mPixelFormat:I", this code. Green- Add:
 
Code:
Select Code
.line 417
 .end local v3 #showNav:Z
 :cond_1
 :goto_2
 const/4 v5, -0x3 (or const/4 v9, -0x3 for Z)

 iput v13, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPixelFormat:I

Compile SystemUI.apk.

upd: 10.05.2013

For the transparency of the open status bar (where the switches and notification)
Step 1:
 
Open PhoneStatusBar.smali (from SystemUI.apk) and find "PhoneStatusBar$FastColorDrawable". Immediately after that string is different, with "setBackground". Remove it. This line can appear twice.


Step 2:
 
We will adjust the transparency in the folder SystemUI\res\layout.Open-head status bar- status_bar_expanded_header.xml
Code:
Select Code
android:background="@drawable/notification_header_bg"
change to
Code:
Select Code
android:background="#5A000000"
It is found in the file twice. Do everywhere.

The file status_bar_expanded.xml do by analogy, replace the reference to the background image on the color code. In this file, the background transparency notifications.


Quote:
Bugs:

- Transparency navibar only on the desktop \ status bar everywhere
- Works on stock launcher \ Apex, but the others were not checked
Do not say thanks, press thanks
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2013-05-03-14-41-47.jpg
Views:	105802
Size:	29.2 KB
ID:	1932072   Click image for larger version

Name:	Screenshot_2013-05-03-14-42-06.jpg
Views:	106978
Size:	53.3 KB
ID:	1932073  
The Following 104 Users Say Thank You to Spaun_Studio For This Useful Post: [ Click to Expand ]
 
mmamedov
Old
#2  
Senior Member
Thanks Meter 35
Posts: 168
Join Date: Mar 2013
Location: Minneaplos
Default Please,

Can you just post modded android.policy.jar and systemui.apk? I'm having troubles with decompiling
 
alvizu
Old
#3  
alvizu's Avatar
Senior Member
Thanks Meter 40
Posts: 266
Join Date: Jun 2012
Location: México
How make it completly transparent?

Sent from my C6603 using xda premium
 
Spaun_Studio
Old
#4  
Spaun_Studio's Avatar
Member - OP
Thanks Meter 574
Posts: 70
Join Date: Nov 2011
Quote:
Originally Posted by alvizu View Post
How make it completly transparent?
5A=>00

Quote:
Originally Posted by mmamedov View Post
Can you just post modded android.policy.jar and systemui.apk? I'm having troubles with decompiling
I'm not sure that these files from my smartphone you fit. (Sola)
But ...
Archive for CWM. Do not forget to backup!
Attached Files
File Type: zip JB_transparent.zip - [Click for QR Code] (1.03 MB, 1729 views)
The Following 6 Users Say Thank You to Spaun_Studio For This Useful Post: [ Click to Expand ]
 
alvizu
Old
#5  
alvizu's Avatar
Senior Member
Thanks Meter 40
Posts: 266
Join Date: Jun 2012
Location: México
Nope, in Xperia Z is in framework-res.apk, thx anyway

Sent from my C6603 using xda premium
 
Drockk_Xm
Old
#6  
Drockk_Xm's Avatar
Senior Member
Thanks Meter 204
Posts: 371
Join Date: Feb 2012
Location: Dhaka
Thank you will try

Xperia Z1
JB 4.4.4 | 14.4.A.0.108
 
Leo
Old
#7  
Leo's Avatar
Senior Member
Thanks Meter 170
Posts: 530
Join Date: Dec 2012
u should've mentioned that it's only for deodexed system
Sony Xperia TX [LT29i] ,
Jelly Bean 4.3,
9.2.A.1.205, Stock, deodex,
1266-3320_R2J,
Relocked BootLoader.
 
Spaun_Studio
Old
#8  
Spaun_Studio's Avatar
Member - OP
Thanks Meter 574
Posts: 70
Join Date: Nov 2011
Quote:
Originally Posted by alvizu View Post
Nope, in Xperia Z is in framework-res.apk, thx anyway
Not... Transparency of the whole system to do in \framework-res.apk\res\values\styles.xml, But it looks awful in applications. Background is taken from the wallpaper on your desktop.
 
fcb13
Old
#9  
fcb13's Avatar
Senior Member
Thanks Meter 101
Posts: 589
Join Date: Nov 2010
What value would you use to achieve around 10-20% transparency?
Current Phone: LG Nexus 5 - Elix-R
 
Spaun_Studio
Old
#10  
Spaun_Studio's Avatar
Member - OP
Thanks Meter 574
Posts: 70
Join Date: Nov 2011
Quote:
Originally Posted by fcb13 View Post
What value would you use to achieve around 10-20% transparency?
Use this:
 


2,55 х (100-20%)=204
Find 204 in image= CC
This 20% transparency
Attached Thumbnails
Click image for larger version

Name:	dec_hex.jpg
Views:	74161
Size:	66.8 KB
ID:	1932756  

The Following 7 Users Say Thank You to Spaun_Studio For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes