LG decided to switch to their own Roboto-like font for Lollipop. All of the Roboto fonts are actually still on the phone and all that is needed to get them back is a simple edit to an xml file. The file in question is /system/etc/fonts_lge.xml. Here are the contents of that file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
Added System Default Fonts Family.
-->
<familyset version="22">
<alias name="newlggothic" to="sans-serif" />
<family name="lgtravel">
<font weight="400" style="normal">HYTravel_Regular.ttf</font>
<font weight="700" style="normal">HYTravel_Bold.ttf</font>
</family>
<family name="hyfonxrain">
<font weight="400" style="normal">HYFoxrain_Regular.ttf</font>
<font weight="700" style="normal">HYFoxrain_Bold.ttf</font>
</family>
<family name="hycoffee">
<font weight="400" style="normal">HYCoffee_Regular.ttf</font>
<font weight="700" style="normal">HYCoffee_Bold.ttf</font>
</family>
<family name="hypure">
<font weight="400" style="normal">HYPureWhite_Regular.ttf</font>
<font weight="700" style="normal">HYPureWhite_Bold.ttf</font>
</family>
<family name="lgserif">
<font weight="400" style="normal">HYSerif_Regular.ttf</font>
<font weight="700" style="normal">HYSerif_Bold.ttf</font>
</family>
</familyset>
You need to add a new family element for Roboto (or any other font you would like to use).
Code:
<family name="roboto">
<font weight="400" style="normal">Roboto-Regular.ttf</font>
<font weight="700" style="normal">Roboto-Bold.ttf</font>
</family>
I don't know how to make a flash-able zip, but you can update the file with a few adb commands.
Code:
adb push fonts_lge.xml /sdcard/
adb shell
su
cp /sdcard/fonts_lge.xml /etc/
exit
exit
adb reboot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I tried this with a few fonts to make sure it works without any problems. One thing I noticed is that the NewSmartGothic font looks identical to Roboto. I suspect this is because of the alias at the top of the file. The sans-serif family is defined in the /etc/fonts.xml as:
Code:
<!-- first font is default -->
<family name="sans-serif">
<font weight="100" style="normal">Roboto-Thin.ttf</font>
<font weight="100" style="italic">Roboto-ThinItalic.ttf</font>
<font weight="300" style="normal">Roboto-Light.ttf</font>
<font weight="300" style="italic">Roboto-LightItalic.ttf</font>
<font weight="400" style="normal">Roboto-Regular.ttf</font>
<font weight="400" style="italic">Roboto-Italic.ttf</font>
<font weight="500" style="normal">Roboto-Medium.ttf</font>
<font weight="500" style="italic">Roboto-MediumItalic.ttf</font>
<font weight="900" style="normal">Roboto-Black.ttf</font>
<font weight="900" style="italic">Roboto-BlackItalic.ttf</font>
<font weight="700" style="normal">Roboto-Bold.ttf</font>
<font weight="700" style="italic">Roboto-BoldItalic.ttf</font>
</family>
Hope this helps!
Is there any way to get the LG home theme settings back as well? It has to be there. I have no idea why this was left out for the sprint lollipop G2 update ?
EROMITLAB said:
Is there any way to get the LG home theme settings back as well? It has to be there. I have no idea why this was left out for the sprint lollipop G2 update
Click to expand...
Click to collapse
I'm not sure. I haven't looked into it. I never messed with the home theme on KK as I was using LiquidSmooth for KK.
Related
I always hated the static wifi icon that is displayed in the notification bar so I set out to change it with a simple 6 step animated icon.
The original framework-res.apk contains 5 wifi icons for the different signal levels.
and they are named stat_sys_wifi_signal_0.png to stat_sys_wifi_signal_4.png and can be found in the res/drawable-hdpi and res/drawable-mdpi folders within the framework-res.apk
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
stat_sys_wifi_signal_0.png is not very useful so we'll keep that one a static icon.
stat_sys_wifi_signal_1.png to stat_sys_wifi_signal_4.png are going to be replaced by a set of 6 icons that will show a nice animation.
So now that we have a the graphics comes the hard part, how do we get these into the framework-res.apk as an animation.
The answer is, with XML files.
We need to create an xml file for each animated set and they have to have the same name as the original icons except for the extension.
So for the stat_sys_wifi_signal_1.png we create an xml file with the name stat_sys_wifi_signal_1.xml and place it in the res/drawable directory.
The content of the xml file is here below.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim0" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim1" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim2" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim3" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim4" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim5" />
</animation-list>
Some explanation about the content, this line
Code:
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim0" />
it tells the system to show the icon stat_sys_wifi_signal_1_anim0.png for 200ms (mili-seconds) and then go to the next line.
The full set of icons and xml files can be downloaded here
To re-compile the framework-res.apk you can use this
Happy modding.
Other animated Icons
Download Sync Animation
Download Upload Download Animation
wdl1908 said:
Reserved for future use.
Click to expand...
Click to collapse
Great!
Just recompile the apk after modding and install it?
Lennb said:
Great!
Just recompile the apk after modding and install it?
Click to expand...
Click to collapse
Yes I'v added a link to a frameworkrebuiler script in the first post.
wdl1908 said:
Yes I'v added a link to a frameworkrebuiler script in the first post.
Click to expand...
Click to collapse
Thank you!
Added some extra animated icons in second post.
very funny !
thanks
thanks
How would set up xml file for your data animation? What would you call it. Im trying to get http://forum.xda-developers.com/showthread.php?t=846825 to work for my lf g2x I have settingSU and framework Ive manged to compile new icons for battery,download,wifi but getting the animations to show is driving me crazy
cleanmydirt said:
How would set up xml file for your data animation? What would you call it. Im trying to get http://forum.xda-developers.com/showthread.php?t=846825 to work for my lf g2x I have settingSU and framework Ive manged to compile new icons for battery,download,wifi but getting the animations to show is driving me crazy
Click to expand...
Click to collapse
What is the name of the icons you are trying to change?
You have to make an xml file with the same name and use other names for the icons that will do the animation.
How to add the Lockscreen Text to any lockscreen.
As most know I have implemented this feature inside the Touchwiz Resurrection rom for galaxy ace i.
As seen below.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Basicly this mod was very easy to add .
What is inside the resources.zip ?
LifeCompanionText.apk ( App to change the text )
LifeCompanion smalis for the framework.jar
SpaceFont.ttf for the CoolJazz font from S3/4
Basicly what you would need to do is:
Download Resources Attachement.
Extract it
Decompile you’re framework.jar
Go to the extract smali folder from the resources.zip and copy the smali folder to the smali folder of you’re framework.jar.
Compile framework.jar
Now we are going to add it to the frameworks location/allocate the text.
Decompile framework-res.apk
Find a lockscreen layout to you’re likes.
I used “zzz_keyguard_screen_clockwidget.xml” but you would be able to put it inside : “keyguard_screen_tab_unlock.xml” for the normal sliding tab lockscreen and such.
Open the layout you wanted and simply add this line above the clock layout or where you want
Code:
<com.touchwizres.lifecompaniontext.LifeCompanionTextView android:textSize="40.0dip" android:textColor="#ffffffff" android:id="[COLOR="RoyalBlue"]@id/life_companion_tag[/COLOR]" android:layout_width="wrap_content" android:layout_height="wrap_content" android:shadowColor="#7f000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="2.0" />
I placed this code just below
Code:
<view android:gravity="left" android:orientation="vertical" android:id="@id/clock_time_and_date" android:paddingLeft="7.0dip" android:paddingTop="2.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" class="com.android.internal.policy.impl.ClockWidget$TimeAndDate">
of the "zzz_keyguard_screen_clockwidget.xml"
Add this to the ids.xml
Code:
<item type="id" name="[COLOR="RoyalBlue"]life_companion_tag[/COLOR]">false</item>
Compile framework-res.apk
Decompile ur compiled framework-res.apk
Now we are going to fix the ID Values. From the smali .
Decompile ur compiled framework.jar
Open
Code:
com/touchwizres/lifecompaniontext/[COLOR="RoyalBlue"]LifeCompanionTextView.smali[/COLOR]
that’s inside the framework.jar
Find
Code:
const v3, 0x[COLOR="Red"]10202cc[/COLOR]
This is the “life_companion_tag” ID (
Code:
<public type="id" name="life_companion_tag" id="0x0[COLOR="Red"]10202cc[/COLOR]" />
) inside public.xml
We need to fix this to yours
Now when u have changed the code from 0x10202cc to something like 0x1020299 or something depends on ur framework-res.apk
U can compile the framework.jar
Now zip the files together and make sure these are set properly.
SpaceFont.ttf inside /system/fonts/**
LifeCompanionText.apk inside /system/apps/**
And then ofcourse you’re modified framework.jar and framework-res.apk inside /system/framework/**
Now you are done
Happy modding
On what roms can u apply this mod ?
Basicly it can be applied to ALL Roms atleast if u know what u are doing.
As Most of you all know i am a HUGE HUGE Open Source fan so in this case i fully opensourced this aswell
Here is the sourcecode: https://github.com/spacecaker/LifeCompanionLockscreentext
Import in Eclipse.
Compile app.
Export unsigned apk.
Sign apk.
Decompile apk.
Retrieve ur smali codes.
Implement in framework
Some helpers who helped me on some knowledge and ideas:
B16H22
MarioZaWa
Pineappleowl
and testers
thanks sir for your guide
sir i want to know how to port Samsunng default clockwidget to our Non tw device.
i ported but not getting hour and minute pngs
How to remove? Keep getting infinite boot whenever I remove it..
Works well.But after reboot,the text will back to"life companion".How to fix?
Android小楼阁-QQ群 439637151
来自搭载Android 2.3 GingerBread的华为Y220-T10
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'm using gravitybox to make other modifications in the image above. But it cant remove SIM number so i use this mod
This Mod Remove Sim number, from statusbar. Works on lockscreen and un-locked screen
Instructions:
Do It Yourself
This can be done to any systemUI Of Lollipop...
1° Copy yours SystemUI.apk and framework-res.apk to PC put in a safe place and do not change these files...
Framework-res.apk is in /system/framework
SystemUI.apk is in /system/priv-app/SystemUI
Make a copy of these files and decompile SystemUI.apk using:
[TOOL] V4.0.3-xdaAutoTool ALL-Win | V5.0.0b-xdaautoAPKTool | V1.0.3-xdaautoDeoTool
To decompile and recompile follow the instructions detailed in the Thread above
change two lines in systemui.apk res/layout/signal_cluster_view.xml as follows
Open XML file with notepad
original
<TextView android:layout_gravity="bottom|center|right" android:id="@id/mobile_phone_label" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/TextAppearance.StatusBar.SimLabel" />
<TextView android:layout_gravity="bottom|center|right" android:id="@id/mobile_phone_label_2" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/TextAppearance.StatusBar.SimLabel" />
changed
* change what is in RED
<TextView android:layout_gravity="bottom|center|right" android:id="@id/mobile_phone_label" android:layout_width="0.0dip" android:layout_height="0.0dip" style="@style/TextAppearance.StatusBar.SimLabel" />
<TextView android:layout_gravity="bottom|center|right" android:id="@id/mobile_phone_label_2" android:layout_width="0.0dip" android:layout_height="0.0dip" style="@style/TextAppearance.StatusBar.SimLabel" />
After the change save the XML file, recompile and Sign the apk using the tool, replace it on the phone...
To easy replace it on the phone, just replace yours MOD SystemUI.apk in the ZIP attach, flash it and tested...
If some goes wrong, replace yours original untouched SystemUI.apk in the ZIP attach and flash it...
FLASHABLE zip:
Flash the zip (SystemUI-xt1069-5.0.2-Mod.zip) on recovery, reboot and test
if something goes wrong, use the file (SystemUI-xt1069-5.0.2-Default.zip) to restore...
!!! This zip only works on android 5.0.2 XT1069 22.21.28
This version:
But if you follow the Instructions Do It Yourself, can be made to any SystemUI...
Do a full backup before
I'm not responsible for any phone brick
if you can not do it yourself, provide me with your SystemUI and framework-res.apk that I make modifications, and make a flash zip to you...
I do not have much time left so it may take up to 48 hours for me to do it...
Credits to creators of thread and and those who helped them...
[MOD][XT1033] Remove carrier label and SIM numbers for statusbar[Do-It-Yourself]
[MOD][5.0] Center clock for stock Android Lollipop
[TOOL] V4.0.3-xdaAutoTool ALL-Win | V5.0.0b-xdaautoAPKTool | V1.0.3-xdaautoDeoTool
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
My English is a little weak, drafting errors may occur.
Hi there. Old dilemma on how to expand the number of Android phones into a pre-made fonts (4-6-8 pieces which normally used to be) just a piece of your favorite font, or even at 20-40. There are several possibilities for this already; flash recovery from flash zip from the XDA,fonts changer applications in the Play Store, etc, etc. Our current solution for our good, that we can not install the fonts chosen by the type and number of pieces of others, but what we want, and as much as we want. Lollipop and KitKat operating system as well, so far I have tested LG phones. I did not feel harmful slowdowns or system errors after 30-40 font. Finding the appropriate fonts on the Internet will take much more time than the change itself. TTF fonts look for.
What it needs for this operation:
1: Root
2: Root file manager
3: Notepad ++
4: A new font or fonts lack, and a few minutes of your life
By default it looks something like the font selection menu, depending on your phone / rom 4-10 pieces chosen from the letter:
After the change is then this:
Take the letter or letters you want to use a file manager to copy the system / fonts folder, and then modify the permissions to this: rw- r-- r--. If you enter more letters copying, modification group should be done faster. Feel free to highlight all the letters as well. Do not just folders, folder if the fonts folder.
Now, you can edit the file fonts_lge.xml, which is located in the system / etc folder. Because even copying the letters in the fonts folder, depending on the system still will not see it, but after editing this file.
Notepad ++ looks like the original xml file's:
After the change this way:
As you can see, but that's all that we need so that we insert name of copied letters:
<family name="Arial">
<font weight="400" style="normal">arial.ttf</font>
<font weight="700" style="normal">arialbd.ttf</font>
<font weight="400" style="italic">arialbi.ttf</font>
<font weight="700" style="italic">ariali.ttf</font>
</family>
Since the type arial four species were also found, (normal, bold, italic, bold italic) should therefore enter and inserted into the original xml file. But where there are only two (normal, bold), there's this:
<family name="Tahoma">
<font weight="400" style="normal">tahoma.ttf</font>
<font weight="700" style="normal">tahomabd.ttf</font>
</family>
Which entries are nothing but a plain ttf, there is this:
<family name="Hwedding">
<font weight="400" style="normal">hwedding.ttf</font>
<font weight="700" style="normal">hwedding.ttf</font>
</family>
It may find that some letters than we can find only three kinds of (normal, bold, italic), the more so, enter:
<family name="Garamond">
<font weight="400" style="normal">GARA.ttf</font>
<font weight="700" style="normal">GARABD.ttf</font>
<font weight="400" style="italic">GARAIT.ttf</font>
</family>
The editing syntax pay attention to the layout, images and Notepad ++ help him. When you are done, you copy the modified xml file in the system / etc folder, but not before the original file, create a backup or just rename example fonts_lge.xm away. The new set fonts_lge.xml file permissions: rw-r--r--.
Here you only need to reboot the phone, and if everything went well, the letters appear. It is not hard on the whole, it can be done in a few minutes, and you can use any fonts out what we want .... enjoy ....
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
My English is a little weak, drafting errors may occur.
Hi there. Old dilemma on how to expand the number of Android phones into a pre-made fonts (4-6-8 pieces which normally used to be) just a piece of your favorite font, or even at 20-40. There are several possibilities for this already; flash recovery from flash zip from the XDA,fonts changer applications in the Play Store, etc, etc. Our current solution for our good, that we can not install the fonts chosen by the type and number of pieces of others, but what we want, and as much as we want. Lollipop and KitKat operating system as well, so far I have tested LG phones. I did not feel harmful slowdowns or system errors after 30-40 font. Finding the appropriate fonts on the Internet will take much more time than the change itself. TTF fonts look for.
What it needs for this operation:
1: Root
2: Root file manager
3: Notepad ++
4: A new font or fonts lack, and a few minutes of your life
By default it looks something like the font selection menu, depending on your phone / rom 4-10 pieces chosen from the letter:
After the change is then this:
Take the letter or letters you want to use a file manager to copy the system / fonts folder, and then modify the permissions to this: rw- r-- r--. If you enter more letters copying, modification group should be done faster. Feel free to highlight all the letters as well. Do not just folders, folder if the fonts folder.
Now, you can edit the file fonts_lge.xml, which is located in the system / etc folder. Because even copying the letters in the fonts folder, depending on the system still will not see it, but after editing this file.
Notepad ++ looks like the original xml file's:
After the change this way:
As you can see, but that's all that we need so that we insert name of copied letters:
<family name="Arial">
<font weight="400" style="normal">arial.ttf</font>
<font weight="700" style="normal">arialbd.ttf</font>
<font weight="400" style="italic">arialbi.ttf</font>
<font weight="700" style="italic">ariali.ttf</font>
</family>
Since the type arial four species were also found, (normal, bold, italic, bold italic) should therefore enter and inserted into the original xml file. But where there are only two (normal, bold), there's this:
<family name="Tahoma">
<font weight="400" style="normal">tahoma.ttf</font>
<font weight="700" style="normal">tahomabd.ttf</font>
</family>
Which entries are nothing but a plain ttf, there is this:
<family name="Hwedding">
<font weight="400" style="normal">hwedding.ttf</font>
<font weight="700" style="normal">hwedding.ttf</font>
</family>
It may find that some letters than we can find only three kinds of (normal, bold, italic), the more so, enter:
<family name="Garamond">
<font weight="400" style="normal">GARA.ttf</font>
<font weight="700" style="normal">GARABD.ttf</font>
<font weight="400" style="italic">GARAIT.ttf</font>
</family>
The editing syntax pay attention to the layout, images and Notepad ++ help him. When you are done, you copy the modified xml file in the system / etc folder, but not before the original file, create a backup or just rename example fonts_lge.xm away. The new set fonts_lge.xml file permissions: rw-r--r--.
Here you only need to reboot the phone, and if everything went well, the letters appear. It is not hard on the whole, it can be done in a few minutes, and you can use any fonts out what we want .... enjoy ....