..[BRAINSTORM/IDEA]..Changeable fonts and themes inside of a rom! - G1 Android Development

Hey all. Well i was sitting there today and i was thinking, why is it only that OpenHome, and aHome, etc. are the only programs/os's that have the ability to change the font through the settings, as well as themes ..
Now amongst the thoughts, i was thinking that it couldent be that hard to do, and it had to be open source if its android no? If i knew how to code/disect and insert i am sure that this could be inculded in some roms, and it would make those roms pwn all others.. Right?
If you guys support this .. lets make it happen. If i knew how, i would, i think all we have to do is disect Open Home and find that code, insert it into a kernal/rom and make it a feature in a rom, and than the Font Packs would work as well with annny rom, that would be the issh.

You mean like Stericson's Metamorph?
Its in the themes section.

They have flashable fonts already and in market i think.

yeah metamorph does this flawlessly.

also simple enough to do from the terminal. overwrite DroidSans.ttf and DroidSans-Bold.ttf with your chosen fonts in the /system/fonts folder and reboot. done.

there's a thread for the font....

metamorph does it all

Maybe what he is talking about is something I too would like to see... native support inside the rom a la google...

Easiest way to change your phones if you're rooted (and don't expect it to happen if you're not rooted):
Probably best done from ADB (IMHO) so you can easily recover if you happen to pick a font that borks the visibility on your phone somehow, and also keeps you from having to copy them from the SD card.
## This backs up the current font to a local directory you're in.
adb pull /system/fonts/DroidSans.ttf DroidSans.ttf
## go read-write
adb remount
## replace the font here with whatever font you want.
adb push /windows/fonts/SegoUI.ttf /system/fonts/DroidSans.ttf
## and.... reboot.
adb reboot

Related

When I try to replace the default "DroidSans.ttf" files to change, fonts, FREEEZE

When I try to replace the default "DroidSans.ttf" files to change, fonts, FREEEZE
So after reading a theme thread, I tried to change the font.
I simply took a font file I liked from my PC (a .ttf) and copied the text file and renamed them all to the default text files in the /system/fonts folder.
I didn't know which font is used for what, (DroidSans, DroidSerif, etc) so I just copied my new .ttf 5 or 6 times and renamed each copy to the old original DroidXXXX.ttf file.
However after pushing via ADB and re-booting the phone just freezes on the htc screen, so I went to default.
Is there a particular font I toyed with I shouldnt have or is the ttf not compatible?
Im running fresh 2.0d
Where did you get the .ttf's from? If they were straight from the theme thread then pull the fonts from the phone via ADB:
adb remount
adb pull /system/fonts fonts
(copy the new .ttf's over the ones pulled from the phone and make sure the names stay the same)
adb push *Directory of the font file on your computer goes here* /system/fonts
adb reboot
poor_red_neck said:
So after reading a theme thread, I tried to change the font.
I simply took a font file I liked from my PC (a .ttf) and copied the text file and renamed them all to the default text files in the /system/fonts folder.
I didn't know which font is used for what, (DroidSans, DroidSerif, etc) so I just copied my new .ttf 5 or 6 times and renamed each copy to the old original DroidXXXX.ttf file.
However after pushing via ADB and re-booting the phone just freezes on the htc screen, so I went to default.
Is there a particular font I toyed with I shouldnt have or is the ttf not compatible?
Im running fresh 2.0d
Click to expand...
Click to collapse
Well, your problem is that you changed all the default fonts names, which is NOT correct. The only two fonts that need to be changed are: DroidSans-Bold and DroidSans... DO NOT change ANY other font names, leave them the way they are.
Here's some instructions::
1) Find the font you want (Should have two variations: A regular non-bold font and another bold font).
2) Then upon opening /system/fonts folder -- you should see these two font names: DroidSans-Bold and DroidSans
3) Change the font you have chosen to the names above and then copy them over to the /system/fonts folder -- this action should prompt you to overwrite the changes, you'll say yes and that's it.
To verify that you did infact do it correctly, you can double click on the DroidSans-Bold and DroidSans and both fonts will open up (Windows only) and at the top you will see the font name -- if it matches what you've chosen, then congrats. Now all you have to do is either adb push the fonts back to your phone or the better solution, would be to create a .zip file for easier convenience and of course to share with the XDA community. Good luck.

