editing the framework-res.apk - Droid Eris General

Sorry if I missed the answer I'm looking for but I did search first, I tried editing a few .png files and after pushing the framework-res.apk back everything on my phone went into a force close loop, I tried pushing the original back and it did the same thing, any help?

I tried editing a PNG file the in call screen pic and pushed it to phone and same thing happened to me,no idea why

After you edit framework-res it must be signed you cannot simply flash it, first you must edit the images you choose, make sure the names stay the same, make it an apk, sign the apk, the reload in the rom by pushing it.
Cheers,
Captainkrtek
Pm if you need help

How do you go bouts signing it

I've never had to resign that one after making any changes. Just a reboot would suffice.
Edit: Maybe try using Metamorph to make your changes. That's what I did recently on that particular apk without a problem. I mistakenly thought I pulled/pushed that one, but maybe I didn't.

PPCGeek01 said:
I've never had to resign that one after making any changes. Just a reboot would suffice.
Edit: Maybe try using Metamorph to make your changes. That's what I did recently on that particular apk without a problem. I mistakenly thought I pulled/pushed that one, but maybe I didn't.
Click to expand...
Click to collapse
heres a good instruction for theming and a singningzip for your sdk tools folder... http://forum.cyanogenmod.com/topic/56-mods-blackbar-etc-50x/page__st__20__p__3320#entry3320

Related

[Q] Implement Theme in Rom

