[Q] The secret of editing framework-res.apk - Desire Q&A, Help & Troubleshooting

Hello everyone!
I have tried and tried to customize framework-res.apk, and what a nightmare!! I made a script that works all fine when using Defrost 2.9a and 2.5, but if i try Cyanogenmod or Defrost 3.0, i get force close. When I modify both xml and images.
What am I doing wrong?
Bestest of best regards,
Jonas Hald

Check this initially:
http://forum.xda-developers.com/showthread.php?t=722993

Daelyn said:
Check this initially:
Click to expand...
Click to collapse
As i get it, that doesnt work when I edit the xml, then it has to be recompiled?

Sure
If u change the code it has to be Recompiled ;-)

xtcislove said:
Sure
If u change the code it has to be Recompiled ;-)
Click to expand...
Click to collapse
Yeah, so I do
But i get force close in cyanogen and DF 3.0 - but the Circle Mod online framework modifier can do it, without force close.

Are you sure its not semi-edit the files? I think there are just various versions of the framework.

xtcislove said:
Are you sure its not semi-edit the files? I think there are just various versions of the framework.
Click to expand...
Click to collapse
Semi-edit the files?

So i'm trying to edit the status bar background.png file. I've made a copy of the framework, changed it to zip, replaced file, changed back to apk. But the systems folder is read only. how do i go about changing it to 'write' so I can replace the frameworks???
Also, if my background is transparent, do i also need to change something in the xml if I want the new background to be a solid color

Related

[Q] How to modify lockscreen transition?