[Guide] Hacks and mods: Three tutorials for modifying your x10 OS aesthetically

Updated: July 24/2010 Go to the X10 Theme repo for a listing of uploaded themes.
Thanks to everyone that is helping out and contributing. I also apologize if I rip anything off. If I do please post it and I will definitely correct it.
The usual disclaimer goes with this... Use at your own risk and backup your system before making any changes. You know what to do if you run into problems
I think this is important...
Links for various stuff:
framework-res.apk
/system/app/ folder
startup show (boot animation)
Mms.apk
Phonebook.apk
apps2sd-work in progress?
http://forum.xda-developers.com/showthread.php?p=7037044#post7037044
Many visual aspects of the os and system apps can be changed and surprisingly easily. By default when opening an apk you should look around the res-drawable folders for the pngs to edit. If you have noticed, there are some png's that look like xxx.9.png. To modify these files easily, remove the 9 from the filename and open with your preferred editor. When you are done editing the files save them, open the command prompt and type draw9patch. This should open a window with an arrow in it. Drag your file there and I'm pretty sure it goes into the same folder. That's it.
If you are using a mac use betterzip and take a look here.
You can also use root explorer (I havent tried this myself)
Step 1:
Connect phone to pc, enable usb debugging and open adb. Type:
adb pull /system/framework/framework-res.apk framework-res.apk
That will pull your framework-res.apk to whatever folder is displaying in your command line.
Step 2:
Find the framework-res.apk on your hard drive, right click and open with 7zip.
Step 3:
Use png's here or create your own and dump into the appropriate folder within framework-res.apk.
Step 4:
When you are done editing the files open up adb and type the following command:
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push framework-res.apk /sdcard/framework-res.apk
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
That will put the new framework-res.apk on your phone. It should automatically reboot (if not reboot it) and your changes should be applied!
When running the script above you can replace framework-res.apk with whatever you want. For example, Timescape.apk
Remember, it is CASE sensitive I made this problem many times)
If you would like to pull an entire folder put a slash at the end of the last word. For example, adb pull /system/etc /etc"/" (no " in actual script )
Courtesy of corruptfate is the steps to modify the startupshow (post #207)
step 1: open adb shell
step 2: type "adb shell"
step 3: type "su"
step 4: type "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system"
step 5: type "mkdir system/etc/semc/startupshow"
step 6: exit and redo step 1 - 4
step 7: type "mkdir system/etc/semc/startupshow/default"
step 8: exit and open command prompt again, this time type "ddms"
step 9: look for the default folder in system > etc > semc > startupshow > default
step 10: push the images into that folder
Possible reasons your phone won't boot after modifications:
images anren't stored properly, right format, right size etc.
unpacked apk improperly, use 7zip, it doesn't mess anything up
you signed the package before pushing it- unless you know what you're doing follow the directions to a tee and you should be fine
pushed the package to the wrong directory, /system/framework-res.apk XX, /system/framework/framework-res.apk
I'm sure many other reasons, these were the only ones I encountered
How to get past boot screen:
Use backup framework-res.apk and push that one to your phone. Remember to place that one where the modified one is.
To see if adb sees your phone type adb devices, if a serial number pops up try pushing your original, if not...
Flash your phone again from scratch . Sorry, I don't know any better way yet.
Please post your themes and download themes from the X10 theme repo
The basics:
http://forum.xda-developers.com/showthread.php?t=502010
http://developer.android.com/index.html
http://developer.android.com/guide/developing/device.html
Some Links:
Notification background color
Status bar clock color
Notification font color
Notification bar shortcuts
Edit 9.png's
Install mobile defense as system app through terminal (I haven't tried this yet)
Resigning apps
http://forum.xda-developers.com/showthread.php?t=549109
http://androidforums.com/developer-101/8665-how-signing-roms.html This is the one I have been using. I just noticed its for roms
http://code.google.com/p/android-apktool/ Figured it out but no need for it as of yet
How to modify notification background colors
Some of the files; not sure which is the top band displaying carrier(semc_avctivity_title.9.png??):
statusbar_background.png
status_bar_background.png
status_bar_close_on.9.png
status_bar_header_background.9.png
status_bar_item_background_normal.9.png
They should be in res/drawable-240dpi. Once you find them open them and modify as you wish. Once completed save your changes.
Getting FLAC working, I was wrong, mixed up file folders. Apparently meridian pioneer works. Havent gotten a chance to test for sure yet. I am now trying to manually add flac support to mediascape
Second tutorial: Busting open apks so you can edit xml's!!
So has anyone tried opening up an xml file on their phone to edit only to find incoherent coding. Well I have. So I have stumbled upon a tool called apktool. The tool somehow breaks down the apk into readable xml files. I haven't gotten so far as to test out an edited xml because I wanted to post this so I don't forget how to do it.
1. follow instructions on installing apktool. Unzip the files into your android-sdk-windows/tools folder
2. Put a copy of your framework-res.apk into the same tools folder
3. from command type: java -jar apktool.jar if framework-res.apk
4. Put whatever apk you want to edit into tools folder and type this: java -jar apktool.jar d xxx.apk
5. Look in your tools folder and voila there will be a folder named with whatever apk you worked with.
Third tutorial: Use smali/baksmali to edit services.jar and services.odex
1. follow instructions on downloading and installing smali/baksmali
2. pull these files from your phone and place them into the same folder as smali (should be android-sdk-windows\tools):
code.odex
ext.odex
framework.odex
android.policy.odex
There may be other ones needed that Im missing so if you find this out please let me know
3. place the odex you want to modify into the same folder (android-sdk-windows\tools)
4. from the command line type java -jar baksmali-1.2.3.jar -x services.odex
your pc will work a little bit and when its finished will just show your directory again.
5. minimize that screen and go into the folder you put everything in there should be an out folder. Open it up and all the files to edit will be there!
I haven't recompiled yet but when I do Ill finish this tutorial.
COMMON PROBLEMS:
These are some problems I ran into because I am a noob. I figure it may help a couple people out
1.unable to access apktool.jar/baksmali-1.2.3.jar
Im pretty sure you are in the wrong directory
from the command line type: cd C:\whatever\directory\leadsto\android-sdk-windows\tools\the.jarfileyouaretryingtoaccess
2....
Modification requests:
Custom boot screens-- find your startupshow folder=== SOLVED
custom response to invalid password
Ad hoc support
Disable slide lock
App drawer categorization=== THERE'S AN APP
map hardkeys
cool, gonna try and change the battery indicators
I was able to replace framework-res while the phone was running, but now the phone wont boot.. good thing I made a backup of the original one
xxsashixx said:
I was able to replace framework-res while the phone was running, but now the phone wont boot.. good thing I made a backup of the original one
Click to expand...
Click to collapse
Thats where I'm stuck too. Did you resign the package after modifying it? Im going to try that in a bit.
Does anyone know of a good n00b guide to emulating our phone in eclipse?
@microkiwi can you post how it went?
I did make some new icons in PS, but unfortunately I wasn't able to boot the phone after pushing my new files to it
I also tried to sign it with the autosign (testsign.java) application but no luck...
mikrokiwi said:
I did make some new icons in PS, but unfortunately I wasn't able to boot the phone after pushing my new files to it
I also tried to sign it with the autosign (testsign.java) application but no luck...
Click to expand...
Click to collapse
Cool thanks, hey have you seen an app called metamorph? I just noticed it right now but it seems like stericson automated and simplified the process. Heres a link
http://forum.xda-developers.com/showthread.php?t=591329
Have you tried that app yet?
Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons
Any other metamorph themes that we can install?
I think for 1.6 only
gavriel18 said:
http://code.google.com/p/android-apktool/ Looks cool I just wish I knew how to use it
Click to expand...
Click to collapse
Apktool is just for everything else but signing ;-)
mikrokiwi said:
Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons
Click to expand...
Click to collapse
Could you please upload the theme, I'd like to learn how theming works. In the AndroidThemes thread I found only themes for custom roms. THX !
mikrokiwi said:
Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons
Click to expand...
Click to collapse
Could you please post the .png files from the framework pull? I would like to change the colors and then try to replace them with files in a theme that I found that might work with our phone. The only issue is the resolution of the theme that I had in mind. If this works then we can all make custom themes for our X10 using that theme as a template. Not sure if it will work, but I would like to try.
pietropizzi said:
Could you please upload the theme, I'd like to learn how theming works. In the AndroidThemes thread I found only themes for custom roms. THX !
Click to expand...
Click to collapse
Unfortunately it does not work at the moment, but when I get it to work I will upload it for everyone to use
troyjamz said:
Could you please post the .png files from the framework pull? I would like to change the colors and then try to replace them with files in a theme that I found that might work with our phone. The only issue is the resolution of the theme that I had in mind. If this works then we can all make custom themes for our X10 using that theme as a template. Not sure if it will work, but I would like to try.
Click to expand...
Click to collapse
http://www.mediafire.com/file/kkmhmnyhgyw/framework-res.apk open it with 7zip
Thx man!
mikrokiwi said:
Unfortunately it does not work at the moment, but when I get it to work I will upload it for everyone to use
http://www.mediafire.com/file/kkmhmnyhgyw/framework-res.apk open it with 7zip
Click to expand...
Click to collapse
Tack så mycket!
@microkiwi Thanks for the upload, do you mind if I post that link in the first post?
@brut.all Does it work the same way as autosign? I followed the instructions properly on installing it but when I try to open it a command line pops up for a second (too fast for me to read) and then closes. Am I missing something?
Also do you know if framework-res.apk needs special signing? I'm just trying to figure out why the phone gets stuck at boot after pushing the modified apk.
@pietropizzi I have made one as well it doesn't work but I'll upload it right away. Check out the metamorph thread for some tutorials on theming. It is surprisingly easy.
On another note has anyone gotten to move their apps to the sdcard? I've tried but with no luck..
heres a post I made about it:
http://forum.xda-developers.com/showthread.php?p=7037044#post7037044
Cool ,I'm going to try it tonight. Mind if I add it to the list at the top?
BTW did anyone know mediascape supports wav audio Swwweeeeeetttt

[MOD] Circle Battery for Tranquility 3.0

Hi all,
So, I'm no coder, themer, whatever by any means, but I looked around, couldn't find it, and decided that I wanted it. So I created a quick mod of Tranquil.'s framework-res.apk by switching out the battery related .pngs. This is nothing special... but I figured I'd share in case someone else likes it.
Credit for original PNG's goes to Fightspit. Original thread here:
http://forum.xda-developers.com/showthread.php?t=724778
Please, please make a nandroid backup in case it hoses your phone. It shouldn't but be warned... If your phone decides to become an expensive paperweight, it's not my fault. You knew the risks (though in worst case you should still be able to sbf).
I'm attaching a screenie, and the apk. To install the apk, this is how I did it, there might be easier ways, but dunno, I like ADB so that's what I use.
1) Download the apk and put it onto the root of your sd card
2) The steps
a) open the adb shell and become root if you're not already
adb shell
b) become root
su -
c) mount /system as RW
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
d) Temporarily place file in /system/app to change permissions. I moved it here so I could change permissions before overwriting the original apk since for some reason it wouldn't let me change permissions on /sdcard, ... otherwise I guess there'd be boot loops galore
cp /sdcard/framework-res.apk /system/app/framework-res.apk
e) Change directory to where you just moved the apk
cd /system/app
f) Actually change the permissions
chmod 644 framework-res.apk
g) overwrite original apk with my changed one
mv framework-res.apk /system/framework/framework-res.apk
b) reboot phone to make changes
reboot
Let me know if you like it.
Looks really good. I was just modding my TranQ 3.0 framework-res last night myself to change the batery to the round clock. I did however use one of the other circular battery icons tho. After seeig this tho I may have to make another change to mine now.....lol.
great job, i will incorporate that into the next release.
jimmydafish said:
great job, i will incorporate that into the next release.
Click to expand...
Click to collapse
Hey, thanks man! I like it, looks good on my phone