Hello!
I'm trying to make my own Rom right now. With dsixda's Kitchen it isn't very hard to do so I thought I'd just give it a try. I'm taking a rooted official Update (Version: 2.10.405.2) as my base. Adding busybox runparts, the /data/app functionality, a2sd+, the custom bootanimation functionality etc. isn't a problem. Removing some apps like Maps, Facebook, Teeter (and so on) and adding some like Rom Manager, Neocore or Quadrant isn't a problem, too. But if I want to implement a theme like the Carbon Espresso Mod or a theme I made with the UOT Kitchen I'm getting bootloops at booting the phone. Here's what I do: I unzip the folder (for example a theme made with the UOT Kitchen) and I copy over the framework-res.apk from the unzipped folder to my Working Folder of the Kitchen (to system/framework) and I overwrite the original framework-res.apk.
And NO: I didn't choose a battery mod or a bootanimation in the UOT Kitchen....
Hope you guys can help me
I might be wrong but doesn't the new file have to be signed? I know there is a signing option in the kitchen.
Sent from my PC36100 using Tapatalk
It's a system .apk so it doesn't have to be signed.
I can't shed any light on the subject, but here's a bump.
Are you replacing the whole "framework-res.apk" file? If so then you will need to resign your entire ROM. Why? When you change a system file ("framework-res.apk", "com.htc.framework.apk", "twframework-res", "rosie.apk", etc.) it no longer has a matching "signature" for all the files it serves images to. Plug your phone into your computer and open up "ddms" in your android_sdk > tools folder to watch what happens when the phone boots up.
A workaround (The way I do it, it's more fun IMHO) is to open up your .apk files in 7zip (or if you're on a mac BetterZip) and add the images from the themed .apk to your stock .apk. This way makes it so your original .apk has the same signature as your other system files yet has the new images from the other files that you wanted. I've had a lot of luck with this method. I don't know if it will still work if you change any .xml files as I have not messed with those yet.
I've subscribed to this thread so if you have any questions post back here or you can PM me if you want. I'm on XDA all day, every day so I'll try to help as much as I can.
Thanks for all the answers! Especially to you, mbobino. Is there a way to sign the whole Rom new? When I make my Rom at the End, the Kitchen signs it automatically, doesn't it? The idea with the images is very good, but if I want to implement a theme like Carbon Espresso it isn't that easy, 'cause Carbon Espresso isn't just a few images. There are several .xml's etc.
The reason you boot loop is mis matched resource ID's in the public.xml file. If you decompile the framework using apktool after adding your images using an archiver then recompile apktool will update the public file for you which saves you from pulling ID''s for every image. I have a video tutorial of how to set up apktool and decompile framework in my Rom thread. Changing images in app apk's won't cause you to boot loop just messing with the framework will.
Sent from my ADR6300 using XDA App
DomiKamp said:
Thanks for all the answers! Especially to you, mbobino. Is there a way to sign the whole Rom new? When I make my Rom at the End, the Kitchen signs it automatically, doesn't it? The idea with the images is very good, but if I want to implement a theme like Carbon Espresso it isn't that easy, 'cause Carbon Espresso isn't just a few images. There are several .xml's etc.
Click to expand...
Click to collapse
The kitchen signs the .zip that you flash when you build it. It does not sign any .apks for you on its own. However, there is an option to sign .apks within the kitchen.
In my opinion, taking all of the images and figuring out how it all works is fun. I feel like I've already learned quite a bit from just digging around and moving files around.
As for the .xml files, you can decompile the .apk and edit them and then recompile the .apk. I'm actually looking into this today. It sounds like some work but hopefully I'll get it figured out.
Sounds like fun indeed So, I'll just have to try it. Where can I find the "Settings" for the Notification Bar? Thanks
The variois status*.xml files in the res/layout folder of the framework-res.apk and the status*.smali files in the services.jar.
What? If I want to implement a Theme made with the UOT Kitchen (without battery) I should just copy over those files to my existing res-framework.apk OR copy over the whole res-framework.apk (the new one) and sign it?
EDIT: Just tried it with a theme from the UOT Kitchen and it worked perfectly. I've just signed the res-framework.apk and the htc.com.resources.apk (or whatever) in the Kitchen, flashed it on my Phone and it just worked like a Charm. But I have got a 50% Transparent Notification Bar and all the system icons (Battery and time/date) are still black and not transparent! Has anyone got a idea where to change this? (.xml or whatever)...And does anyone know where I can find the HTC Wallpapers? I want to change them a little bit
HeyItsLou said:
The reason you boot loop is mis matched resource ID's in the public.xml file. If you decompile the framework using apktool after adding your images using an archiver then recompile apktool will update the public file for you which saves you from pulling ID''s for every image. I have a video tutorial of how to set up apktool and decompile framework in my Rom thread. Changing images in app apk's won't cause you to boot loop just messing with the framework will.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
HeyItsLou, I looked up your ROM thread but couldn't locate the video tutorial.... do you mind providing the url? Specifically, I am trying to add to the list of wallpapers in a ROM. (I have setup apktool but not sure where/which folder to add my wallpapers in Framework-res.apk Launcher.apk before recompiling/signing). Thanks.
You COULD use the Theme Porter by daneshm90. It will only port the PNG s for it so things like clock colour n stuff will be lost, but it will get you alot closer...
http://forum.xda-developers.com/showthread.php?t=737526
Sent from my HTC Hero using XDA App
Thanks! But like I've written before in my Edit, I made it. The bigger theme (Carbon Espresso) wasn't a problem, too. I just had to sign the .apk's in system/app and system/framework (the kitchen doesn't do it by itself. You have to choose the option to sign a single .apk and then look, where the system/framework .apk's are...). Works great now!
DomiKamp said:
Thanks! But like I've written before in my Edit, I made it. The bigger theme (Carbon Espresso) wasn't a problem, too. I just had to sign the .apk's in system/app and system/framework (the kitchen doesn't do it by itself. You have to choose the option to sign a single .apk and then look, where the system/framework .apk's are...). Works great now!
Click to expand...
Click to collapse
Isnt that what I said in the 2nd post -.- lol jk. Glad you got it working!
Yes! And that's why I tried it. And it worked! Thanks Husker and, of course, everybody else!
Glad you got it working. Welcome to the development side of android!
Sent from my PC36100 using XDA App
I don't sign system files or apps and apkmanager among other threads I've read say not to. Im on a rooted backflip. I find I only have to sign third party apps to install.
Why do you have to sign YOUR files?
Sorry for answering that late. Had a few things to do, so I wasn't online very often
If you want to cook an App into your Rom (NeoCore for example), then you don't have to sign it. You can just copy it into data/app. But if you want to change the whole framework-res.apk of the Rom, you have to sign it. 'Cause if you don't sign it, you'll get a Bootloop. The framework-res.apk is a very important part of the Rom, so it has to "fit" to the others. There are some ID's which have to match. Otherwise it won't work. That's how I understood it
Another Question: Has anybody got an Idea where to change the things that are coming, when you first start the phone with a new Rom (the "installation" of the Rom)? I wan't to write: "Welcome to DomiKamp's Rom!" Or something like that...
bestialbub said:
I don't sign system files or apps and apkmanager among other threads I've read say not to. Im on a rooted backflip. I find I only have to sign third party apps to install.
Why do you have to sign YOUR files?
Click to expand...
Click to collapse
I was curious about this too. I always edit the framework-res of any ROM I flash using a custom set of images I have and have never signed the apk afterwards and it has always worked. Maybe cause I'm only replacing images? I usually do this with framework-res and twframework-res and they both can sometimes grow by 1MB or more. Just my experience.
Sent from my SAMSUNG-SGH-I897 using XDA App
DomiKamp said:
Sorry for answering that late. Had a few things to do, so I wasn't online very often
If you want to cook an App into your Rom (NeoCore for example), then you don't have to sign it. You can just copy it into data/app. But if you want to change the whole framework-res.apk of the Rom, you have to sign it. 'Cause if you don't sign it, you'll get a Bootloop. The framework-res.apk is a very important part of the Rom, so it has to "fit" to the others. There are some ID's which have to match. Otherwise it won't work. That's how I understood it
Another Question: Has anybody got an Idea where to change the things that are coming, when you first start the phone with a new Rom (the "installation" of the Rom)? I wan't to write: "Welcome to DomiKamp's Rom!" Or something like that...
Click to expand...
Click to collapse
I think that in order to do the "welcome to" thing you'll have to edit the update-script file. I'm not 100% on it though. Look at a cm Rom and see what all is in there.
Sent from my HTC Evo 4G using XDA App

