[Nexus 4 Themes and Apps] tonysansone:
Hey Guys here find you the flashable zip for ambient display mod and extended power menu for Nexus 4 with stock 5.1 LMY47O Rom.

Added Ambient Display + Extended Power Menu + Center Clock + Battery % mod

Update Ambient Display + Extended Power Menu + Center Clock + Battery % mod v.2.0 with doze pulse duration visible value to 12 seconds

Added Ambient Display mod

Added Ambient Display + Extended Power Menu + Center Clock mod

Added Ambient Display + Extended Power Menu + Battery % mod

Added Ambient Display + Extended Power Menu + Battery % mod + 5 Navbar Buttons + Added day next to Clock and format 12h/24h with italic font style

Added Ambient Display + Extended Power Menu + Center Clock mod with fix overlapping + Battery % mod + 5 Navbar Buttons + Added day next to Clock and format 12h/24h with italic font style

Added All Mods files

Root needed.

Tested on my Nexus 4.

Regards

Thanks to

Ticklefish for center clock mod. You can take a look here

http://xdaforums.com/general/xda-university/xml-101-xml-modding-easy-t2929816

raffaele88 for ambient display mod. You can take a look here

http://xdaforums.com/google-nexus-5/themes-apps/how-to-add-ambient-display-settings-t2942838

namin78 from 4pda.ru for edit PhoneStatusBar.smali for hide clock on lockscreen after center clock with best method by Ticklefish. You can take a look here

http://xdaforums.com/general/xda-university/xml-101-xml-modding-easy-t2929816/page33

garynych for for battery % mod. You can take a look here

http://xdaforums.com/google-nexus-5/themes-apps/mod-center-clock-battery-charge-percent-t3003413

and Planters76. You can take a look here

http://xdaforums.com/google-nexus-5/themes-apps/mod-pm-battery-t3082716

Spannaa for AM/PM mod. You can take a look here

http://xdaforums.com/showthread.php?t=2713812

pandza88 for Add/Reorder buttons in Navigation Bar. You can take a look here

http://xdaforums.com/google-nexus-5/themes-apps/guide-how-to-edit-mod-navigation-bar-t2973512

If You have got stuck on boot loop then do this.

METHOD 1

1. You can first try to flash Revert to Stock 5.1.zip file.

2. Reboot your phone..

3. Go to recovery and flash one of my mod.

4. Reboot your phone and enjoy ;)

METHOD 2

1. You can try to flash first only ambient display mod.

2. Reboot your phone and You should have got ambient display mod installed.

3. After install ambient display mod go to recovery and flash ambient display and power menu mod.

4. Reboot your phone and You should have got ambient display and power menu mod installed.

5. Go to recovery again and flash ambient display-power menu-center clock mod that I added now.

6. Reboot your phone and You should have got ambient display-power menu-center clock mod installed.

7. Last go to recovery again and last flash ambient display-power menu-center clock-battery percent mod.

8. Reboot your phone and enjoy ;)

Tutorial

How add Ambient Display mod.

1. Decompile SystemUI.apk with AdvancedApkTool that You can find here:

http://xdaforums.com/showthread.php?t=2639400

You must use this file for decompile and recompile android 5.1 rom files

http://xdaforums.com/showpost.php?p=59436776&postcount=2812

You just put inside AdvancedApkTool/1-BDFreak/ folder and rename it to apktool.jar (delete old apktool.jar file v. 2.0.0-RC3)

Remember first to install framework-res.apk file and to add your file inside AdvancedApkTool/2-In/ folder

2. Navigate to systemui/res/values/bools.xml and open it with Notepad++ and change this line:

from

<bool name="doze_display_state_supported">false</bool>
<bool name="doze_pulse_on_pick_up">false</bool>

to

<bool name="doze_display_state_supported">true</bool>
<bool name="doze_pulse_on_pick_up">true</bool>

3. Save and recompile SystemUI.apk

4. Decompile framework-res.apk

5. Navigate to framework-res/res/values/strings.xml and open it with notepad++ and change this line:

from