When locking the phone, the screen just simply blackens. What i prefer is the old-tv-like transition that is used in the Galaxy Nexus. Does anyone knows how to make it happen?
SyzwnFrzRdz said:
When locking the phone, the screen just simply blackens. What i prefer is the old-tv-like transition that is used in the Galaxy Nexus. Does anyone knows how to make it happen?
Click to expand...
Click to collapse
Found the XDA thread that give me the enlightenment, this works on my phone, Stock ROM I8150DXLA2, should work on most rom because we modified the framework-res.apk FROM OUR OWN ROM, manually.
Here
Regards,
Reidzeibel
reidzeibel said:
Found the XDA thread that give me the enlightenment, this works on my phone, Stock ROM I8150DXLA2, should work on most rom because we modified the framework-res.apk FROM OUR OWN ROM, manually.
Here, mortal, LOL )
Regards,
Reidzeibel
Click to expand...
Click to collapse
WOW! Thank a bunch dude! Will bear this in mind as i'll look into it!
reidzeibel said:
Found the XDA thread that give me the enlightenment, this works on my phone, Stock ROM I8150DXLA2, should work on most rom because we modified the framework-res.apk FROM OUR OWN ROM, manually.
Here
Regards,
Reidzeibel
Click to expand...
Click to collapse
Lots of errors using this method!
Tried even the crt.zip with CWM but nothing happens.
Well, the only errors I get was force close, after I rebooted my phone, it works normally and the CRT animation is applied.
Did you follow the steps exactly? Do not move the recompiled apk, use the modified original apk.
Regards,
Reidzeibel
Sent from Ridwandroid-2.3.6 : 1804 MHz OC & Customized I8150DXLA2 Stock ROM w/ Cowithgun's kernel & Zeppelinrox V6 Script
reidzeibel said:
Well, the only errors I get was force close, after I rebooted my phone, it works normally and the CRT animation is applied.
Did you follow the steps exactly? Do not move the recompiled apk, use the modified original apk.
Regards,
Reidzeibel
Sent from Ridwandroid-2.3.6 : 1804 MHz OC & Customized I8150DXLA2 Stock ROM w/ Cowithgun's kernel & Zeppelinrox V6 Script
Click to expand...
Click to collapse
Dude,
I have attached the screenshot regarding my problems with the framework-re.apk.
Note :
-There's ONLY "build" folder but no "dist" folder.
Ahh, I see, the problem is that your current framework-res.apk isn't original anymore, that error in the "2.jpg" tells everything, the png files replaced by the theme maker isn't 9-patched (what is 9-patch? here, and here )
Basically, 9-patch allows the image to be stretched by redrawing some parts of the image. if the image isn't 9-patched, it will still displayed correctly on your Phone, but when recompiling the apk files, you'll encounter problems.
I tried decompiling and recompiling the ported ICS theme in the Theme section, all went well, but when I tried to insert a non-9patched png files to the apk, the error shows up.
Thus, in order to enable CRT animations for your phone, the png files on the "2.jpg" screenshot must be 9-patched :
- menu_background.9.png
- status_bar_header_background.9.png
and so on
Hope this helps,
Reidzeibel
reidzeibel said:
Ahh, I see, the problem is that your current framework-res.apk isn't original anymore, that error in the "2.jpg" tells everything, the png files replaced by the theme maker isn't 9-patched (what is 9-patch? here, and here )
Basically, 9-patch allows the image to be stretched by redrawing some parts of the image. if the image isn't 9-patched, it will still displayed correctly on your Phone, but when recompiling the apk files, you'll encounter problems.
I tried decompiling and recompiling the ported ICS theme in the Theme section, all went well, but when I tried to insert a non-9patched png files to the apk, the error shows up.
Thus, in order to enable CRT animations for your phone, the png files on the "2.jpg" screenshot must be 9-patched :
- menu_background.9.png
- status_bar_header_background.9.png
and so on
Hope this helps,
Reidzeibel
Click to expand...
Click to collapse
Ohh no wonder it was always error! Ahaa. So what should i do now? I should do a NinePatch using the Draw-9 patch tool like in the links you gave me? Sorry bro, i am a TOTAL noob.
Yeah, if you want to do decompiling and recompiling your apk files (and modify the png files), you should start learning to draw the 9-patches, it'll be a little complicated though
Hope this helps ,
Reidzeibel
reidzeibel said:
Yeah, if you want to do decompiling and recompiling your apk files (and modify the png files), you should start learning to draw the 9-patches, it'll be a little complicated though
Hope this helps ,
Reidzeibel
Click to expand...
Click to collapse
Ahh shucks! :-( Where do i start actually? :/
Sent from my Super Galaxy White using xda premium

.9 PNG Change Error Compiling

Hey Guys, so I'm working on a theme port (Yes I've Asked Multiple Questions About This) , well, when I change a .9 PNG file, it has errors compiling. How do I compile then? Can I not change .9 PNG files?
alphadog32 said:
Hey Guys, so I'm working on a theme port (Yes I've Asked Multiple Questions About This) , well, when I change a .9 PNG file, it has errors compiling. How do I compile then? Can I not change .9 PNG files?
Click to expand...
Click to collapse
M&S gives a tutorial about it here:
http://forum.xda-developers.com/showthread.php?t=1506177
Personally, I've found that if all you're doing is adjusting the hue or saturation (the color of the image) you can straight make the edit. At least I've had the two changes I've made work without doing anything special.
Sent from my SGH-T989 using xda premium
yoft1 said:
M&S gives a tutorial about it here:
http://forum.xda-developers.com/showthread.php?t=1506177
Personally, I've found that if all you're doing is adjusting the hue or saturation (the color of the image) you can straight make the edit. At least I've had the two changes I've made work without doing anything special.
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
Thanks, but I'm just moving from one theme that I'm porting, to the other, which is the ported one.
alphadog32 said:
Thanks, but I'm just moving from one theme that I'm porting, to the other, which is the ported one.
Click to expand...
Click to collapse
So you're having trouble moving the image to the new .apk or what are you asking?
yoft1 said:
So you're having trouble moving the image to the new .apk or what are you asking?
Click to expand...
Click to collapse
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
alphadog32 said:
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
Click to expand...
Click to collapse
As long as you're replacing files with the exact same name and not creating new ones it should compile. Alternatively, you don't even need to uncompile and recompile. Just take your stock framework and open (not extract) it in 7zip. It'll show you all the files. Drag and drop your modified files over into the 7zip window. It shouldn't have to compress them or anything, it'll just replace the files that have the same name. That's how I make all my modifications.
yoft1 said:
As long as you're replacing files with the exact same name and not creating new ones it should compile. Alternatively, you don't even need to uncompile and recompile. Just take your stock framework and open (not extract) it in 7zip. It'll show you all the files. Drag and drop your modified files over into the 7zip window. It shouldn't have to compress them or anything, it'll just replace the files that have the same name. That's how I make all my modifications.
Click to expand...
Click to collapse
That's, ill give it a shot tomorrow.
alphadog32 said:
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
Click to expand...
Click to collapse
Paste ur error log so I can tell you the problem
M&S

