[G2 Themes and Apps] d_ave:
I'm starting this thread in order to share my findings about modding stock Lollipop apps for our beloved LG G2.

First of all, let’s start with modding the LGSystemUI.apk

You’ll need a deodexed LGSystemUI.apk in order to have all mods working without any faults.

There’s no need to have a fully deodexed rom, it’s enough just to have a deodexed systemui, but I recommend you to pull the whole /system through adb and to deodex it using either Joel Droid’s Lollipop deodexer or some other deodexing tool. It’s a lot easier to have a fully deodexed version of the rom stored on one of your drives and to take the apks you want to mod from there instead of deodexing them one by one manually.

Other tools that you will need include:

-	TickleMyDroid (TMD) – very useful tool, which offers a nice interface, allows you to work on several roms at once and makes decompiling and recompiling as simple as pressing a button

-	APKTool – latest possible version, at the moment on writing the guide the latest possible version is 2.0.0

-	Notepad++ for editing

-	7zip – no comment necessary

You need to set the TMD to use the latest APKtool and you’re good to go.

Few words on the deodexing process itself. You don’t need the whole rom to be deodexed, just the files you’re editing. Let’s say you want to use your freshly deodexed LGSystemUI.apk. The only thing you need to do is to replace the stock LGSystemUI.apk with the deodexed one and to delete the LGSystemUI.odex from the /system/priv-app/LGSystemUI/arm/ folder. There are several ways to do that. You can either use Root Explorer or similar app, do it through the TWRP file browser or just make a flashable zip file, it’s up to you.

Another few words on decompiling and recompiling. While recompiling always choose option 2 in the TMD – Recompile App With Original Signature. Otherwise you’ll be facing a fc as soon as you reboot your phone with the freshly flashed mod.

Enabling the Clear and Cloudy weather effects on the lockscreen.

This one is easy.

1.	Decompile the deodexed LGSystemUI.apk

2.	Navigate to \LGSystemUI.apk\smali\com\lge\effect\weather and open WeatherEffect.smali

3.	Now let’s take a look at what’s inside the file. Locate the following segment:

:pswitch_2
new-instance v0, Lcom/lge/effect/weather/thunder/ThunderWeather;

.end local v0 # "weather":Lcom/lge/effect/weather/WeatherEffect;
invoke-direct {v0, p0, p1}, Lcom/lge/effect/weather/thunder/ThunderWeather;-><init>(Landroid/content/Context;Lcom/lge/effect/lockscreen/LockScreenRenderer;)V

.line 44
.restart local v0 # "weather":Lcom/lge/effect/weather/WeatherEffect;
invoke-direct {v0, p2}, Lcom/lge/effect/weather/WeatherEffect;->setWeather(I)V

goto :goto_0

below it you’ll find almost the same segment for Clear weather and for Cloudy weather. I say almost the same, because it looks like that:

:pswitch_3
[COLOR="Red"]sget-boolean v1, Lcom/lge/effect/weather/WeatherEffect;->mIsDisney:Z

if-ne v1, v2, :cond_0

.line 48[/COLOR]
new-instance v0, Lcom/lge/effect/weather/clear/ClearWeather;

.end local v0 # "weather":Lcom/lge/effect/weather/WeatherEffect;
invoke-direct {v0, p0, p1}, Lcom/lge/effect/weather/clear/ClearWeather;-><init>(Landroid/content/Context;Lcom/lge/effect/lockscreen/LockScreenRenderer;)V

.line 49
.restart local v0 # "weather":Lcom/lge/effect/weather/WeatherEffect;
invoke-direct {v0, p2}, Lcom/lge/effect/weather/WeatherEffect;->setWeather(I)V

goto :goto_0

you’ll notice that between the :pswitch_3 and the new-instance rows there are several other rows. I have colored them red, so you can easily locate them. just delete them so the code looks like that:

:pswitch_3
new-instance v0, Lcom/lge/effect/weather/clear/ClearWeather;

.end local v0 # "weather":Lcom/lge/effect/weather/WeatherEffect;
invoke-direct {v0, p0, p1}, Lcom/lge/effect/weather/clear/ClearWeather;-><init>(Landroid/content/Context;Lcom/lge/effect/lockscreen/LockScreenRenderer;)V

.line 49
.restart local v0 # "weather":Lcom/lge/effect/weather/WeatherEffect;
invoke-direct {v0, p2}, Lcom/lge/effect/weather/WeatherEffect;->setWeather(I)V

goto :goto_0

Do exactly the same for the Cloudy weather, which is just below the Clear Weather.

After you’re done, do just have to recompile and push back the file to the phone.

Removing the carrier label from the lockscreen

1.	Decompile the deodexed LGSystemUI.apk

2.	Navigate to \LGSystemUI.apk\res\layout

3.	Open the file keyguard_message_area_dragview.xml

