[G2 Themes and Apps] rastigo:
This guide will help you in customizing the statusbar clock and play with it a bit. This mod requires a deodexed LGSystemUI.apk. It took me about a month to cook this mod.This guide couldnt have been possible without [MENTION=4315551]Ticklefish[/MENTION] , so I thank him for his terrific knowledge and his willingness to help others.

Special thanks to [MENTION=2948558]Spannaa[/MENTION] for his guide based on which this one was made...Truly awesome both [MENTION=2948558]Spannaa[/MENTION] and [MENTION=4315551]Ticklefish[/MENTION]

Basically an inbuilt android function called "TEXTCLOCK" is used in the mod to display clock in html code

You need to have knowledge of compiling and decompiling ...Tools recommended:

Apktool 1.5.2 (coz it handles smali files perfectly, although we don't touch any of them in this mod)

Notepad++

Remember the variable used should be in format like :

There are lots of options for customizations available. You can change the strings above using any of the following.

Step 1

Decompile your LGSystemUI.apk. Edit /res/layout/statusbar.xml and find the line:

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="18.0dip" android:textColor="#ffffffff" android:gravity="center" android:id="@id/clock" android:paddingBottom="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

V.Imp: Do not delete this line...Just hide the clock by adding "andoid:visibility="gone""

Change it to

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="18.0dip" android:visibility="gone" android:textColor="#ffffffff" android:gravity="center" android:id="@id/clock" android:paddingBottom="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

Step 2

Just below that line add the following code:

<TextClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:format12Hour="@string/status_bar_clock_12hr_format" android:format24Hour="@string/status_bar_clock_24hr_format" />

VVV IMP: The above line must be below the stock clock code or the statusbar will crash

Step 3

Open /res/values/strings and add the following strings at the end.

<string name="status_bar_clock_12hr_format"><font size="13">EEE, </font>h:mm<font size="10"> a</font></string>
<string name="status_bar_clock_24hr_format"><font size="13">EEE, </font>HH:mm</string>

You can change this to what is mentioned before with your choice of clock format

Step 4

Open/res/values/styles and find

<style name="TextAppearance.StatusBar.Clock" parent="@*android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">18.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>

Here you can customize size.bold,colour of the clock

Step 5

Recompile your LGSystemUI.apk.

Copy meta_inf folder and AndroidManifest.xml from original file to recompiled file.

Rename the recompiled file as LGSystemUI.apk

Push to /system/priv-app with 644 permissions.

Reboot and enjoy the mod.

For eg. my strings read as follows:

<string name="status_bar_clock_12hr_format"><font size="13">EEE, </font>h:mm:ss<font size="10"> a</font></string>
<string name="status_bar_clock_24hr_format"><font size="13">EEE, </font>HH:mm:ss</string>

Output of which is as under:

View attachment 2919792

For those who arent profoud with compile/decompile...I am posting a G2 STOCK KK LGSystemUI.apk for download. It has

-Short day of the week.

-Clock with seconds

-Small am/pm

SCRRENSHOT:View attachment 2919858

Rename to LGSystemUI.apk and push to /system/priv-app with 644 permissions and delete the LGSystemUI.odex file.

Stock G2 KK Download

You have to play around a bit with the strings added to strings.xml in order to figure out your desired result

A lot of hardwork went into making this guide so please show appreciation by pressing thanks button. Please also give credit if youve used this in your MODS/ROM