{Solved} Help required to make Black theme Contacts & Phone.

Can anybody make black contact & phone.apk attached here. Or else let me know the step by step procedure to make the Black themed Contacs.apk & Phone.apk
I Know we need to edit some XML files like styles.xml , call_background.xml, background_dial_holo_dark.xml and also have tried but able to get the success. So please help me.
Its not that easy...
apktool-1.4.3 wont decompile Contacts.apk properly so when you recompile, it will most likely crash the Phone.apk
I am able to decompile and recompile it without any problems.
You have to just decompile with 1.4.2 apktool and compile it with 1.4.3 apktool.
Before decompiling you have to delete classes.dex from contacts.apk.
If it was not possible then how other themers are modifying contacts.apk. So themers please help me.
I would do it for you, how exactly do you want it to look?
manikant_009 said:
I am able to decompile and recompile it without any problems.
You have to just decompile with 1.4.2 apktool and compile it with 1.4.3 apktool.
Before decompiling you have to delete classes.dex from contacts.apk.
If it was not possible then how other themers are modifying contacts.apk. So themers please help me.
Click to expand...
Click to collapse
How many "themer's" are changing XML? show me one please...
shayne77 said:
How many "themer's" are changing XML? show me one please...
Click to expand...
Click to collapse
Most just change images, just swap out the images using 7-zip
OriginsOfLewis said:
Most just change images, just swap out the images using 7-zip
Click to expand...
Click to collapse
Exactly my point... Contacts.apk has been a pain the bum since ICS got here... (with APKTOOL-1.4.3 anyway)
hence why no-one has really changed XML too much...
I think managed to get it to work though...
OriginsOfLewis said:
I would do it for you, how exactly do you want it to look?
Click to expand...
Click to collapse
Thanks for trying to help me i want black dialler with blue text numbers, transparent buttons. and also pleas let me know how to make the transparent notification in the below image attached.
shayne77 said:
Exactly my point... Contacts.apk has been a pain the bum since ICS got here... (with APKTOOL-1.4.3 anyway)
hence why no-one has really changed XML too much...
I think managed to get it to work though...
Click to expand...
Click to collapse
I thinks for this we need to install framework-res then decompile contacts.apk with 1.4.2 and recompile with 1.4.3
manikant_009 said:
I thinks for this we need to install framework-res then decompile contacts.apk with 1.4.2 and recompile with 1.4.3
Click to expand...
Click to collapse
My bet is: Contacts.apk will work fine but Phone.apk will crash.
shayne77 said:
My bet is: Contacts.apk will work fine but Phone.apk will crash.
Click to expand...
Click to collapse
See i am not a themer but i have tried contacts.apk by this method not tried phone.apk so i can't tell about it.
I just need the info about the xml files that needs to be edited so please help me.
manikant_009 said:
See i am not a themer but i have tried contacts.apk by this method not tried phone.apk so i can't tell about it.
I just need the info about the xml files that needs to be edited so please help me.
Click to expand...
Click to collapse
You're missing my point, the 2 apk's talk to each other... you change Contacts and it crashes Phone.
sent from SGS2 using XDA app.
shayne77 said:
You're missing my point, the 2 apk's talk to each other... you change Contacts and it crashes Phone.
sent from SGS2 using XDA app.
Click to expand...
Click to collapse
But their should be some way to change it because Vertumus and other themers have done that
For example you can see here
http://forum.xda-developers.com/showthread.php?t=1564209
http://forum.xda-developers.com/showthread.php?t=1517344
manikant_009 said:
But their should be some way to change it because Vertumus and other themers have done that
For example you can see here
http://forum.xda-developers.com/showthread.php?t=1564209
http://forum.xda-developers.com/showthread.php?t=1517344
Click to expand...
Click to collapse
I think you'll find they're only changing PNGs in Contacts.apk... could be wrong but I am thinking that is the case...
Will see if any "themers" offer you some advice in this thread then...
shayne77 said:
How many "themer's" are changing XML? show me one please...
Click to expand...
Click to collapse
Me , for my theme (Black&Blue for HyDrOG3N-ICS)
I change the pictures, but also some XML files
el_liberator said:
Me , for my theme (Black&Blue for HyDrOG3N-ICS)
I change the pictures, but also some XML files
Click to expand...
Click to collapse
Oh so you'll share your method to manikant/us then? good-o
---------- Post added at 12:28 AM ---------- Previous post was at 12:24 AM ----------
el_liberator said:
Me , for my theme (Black&Blue for HyDrOG3N-ICS)
I change the pictures, but also some XML files
Click to expand...
Click to collapse
Can you share with us also i like the MMS.apk of your theme so please try to share with us.
Didn't think so...
either he doesn't change XML or he steals someone else work or he's just plain selfish.
not in the spirit of xda anyway.
That's the problem with this place, ego's get in the way of development.
manikant_009 said:
Thanks for trying to help me i want black dialler with blue text numbers, transparent buttons. and also pleas let me know how to make the transparent notification in the below image attached.
Click to expand...
Click to collapse
Okay I've done it, I haven't tested it so it's at your own risk. Remember to set permissions! This is at 50% transparency
http://dl.dropbox.com/u/43639041/framework-res.apk
I had errors with the Contacts.apk when making any XML edits, I ended up having to grab it from the source.

