Monday, September 5, 2016

[TUT][CM12.1] Adding Xperia Lockscreen Clock Style to CM12.1 SystemUI

I want to share how I add Xperia lockscreen clock style including analog, vertical, & horizontal clock to CM12.1 (or other rom based on it)

REQUIREMENT:
Before applying this guide, u have to:
- Know how to decompile, recompile, sign apk
- Know how to compare xml & smali
- Use this Sony fonts
- Apply this guide & this

STEPS:
SystemUI.apk
- Apply this
- Decompile SystemUI.apk
- Download attachment, merge to decompiled SystemUI.apk
- Open /res/values/styles.xml, add this
PHP Code:

    <style name="502_hour">
        <
item name="android:textSize">114.0dip</item>
        <
item name="android:fontFamily">x-sst-medium</item>
    </
style>
    <
style name="502_minute">
        <
item name="android:textSize">114.0dip</item>
        <
item name="android:fontFamily">x-sst-ultralight</item>
    </
style>
    <
style name="511">
        <
item name="android:textSize">114.0dip</item>
        <
item name="android:fontFamily">x-sst</item>
    </
style>
    <
style name="601">
        <
item name="android:textSize">114.0dip</item>
        <
item name="android:fontFamily">x-sst-light</item>
    </
style>
    <
style name="502h_hour">
        <
item name="android:textSize">88.0dip</item>
        <
item name="android:fontFamily">x-sst-medium</item>
    </
style>
    <
style name="502h_minute">
        <
item name="android:textSize">88.0dip</item>
        <
item name="android:fontFamily">x-sst-ultralight</item>
    </
style>
    <
style name="511h">
        <
item name="android:textSize">88.0dip</item>
        <
item name="android:fontFamily">x-sst</item>
    </
style>
    <
style name="601h">
        <
item name="android:textSize">88.0dip</item>
        <
item name="android:fontFamily">x-sst-light</item>
    </
style

- Recompile it
- Decompile again
- Open /res/values/public.xml
- Open /smali/com/dhian/clock/AnalogClock.smali, change id's with urs
Quote:

Line 132: const v3, 0x7f0204ba <public type="drawable" name="somc_themeable_analog_clock_face" id="
Line 141: const v3, 0x7f0204bb <public type="drawable" name="somc_themeable_analog_clock_hour_hand" id="
Line 150: const v3, 0x7f0204bc <public type="drawable" name="somc_themeable_analog_clock_minute_hand" id="
Line 159: const v3, 0x7f0204bd <public type="drawable" name="somc_themeable_analog_clock_second_hand" id="
- Open /smali/com/dhian/clock2/AnalogClock.smali, change id's with urs
Quote:

Line 132: const v3, 0x7f02030e <public type="drawable" name="plain_dial" id="
Line 141: const v3, 0x7f0204c0 <public type="drawable" name="plain_hour" id="
Line 150: const v3, 0x7f0204c1 <public type="drawable" name="plain_minute" id="
Line 159: const v3, 0x7f0204c2 <public type="drawable" name="plain_second" id="
- Open /smali/com/dhian/clock3/AnalogClock.smali, change id's with urs
Quote:

Line 132: const v3, 0x7f0204c5 <public type="drawable" name="xplain_dial" id="
Line 141: const v3, 0x7f0204c8 <public type="drawable" name="xplain_hour" id="
Line 150: const v3, 0x7f0204c9 <public type="drawable" name="xplain_minute" id="
Line 159: const v3, 0x7f0204ca <public type="drawable" name="xplain_second" id="
- Save all changes
- Recompile, sign, push

NEXT TO POST #2



from xda-developers http://ift.tt/2c999FS
via IFTTT

No comments:

Post a Comment