noob who wants to learn

I want to learn how to theme. I've read this guide http://forum.xda-developers.com/showthread.php?t=916814
I Think i understand the process of editing images, I'm not a noob when it comes to photoshop, but i get a little frustrated when it comes to the topic of signing. I have a windows vista system, and section two of this https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en states that signing in vista causes bootloops unless you take other steps. The directions for XP seem so straight forward, is there a way to sign without all the hassle that vista seems to cause?
I've been told that if you use another theme for a base, resigning is not needed. I'm a noob at this also, really wanting to learn.
thenaut said:
I want to learn how to theme. I've read this guide http://forum.xda-developers.com/showthread.php?t=916814
I Think i understand the process of editing images, I'm not a noob when it comes to photoshop, but i get a little frustrated when it comes to the topic of signing. I have a windows vista system, and section two of this https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en states that signing in vista causes bootloops unless you take other steps. The directions for XP seem so straight forward, is there a way to sign without all the hassle that vista seems to cause?
Click to expand...
Click to collapse
When it comes to basic themeing, you don't need to sign anything....its a matter of extracting and re-zipping the apk without signing it so it keeps its original signature...then you would add all your themed apks in a CWM flashable zip(that isn't signed either).....use APK Manager....it works wonders for theme devs
Mr. Apocalypse said:
When it comes to basic themeing, you don't need to sign anything....its a matter of extracting and re-zipping the apk without signing it so it keeps its original signature...then you would add all your themed apks in a CWM flashable zip(that isn't signed either).....use APK Manager....it works wonders for theme devs
Click to expand...
Click to collapse
Thanks man,
If i'm understanding you correctly you are basically saying that if i take from an existing theme i don't have to sign. but i create my own theme based off of a rom i need to sign it?
EDIT: nevermind, i mixed both responses up and with my question. i'm a little off today
thenaut said:
Thanks man,
If i'm understanding you correctly you are basically saying that if i take from an existing theme i don't have to sign. but i create my own theme based off of a rom i need to sign it?
EDIT: nevermind, i mixed both responses up and with my question. i'm a little off today
Click to expand...
Click to collapse
Ok...let me try to clarify this...if you're new to theme developing, get "signing" out of your head
You would only need to sign an apk if it was being installed...
When you theme, nothing is being "installed", all of the original apks that are in your /system/ directory are replaced with your themed ones while flashing....
YOU NEVER SIGN AN APK THAT IS BEING SENT TO /system/ DIRECTORY
In reality, no themed apks are signed, because they are sent to the /system/ directory....its just a matter of extracting the stock apk, make your mods, and re-zip. As a said above, if you use Apk Manager, this will be a breeze
Mr. Apocalypse said:
Ok...let me try to clarify this...if you're new to theme developing, get "signing" out of your head
You would only need to sign an apk if it was being installed...
When you theme, nothing is being "installed", all of the original apks that are in your /system/ directory are replaced with your themed ones while flashing....
YOU NEVER SIGN AN APK THAT IS BEING SENT TO /system/ DIRECTORY
In reality, no themed apks are signed, because they are sent to the /system/ directory....its just a matter of extracting the stock apk, make your mods, and re-zip. As a said above, if you use Apk Manager, this will be a breeze
Click to expand...
Click to collapse
Thanks, You've helped a lot. can't wait to start. I have to go to work though, so tomorrow, hopefully.
thenaut said:
Thanks, You've helped a lot. can't wait to start. I have to go to work though, so tomorrow, hopefully.
Click to expand...
Click to collapse
If you have any other questions, PM me....i'm always willing to help someone who is willing to learn.
What I do when i want to change something... example I made my own lock screen.
If it was already explained how to do this... im sorry for wasting your and mine time... I only have about 5 minutes so I cant read everything before i post this... but this is what i do when i want to edit the theme.
I put the rom on my computer and extract it... locate the files I need to edit, (they are alwas going to be in the res folder of an extracted .apk and then in a drawable folder.) I take the files i want and I edit them. put them back on my phone... copy the framework-res.apk from systems>framework>framework-res.apk and then put it in a folder i created on my sdcard.
Using Astro File Manager I select my edited files and copy them.... then click on framework-res.apk and select browse and past my edited files into the framework-res.apk then using root explorer I then copy my edited framework-res.apk and paste it back in system>framework>framework-res.apk

