[MOD/Tutorial] Lockscreen clock fonts and how-to

Search This thread

itiskonrad

Senior Member
Dec 5, 2009
361
307
Google Pixel 6 Pro
*This is only for the stock, non-deodexed Gingerbread rom for the Nitro. If you want to apply this mod to a particular rom, let me know and I can apply it to it.*


**TYPICAL DISCLAIMER: I am not a dev, just a guy messing with this phone and sharing my experiences, so try anything I suggest at your own risk and protect yourself with lots of backups! And if you have any questions at ALL, please ask before trying something that could hurt your very expensive phone! =) **

For those of you obsessed with the minor cosmetics of android (or for those of you who just can't get enough of ICS), you may have noticed that changing the lockscreen font to whatever you want is much harder than in other usual android roms. Ordinarily, all you have to do is find a font you like (*.ttf format), rename it to Clockopia.ttf and plop it into /system/fonts in your phone, and voila, lockscreen clock changed. Unfortunately, LG modified the rom so that it doesn't use Clockopia.ttf for the lockscreen font at all. It just uses whatever system-wide font is being utilized at the time, making it impossible to have, for example, an Ice Cream Sandwich style font setup, with roboto font for the phone and the ICS lockscreen font for the clock (which is actually quite different looking from roboto). Well, I, for one, couldn't stand for that, so I found the settings in framework.odex, deodexed it, changed the settings to use Clockopia.ttf for the lockscreen and re-odexed it back. Now, trying out different fonts is as simple as swapping in a new *.ttf. For example:

Default clockopia font (included in attached zip)
clockopia.png


Ice Cream Sandwich lockscreen font (included in attached zip)
ICS.png


Gothic font I imported (included in attached zip)
centurygothic.png


Here's what you'll need to apply this mod:

1.) 7zip for your computer
2.) root explorer (with root access) for your phone

Here's what to do:

1.) BACK UP EVERYTHING FIRST! With clockworkmod and titanium and anything else you use! Any time you mess with system files, always backup everything first! In particular, back up "framework.odex" and "framework-res.apk" from your phone's /system/framework/ folder somewhere safe so that you can revert back to the original versions if you like.

2.) From attached "framework.zip" file, copy the framework.odex file to /system/ folder of your phone using root explorer.

3.) Using root explorer, change permissions of framework.odex to Owner: read write, Group: read, Others: read.

4.) Now that it has correct permissions, move framework.odex into /system/framework of your phone, letting it overwrite your original odex

5.) Restart your phone.

If everything went as expected, your lockscreen will now show the standard clockopia font shown in the first image above. (If you are using the pattern lockscreen, the clock will be slightly cut off at the top. To fix this we will move on to step 6)

6.) Pick which ONE "fixed clock" xml you want from the attached files. If you just want to fix the clock being cut off, choose "fixed clock - stock." However, if you want to also remove (or had already removed) the emergency call button or the carrier on the lockscreen as well, pick those files instead.

7.) Copy framework-res.apk from /system/framework to your computer

8.) Right click framework-res.apk on your computer, choose 7zip, "open archive", and navigate to res/layout folder with all the XMLs in it

9.) Drag and drop the keyguard_screen_unlock_portrait.xml in the "fixed clock" zip you chose into the open archive of framework-res.apk, and let it overwrite the original xml in res/layout

10.) Move framework-res.apk back onto your phone. Using root explorer, move it to /system/, change permissions to Owner: read write, Group: read, Others: read.

11.) Now that it has correct permissions, move framework-res.apk back into /system/framework and let it overwrite the original framework-res.apk.

12.) Restart your phone!

13.) Pick whichever of the attached Clockopia fonts (including ICS) (or pick one from your computer or off the web), move it into /system/, change permissions of the font file to Owner: read write, Group: read, Others: read, and then move it into /system/fonts, overwriting the original Clockopia.ttf. (You may have to restart your phone after changing fonts for it to adjust to the new font properly).

Now if you want to change the lockscreen clock font, just swap Clockopia.ttf in /system/fonts to whatever you want (making sure to always use proper permissions). Always paste system files INCLUDING FONTS into /system/, then change permissions to Owner: read write, Group: read, Others: read, and THEN move into their proper places, overwriting the originals. NEVER try to change permissions after replacing. It probably won't end well =)