[Q] Replace system fonts?

I would like the change the fonts (if possible), on my lockscreen clock, battery indicator, and possibly some fonts on my calwidget and beautiful widgets clock/weather widget.
Is this possible?
Let's say I find a font pack I like, called "coolfont.ttf". How would I go about doing this?
Ok, I found an app called fontchanger that works well...I only need to find fonts online and add them to the folder.
But the lockscreen clock in CM7 isn't affected. Anyone know how to change that font?
involves rooting and using a root file explorer app (ie root explorer)
yes, but does require root and TrueType fonts (ie .TTF). i personally use the Unique.ttf from Apple's Mac OS X SL and love it. has a futuristic but readable look.
System fonts are located here:
/system/fonts
I just rename the unique.ttf font to SansDroid.ttf (this is the main default system font thats used throughout the android ui). I rename the original one w/a .orig file extension before doing this. Bad fonts can cause boot loops and in turn you will have to boot to recovery mode and then use ADB Shell command to rename the original system font back or push it if you copy from your device.
link to a guide i wrote at tech-recipes.com
http://www.tech-recipes.com/rx/1057...the-default-system-font-requires-root-or-adb/
screenshots from my nexus one but same on the G2x
Hey SeaMonkey,
Where do I find the Unique.ttf?? I really like that look on your screenshots
I use Absolute System to change fonts. There are like 1000 fonts to choose from and you don't have to do any work. Just choose the font, reboot and there it is. Love it.
Sent from my LG G2x
seamonkey420 said:
yes, but does require root and TrueType fonts (ie .TTF). i personally use the Unique.ttf from Apple's Mac OS X SL and love it. has a futuristic but readable look.
System fonts are located here:
/system/fonts
I just rename the unique.ttf font to SansDroid.ttf (this is the main default system font thats used throughout the android ui). I rename the original one w/a .orig file extension before doing this. Bad fonts can cause boot loops and in turn you will have to boot to recovery mode and then use ADB Shell command to rename the original system font back or push it if you copy from your device.
link to a guide i wrote at tech-recipes.com
http://www.tech-recipes.com/rx/1057...the-default-system-font-requires-root-or-adb/
screenshots from my nexus one but same on the G2x
Click to expand...
Click to collapse
Yes, can you either upload the Unique.ttf font for us, or point us in the right direction of where we can download it? I really like that font, but can't find it anywhere.
MMAPCPRO,
After a pretty good deal of searching many of the free font sites, I'm with you.
Any help or hints, or a zipped up .ttf file would sure help on this one.
Thanks!
tjbunch1228 said:
i use absolute system to change fonts. There are like 1000 fonts to choose from and you don't have to do any work. Just choose the font, reboot and there it is. Love it.
Sent from my lg g2x
Click to expand...
Click to collapse
never knew this was there thanks
Just paid for and downloaded Absolute System.
Its AWESOME! WELL WORTH the $1.99.
Highly recommended for the font peeps in this thread.