SystemUI Theme

Hey guys, I'm not sure if this is the right spot, but if not can a mod please move it.
Anyway I want to add a notification background to my systemUI, and/or change the statusbar color. I know what to change but I do not know how to compile APKs, so if there is anyone out there who would be willing to do it for me it would be great, I can send you all my files!
Thank you so much in advance!
Pikezer1337 said:
Hey guys, I'm not sure if this is the right spot, but if not can a mod please move it.
Anyway I want to add a notification background to my systemUI, and/or change the statusbar color. I know what to change but I do not know how to compile APKs, so if there is anyone out there who would be willing to do it for me it would be great, I can send you all my files!
Thank you so much in advance!
Click to expand...
Click to collapse
It's possible, but you would need to flash a custom ROM that supports UI customization to do this.
Swap out images with the same file name using 7 zip but don't extract the ROM
Do I use 7zip on my Pc or phone?
Pikezer1337 said:
Do I use 7zip on my Pc or phone?
Click to expand...
Click to collapse
Swapping out the PNG's only works on the computer I've tried on the phone but no dice. Again, make sure you do not extract the ROM, or changing the images will not work!
Correction: NinjaMorph in the Google Play store can alter images from the phone, though its a little bit harder to use in my opinion.
Adizzzle said:
Swapping out the PNG's only works on the computer I've tried on the phone but no dice. Again, make sure you do not extract the ROM, or changing the images will not work!
Correction: NinjaMorph in the Google Play store can alter images from the phone, though its a little bit harder to use in my opinion.
Click to expand...
Click to collapse
Okay, so I have downloaded Ninjamorph, and I somehow can not find the .png for the notification background for 4.1.1. I'm on the stock ROM, Do you happen to know what the file name is?
Pikezer1337 said:
Okay, so I have downloaded Ninjamorph, and I somehow can not find the .png for the notification background for 4.1.1. I'm on the stock ROM, Do you happen to know what the file name is?
Click to expand...
Click to collapse
I believe that is a hex value in one of the xml files. you would need to decompile and edit the xml to allow custom png images as the background.
BYOBret said:
I believe that is a hex value in one of the xml files. you would need to decompile and edit the xml to allow custom png images as the background.
Click to expand...
Click to collapse
Sounds a tad complicated
Adizzzle said:
Sounds a tad complicated
Click to expand...
Click to collapse
Yeah, it requires a bit more work. I am looking for the thread where I found the info, but xda search is down. I will link as soon as I find it.
BYOBret said:
Yeah, it requires a bit more work. I am looking for the thread where I found the info, but xda search is down. I will link as soon as I find it.
Click to expand...
Click to collapse
Thanks I wanted to look into this. :beer:
Adizzzle said:
Thanks I wanted to look into this. :beer:
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1770698
This should still apply. Check post 2.
...and this one should help if you have questions about modifying the apk
http://forum.xda-developers.com/showthread.php?t=2147425