Here’s what you can expect to see:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.keyguard.KeyguardMessageArea android:layout_gravity="center" android:id="@id/keyguard_message_area_cmas" android:tag="cmas" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/InfoTextStyle" />
</LinearLayout>
[COLOR="Red"]<com.android.keyguard.CarrierText android:id="@id/carrier_text_dragview" android:clickable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<com.android.keyguard.KeyguardMessageArea android:layout_gravity="center" android:id="@id/keyguard_message_area_charger" android:tag="charger" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/InfoTextStyle" />
<com.android.keyguard.KeyguardMessageArea android:layout_gravity="center" android:id="@id/keyguard_message_area_owner" android:tag="owner" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/InfoTextStyle" />
<com.android.keyguard.KeyguardMessageArea android:layout_gravity="center" android:id="@id/keyguard_message_area_lockout" android:tag="lockout" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/InfoTextStyle" />
</LinearLayout>

The carrier text is colored in red. You can replace it with the following:

<com.android.keyguard.CarrierText android:id="@id/carrier_text_dragview" android:visibility="gone" android:clickable="true" android:layout_width="0.0dip" android:layout_height="0.0dip" />

In general only the android:visibility=”gone” is enough, but better to be safe with also setting the width and the height to 0.0dip.

Note also this:

<com.android.keyguard.KeyguardMessageArea android:layout_gravity="center" android:id="@id/keyguard_message_area_charger" android:tag="charger" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/InfoTextStyle" />

This is the Charging text which appears while you charge your phone. In my mod I have removed it from this xml and placed it under the clock in order to avoid having a charging text hanging in the middle of nowhere on my screen.

Editing the lockscreen clock and date

1.	Decompile the deodexed LGSystemUI.apk

2.	Before playing with the clock it’s advisable to remove the circle. The easiest way to do it is to locate the files lockscreen_clock_bg.png and lockscreen_clock_bg_dark.png inside the \LGSystemUI.apk\res\drawable-xxhdpi and to edit them with Photoshop or Gimp. Just make them transparent, that’ll be enough.

3.	Navigate to \LGSystemUI.apk\res\layout

4.	Open the file keyguard_circular_clock_view.xml

5.	Here’s what you can expect to see:

<?xml version="1.0" encoding="utf-8"?>
<com.lge.systemui.widget.ClockWidgetView android:gravity="center" android:orientation="vertical" android:id="@id/lge_clock_widget" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center" android:layout_gravity="center|top" android:orientation="vertical" android:id="@id/lge_keyguard_status_view_clock_bg" android:background="@drawable/lockscreen_clock_bg_dark" android:focusable="true" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.lge.systemui.widget.ClockView android:id="@id/lge_clock_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerVertical="true">
[COLOR="Red"] <com.lge.adaptive.AdaptiveTextView android:textSize="@dimen/circular_ampm_font_size" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/circular_ampm_margin_top" android:singleLine="true" android:layout_centerHorizontal="true" style="@style/lockscreenDefaultClockSubtext" />
<com.lge.adaptive.AdaptiveTextView android:textSize="@dimen/circular_clock_font_size" android:ellipsize="none" android:gravity="center" android:id="@id/lge_clock_text" android:layout_width="wrap_content" android:layout_height="@dimen/circular_clock_view_height" android:singleLine="true" android:layout_below="@id/am_pm" android:layout_centerHorizontal="true" style="@style/lockscreenDefaultClockSubtext" />[/COLOR]
</com.lge.systemui.widget.ClockView>
<com.lge.systemui.widget.DateView android:layout_gravity="center" android:orientation="vertical" android:id="@id/lge_date_view" android:layout_width="wrap_content" android:layout_height="wrap_content">
[COLOR="RoyalBlue"] <com.lge.adaptive.AdaptiveTextView android:textSize="@dimen/circular_date_font_size" android:textStyle="bold" android:layout_gravity="center" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" style="@style/lockscreenDefaultClockSubtext" />
<com.lge.adaptive.AdaptiveTextView android:textSize="@dimen/circular_date_font_size" android:textStyle="bold" android:layout_gravity="center" android:id="@id/day" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" style="@style/lockscreenDefaultClockSubtext" />[/COLOR]
</com.lge.systemui.widget.DateView>
</LinearLayout>
</com.lge.systemui.widget.ClockWidgetView>

Here you can change several things in order to suit your needs. First of all take a look at the red part – this is the clock itself. This is am/pm indicator – if you wish you can set android:visibility=”gone” and you’ll get rid of it like this:

<com.lge.adaptive.AdaptiveTextView android:textSize="@dimen/circular_ampm_font_size" android:visibility="gone" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/circular_ampm_margin_top" android:singleLine="true" android:layout_centerHorizontal="true" style="@style/lockscreenDefaultClockSubtext" />

The part colored in blue is the date and weekday.

If you want to change the size of the clock and the date you have to change everywhere you see in the file android:textSize="@dimen/circular_clock_font_size" with something like android:textSize="100.0dip". afterwards it’s up to you to set the size you want.