A primer for modifying framework-res.apk?

I've been trying to make a couple of modifications to framework-res.apk and I've been having a lot of trouble. I've bootlooped the DX2 more than a few times (and was able to recover with the recently released SBF).
I've tried making one change, I've tried signing the file, I've tried not signing it, I've tried different compression levels on the zip, all with no luck. The one time I got my apk into the phone with my change on board (I verified that it was there) my change was ignored by the phone. (I've been trying to replace /res/drawable-hdp/zz_moto_list_texture_bg.png to change the default list background from the light gray to black.)
Has anyone been successful making modifications to this file in a DX2? If so, how did you do it?
What did program did you zip it with?
What was the compression set to?
Did you sign the file? If so, with what program and key?
What method did you use to drop framework-res.apk back into the phone?
Are there any files that should not be modified? (I've heard to leave the ".9" files alone.)
Thanks,
Chris
I've been trying to do the exact same thing and haven't got too far. I'm doing dev stuff thru Ubuntu and it seems to be very friendly along with gimp. I've actually been able to drag and drop replacement files without extracting the apk but haven't been able to flash it inside a theme. I haven't actually tried just replacing the framework.
Staying tuned...
Sent from my DROID X2 using XDA App
You can make a theme at uot.dakra.lt and flash the .zip file to your phone.. jus upload your framework-res.apk to the site once you make it, but anyway, they modify the file and it worked for me.
Peperm1nt said:
You can make a theme at uot.dakra.lt and flash the .zip file to your phone.. jus upload your framework-res.apk to the site once you make it, but anyway, they modify the file and it worked for me.
Click to expand...
Click to collapse
Yes I've been using this but it's not really set up for blur. we're talking about going deeper than UOT can reach with current software.
Sent from my DROID X2 using XDA App
You can recompile and decompile with apkmanager, but its not without some hiccups. First, it compresses the resources.arsc which unlike the rest of the apk needs to be decompressed. To fix this I pull it out then with 7zip I add it back to the framework-res archive with zip as the format and store as compression. That fixes the boot-loops. Even after that there's been some minor problems with it recompiling certain .xml a little goofy.
But at least it doesnt cause a boot loop.

[Q] Noob - How do you modify Framework-res.apk?

I've looked through many posts. I am very new to creating my own Rom's, and I am having a problem after editing framework-res.apk. I started by downloading a popular rom for the Evo 3D, and decompiled it, edited framework-res, and after flashing the rom it wouldn't boot past the startup animation. The screen just remained black, but the capacitive buttons remained lit. Heres my process:
1.) Download the rom I desired.
2.) Extract zip
3.) Locate Framework-res.apk, copy, paste on desktop.
4.)Extract framework-res.apk, edited icons to my liking.
5.) Delete Meta-inf.
6.) Compress framework-res back to .zip, then to .apk.
7.)Sign Framework-res.apk.
8.) Replace framework-res.apk in my desired rom.
9.) Go into Meta-inf, delete Cert.RSA, Cert.SF, Manifest.MF (everything but the com folder)
10.) Re-sign .zip
11.) Flash via CWM, reboot, see Android startup animation, black screen?!!?!?
I am 99% I didn't change any dimensions of any of the images, and I re-signed everything perfectly. I know my mistake(s) are probably very noob, but as of now, I can't figure out what I am doing wrong. Any help would be greatly appreciated!
(Before you say anything, I have searched the forums several times, with no luck. I also tried this process several times, only editing one.png in framework-res, and I still get the same result.)
ellisperkins said:
I've looked through many posts. I am very new to creating my own Rom's, and I am having a problem after editing framework-res.apk. I started by downloading a popular rom for the Evo 3D, and decompiled it, edited framework-res, and after flashing the rom it wouldn't boot past the startup animation. The screen just remained black, but the capacitive buttons remained lit. Heres my process:
1.) Download the rom I desired.
2.) Extract zip
3.) Locate Framework-res.apk, copy, paste on desktop.
4.)Extract framework-res.apk, edited icons to my liking.
5.) Delete Meta-inf.
6.) Compress framework-res back to .zip, then to .apk.
7.)Sign Framework-res.apk.
8.) Replace framework-res.apk in my desired rom.
9.) Go into Meta-inf, delete Cert.RSA, Cert.SF, Manifest.MF (everything but the com folder)
10.) Re-sign .zip
11.) Flash via CWM, reboot, see Android startup animation, black screen?!!?!?
I am 99% I didn't change any dimensions of any of the images, and I re-signed everything perfectly. I know my mistake(s) are probably very noob, but as of now, I can't figure out what I am doing wrong. Any help would be greatly appreciated!
(Before you say anything, I have searched the forums several times, with no luck. I also tried this process several times, only editing one.png in framework-res, and I still get the same result.)
Click to expand...
Click to collapse
Also, I just tried only changing the default_wallpaper, and it did the same thing leading me to believe that it doesn't have something to do with me modifying it, but actually in me signing and repackaging it. If anyone could help/ give me instructions on how to do so, that would be great!
WOW!
you could always try the easy way... http://forum.xda-developers.com/showthread.php?t=695701
Select option 1 to decompress, then when done press option 3 to recompress.
Its what I use for framework. Sometimes I use this: http://forum.xda-developers.com/showthread.php?t=737526
All depends on what I need to do.
scrosler said:
WOW!
you could always try the easy way... http://forum.xda-developers.com/showthread.php?t=695701
Select option 1 to decompress, then when done press option 3 to recompress.
Its what I use for framework. Sometimes I use this: http://forum.xda-developers.com/showthread.php?t=737526
All depends on what I need to do.
Click to expand...
Click to collapse
Thanks a lot! I'm going to try my luck with that, and build a rom shortly. Another question, if I am lazy and I copy/ paste and replace the icons from one framework-res to another, and there are un-used icons, would that effect it?
ellisperkins said:
Thanks a lot! I'm going to try my luck with that, and build a rom shortly. Another question, if I am lazy and I copy/ paste and replace the icons from one framework-res to another, and there are un-used icons, would that effect it?
Click to expand...
Click to collapse
No, it would just bloat your file.
scrosler said:
No, it would just bloat your file.
Click to expand...
Click to collapse
Thanks. Then what I was doing earlier had literally nothing to do with me modding any of the files, but had to do with the way I was either compressing/ or signing. I was using an old tool to sign from PPC geeks, so I kind of assumed that was the issue from the start.
ellisperkins said:
Thanks. Then what I was doing earlier had literally nothing to do with me modding any of the files, but had to do with the way I was either compressing/ or signing. I was using an old tool to sign from PPC geeks, so I kind of assumed that was the issue from the start.
Click to expand...
Click to collapse
Prolly so.

