Compilation of Verizon S3 Tutorials

Search This thread

metalfan78

Senior Member
Jan 30, 2010
5,009
2,476
Littleton, CO
It's something in the clock mod v2, the 2nd step I think, that isn't playing nice on the Sprint version. There is some code that causes an abort during recompiling.
 

metalfan78

Senior Member
Jan 30, 2010
5,009
2,476
Littleton, CO
If I still have it. I can redo it later tonight and get the log

Heres the error


C:\apktool>apktool b SecSettings
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\SecSettings\res\xml\date_time_prefs.xml:8: error: Error: No resource
found that matches the given name (at 'entries' with value '@array/clock_style_e
ntries').
C:\apktool\SecSettings\res\xml\date_time_prefs.xml:8: error: Error: No resource
found that matches the given name (at 'entryValues' with value '@array/clock_sty
le_values').
aapt: warning: string 'cpa_err_msg_parameter_error' has no default translation i
n C:\apktool\SecSettings\res; found: en_US ja ko
aapt: warning: string 'insert_simuim_card' has no default translation in C:\apkt
ool\SecSettings\res; found: es_ES it ko pl zh_CN
aapt: warning: string 'insert_simuim_card_message' has no default translation in
C:\apktool\SecSettings\res; found: es_ES it ko pl zh_CN
aapt: warning: string 'stms_version' has no default translation in C:\apktool\Se
cSettings\res; found: ja
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Kevin\AppData\Local\Temp
\APKTOOL5743119660319129498.tmp, -I, C:\Users\Kevin\apktool\framework\1.apk, -S,
C:\apktool\SecSettings\res, -M, C:\apktool\SecSettings\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:357)
at brut.androlib.Androlib.buildResources(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:218)
at brut.apktool.Main.main(Main.java:74)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:
\Users\Kevin\AppData\Local\Temp\APKTOOL5743119660319129498.tmp, -I, C:\Users\Kev
in\apktool\framework\1.apk, -S, C:\apktool\SecSettings\res, -M, C:\apktool\SecSe
ttings\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:349)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:335)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Kevin\AppData\Local\Temp\A
PKTOOL5743119660319129498.tmp, -I, C:\Users\Kevin\apktool\framework\1.apk, -S, C
:\apktool\SecSettings\res, -M, C:\apktool\SecSettings\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:347)
... 6 more

C:\apktool>
 

rompnit

Senior Member
Aug 24, 2008
3,249
20,624
Granger, IN
@metalfan78.. The errors are generated from missing array values. I am on mobile so it's tough to tell but it looks like that step is missing. You mentioned MOAR.. If you still have the apks, navigate to res\values\arrays.xml and diff it out. The values are contained there. The 'aapt warnings' are nothing to be concerned about.

Sent from my SPH-L710 using xda app-developers app
 
  • Like
Reactions: metalfan78

rompnit

Senior Member
Aug 24, 2008
3,249
20,624
Granger, IN

metalfan78

Senior Member
Jan 30, 2010
5,009
2,476
Littleton, CO
Ok, well I got the system UI edited and compiled with no errors. When I push it to my phone, reboot, I get 'system ui has stopped' and date and time still fc's . I'll check the id's

---------- Post added at 02:05 PM ---------- Previous post was at 02:01 PM ----------

Do I diff my original with my modded apk's?

---------- Post added at 02:25 PM ---------- Previous post was at 02:05 PM ----------

This might be beyond me, I don't know which id's to check
 

metalfan78

Senior Member
Jan 30, 2010
5,009
2,476
Littleton, CO
So the clock mod is working, the issue I see now is that it seems the videoplayer.apk seems to have its own clock. The mods for the status bar don't seem to affect this. Am I the only one that has seen this or is there something in this mod that should have overwritten the video player clock?
 

TheDriller

Senior Member
Jan 31, 2012
4,299
6,681
Augusta, GA
Does anyone know where the clock in the videoplayer.apk is? I've looked and looked and can't find it. Thanks

I didn't know the video player had a clock. I just updated his multimod if you want to use that or diff it out

Tapatalk 4 sucks
RErickOilfieldTrash3_zpse29e1dc7.png
 

metalfan78

Senior Member
Jan 30, 2010
5,009
2,476
Littleton, CO
Yea, it is separate from the standard clock. I used the clock mod and have am/PM turned off but when I play videos it's there. I had to change the battery icon in the video player apk as well because that's also separate from the system icon. Very strange.
 

TheDriller

Senior Member
Jan 31, 2012
4,299
6,681
Augusta, GA
Oh I see what you mean I just played a video on my phone and I see what you're talking about. I have never noticed that before! Wtf!? Lol.

Tapatalk 4 sucks
RErickOilfieldTrash3_zpse29e1dc7.png
 

metalfan78