Changing System Fonts (easy way)

I've seen posts on this topic, but nothing in one place.
This will help you to just switch out the basic overall system fonts (without any apps, aside from root explorer)...
0. (optional) using root explorer, navigate to /system/fonts and copy the current Clockopia.ttf, DroidSans-Bold.ttf, and DroidSans.ttf files to your sd card for safe-keeping (note that if you are on any custom roms, these are most likely not the actual font names - if you're curious, copy it to your computer and preview the .ttf file or just hold your cursor over the font and it should tell you the actual font name)
1. get the .ttf files that you want (maybe from here: http://forum.xda-developers.com/showthread.php?t=1194202 <-- these are font packs with a lot more stuff in there than you need - just unzip and grab the three .ttf files only) you really only need to grab the unique files - usually clockopia and droidsans are the exact same file with different names, and sometimes all three are the same when there is no actual bold type of a specific font)
2. put the .ttf files on your sd card (i have a folder with different fonts on my sd, i named the .ttf files the actual font name to keep everything straight, and copy and rename when i want to switch fonts)
3. using root explorer, copy the 3 .ttf files (or only the unique files and make additional copies as needed) to your /system folder - make sure to mount r/w first (we need to make a layover here so we can change the permissions)
4. rename the files (you could do the renaming at any stage really, just sometime before you put them in the /system/fonts folder) - change the regular font types to Clockopia and DroidSans, and the bold font type to DroidSans-Bold (that's what your system is looking for when calling fonts)
5. change permissions of the 3 files to chmod 644 (see attached pic)
6. multi-select the 3 files and MOVE (do not copy) to the /system/fonts folder. it will ask you if you want to overwrite, check the box to do it for all files, and hit ok.
7. exit. reboot. done. cheers!
Disclaimer - I am not responsible for what you do to your phone. It is advised to install the CWM on Boot mod (http://forum.xda-developers.com/showthread.php?t=1554579) before messing with any of the system files.
Thanks man, easy as pie!
Before
After
916x10 said:
Thanks man, easy as pie!
Click to expand...
Click to collapse
No prob. I learned quick after taking a misstep trying to copy them to the fonts folder w/ no cwm on boot - fc's, followed by a boot loop, followed by rsd lite... you know where this goes... anyway, i thought i'd share..
...Still not sure what all the other fonts in there do.. heck, i got no idea what the clockopia font is even for. I've changed it to different fonts separately, and notice no difference anywhere... you probably don't need to even change it. Someone else please feel free to post if you can add to the topic
Sent from my mind using XDA
Guys, I just did what I didn't suppose to and ended up in bootloop during font change! I know, am a stupid noob...
But, can't get the phone to CWM either. What should I do?
Running Victory rom if that helps. Thank you very much for the responses.
EDIT: nevermind, now I know what to do. Sorry for trolling, moderators can now delete my stupid post...
Don't beat yourself up my brother.... We've all been there.
Some, like me, more than others. That's the way I learned.
ATRIX 2 / Victory Rom
Yup - been there. And, learned from it..
Try and keep that CWM on Boot installed if you're messing around, and a backup on your sd card to restore if you start looping..
Thanks for your support guys, you're awesome
The thing is that i did have CWM on boot installed, and I did make all important backups. I just couldn't get anywhere but in regular fastboot mode only...
Anyway, RSDLite will do the thing I hope...
Thanks again boys, cheers from OZ
Back to CM7 fonts
How I can back to CM7 fonts or reinstall it?
Thanks in advance
Mobeca said:
How I can back to CM7 fonts or reinstall it?
Thanks in advance
Click to expand...
Click to collapse
Wow.. I forgot about this thread!
Anyway, you would need you to find the fonts from cm7 and move those as described above.
I am not familiar with CM roms, but I assume the fonts are in the same /system/fonts folder - grab them from a CM7 rom and follow the steps..
Note: there are also apps that change system fonts (like Font Changer) - but I prefer to do things manually..
Sent from my phone's mind
Thanks man, that;s easy to setup
Anybody try this on ICS yet?
Sent from my phone's mind
alteredlikeness said:
Anybody try this on ICS yet?
Sent from my phone's mind
Click to expand...
Click to collapse
Good read : http://rootzwiki.com/topic/15077-how-to-make-font-packs-that-work-in-icsjb/
Archmag3 said:
Good read : http://rootzwiki.com/topic/15077-how-to-make-font-packs-that-work-in-icsjb/
Click to expand...
Click to collapse
Thanks! That is a good read... and, so it looks like you could possibly still use the method in my OP, but you need to replace the four Roboto font files instead of the DroidSans ones.. I'll give it a try sometime when I get back on ICS and update the OP accordingly.
alteredlikeness said:
Thanks! That is a good read... and, so it looks like you could possibly still use the method in my OP, but you need to replace the four Roboto font files instead of the DroidSans ones.. I'll give it a try sometime when I get back on ICS and update the OP accordingly.
Click to expand...
Click to collapse
There is a application called LCfont changer. It works via CWM / Recovery..but i didnt work for me.Can you just try out and let me know ?

Categories

Resources