Editing .smali files??

Im trying to teach myself here and actually reading unlike others at times, but What my GOAL: is to remove the GPS icon in my ROM when it is not active. I may be wrong so please correct me if I am...
I started with "APKtool" to decompile my "systemUI.apk" I then edited "HtcCdmaStatusBar.smali" located in "com/android/systemui/statusbar/policy"
I ran into a problem with compiling it back together with errors (after trying for hours to find my mistake) I moved on to...
"APK-Manager"
Again following instructions I decompiled "systemUI.apk" using "com.htc.resources.apk" as well since its a system file..
It seems to have worked, it said to delete whatever I modified in the "keep" folder well the ".smali" files don't appear only XML and system images but I went ahead and tried to take that "SystemUI.apk" that I recompiled with the edited files and dropped it in my phone via root manager
(well yea that didnt seem to work)
I moved on to this link http://forum.xda-developers.com/showthread.php?t=549309
I used it as a reference to edit the files I wanted to and not the the ones that were on the guide. well I had no errors and I and did everthing correctly, as i thought and the finally step I pushed the "SystemUI.apk" via adb and then rebooted
That resulted in a force close on my "status bar" i believe it said when I booted it up, after i cleared the force close my phone worked fine except the fact I had NO TASKBAR what so ever...
I am running "Showdown 1.0'
http://forum.xda-developers.com/showthread.php?t=1209777
Like always, Thanks for any help or ideas in advanced....
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
Where did the thread go? Dont see it in Q &A forum??? Having the same problem
I was JUST having a very similar issue.. I was trying to decompile and recompile rosie but it kept giving me errors. Someone said try apkmanager 4.9 (I was using 5) and my problems went away. Also I noticed if you are using a file that has already been modified apkmanager didnt seem to like that. I had to take a stock one, make the xml changes, build it then replace whatever images I had replaced in the original
and now I cant get the ***** to build right. I'm not trying to mod it so the pull down notification bar is semi-transparent but it wont build correctly
pastebin of my apkmanager log file http://pastebin.com/uZ8JacJL

Categories

Resources