[Q] Where to find the status bar pattern in SystemUI.apk or framework-res.apk

Hi guys, I'm looking for the status bar pattern in the SystemUI.apk or framework-res.apk in order to change it into a full transparent white through ZipThemer (and finally have a transparent status bar in 4.2.2 stock :victory
But there's so many png in those files that I don't know which one I should use
Can you guys help me ?
Many thanks !
PS : Here are my files if you want to check quickly : https://www.box.com/s/4ij73xgwutyin6bmmkih
UP
Next time, try Google search if you aren't comfortable with xda search.
Literally the first link when I searched for "status bar png systemUI.apk"
Please read the entire thread before you do anything. The instructions in the OP are flawed.
Hung0702 said:
Next time, try Google search if you aren't comfortable with xda search.
Literally the first link when I searched for "status bar png systemUI.apk"
Please read the entire thread before you do anything. The instructions in the OP are flawed.
Click to expand...
Click to collapse
Thank you but it didn't work I've tried many tutorial by now and it didn't work. I really want to achieve it through ZipThemer because I want to be able to change quite easily
azertguigui said:
Thank you but it didn't work I've tried many tutorial by now and I didn't work. I really want to achieve it through ZipThemer because I want to be able to change quite easily
Click to expand...
Click to collapse
With the new roms this is not an option as it is no longer a png file file a combo of color codes thoughout the systemui and framework res. It took me 3 months to find all the changes to redirect it to a png
zelendel said:
With the new roms this is not an option as it is no longer a png file file a combo of color codes thoughout the systemui and framework res. It took me 3 months to find all the changes to redirect it to a png
Click to expand...
Click to collapse
I'm not sure I understand your post. You mean I have to change .xml files to apply a transparent status bar ? That is not a problem with ZipThemer, right ?
azertguigui said:
I'm not sure I understand your post. You mean I have to change .xml files to apply a transparent status bar ? That is not a problem with ZipThemer, right ?
Click to expand...
Click to collapse
What I mean depending on your rom is that you will have to adjust the color codes. Your issues is that the main place one of these changes needs to be made are in a place tat cant be adjusted with zip themer.
zelendel said:
What I mean depending on your rom is that you will have to adjust the color codes. Your issues is that the main place one of these changes needs to be made are in a place tat cant be adjusted with zip themer.
Click to expand...
Click to collapse
Ok so what would be the solution ? (without ZipThemer)
(By the way thanks for helping me )
azertguigui said:
Ok so what would be the solution ? (without ZipThemer)
(By the way thanks for helping me )
Click to expand...
Click to collapse
You would have to decompile the both Framework-res apk and the systemui.apk and make about 15 xml edits to redirect it to an image and then remove a few places. Then recompile the apks and then flash them. This would have to be done for each rom you flash.
What are you trying to do over all?
zelendel said:
You would have to decompile the both Framework-res apk and the systemui.apk and make about 15 xml edits to redirect it to an image and then remove a few places. Then recompile the apks and then flash them. This would have to be done for each rom you flash.
What are you trying to do over all?
Click to expand...
Click to collapse
I just want a transparent status bar :crying:
azertguigui said:
I just want a transparent status bar :crying:
Click to expand...
Click to collapse
This option is in most custom roms. What rom are you running?
zelendel said:
This option is in most custom roms. What rom are you running?
Click to expand...
Click to collapse
4.2.2 stock with some mods (beats louder, a custom battery in status bar, a new locking...)
I agree that I have no idea why CM doesn't add this in their most recent ROM's, making the statusbar transparent is such an improvement to the UI immediately

Categories

Resources