<string name="config_dozeComponent"></string>

to

<string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>

6. Save and close

7. Now in the same folder open bools.xml and with Notepad++ and change this line:

from

<bool name="config_dozeAfterScreenOff">false</bool>
<bool name="config_powerDecoupleInteractiveModeFromDisplay">false</bool>

to

<bool name="config_dozeAfterScreenOff">true</bool>
<bool name="config_powerDecoupleInteractiveModeFromDisplay">true</bool>

Save it and close

8. Now in the same folder open integers.xml with notepad++ and change this line:

from

<integer name="config_screenBrightnessDoze">1</integer>

to

<integer name="config_screenBrightnessDoze">17</integer>

9. Save and recompile framework-res.apk

10. Make a backup of your SystemUI.apk and Framework-res.apk files.

11. Create a zip flashable with ZIPme app that You can find here:

https://play.google.com/store/apps/details?id=zip.me&hl=it

Add Aeroplane mode and mute-vibrate-ringer mode to the Power Menu

1. Decompile framework-res.apk

2. Navigate to framework-res/res/values/arrays.xml and open it with notepad++ and change this line:

from

<string-array name="config_globalActionsList">
<item>power</item>
<item>bugreport</item>
<item>users</item>

to

<string-array name="config_globalActionsList">
<item>power</item>
<item>airplane</item>
<item>bugreport</item>
<item>silent</item>
<item>users</item>

3. Save and recompile framework-res.apk

Add center clock

1. Decompile SystemUI.apk

2. Navigate to systemui/res/layout/status_bar.xml open it with notepad++ and add this line:

<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/notification_icon_area_inner" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>

immediatly to follow after this line:

xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">

and delete this line:

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="7.0dip" />

immediatly to follow after this line:

<include layout="@layout/system_icons" />

3. Save and close

4. Navigate to systemui/res/values/dimens.xml open it with notepad++ and change this line:

from

<dimen name="keyguard_carrier_text_margin">16.0dip</dimen>

to

<dimen name="keyguard_carrier_text_margin">156.0dip</dimen>

5. Save and recompile SystemUI.apk

How add Battery Percent

1. Decompile SystemUI.apk

2. Navigate to systemui/smali/com/ and put inside erryy folder (this folder is inside source.zip file)

3. Navigate to systemui/res/layout/keyguard_status_bar.xml open it with notepad++ and add this line:

<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="@dimen/battery_level_text_size" android:gravity="start|center" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

immediatly to follow after this line:

<include layout="@layout/system_icons" />
</FrameLayout>

delete this line:

<TextView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="noHideDescendants" android:paddingEnd="@dimen/battery_level_padding_end" android:layout_marginStart="@dimen/header_battery_margin_keyguard" />

and add this line:

<TextView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip" android:importantForAccessibility="noHideDescendants" android:paddingEnd="@dimen/battery_level_padding_end" android:layout_marginStart="@dimen/header_battery_margin_keyguard" />

4. Save and close

5. Now in the same folder open status_bar.xml open it with notepad++ and add this line:

<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="@dimen/battery_level_text_size" android:gravity="start|center" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

immediatly to follow after this line:

<include layout="@layout/system_icons" />

6. Save and close

7. Now in the same folder open status_bar_expanded_header.xml open it with notepad++ and add this line:

<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="@dimen/battery_level_text_size" android:gravity="start|center" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

immediatly to follow after this line:

<include layout="@layout/system_icons" />
</FrameLayout>

delete this line:

<TextView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="noHideDescendants" android:paddingEnd="@dimen/battery_level_padding_end" android:layout_marginStart="@dimen/header_battery_margin_keyguard" />

and add this line:

<TextView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip" android:importantForAccessibility="noHideDescendants" android:paddingEnd="@dimen/battery_level_padding_end" android:layout_marginStart="@dimen/header_battery_margin_keyguard" />

8. Save and recompile SystemUI.apk

Do You like that I do? If You want to show your appreciation then You can donate HERE or click on Donate to Me.

Every donation is really appreciated.

Thanks to everyone