Senior Member
Jan 30, 2010
5,009
2,476
Littleton, CO
Yea, that's what I said, wtf samsung? Why have a separate status bar for the video player. Makes no sense. I've never seen it mentioned before so it made me wonder if I missed something in the code.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    Here is a compilation of my Verizon Samsung Galaxy S3 Tutorials.

    Some have included Zips, some do not. Due to time constraints and the many different ROMs it is impossible to make flashables for all of them. These tutotials are meant for DEVs who want to implement these MODs into thier ROMs.

    Also, some tutorials are for different Rom versions, not always the current ROM. This is okay, because the information contained in these tutorials is a good base to get the MODs working even if the you are on different firmware. Many of my MODs were re-written, updated, and converted to work with the S3 from other carriers, tutorials, and snippits of code.

    I will add to this thread as I get time.

    Thanks button if this helps!
    21
    [MOD][GUIDE] Status Bar Clock Mods

    Status Bar Clock Mods​




    DEVS, If you want to incorporate this into your ROMs feel free, just shoot me some thanks and some credit.

    I would like to thank the following for helping with these MODs:

    Jeboo & Shoman94 - They pretty much wrote the toggle portion of the code for the GS2, I just ported over to work with the GS3
    RMarkWald - Helped me straighten out some of the identifiers
    Clark44 - General thanks


    Okay,thats all for that. Lets get to the good stuff.....

    This MOD will do the following based on how you want it to look.

    -Center the clock in the Status Bar.
    -Roll the clock out of the way if you get a notification.
    -Make the AM/PM text size a step smaller.
    -Add toggle On/Off functionality in Settings/Time and Date.
    -Allow you to either toggle on/off am/pm or am/pm & Time all together

    This guide assumes you are familiar with de/recompiling. If you are not, there are a bunch of how-to's floating around.

    The following APK's will be modified:
    SystemUI.apk
    SecSettings.apk

    We will start with SecSettings.apk



    THIS PART OF THE GUIDE WILL ADD THE TOGGLES TO REMOVE AM/PM AND OR TIME. THIER FUNCTIONALITY CAN BE FOUND IN SETTING/DATE AND TIME



    Navigate to:
    res/values/public.xml

    find the following identifiers:
    Code:
    0x7f0d05f8
    0x7f0d05f9
    0x7f0d05fa
    0x7f0d05fb

    Change the entire lines to match the ones below in red
    Code:
        <public type="string" name="tts_default_settings_section" id="0x7f0d05f7" />
        [COLOR="Red"]<public type="string" name="disable_ampm" id="0x7f0d05f8" />
        <public type="string" name="disable_ampm_text" id="0x7f0d05f9" />
        <public type="string" name="disable_time" id="0x7f0d05fa" />
        <public type="string" name="disable_time_text" id="0x7f0d05fb" />
    [/COLOR]    <public type="string" name="tts_default_pitch_title" id="0x7f0d05fc" />

    Navigate to:
    res/values/strings.xml

    Add the following lines below in red.
    Code:
        <string name="tts_default_settings_section">Default settings</string>
        [COLOR="Red"]<string name="disable_ampm">Hide AM/PM</string>
        <string name="disable_ampm_text">Remove AM/PM from time in status bar</string>
        <string name="disable_time">Hide Time</string>
        <string name="disable_time_text">Remove time from status bar</string>
    [/COLOR]    <string name="tts_default_pitch_title">Pitch</string>

    Navigate to:
    res/xml/date_time_prefs.xml

    Add the following below in red
    Code:
    <ListPreference android:title="@string/date_time_date_format" android:key="date_format" android:summary="mm/dd/yyyy" android:widgetLayout="@layout/round_more_icon" />
        [COLOR="Red"]<CheckBoxPreference android:title="@string/disable_time" android:key="hide_time" android:summary="@string/disable_time_text" />
        <CheckBoxPreference android:title="@string/disable_ampm" android:key="hide_ampm" android:summary="@string/disable_ampm_text" />[/COLOR]
    </PreferenceScreen>

    Pause - At this point I suggest you compile SecSettings.apk and push to /system/app to verify the new toggles are in place. I like to stop every few steps to verify that the APK will at least compile so I know if I have made any mistakes.

    Continuing on with SecSettings.apk....

    Navigate to:
    smali/com/android/settings/DateTimeSettings.smali

    Add the following below in red
    Code:
    .field private mDummyDate:Ljava/util/Calendar;
    
    .[COLOR="red"]field private mHideAmPm:Landroid/preference/Preference;
    
    .field private mHideTime:Landroid/preference/Preference;
    [/COLOR]
    .field private mIntentReceiver:Landroid/content/BroadcastReceiver;

    Find the following code
    Code:
    iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mTimePref:Landroid/preference/Preference;

    Starting with the very next line, delete everything up to and including the first ".end Method" you come to and paste the following code in its place
    Code:
    if-nez v0, :cond_6
    
        move v4, v5
    
        :goto_0
        invoke-virtual {v7, v4}, Landroid/preference/Preference;->setEnabled(Z)V
    
        .line 193
        iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mDatePref:Landroid/preference/Preference;
    
        if-nez v0, :cond_7
    
        move v4, v5
    
        :goto_1
        invoke-virtual {v7, v4}, Landroid/preference/Preference;->setEnabled(Z)V
    
        .line 194
        iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTimeZone:Landroid/preference/Preference;
    
        if-nez v1, :cond_8
    
        :goto_2
        invoke-virtual {v4, v5}, Landroid/preference/Preference;->setEnabled(Z)V
    
        .line 197
        invoke-direct {p0}, Lcom/android/settings/DateTimeSettings;->applyEDMDateTimeChangePolicy()V
    
        const-string v4, "hide_time"
    
        invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v4
    
        check-cast v4, Landroid/preference/Preference;
    
        iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
    
        const-string v4, "hide_ampm"
    
        invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v4
    
        check-cast v4, Landroid/preference/Preference;
    
        iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
    
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
    
        check-cast v0, Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0
    
        if-eqz v0, :cond_4
    
        const/4 v0, 0x0
    
        iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
    
        invoke-virtual {v4, v0}, Landroid/preference/Preference;->setEnabled(Z)V
    
        iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
    
        invoke-virtual {v4, v0}, Landroid/preference/Preference;->setEnabled(Z)V
    
        :cond_4
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
    
        check-cast v0, Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0
    
        if-eqz v0, :cond_5
    
        const/4 v0, 0x0
    
        iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
    
        invoke-virtual {v4, v0}, Landroid/preference/Preference;->setEnabled(Z)V
    
        :cond_5
    
        return-void
    
        :cond_6
        move v4, v6
    
        .line 192
        goto :goto_0
    
        :cond_7
        move v4, v6
    
        .line 193
        goto :goto_1
    
        :cond_8
        move v5, v6
    
        .line 194
        goto :goto_2
    .end method

    Find the following code
    Code:
    .method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z

    Starting with the very next line, delete everything up to and including the first ".end Method" you come to and paste the following code in its place
    Code:
    .locals 6
        .parameter "preferenceScreen"
        .parameter "preference"
    
        .prologue
        const/4 v1, 0x1
    
        .line 486
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mDatePref:Landroid/preference/Preference;
    
        if-ne p2, v0, :cond_1
    
        .line 487
        const/4 v0, 0x0
    
        invoke-virtual {p0, v0}, Lcom/android/settings/DateTimeSettings;->showDialog(I)V
    
        .line 497
        :cond_0
        :goto_0
        invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
    
        move-result v0
    
        return v0
    
        .line 488
        :cond_1
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTimePref:Landroid/preference/Preference;
    
        if-ne p2, v0, :cond_2
    
        .line 490
        invoke-virtual {p0, v1}, Lcom/android/settings/DateTimeSettings;->removeDialog(I)V
    
        .line 491
        invoke-virtual {p0, v1}, Lcom/android/settings/DateTimeSettings;->showDialog(I)V
    
        goto :goto_0
    
        .line 492
        :cond_2
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
    
        if-ne p2, v0, :cond_4
    
    
        .line 493
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
    
        check-cast v0, Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0
    
        invoke-direct {p0, v0}, Lcom/android/settings/DateTimeSettings;->set24Hour(Z)V
    
        iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
    
        if-nez v0, :cond_3
    
        const/4 v0, 0x1
    
        goto :goto_1
    
        :cond_3
        const/4 v0, 0x0
    
        :goto_1
        invoke-virtual {v1, v0}, Landroid/preference/Preference;->setEnabled(Z)V
    
        .line 494
        :goto_2
        invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
    
        move-result-object v0
    
        invoke-virtual {p0, v0}, Lcom/android/settings/DateTimeSettings;->updateTimeAndDateDisplay(Landroid/content/Context;)V
    
        .line 495
        invoke-direct {p0}, Lcom/android/settings/DateTimeSettings;->timeUpdated()V
    
        goto :goto_0
    
        :cond_4
        const-string v3, "hide_ampm"
    
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
    
        if-ne p2, v0, :cond_5
    
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
    
        check-cast v0, Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v2
    
        invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "hide_ampm"
    
        invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    
        goto :goto_2
    
        :cond_5
        const-string v3, "hide_time"
    
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
    
        if-ne p2, v0, :cond_0
    
        iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
    
        check-cast v0, Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v2
    
        invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "hide_time"
    
        invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    
        if-nez v2, :cond_6
    
        const/4 v2, 0x1
    
        goto :goto_3
    
        :cond_6
        const/4 v2, 0x0
    
        :goto_3
        iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
    
        invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
    
        iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
    
        invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
    
        goto :goto_2
    .end method

    Thats it for SecSettins.apk. Recompile and push to /system/app and make sure the toggles are there. They wont function yet but they should be clickable at this point.

    Decompile SystemUI

    Navigate to smali/com/android/systemui/statusbar/policy/clock.smali

    In the next step you will basically be C&P'ing the entire method. If you would like to use your editor to compare code and make only the changes you need thats fine, but for the sake of this guide and time, I am just having you copy and paste the entire method. I suggest you copy half the code and paste, then copy the other half and paste. Its too much to copy at one time..

    Find the code
    Code:
    .method private final getSmallTime()Ljava/lang/CharSequence;

    Starting with the very next line, delete everything up to and including the first ".end Method" you come to and paste (half at a time as described above) the following code in its place
    Code:
    .locals 22
    
    
        invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/policy/Clock;->getContext()Landroid/content/Context;
    
        move-result-object v8
    
        invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v2
    
        const-string v7, "hide_time"
    
        const/4 v0, 0x0
    
        invoke-static {v2, v7, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v7
    
        const/4 v0, 0x0
    
        if-eqz v7, :cond_0
    
        const/16 v0, 0x8
    
        :cond_0
        const v1, 0x7f0f0027
    
        move-object/from16 v2, p0
    
        invoke-virtual {v2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
    
        move-result-object v1
    
        invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
    
        invoke-static {v8}, Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/Context;)Z
    
        move-result v6
    
        if-eqz v6, :cond_5
    
        const v16, 0x104007e
    
        :goto_0
        const v2, 0xef00
    
        const v3, 0xef01
    
        move/from16 v0, v16
    
        invoke-virtual {v8, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
    
        move-result-object v9
    
        if-nez v6, :cond_1
    
        invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v2
    
        const-string v3, "hide_ampm"
    
        const/4 v0, 0x0
    
        invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v7
    
        const-string v0, "ampm"
    
        new-instance v1, Ljava/lang/StringBuilder;
    
        invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
    
        const-string v2, "getint returned="
    
        invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v1
    
        invoke-virtual {v1, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
    
        move-result-object v1
    
        invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    
        move-result-object v1
    
        invoke-static {v0, v1}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
    
        move v2, v7
    
        if-eqz v2, :cond_1
    
        const-string v9, "h:mm"
    
        :cond_1
        move-object/from16 v0, p0
    
        iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormatString:Ljava/lang/String;
    
        move-object/from16 v20, v0
    
        move-object/from16 v0, v20
    
        invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    
        move-result v20
    
        if-eqz v20, :cond_2
    
        if-nez v6, :cond_a
    
        move-object/from16 v0, p0
    
        iget-boolean v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mLocaleChanged:Z
    
        move/from16 v20, v0
    
        if-eqz v20, :cond_a
    
        :cond_2
        const/16 v20, 0x0
    
        move/from16 v0, v20
    
        move-object/from16 v1, p0
    
        iput-boolean v0, v1, Lcom/android/systemui/statusbar/policy/Clock;->mLocaleChanged:Z
    
        sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
    
        if-eqz v20, :cond_9
    
        const/4 v4, -0x1
    
        const/4 v15, 0x0
    
        const/4 v11, 0x0
    
        :goto_1
        invoke-virtual {v9}, Ljava/lang/String;->length()I
    
        move-result v20
    
        move/from16 v0, v20
    
        if-ge v11, v0, :cond_4
    
        invoke-virtual {v9, v11}, Ljava/lang/String;->charAt(I)C
    
        move-result v7
    
        const/16 v20, 0x27
    
        move/from16 v0, v20
    
        if-ne v7, v0, :cond_3
    
        if-nez v15, :cond_6
    
        const/4 v15, 0x1
    
        :cond_3
        :goto_2
        if-nez v15, :cond_7
    
        const/16 v20, 0x61
    
        move/from16 v0, v20
    
        if-ne v7, v0, :cond_7
    
        move v4, v11
    
        :cond_4
        if-ltz v4, :cond_9
    
        move v5, v4
    
        :goto_3
        if-lez v4, :cond_8
    
        add-int/lit8 v20, v4, -0x1
    
        move/from16 v0, v20
    
        invoke-virtual {v9, v0}, Ljava/lang/String;->charAt(I)C
    
        move-result v20
    
        invoke-static/range {v20 .. v20}, Ljava/lang/Character;->isWhitespace(C)Z
    
        move-result v20
    
        if-eqz v20, :cond_8
    
        add-int/lit8 v4, v4, -0x1
    
        goto :goto_3
    
        :cond_5
        const v16, 0x104007d
    
        goto/16 :goto_0
    
        :cond_6
        const/4 v15, 0x0
    
        goto :goto_2
    
        :cond_7
        add-int/lit8 v11, v11, 0x1
    
        goto :goto_1
    
        :cond_8
        new-instance v20, Ljava/lang/StringBuilder;
    
        invoke-direct/range {v20 .. v20}, Ljava/lang/StringBuilder;-><init>()V
    
        const/16 v21, 0x0
    
        move/from16 v0, v21
    
        invoke-virtual {v9, v0, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
    
        move-result-object v21
    
        invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v20
    
        const v21, 0xef00
    
        invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
    
        move-result-object v20
    
        invoke-virtual {v9, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;
    
        move-result-object v21
    
        invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v20
    
        const-string v21, "a"
    
        invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v20
    
        const v21, 0xef01
    
        invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
    
        move-result-object v20
    
        add-int/lit8 v21, v5, 0x1
    
        move/from16 v0, v21
    
        invoke-virtual {v9, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
    
        move-result-object v21
    
        invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v20
    
        invoke-virtual/range {v20 .. v20}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    
        move-result-object v9
    
        :cond_9
        new-instance v18, Ljava/text/SimpleDateFormat;
    
        move-object/from16 v0, v18
    
        invoke-direct {v0, v9}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
    
        move-object/from16 v0, v18
    
        move-object/from16 v1, p0
    
        iput-object v0, v1, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormat:Ljava/text/SimpleDateFormat;
    
        move-object/from16 v0, p0
    
        iput-object v9, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormatString:Ljava/lang/String;
    
        :goto_4
        move-object/from16 v0, p0
    
        iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mCalendar:Ljava/util/Calendar;
    
        move-object/from16 v20, v0
    
        invoke-virtual/range {v20 .. v20}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
    
        move-result-object v20
    
        move-object/from16 v0, v18
    
        move-object/from16 v1, v20
    
        invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
    
        move-result-object v17
    
        sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
    
        if-eqz v20, :cond_e
    
        const v20, 0xef00
    
        move-object/from16 v0, v17
    
        move/from16 v1, v20
    
        invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I
    
        move-result v12
    
        const v20, 0xef01
    
        move-object/from16 v0, v17
    
        move/from16 v1, v20
    
        invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I
    
        move-result v13
    
        if-ltz v12, :cond_e
    
        if-le v13, v12, :cond_e
    
        new-instance v10, Landroid/text/SpannableStringBuilder;
    
        move-object/from16 v0, v17
    
        invoke-direct {v10, v0}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V
    
        sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
    
        const/16 v21, 0x2
    
        move/from16 v0, v20
    
        move/from16 v1, v21
    
        if-ne v0, v1, :cond_b
    
        add-int/lit8 v20, v13, 0x1
    
        move/from16 v0, v20
    
        invoke-virtual {v10, v12, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
    
        :goto_5
        return-object v10
    
        :cond_a
        move-object/from16 v0, p0
    
        iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormat:Ljava/text/SimpleDateFormat;
    
        move-object/from16 v18, v0
    
        goto :goto_4
    
        :cond_b
        sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
    
        const/16 v21, 0x1
    
        move/from16 v0, v20
    
        move/from16 v1, v21
    
        if-ne v0, v1, :cond_d
    
        const v14, 0x3f333333
    
        sget-boolean v20, Lcom/android/systemui/statusbar/StatusBar;->useTouchWizGUI:Z
    
        if-eqz v20, :cond_c
    
        sget-boolean v20, Lcom/android/systemui/statusbar/StatusBar;->canStatusBarHide:Z
    
        if-nez v20, :cond_c
    
        const/high16 v14, 0x3f00
    
        :cond_c
        new-instance v19, Landroid/text/style/RelativeSizeSpan;
    
        move-object/from16 v0, v19
    
        invoke-direct {v0, v14}, Landroid/text/style/RelativeSizeSpan;-><init>(F)V
    
        const/16 v20, 0x22
    
        move-object/from16 v0, v19
    
        move/from16 v1, v20
    
        invoke-virtual {v10, v0, v12, v13, v1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V
    
        :cond_d
        add-int/lit8 v20, v13, 0x1
    
        move/from16 v0, v20
    
        invoke-virtual {v10, v13, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
    
        add-int/lit8 v20, v12, 0x1
    
        move/from16 v0, v20
    
        invoke-virtual {v10, v12, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
    
        goto :goto_5
    
        :cond_e
        move-object/from16 v10, v17
    
        goto :goto_5
    .end method

    Thats it for clock.smali

    Navigate to smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali

    Find the code
    Code:
    .method public showClock(Z)V

    Starting with the very next line, delete everything up to and including the first ".end Method" you come to and paste the following code in its place
    Code:
    .locals 3
    
        iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    
        const v2, 0x7f0f0027
    
        invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
    
        move-result-object v0
    
        if-eqz v0, :cond_1
    
        if-eqz p1, :cond_2
    
        const/4 v1, 0x0
    
        iget-object v2, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
    
        invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v2
    
        const-string p0, "hide_time"
    
        invoke-static {v2, p0, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v2
    
        if-eqz v2, :cond_0
    
        const/16 v1, 0x8
    
        :cond_0
        :goto_0
        invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
    
        :cond_1
    
        return-void
    
        :cond_2
    
        const/16 v1, 0x8
    
        goto :goto_0
    .end method

    Thats it for the toggles, if you want you can recompile and push APK's to /system/app or you can continue adding some more functions below.


    THIS PART OF THE CODE WILL CENTER THE CLOCK IN THE STATUS BAR

    Still in SystemUI.apk

    Navigate to res/layout/tw_status_bar.xml

    Find the following code and DELETE it
    Code:
    <com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />

    FInd the following code
    Code:
    xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">

    Add this right below it
    Code:
    <LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:gravity="center" android:id="@id/clock" android:paddingTop="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" android:layout_weight="1.0" />
        </LinearLayout>

    Find the following code
    Code:
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">

    Change it to this
    Code:
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:background="@drawable/status_bar_bg_tile" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">


    THIS PART WILL MAKE THE AM/PM A SIZE SMALLER

    Navigate to smali/com/android/systemui/statusbar/policy/clock.smali

    Find the following code and remove whats in red and add whats in green
    Code:
    # direct methods
    .method static constructor <clinit>()V
        .locals 1
    
        .prologue
        .line 78
       [COLOR="Red"] const/4 v0, 0x0[/COLOR]
         [COLOR="SeaGreen"]const/4 v0, 0x1[/COLOR]
    
        sput v0, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
    
        return-void
    .end method

    Thats it!!

    Recompile
    Chmod 644
    Push to /system/app or create a zip and flash away.


    IF YOU LIKE THIS MOD HIT THE THANKS BUTTON
    14
    [MOD] [GUIDE] Remove the GPS Icon from the Status Bar (the right way)

    REMOVE GPS ICON FROM STATUS BAR


    Here is a guide to remove the GPS (location) Icon from the status bar. This is not the current method of going into the drawables XML and removing or making the PNGs transparent. This is a smali edit to prevent the ICON from displaying thus removing the space the icon utilizes from the status bar. If you like this MOD hit the thanks button.

    DEVs feel free to use this MOD just shoot me a thanks and some credit.

    We will be working within SystemUI.apk

    Decompile SystemUI.apk

    Navigate to smali/com/android/systemui/statusbar/policy/LocationController.smali

    Find the three instances of the following:
    Code:
    "Gps icon State"

    In each instance remove the very next "invoke-virtual" line

    Thats it!

    Recompile
    Chmod 644
    Push to System/app or make a flashable ZIP.
    12
    [MOD] [GUIDE] Lockscreen Torch LG7

    Lockscreen Torch LG7​





    The lockscreen torch will allow you to quickly turn on your flashlight from the lockscreen. Simply hold the home button in for torch, let it go and it will turn off. It is meant to function this way so you dont accidentally turn it on in your pocket or something and forget about it. Not sure who originally wrote the MOD but I have spent some time re-writing it to fit the GS3 based on a dozen or so other tutorials.

    After reboot, it will take about 20 seconds before the MOD will engage. Then it will work at will as long as you are on the lockscreen.

    I will include the three files that are being modified in the zip below so you can use them in your compare tool.

    DEVs if you want to use this in your ROM feel free, just shoot me some credit and some thanks!

    Hit the Thanks Button!

    Here is the guide.....



    First you will need to download the torch file below and drop it in /system/app. This will be in the zip file with the smali files.

    We will be working with three smali files inside of android.policy.jar.

    Navigate to smali/com/android/internal/policy/impl/KeyguardViewMediator$2.smali

    Find the following code and add the part in RED
    Code:
        packed-switch v2, :pswitch_data_0
    
        .line 1172
        :goto_0
       [COLOR="Red"][B] :pswitch_0
    [/B][/COLOR]    return-void

    Find the 13 : pswitch_ lines and increase them by 1. For example
    Code:
    :pswitch_0 becomes :pswitch_1
    :pswitch_1 becomes :pswitch_2
    :pswitch_2 becomes :pswitch_3
    :pswitch_3 becomes :pswitch_4
    :pswitch_4 becomes :pswitch_5
    :pswitch_5 becomes :pswitch_6
    :pswitch_6 becomes :pswitch_7
    :pswitch_7 becomes :pswitch_8
    :pswitch_8 becomes :pswitch_9
    :pswitch_9 becomes :pswitch_a
    :pswitch_a becomes :pswitch_b
    :pswitch_b becomes :pswitch_c
    :pswitch_c becomes :pswitch_d

    Find the following code
    Code:
    invoke-static {v0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->access$300(Lcom/android/internal/policy/impl/KeyguardViewMediator;)V
    
        .line 1169
        monitor-exit v1
    
        goto :goto_0

    Add the following directly after
    Code:
    .line 974
        :pswitch_e
        iget-object v2, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator$2;->this$0:Lcom/android/internal/policy/impl/KeyguardViewMediator;
    
        iget v3, p1, Landroid/os/Message;->arg1:I
    
        if-eqz v3, :cond_2
    
        move v3, v0
    
        :goto_3
        #calls: Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
        invoke-static {v2, v3}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->access$1900(Lcom/android/internal/policy/impl/KeyguardViewMediator;Z)V
    
        goto :goto_0
    
        :cond_2
        move v3, v1
    
        goto :goto_3

    Find the "nop' at the end and add another one right below it
    Code:
    throw v0
    
        .line 1129
        nop
    
        nop

    Find the stack of : pswitch_ lines at the end of the smali and delete : pswitch_0
    Then add the following so the entire stack will end up looking like this
    Code:
    .packed-switch 0x1
    
            :pswitch_1
            :pswitch_2
            :pswitch_3
            :pswitch_4
            :pswitch_5
            :pswitch_6
            :pswitch_7
            :pswitch_8
            :pswitch_9
            :pswitch_a
            :pswitch_b
            :pswitch_c
            :pswitch_d
            :pswitch_0
            :pswitch_0
            :pswitch_0
            :pswitch_0
            :pswitch_0
            :pswitch_0
            :pswitch_e
        .end packed-switch
    .end method

    Thats it for KeyguardViewMediator$2.smali. Save and close the file.

    Navigate to smali/com/android/internal/policy/impl/KeyguardViewMediator.smali

    Find the following code
    Code:
    .field private static final SET_HIDDEN:I = 0xc

    Add this right after
    Code:
    [hide]
    .field private static final SET_TORCH:I = 0x14

    Find the following code
    Code:
    .field private mTelephonyManager:Landroid/telephony/TelephonyManager;

    Add this right after
    Code:
    .field private mTorchEnabled:Z
    
    .field private mTorchStateChanged:Z

    Find the following code
    Code:
    const/4 v10, 0x0
    
        const/4 v9, 0x1
    
        .line 301
        invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    Add this after
    Code:
    iput-boolean v9, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z

    Find the following code
    Code:
        iput-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
    
        .line 302
        iput-object p1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mContext:Landroid/content/Context;
    
        .line 304
        iput-object p3, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mRealPowerManager:Landroid/os/LocalPowerManager;

    Add this after
    Code:
        iput-boolean v10, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
    
        .line 1188
        iput-boolean v10, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z

    Find this method
    Code:
    .method static synthetic access$200(Lcom/android/internal/policy/impl/KeyguardViewMediator;)V

    Add this entire NEW method RIGHT BEFORE it.
    Code:
    .method static synthetic access$1900(Lcom/android/internal/policy/impl/KeyguardViewMediator;Z)V
        .locals 0
        .parameter "x0"
        .parameter "x1"
    
        .prologue
        invoke-direct {p0, p1}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
    
        return-void
    .end method

    Find the following code
    Code:
    const/4 v0, 0x1
    
        invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->adjustLocked(Z)V
    
        .line 1315
        monitor-exit p0

    Add this right after
    Code:
    invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V

    Find the following code
    Code:
    .line 1496
        iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mKeyguardViewManager:Lcom/android/internal/policy/impl/KeyguardViewManager;
    
        invoke-virtual {v0}, Lcom/android/internal/policy/impl/KeyguardViewManager;->onScreenTurnedOff()V
    
        .line 1497
        monitor-exit p0

    Add this directly after
    Code:
    invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V

    Find the following code
    Code:
    iput-boolean p1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHidden:Z
    
        .line 611
        invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->adjustUserActivityLocked()V
    
        .line 612
        invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->adjustStatusBarLocked()V

    Add this directly after
    Code:
    invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V

    Find the following code
    Code:
    :try_end_0
        .catchall {:try_start_0 .. :try_end_0} :catchall_0
    
        throw v0
    .end method

    Add this ENTIRE NEW METHOD directly after
    Code:
    .method private handleSetTorch(Z)V
        .locals 6
        .parameter "enable"
    
        .prologue
        const/4 v5, 0x0
    
        const/4 v4, 0x1
    
        .line 504
        :try_start_0
        iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
    
        if-nez v1, :cond_1
    
        .line 505
        iput-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
    
        .line 506
        const/4 v1, 0x1
    
        iput-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
    
        .line 515
        :cond_0
        :goto_0
        return-void
    
        .line 507
        :cond_1
        iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
    
        if-eq v1, p1, :cond_0
    
        .line 508
        iput-boolean p1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
    
        .line 509
        new-instance v0, Landroid/content/Intent;
    
        const-string v1, "net.cactii.flash2.TOGGLE_FLASHLIGHT"
    
        invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
    
        .line 510
        .local v0, intent:Landroid/content/Intent;
        const-string v1, "net.cactii.flash2.EXTRA_DISABLE_NOTIFICATION"
    
        const/4 v2, 0x1
    
        invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
    
        .line 511
        iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mContext:Landroid/content/Context;
    
        invoke-virtual {v1, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
        :try_end_0
        .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    
        goto :goto_0
    
        .line 514
        .end local v0           #intent:Landroid/content/Intent;
        :catch_0
        move-exception v1
    
        goto :goto_0
    .end method

    Find the following code
    Code:
    :goto_1
        :try_start_2
        iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mShowKeyguardWakeLock:Landroid/os/PowerManager$WakeLock;
    
        invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->release()V

    Add the following after
    Code:
    .line 995
        const/4 v0, 0x1
    
        iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z

    Find the following code
    Code:
    iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
    
        invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    
        .line 752
        return-void
    .end method

    Add this ENTIRE NEW METHOD after
    Code:
    .method private resetTorchState()V
        .locals 1
    
        .prologue
        .line 1193
        iget-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
    
        if-eqz v0, :cond_0
    
        .line 1194
        const/4 v0, 0x0
    
        invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
    
        .line 1196
        :cond_0
        return-void
    .end method

    Find the following code
    Code:
    :try_end_3
        .catchall {:try_start_3 .. :try_end_3} :catchall_0
    
        goto :goto_1
    .end method

    Add this ENTIRE NEW METHOD after
    Code:
    .method public setTorch(Z)V
        .locals 5
        .parameter "enable"
    
        .prologue
        const/16 v4, 0x14
    
        const/4 v3, 0x0
    
        .line 1155
        iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mScreenOn:Z
    
        if-eqz v1, :cond_0
    
        .line 1157
        iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
    
        invoke-virtual {v1, v4}, Landroid/os/Handler;->removeMessages(I)V
    
        .line 1158
        iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
    
        if-eqz p1, :cond_1
    
        const/4 v2, 0x1
    
        :goto_0
        invoke-virtual {v1, v4, v2, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
    
        move-result-object v0
    
        .line 1159
        .local v0, msg:Landroid/os/Message;
        iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
    
        invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    
        .line 1161
        .end local v0           #msg:Landroid/os/Message;
        :cond_0
        return-void
    
        :cond_1
        move v2, v3
    
        .line 1158
        goto :goto_0
    .end method

    Thats it for KeyguardViewMediator.smali. Save the file and close.

    Navigate to smali/com/android/internal/policy/impl/PhoneWindowManager.smali

    Find the following code
    Code:
    const/16 v41, 0x3
    
        move/from16 v0, v22
    
        move/from16 v1, v41

    Change the next line to the following
    Code:
    if-ne v0, v1, :cond_2b

    Find the following code
    Code:
    invoke-static/range {v41 .. v42}, Landroid/util/safelog/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
    
        goto :goto_a
    
        :cond_20

    Change the next line to the following
    Code:
    if-eqz v4, :cond_26

    Find the following code
    Code:
    const/16 v41, 0x7d9
    
        move/from16 v0, v38
    
        move/from16 v1, v41

    Change the next line to the following
    Code:
    if-ne v0, v1, :cond_23

    Directly after that last change in code, add the following
    Code:
    :cond_21
        move-object/from16 v0, p0
    
        iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
    
        move-object/from16 v41, v0
    
        invoke-virtual/range {v41 .. v41}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->isShowingAndNotHidden()Z
    
        move-result v41
    
        if-eqz v41, :cond_22
    
        .line 1275
        move-object/from16 v0, p0
    
        iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
    
        move-object/from16 v41, v0
    
        move-object/from16 v0, v41
    
        move v1, v8
    
        invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->setTorch(Z)V
    
        .line 1276
        rem-int/lit8 v41, v31, 0xf
    
        if-nez v41, :cond_22
    
        .line 1277
        move-object/from16 v0, p0
    
        iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
    
        move-object/from16 v41, v0
    
        invoke-virtual/range {v41 .. v41}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->pokeWakelock()V
    
        :cond_22

    Here is a sort of tricky part. Starting right after the above code change you need to comb the rest of this entire method for all references to ":cond_X" and increment them by one. THERE ARE A LOT! Take your time and find them all. For example

    Code:
    :cond_23 becomes :cond_24
    :cond_29 becomes :cond_2a
    :cond_3f becomes :cond_40
    ....etc.  MAKE SURE YOU FIND THEM ALL!  The last one you change should be :cond_47.

    [/hide]

    Thats it. Save all fines, recompile and push to /system/framework.

    Enjoy and hit the Thanks Butto
    9
    [MOD][GUIDE] How-to add abbreviated day of week in stsatus bar

    Add abbreviated day of week in stsatus bar​




    This will add an abbreviated day of the week (Mon, Tue, Wed, etc) to your status bar

    This will modify the status bar on the lock screen status bar, regular screen status bar, and expanded status bar.

    This will work for LG7 and the new leak too i believe.

    Here is the guide:



    This will cover two scenarios.

    1. Center Clock Applications
    2. Stock Clock Applications

    First one will be for Center Clock....

    Decompile SystemUI and navigate to res/layout/tw_status_bar.xml

    Find the following code
    Code:
    <com.android.systemui.statusbar.policy.Clock

    Right above this line paste the following code
    Code:
    <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="right" android:id="@id/date" android:paddingRight="2.0dip" android:paddingTop="7.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" android:layout_weight="1.0" />

    Navigate to smali/com/android/systemui/statusbar/policy/dateview.smali

    Find the following code
    Code:
    .method private final updateClock()V

    Starting with and including the very next line, delete everything all the way to and including the first "end Method you come to and paste the following code in its place
    Code:
    .locals 9
    
        .prologue
        const v8, [B][COLOR="Red"]0x7f080002
    [/COLOR][/B]
        const/4 v5, 0x2
    
        const/4 v7, 0x1
    
        const/4 v6, 0x0
    
    
        .line 92
        invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/DateView;->getContext()Landroid/content/Context;
    
        move-result-object v0
    
    
        .line 93
        .local v0, context:Landroid/content/Context;
        new-instance v3, Ljava/util/Date;
    
        invoke-direct {v3}, Ljava/util/Date;-><init>()V
    
    
        .line 94
        .local v3, now:Ljava/util/Date;
        const-string v4, "EEE"
    
        invoke-static {v4, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Date;)Ljava/lang/CharSequence;
    
        move-result-object v2
    
    
        .line 95
        .local v2, dow:Ljava/lang/CharSequence;
        invoke-static {v0}, Landroid/text/format/DateFormat;->getLongDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
    
        move-result-object v4
    
        invoke-virtual {v4, v3}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
    
        move-result-object v1
    
    
        .line 98
        .local v1, date:Ljava/lang/CharSequence;
        sget-boolean v4, Lcom/android/systemui/statusbar/StatusBar;->useTouchWizGUI:Z
    
        if-eqz v4, :cond_1
    
        .line 99
        sget-boolean v4, Lcom/android/systemui/statusbar/StatusBar;->canStatusBarHide:Z
    
        if-eqz v4, :cond_0
    
        .line 100
    
        new-array v4, v5, [Ljava/lang/Object;
    
        aput-object v1, v4, v6
    
        aput-object v2, v4, v7
    
        invoke-virtual {v0, v8, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
    
        move-result-object v4
    
        invoke-virtual {p0, v4}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V
    
        .line 108
        :goto_0
        return-void
    
        .line 102
    	
        :cond_0
        const v4, [B][COLOR="red"]0x7f080003
    [/COLOR][/B]
        new-array v5, v5, [Ljava/lang/Object;
    
        aput-object v2, v5, v6
    
        aput-object v1, v5, v7
    
        invoke-virtual {v0, v4, v5}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
    
        move-result-object v4
    
        invoke-virtual {p0, v4}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V
    
        goto :goto_0
    
    
        .line 105
        :cond_1
    
    
        new-array v4, v5, [Ljava/lang/Object;
    
        aput-object v2, v4, v6
    
        aput-object v1, v4, v7
    
        invoke-virtual {v0, v8, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
    
        move-result-object v4
    
        invoke-virtual {p0, v4}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V
    
        goto :goto_0
    .end method

    Pay attention to the code above in RED. Those ID's must match up to the date ID's in your res/values/public.xml. If they dont you will need to change them.

    Since this will also change the layout of the date in your dropdown menu, you may want to delete the date reference from there. If you do, this is how you delete it

    Navigate to res/layout/tw_status_bar_expanded

    Find the code that begins with the following and delete the entire line
    Code:
    <com.android.systemui.statusbar.policy.DateView


    Thats it, recompile, chmod 644, and push to /system/app.

    The next steps are for a stock clock setup. I have mine setup as a center clock so I will give you the basics for the stock clock. You may have to add some padding to tweak your location in the status bar. I will assume if you know how to de/recompile, you know how to pad your code.

    In SystemUI Navigate to res/layout/tw_status_bar

    Find the following code
    Code:
    <com.android.systemui.statusbar.policy.Clock

    Add the following code on top of it
    Code:
    <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_toLeftOf="@id/clock" />

    Navigate to smali/com/android/systemui/statusbar/policy/dateview.smali

    Find the following code
    Code:
    .method private final updateClock()V

    Starting with and including the very next line, delete everything all the way to and including the first "end Method you come to and paste the following code in its place
    Code:
    .locals 9
    
        .prologue
        const v8, [B][COLOR="Red"]0x7f080002
    [/COLOR][/B]
        const/4 v5, 0x2
    
        const/4 v7, 0x1
    
        const/4 v6, 0x0
    
    
        .line 92
        invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/DateView;->getContext()Landroid/content/Context;
    
        move-result-object v0
    
    
        .line 93
        .local v0, context:Landroid/content/Context;
        new-instance v3, Ljava/util/Date;
    
        invoke-direct {v3}, Ljava/util/Date;-><init>()V
    
    
        .line 94
        .local v3, now:Ljava/util/Date;
        const-string v4, "EEE"
    
        invoke-static {v4, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Date;)Ljava/lang/CharSequence;
    
        move-result-object v2
    
    
        .line 95
        .local v2, dow:Ljava/lang/CharSequence;
        invoke-static {v0}, Landroid/text/format/DateFormat;->getLongDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
    
        move-result-object v4
    
        invoke-virtual {v4, v3}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
    
        move-result-object v1
    
    
        .line 98
        .local v1, date:Ljava/lang/CharSequence;
        sget-boolean v4, Lcom/android/systemui/statusbar/StatusBar;->useTouchWizGUI:Z
    
        if-eqz v4, :cond_1
    
        .line 99
        sget-boolean v4, Lcom/android/systemui/statusbar/StatusBar;->canStatusBarHide:Z
    
        if-eqz v4, :cond_0
    
        .line 100
    
        new-array v4, v5, [Ljava/lang/Object;
    
        aput-object v1, v4, v6
    
        aput-object v2, v4, v7
    
        invoke-virtual {v0, v8, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
    
        move-result-object v4
    
        invoke-virtual {p0, v4}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V
    
        .line 108
        :goto_0
        return-void
    
        .line 102
    	
        :cond_0
        const v4, [B][COLOR="red"]0x7f080003
    [/COLOR][/B]
        new-array v5, v5, [Ljava/lang/Object;
    
        aput-object v2, v5, v6
    
        aput-object v1, v5, v7
    
        invoke-virtual {v0, v4, v5}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
    
        move-result-object v4
    
        invoke-virtual {p0, v4}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V
    
        goto :goto_0
    
    
        .line 105
        :cond_1
    
    
        new-array v4, v5, [Ljava/lang/Object;
    
        aput-object v2, v4, v6
    
        aput-object v1, v4, v7
    
        invoke-virtual {v0, v8, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
    
        move-result-object v4
    
        invoke-virtual {p0, v4}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V
    
        goto :goto_0
    .end method

    Pay attention to the code above in RED. Those ID's must match up to the date ID's in your res/values/public.xml. If they dont you will need to change them.

    Since this will also change the layout of the date in your dropdown menu, you may want to delete the date reference from there. If you do, this is how you delete it

    Navigate to res/layout/tw_status_bar_expanded

    Find the code that begins with the following and delete the entire line
    Code:
    <com.android.systemui.statusbar.policy.DateView


    Thats it, recompile, chmod 644, and push to /system/app.


    Hit the thanks button if this has been helpful to you!