*NOTE: if you want to import fonts from windows or online or where ever, note that simply renaming the *.ttf to Clockopia.ttf and putting it into /system/fonts will result in weird spacing issues, as it does on any typical android device when swapping Clockopias. The original Clockopia.ttf font file has unique spacing for android. For importing other fonts, I suggest using wonderful font-editing freeware programs like Type Light to modify your original Clockopia.ttf by copying and pasting individual glyphs from whatever font you want over those in the original Clockopia.ttf from your phone, and then saving this as your new Clockopia.ttf. This will preserve the proper spacing, though you may still have to tweak it some, just depending on the font you're trying to import. The good news is Clockopia only has characters 0-9, :, A, M, and P, so copying and pasting these 14 characters from another font into Clockopia.ttf doesn't take too long =)
 

Attachments

  • framework.zip
    3.9 MB · Views: 475
  • Clockopias.zip
    11.8 KB · Views: 1,127
Last edited:

itiskonrad

Senior Member
Dec 5, 2009
361
307
Google Pixel 6 Pro
Font changers won't allow you to change the lock screen font without also changing the font of your phone system wide due to the way lg modified the os. This allows you to detach the lockscreen font from the rest of the phone like it normally is on stock Android os.
 

kernelpan1c

Retired Ep1c Sysadmin
Jan 6, 2010
1,101
313
California
Font changers won't allow you to change the lock screen font without also changing the font of your phone system wide due to the way lg modified the os. This allows you to detach the lockscreen font from the rest of the phone like it normally is on stock Android os.

Nice work!

Sent from my LG Nitro HD
 

itasoulas

Senior Member
Nov 3, 2011
2,215
4,502
Athens
www.youtube.com
can someone speficy on the following lines what to do in order to hide carrier label from lockscreen? thanks

<TextView android:textAppearance="?textAppearanceMedium"
android:ellipsize="marquee" android:gravity="bottom|right|center"
android:id="@id/carrier" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="8.0dip"
android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip"
android:singleLine="true" android:layout_toRightOf="@id/time"
android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
 
Last edited:

itiskonrad

Senior Member
Dec 5, 2009
361
307
Google Pixel 6 Pro
can someone speficy on the following lines what to do in order to hide carrier label from lockscreen? thanks

<TextView android:textAppearance="?textAppearanceMedium"
android:ellipsize="marquee" android:gravity="bottom|right|center"
android:id="@id/carrier" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="8.0dip"
android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip"
android:singleLine="true" android:layout_toRightOf="@id/time"
android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
Easiest way I can think of, I would just switch

layout_height="wrap_content"

to

layout_height="0.0dip"


You might also try changing layout_width to "0.0dip", but I think swapping layout_height would have less likelihood of messing with spacing of other stuff
 
  • Like
Reactions: itasoulas

itiskonrad

