Post Reply

[MOD] 4.4.2 TW Hidden power button

27th March 2014, 11:33 AM   |  #1  
tkari4's Avatar
OP Senior Member
Thanks Meter: 4,816
 
1,609 posts
Join Date:Joined: Jan 2010
Hidden power button under the status bar clock.

No visual changes looks like the stock status bar:


Attention!

After this changes an Xposed modul can't move, or hide the clock.


Functions:
- Short press on the clock turns off the screen
- Long press, or swipe from the clock top to the bottom opens the power menu.

Needed tools:
Apktool
Notepad++

1. Decompile SystemUI.apk
2. Navigate to \res\layout folder
3. Open status_bar.xml

Add BLUE lines.

Code:
        <LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
                <TextView android:textSize="@dimen/status_bar_battery_text_size" android:textColor="#ffffffff" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" android:layout_marginStart="@dimen/status_bar_battery_text_marginStart" />
                <com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="12.0dip" android:layout_height="18.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="5.0dip" />
            </LinearLayout>
             <FrameLayout android:gravity="center" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerInParent="true">
              <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:ellipsize="none" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" android:paddingStart="6.0dip" systemui:ampmSmall="false" />
              <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@null" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" />
             </FrameLayout>
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip">
4. Save your changes
5. Build SystemUI.apk
6. Push to your Phone, set permissions, reboot

I did it already for the N9005XXUENC2 firmware: Download

The Following 14 Users Say Thank You to tkari4 For This Useful Post: [ View ]
27th March 2014, 02:58 PM   |  #2  
AldrichDSaints's Avatar
Senior Member
Flag Binan City
Thanks Meter: 25
 
151 posts
Join Date:Joined: Oct 2013
More
Quote:
Originally Posted by tkari4

Hidden power button under the status bar clock.

No visual changes looks like the stock status bar:


Attention!

After this changes an Xposed modul can't move, or hide the clock.


Functions:
- Short press on the clock turns off the screen
- Long press, or swipe from the clock top to the bottom opens the power menu.

Needed tools:
Apktool
Notepad++

1. Decompile SystemUI.apk
2. Navigate to \res\layout folder
3. Open status_bar.xml

Add BLUE lines.

Code:
        <LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
                <TextView android:textSize="@dimen/status_bar_battery_text_size" android:textColor="#ffffffff" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" android:layout_marginStart="@dimen/status_bar_battery_text_marginStart" />
                <com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="12.0dip" android:layout_height="18.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="5.0dip" />
            </LinearLayout>
             <FrameLayout android:gravity="center" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerInParent="true">
              <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:ellipsize="none" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" android:paddingStart="6.0dip" systemui:ampmSmall="false" />
              <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@null" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" />
             </FrameLayout>
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip">
4. Save your changes
5. Build SystemUI.apk
6. Push to your Phone, set permissions, reboot

I did it already for the N9005XXUENC2 firmware: Download



Do you have flashable zip?
27th March 2014, 03:45 PM   |  #3  
Junior Member
Thanks Meter: 1
 
2 posts
Join Date:Joined: Mar 2014
nice
The Following User Says Thank You to medo5758 For This Useful Post: [ View ]
27th March 2014, 04:45 PM   |  #4  
tkari4's Avatar
OP Senior Member
Thanks Meter: 4,816
 
1,609 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by AldrichDSaints

Do you have flashable zip?

Flashable zip attached here: http://forum.xda-developers.com/show...&postcount=157

Copy SystemUI.apk in system / priv-app folder, than you can flash it.

Don't forget backup your current SystemUI.apk.
The Following User Says Thank You to tkari4 For This Useful Post: [ View ]
28th March 2014, 06:18 AM   |  #5  
kmokhtar79's Avatar
Senior Member
Flag Beijing
Thanks Meter: 5,505
 
2,124 posts
Join Date:Joined: Aug 2012
Donate to Me
More
@tkari4 Thanks for sharing your guids. I think Note 3 community is missing a development thread like the one in Note (by majdini). so as you have reasonable knowledge about smali things, that would be nice if you could open such thread so that everyone can add his mod/guide/tip to it and all can be found in the same thread.




Sent from my SM-N9005
Last edited by kmokhtar79; 28th March 2014 at 07:08 AM.
The Following 3 Users Say Thank You to kmokhtar79 For This Useful Post: [ View ]
28th March 2014, 07:16 AM   |  #6  
AldrichDSaints's Avatar
Senior Member
Flag Binan City
Thanks Meter: 25
 
151 posts
Join Date:Joined: Oct 2013
More
Quote:
Originally Posted by tkari4

Flashable zip attached here: http://forum.xda-developers.com/show...&postcount=157

Copy SystemUI.apk in system / priv-app folder, than you can flash it.

Don't forget backup your current SystemUI.apk.


Thanks. I'm gonna try this one
28th March 2014, 08:23 AM   |  #7  
aly19's Avatar
Senior Member
Thanks Meter: 70
 
388 posts
Join Date:Joined: Apr 2011
This mod works great! Thank you!
The Following User Says Thank You to aly19 For This Useful Post: [ View ]
28th March 2014, 09:37 AM   |  #8  
Senior Member
Thanks Meter: 261
 
730 posts
Join Date:Joined: Jan 2014
Quote:
Originally Posted by tkari4

Flashable zip attached here: http://forum.xda-developers.com/show...&postcount=157

Copy SystemUI.apk in system / priv-app folder, than you can flash it.

Don't forget backup your current SystemUI.apk.

Could you provide the download link instead of thread link.um just a noob and dont have that much idea about all this stuff. It will be helpful if you just provide the download link of flashable zip.
Take care

Sent from my SM-N900 using XDA Premium 4 mobile app

---------- Post added at 08:15 AM ---------- Previous post was at 07:45 AM ----------

Will this mod work on n900 octa core firmware version DNA6 KITKAT.
THANKS

Sent from my SM-N900 using XDA Premium 4 mobile app

---------- Post added at 08:37 AM ---------- Previous post was at 08:15 AM ----------

Wprking great...it took time me to understand. ...thanks

Sent from my SM-N900 using XDA Premium 4 mobile app
The Following User Says Thank You to ghalib87 For This Useful Post: [ View ]
2nd April 2014, 06:02 PM   |  #9  
MEHRDAD595's Avatar
Senior Member
Flag shiraz
Thanks Meter: 321
 
408 posts
Join Date:Joined: Aug 2011
More
just usable on KK?
noway for using on JB?
2nd April 2014, 08:14 PM   |  #10  
tkari4's Avatar
OP Senior Member
Thanks Meter: 4,816
 
1,609 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by MEHRDAD595

just usable on KK?
noway for using on JB?

I'm using this code on 4.1.2 too, so should work on JB.


The Following User Says Thank You to tkari4 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Galaxy Note 3 Themes and Apps by ThreadRank