Editing framework-res.apk - Motorola Droid 3

I got to be fairly efficient at editing the framework-res.apk on my D1. Nothing major, just a handful of custom PNG's. I could boot into recovery, pull the APK, edit it in 7Ziip, then push it back and set permissions. Will that process work on the D3 the same?
Boot into recovery
Mount System
Open command prompt on computer and typ the following commands
adb push framework-res.apk /system/framework /framework-res.apk
adb shell "/system/bin/chmod 644 /system/framework /framework-res.apk"
adb reboot
-Mike

Also, trying to figure out where the icons and PNGs for the text messaging app are. This Blur UI is really throwing me for a curve.
Hopefully someone out there can point me in the right direction.
-Mike

Any ideas guys/gals?
-Mike

Related

Changing fonts on a rooted phone

Hi,
I need help updating the fonts on my rooted Incredible. The way I understand it, all that needs to be done is to replace the font(s) in /system/fonts with something else. Easier said than done...
I opened an SU shell via "adb shell", and then tried to remount the /system in "rw" mode, I also updated the permissions for the font files so that I can override them. So good so far...
But when I try to copy or replace the files, I run into all kinds of problems:
* First of all, the rooted phone doesn't have "cp" so I can't do the usual copy operations like a regular *nix machine (did I miss something during the root process).
* Then I saw examples of using the "cat" command to replace the old files, but that resulted in "write: No space left on device" error, which I think has to do with how the memory image is loaded/packed??
* Then I saw examples of using the "dd" command, to copy the new files over the old files. This went further, since I can see the new timestamp when using "ls -l /system/fonts". However, when I reboot the phone, the old fonts show back again.
* I also saw an example in another thread titled "Hebrew support" in this forum (sorry, don't know how to cross-post URLs), but I didn't know how to follow the instructions there.
I would really appreciate it if someone can help me out.
- how can I update the system image? (do I really need a signed ZIP file?)
- is it too late for me to add "cp" to my rooted phone?
- the 10 minutes rooting video had us copy the "busybox" file to the sdcard, but it didn't say what to do with it. can I use it as a replacement for "cp"? (do I have to go back to "adb recovery"?)
You can only modify /system while in clockwork recovery after you're rooted and have run the unrevoked recovery flash tool
Yea, you have to push them to the phone in clockwork recovery.
you can put them in your tools folder where adb is located or put them on your SDcard and push them from there.
I attached the fonts I used. I used these on my Moto Droid I used to have and now they are on my dInc. This font is not as bold as the stock font and a little smaller. This font i believe is the "Droid" font. It looks pretty nice, see my screenshot and look under icons and at the clock and then compare to your phone.
Here is the commands you would do at command prompt, not from ADB shell.
For these commands to work, you have to place the fonts in your tools folder where ADB is.
Code:
adb push Clockopia.ttf /system/fonts/
adb push DroidSans.ttf /system/fonts/
adb push DroidSans-Bold.ttf /system/fonts/
adb push DroidSansFallback.ttf /system/fonts/
adb push DroidSansMono.ttf /system/fonts/
adb push DroidSerif-Bold.ttf /system/fonts/
adb push DroidSerif-BoldItalic.ttf /system/fonts/
adb push DroidSerif-Italic.ttf /system/fonts/
adb push DroidSerif-Regular.ttf /system/fonts/
you might be able to try this command
adb push *.ttf /system/fonts/
Im not sure if that would work or not, maybe someone else could confirm.
Thank a lot for the reply...
So is this the correct thread that I should follow now: "Unrevoked team: Recovery reflash tool (updated!)" to install the "clockwork recovery"? I am assuming this will allow the phone to start recovery with adbd running, so that I can connect to it from my PC while in recovery. Correct?
It took me forever to get the adbd running in recovery as part of rooting my phone, and I am not sure that I can replicate these steps again (at least not easily). I was this close to copying the font files while in "adb recovery" mode, but then I chickened out, because I didn't want to risk the rooting process by doing something that doesn't match the root instructions.
yes, as long as you have actually gained root and have the superuser/busybox properly installed. just follow that thread and you'll have new fonts in no time, and I can assure you that it will work because I changed mine too.
If using clockword recovery, dont forget to mount system.
Put them all in a folder named fonts. Put the folder in tools. Boot into recovery, mount system. Then: adb push fonts /system/fonts. Unmount system then reboot.
Sent from my ADR6300 using XDA App
TNS201 said:
Yea, you have to push them to the phone in clockwork recovery.
you can put them in your tools folder where adb is located or put them on your SDcard and push them from there.
I attached the fonts I used. I used these on my Moto Droid I used to have and now they are on my dInc. This font is not as bold as the stock font and a little smaller. This font i believe is the "Droid" font. It looks pretty nice, see my screenshot and look under icons and at the clock and then compare to your phone.
Here is the commands you would do at command prompt, not from ADB shell.
For these commands to work, you have to place the fonts in your tools folder where ADB is.
Code:
adb push Clockopia.ttf /system/fonts/
adb push DroidSans.ttf /system/fonts/
adb push DroidSans-Bold.ttf /system/fonts/
adb push DroidSansFallback.ttf /system/fonts/
adb push DroidSansMono.ttf /system/fonts/
adb push DroidSerif-Bold.ttf /system/fonts/
adb push DroidSerif-BoldItalic.ttf /system/fonts/
adb push DroidSerif-Italic.ttf /system/fonts/
adb push DroidSerif-Regular.ttf /system/fonts/
you might be able to try this command
adb push *.ttf /system/fonts/
Im not sure if that would work or not, maybe someone else could confirm.
Click to expand...
Click to collapse
Where can I get/download these font files?
EDIT im a retard and didnt see the .zip sorry
so where can i go to download other font types?
Perhaps this is an obvious questions to some... Can I use any TTF font? I have a font I created that is my own handwriting. This would be pretty cool to have available in my Phone... It is a standard TTF font.
Possible? I tried to search but didn't see anything specifically mentioned if a font has to be a specific type or if I can use anything.
Thanks!
compnird said:
Perhaps this is an obvious questions to some... Can I use any TTF font? I have a font I created that is my own handwriting. This would be pretty cool to have available in my Phone... It is a standard TTF font.
Possible? I tried to search but didn't see anything specifically mentioned if a font has to be a specific type or if I can use anything.
Thanks!
Click to expand...
Click to collapse
it should work fine, you just need to rename the file to DroidSans.ttf and DroidSans-Bold.ttf and replace the ones that are in /system/fonts
Thanks for the help seanhassars and TNS201: I am using the ClockworksMod recovery, and I was able to update the fonts (using the "update from ZIP" option).
I can see Arabic letters, but unfortunately, they don't look correct (they are disjoined, when they actually should be connected together). Now I am looking around for patched libwebcore.so to fix this issue, and thanks to nandroid backup, I can experiment with changing the libraries as much as I can.
shamidude can you please let me know which fonts you used? I am desperately needing to install arabic on my phone and could use the help. If possible could you upload the proper ones? Also which libwebcore.so did you use?
I tried to install Arabic fonts from another website but my phone froze on the splash screen and wouldn't boot. Please let me know what works for you, especially if you get the reshaper working.
edit- also if you could post general instructions of what you did to push the fonts onto the phone, how you mounted/dismounted, etc would be good
I don't think that was supposed to be an update.zip he just zipped the fonts he's using for easier access, you still have to push them manually.

changing battery in notification bar cm 6

I have the release candidate for cm 6.0 and was working on personalizing the interface. as i am trying to change the battery to a circular theme i am coming across this error in my terminal
C:\androidSDK\tools>adb push framework-res.apk /system/framework
failed to copy 'framework-res.apk' to '/system/framework/framework-res.apk': No
space left on device
is this a known issue? or is there a more efficient way of handling themes
Install "Android Mate" from the market, use the explorer to go in /system/framework and delete framework-res.apk
Try your command one more time, it should work.
Or just go into recovery, mount system, and adb push it to /system/framework/
I had the same problem and did it that way, and it worked smoothly.
youngalumni said:
I have the release candidate for cm 6.0 and was working on personalizing the interface. as i am trying to change the battery to a circular theme i am coming across this error in my terminal
C:\androidSDK\tools>adb push framework-res.apk /system/framework
failed to copy 'framework-res.apk' to '/system/framework/framework-res.apk': No
space left on device
is this a known issue? or is there a more efficient way of handling themes
Click to expand...
Click to collapse
use
adb remount
adb push [...]
if you were using Metamorph, it would be easier

ADB help...

OK, I know how to use ADB to reboot and get into download mode on my phone, but I have a kind of emergency. I was attempting to replace a framework-res.apk file on my phone to change the battery icon, and now I am stuck FCing all over the place. So much that I can't put my backed up framework-res.apk file back in /system/framework via Root Explorer like I normally do.
I am connected to my phone, can list directories, but cannot seem to push the framework-res.apk file.
Can someone give me a step by step on how to do this and soon please...
EDIT: I think I got it. I needed to be in Recovery Mode, and then it seemed to copy fine.
While I do have someone's attention (hopefully), how do you change directories if the directory you want to change to is two names, IE 'Battery Mod'?
Demented71 said:
OK, I know how to use ADB to reboot and get into download mode on my phone, but I have a kind of emergency. I was attempting to replace a framework-res.apk file on my phone to change the battery icon, and now I am stuck FCing all over the place. So much that I can't put my backed up framework-res.apk file back in /system/framework via Root Explorer like I normally do.
I am connected to my phone, can list directories, but cannot seem to push the framework-res.apk file.
Can someone give me a step by step on how to do this and soon please...
Click to expand...
Click to collapse
Is your backed up framework on your sdcard? You could try adb shell.
from pc,
adb shell
su
cp XXXX/framework-res.apk system/framework <<<may need to use busybox cp
exit
exit
adb reboot
bobbylx said:
Is your backed up framework on your sdcard? You could try adb shell.
from pc,
adb shell
su
cp XXXX/framework-res.apk system/framework <<<may need to use busybox cp
exit
exit
adb reboot
Click to expand...
Click to collapse
My backed up framework file was on my PC. The first one I was trying to get to was on my phone, in a folder called Battery Mod, which I could not get into because ADB kept saying wrong substitution or something?
Either way, I was able to get it done, so I learned something new again.
EDIT: I think I got it. I needed to be in Recovery Mode, and then it seemed to copy fine.
While I do have someone's attention (hopefully), how do you change directories if the directory you want to change to is two names, IE 'Battery Mod'?
Click to expand...
Click to collapse
That makes sense, it may not let you Push to the file system while it's in use.
As for 2 names, do you mean from a windows command box or in the android command line. Windows you just type it as is. Linux is a little more picky, I usually try to remove spaces from directory names so I don't run into any problems with that. In linux a backslash works, ie, cd /sdcard/Battery\ Mod
Not sure if it will work on our phones.

[Q] Pushing Framework-res.apk

I have been trying to edit my framework-res.apk file to change some icons but I keep running into problems. Without even editing framework-res.apk, just pulling it down to my computer then pushing it back up is causing me to go into a boot loop. I assume I am missing something simple but all the guides I have found say to do pretty much the same thing. Here is what I am doing
boot to clockwork recovery
mount system from recovery
adb remount
adb pull /system/framework/framework-res.apk
adb push framework-res.apk /system/framework
reboot
I don't edit the file at all, just getting it on my windows 7 machine and then pushing it back to the phone and that is causing it to boot loop. Any idea what I am doing wrong? oh I am using CM6 rc1
I pushed yesterday successfully just like that:
- boot to recovery
- mount system
adb push framework-res.apk /system/framework/framework-res.apk
adb reboot
You can't push framework-res while the system is working.
That's why you have to do it like rori~ posted above me.
Jack_R1 said:
You can't push framework-res while the system is working.
That's why you have to do it like rori~ posted above me.
Click to expand...
Click to collapse
I was doing it all from recovery, but it doesn't seem to make a difference.
Did you check the file you're getting with pull, before pushing it back?
Is it the correct size?
Yea, I checked the md5 as well as the size and it matches the original even after I have pushed it back up.
I would suggest making a metamorph. Thats what i did for icon editing. It works great.
Check here for info. http://forum.xda-developers.com/showthread.php?t=654858
I finally got it. Not entirely sure why the framework-res.apk I had didn't work but I do know it was one I generated from the UOT kitchen. I went back to the one that was included in the original rom zip, and that one I can upload, edit and do whatever with.
Anyways thanks for the replys.
I would suggest making a metamorph. Thats what i did for icon editing. It works great.
Check here for info.
Click to expand...
Click to collapse
I plan on doing that eventually but this seems like a lot less work for just replacing some notification icons, and at this point I am still just getting my feet wet in this whole customizing my phone process.

How: can I mod the stock phone.app?

Ok, I must have posted this question somewhere but I would like to know the answer cause no one has answered it. "how do I get the stock phone app to modify?. How would I get it and put it back into my phone? please I would like to know.
38 views and no response?
the .png files for the phone are actually in the contacts.apk.
Are you asking how to modify the apk, or just specifically where are the phone images?
To copy the app from your phone just do: adb pull /system/app/Phone.apk
That will put a copy of the file in your "tools" directory in the android sdk folder
Then when you want to put it back on you should be able to overwrite it with: adb push /system/app/Phone.apk
What exactly are you planning on doing with this file?
Thank you. I want to create my own images to make it look different then the stock colors.
There are 2 apks that contain dialers, one is the Contacts.apk as stated bfore that brings up the phone when the phone icon is pressed the second is in the Phone.apk appears once a call is placed, and the persons picture appears of the person you are calling.
I don't know how to do a adb pull. can you explain?
johnny quest said:
I don't know how to do a adb pull. can you explain?
Click to expand...
Click to collapse
In terminal or command prompt, navigate to the tools directory in the android SDK and run the following commands:
Code:
adb remount
adb pull /system/app/Phone.apk
That will dump the file in you tools directory.
If you are having trouble with this, let me know what operating system you are using and if you have the android SDK installed.
synesthete said:
In terminal or command prompt, navigate to the tools directory in the android SDK and run the following commands:
Code:
adb remount
adb pull /system/app/Phone.apk
That will dump the file in you tools directory.
If you are having trouble with this, let me know what operating system you are using and if you have the android SDK installed.
Click to expand...
Click to collapse
This is confusing. I didn't think it would be so hard. I do UI's for iphone and ipod touch and this is way different. There are so many different things. Its discouraging in some ways. Sorry. I would love to create an app but of course its different. So, I stick to creating themes.
I would love to take a ROM and mod it myself or even modifying Launcher pro but it has that 9.pngs which makes it hard.
Ok, I have the Eris 2.1 rooted with Tenzo Rcmix2.0 installed. I have the SDK installed but don't know what to do with it. I appreciate you taking the time to help me out. I really want to create and mod lots of apps.
this is what I've done to a phone app I downloaded from the market:
-I created my images through Photoshop and saved them to a folder with its correct name used.
-I opened draw9patch and saved the images with the correct name again to a folder.
-I named the folder drawable-hdpi that belongs in the Res folder
-took the files and folder and created a zip out of it.
-opened the AvaboxV2 and signed it.
-loaded to my phone and changed the name to the correct name and installed it
but it keeps saying application not install, I just don't get it. What step did I messed up on?
Anybody? anybody?...............................
This is what you need to do:
1. Open Contacts.apk in 7-zip
2. Copy the images over top of the original images in drawable, drawable-mdpi, and drawable-mdpi-finger (notice I didn't say anything about hdpi)
3. Close the archive.
4. Copy it back onto the device with:
Code:
adb remount
adb push Contacts.apk /system/app
Your phone may not appreciate you pushing Contacts.apk while it is running, so it may become unstable at this point. I would recommend restarting.
icbeer said:
This is what you need to do:
1. Open Contacts.apk in 7-zip
2. Copy the images over top of the original images in drawable, drawable-mdpi, and drawable-mdpi-finger (notice I didn't say anything about hdpi)
3. Close the archive.
4. Copy it back onto the device with:
Code:
adb remount
adb push Contacts.apk /system/app
Your phone may not appreciate you pushing Contacts.apk while it is running, so it may become unstable at this point. I would recommend restarting.
Click to expand...
Click to collapse
thank you but I'm trying to understand what you mean by push ADB. is that the one in the sdk folder? if so, I open it and it just flashes for a few seconds then closes.
ADB is a command line program that allows you to debug and move/edit files on your phone. You need to run those commands from a command prompt (should be a link in the Accessories folder on the Start menu if you can't right-click on the sdk folder and open one). Navigate to the tools folder, then run the remount and push commands like icbeer said to get your modified .apk on your phone:
Code:
C:\users\brtnbrdr> cd c:\android-sdk-windows\tools
C:\android-sdk-windows\tools> adb remount
C:\android-sdk-windows\tools> adb push Contacts.apk /system/app

Categories

Resources