Senior Member
Dec 5, 2009
361
307
Google Pixel 6 Pro
That sucks. Make sure you're looking at the right xml for what you want to change. That's all I changed to get rid of the carrier in my lockscreen, but then I changed that setting in the keyguard_screen_unlock_portrait xml, and it gets rid of the carrier in the pattern lockscreen. The non-pattern lockscreen obviously uses a different xml, so that setting will have to be changed there.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    *This is only for the stock, non-deodexed Gingerbread rom for the Nitro. If you want to apply this mod to a particular rom, let me know and I can apply it to it.*


    **TYPICAL DISCLAIMER: I am not a dev, just a guy messing with this phone and sharing my experiences, so try anything I suggest at your own risk and protect yourself with lots of backups! And if you have any questions at ALL, please ask before trying something that could hurt your very expensive phone! =) **

    For those of you obsessed with the minor cosmetics of android (or for those of you who just can't get enough of ICS), you may have noticed that changing the lockscreen font to whatever you want is much harder than in other usual android roms. Ordinarily, all you have to do is find a font you like (*.ttf format), rename it to Clockopia.ttf and plop it into /system/fonts in your phone, and voila, lockscreen clock changed. Unfortunately, LG modified the rom so that it doesn't use Clockopia.ttf for the lockscreen font at all. It just uses whatever system-wide font is being utilized at the time, making it impossible to have, for example, an Ice Cream Sandwich style font setup, with roboto font for the phone and the ICS lockscreen font for the clock (which is actually quite different looking from roboto). Well, I, for one, couldn't stand for that, so I found the settings in framework.odex, deodexed it, changed the settings to use Clockopia.ttf for the lockscreen and re-odexed it back. Now, trying out different fonts is as simple as swapping in a new *.ttf. For example:

    Default clockopia font (included in attached zip)
    clockopia.png


    Ice Cream Sandwich lockscreen font (included in attached zip)
    ICS.png


    Gothic font I imported (included in attached zip)
    centurygothic.png


    Here's what you'll need to apply this mod:

    1.) 7zip for your computer
    2.) root explorer (with root access) for your phone

    Here's what to do:

    1.) BACK UP EVERYTHING FIRST! With clockworkmod and titanium and anything else you use! Any time you mess with system files, always backup everything first! In particular, back up "framework.odex" and "framework-res.apk" from your phone's /system/framework/ folder somewhere safe so that you can revert back to the original versions if you like.

    2.) From attached "framework.zip" file, copy the framework.odex file to /system/ folder of your phone using root explorer.

    3.) Using root explorer, change permissions of framework.odex to Owner: read write, Group: read, Others: read.

    4.) Now that it has correct permissions, move framework.odex into /system/framework of your phone, letting it overwrite your original odex

    5.) Restart your phone.

    If everything went as expected, your lockscreen will now show the standard clockopia font shown in the first image above. (If you are using the pattern lockscreen, the clock will be slightly cut off at the top. To fix this we will move on to step 6)

    6.) Pick which ONE "fixed clock" xml you want from the attached files. If you just want to fix the clock being cut off, choose "fixed clock - stock." However, if you want to also remove (or had already removed) the emergency call button or the carrier on the lockscreen as well, pick those files instead.

    7.) Copy framework-res.apk from /system/framework to your computer

    8.) Right click framework-res.apk on your computer, choose 7zip, "open archive", and navigate to res/layout folder with all the XMLs in it

    9.) Drag and drop the keyguard_screen_unlock_portrait.xml in the "fixed clock" zip you chose into the open archive of framework-res.apk, and let it overwrite the original xml in res/layout

    10.) Move framework-res.apk back onto your phone. Using root explorer, move it to /system/, change permissions to Owner: read write, Group: read, Others: read.

    11.) Now that it has correct permissions, move framework-res.apk back into /system/framework and let it overwrite the original framework-res.apk.

    12.) Restart your phone!

    13.) Pick whichever of the attached Clockopia fonts (including ICS) (or pick one from your computer or off the web), move it into /system/, change permissions of the font file to Owner: read write, Group: read, Others: read, and then move it into /system/fonts, overwriting the original Clockopia.ttf. (You may have to restart your phone after changing fonts for it to adjust to the new font properly).

    Now if you want to change the lockscreen clock font, just swap Clockopia.ttf in /system/fonts to whatever you want (making sure to always use proper permissions). Always paste system files INCLUDING FONTS into /system/, then change permissions to Owner: read write, Group: read, Others: read, and THEN move into their proper places, overwriting the originals. NEVER try to change permissions after replacing. It probably won't end well =)

    *NOTE: if you want to import fonts from windows or online or where ever, note that simply renaming the *.ttf to Clockopia.ttf and putting it into /system/fonts will result in weird spacing issues, as it does on any typical android device when swapping Clockopias. The original Clockopia.ttf font file has unique spacing for android. For importing other fonts, I suggest using wonderful font-editing freeware programs like Type Light to modify your original Clockopia.ttf by copying and pasting individual glyphs from whatever font you want over those in the original Clockopia.ttf from your phone, and then saving this as your new Clockopia.ttf. This will preserve the proper spacing, though you may still have to tweak it some, just depending on the font you're trying to import. The good news is Clockopia only has characters 0-9, :, A, M, and P, so copying and pasting these 14 characters from another font into Clockopia.ttf doesn't take too long =)
    1
    can someone speficy on the following lines what to do in order to hide carrier label from lockscreen? thanks

    <TextView android:textAppearance="?textAppearanceMedium"
    android:ellipsize="marquee" android:gravity="bottom|right|center"
    android:id="@id/carrier" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:layout_marginLeft="8.0dip"
    android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip"
    android:singleLine="true" android:layout_toRightOf="@id/time"
    android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
    Easiest way I can think of, I would just switch

    layout_height="wrap_content"

    to

    layout_height="0.0dip"


    You might also try changing layout_width to "0.0dip", but I think swapping layout_height would have less likelihood of messing with spacing of other stuff