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

Spaun_Studio

Senior Member
Nov 21, 2011
70
585
0
So..My friends asked me to write a manual how to make a transparent virtual buttons and status bar on JB. Ready? :angel:

Screenshots from my Sola JB :)eek:):

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

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

    iput v0, p1, Landroid/graphics/Rect;->[color="blue"]top:I[/color]

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

    iput v0, p1, Landroid/graphics/Rect;->[color="blue"]right:I[/color]

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

    iput v0, p1, Landroid/graphics/Rect;->[color="blue"]bottom:I[/color]

    [color="red"] .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[/color]
    [COLOR="SeaGreen"][B]const/4 v0, 0x0

    return v0[/B][/COLOR]
.end method
Compile android.policy.jar

2. Decompile SystemUI.apk and...
Open \SystemUI\res\values\drawables.xml
Code:
<item type="drawable" name="status_bar_background">#[B]5a[/B]000000</item>
5A - Transparency.

Open \SystemUI\res\layout\navigation_bar.xml and correct the same
Code:
<item type="drawable" name="status_bar_background">#[B]5a[/B]000000</item>
3. Open SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali and find "IIIII", near the code should be.
Green- Add, Red- Remove:
Code:
const/16 v3, 0x7e3

 const v4, 0x4800068

[B][COLOR="Green"] const/4 v5, -0x3[/COLOR][/B]

 move v2, v1

[COLOR="Red"] move v5, v1[/COLOR]

 invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>([COLOR="Blue"]IIIII[/COLOR])V
Find "showNav" (second result in Notepad++) or "mPixelFormat:I", this code. Green- Add:
Code:
.line 417
 .end local v3 #[COLOR="Blue"]showNav[/COLOR]:Z
 :cond_1
 :goto_2
[COLOR="Green"] const/4 v5, -0x3[/COLOR] [B][I](or [COLOR="Green"]const/4 v9, -0x3[/COLOR] for Z)[/I][/B]

 iput v13, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[COLOR="Blue"]mPixelFormat:I[/COLOR]
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:
android:background="@drawable/notification_header_bg"
change to
Code:
android:background="#[B]5A[/B]000000"
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.


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:angel:
 

Attachments

Last edited:

datagubben

Senior Member
Nov 25, 2010
1,410
504
0
Landskrona
I get a little confused, so many with C6603 chatting here.

Anyway, can you make it work for Xperia V (LT25i) with .140 firmware and give a download link to be flashed with CWM, Please?
 

Spaun_Studio

Senior Member
Nov 21, 2011
70
585
0
will dis mod enable navigation bar on phones dat doesnt have it before?
No, it is included in the framework. Therefore, if before that it was not, and never will.
Dear Spaun, here is my Lt29i system file, please make a transparent status bar for me? Thank alot :fingers-crossed:
Can not download. On the other file storage, please.
Please make it for me
Xperia V LT25i_4.1.2_9.1.A.1.140
Wait, now let me do.
help please..... i get smali error when recompiling!!!!
please dis is my decompiled SystemUI.apk in zip archieve, just unzip!!!!
.
I made all the changes and compiled.
 

Attachments