Related
i decided to make my taskbar and tasktray transparent so i pulled framework-res from my phone, extracted and modified the images, and then made a flashable zip and reflashed it (i used the update-script from a theme i have that replaces the framework-res so i know it works). it flashes and boots fine and doesnt bootloop or anything but any app i open whether it be settings or gmail or root explorer force closes and theres no way to do anything but scroll on my home screen. the only thing that works is the usb connection type picker.
images i modified:
activity_title_bar.9.png
status_bar_background.png
status_bar_close_on.9.png
status_bar_header_background.9.png
status_bar_item_app_background_normal.9.png
status_bar_item_background_focus.9.png
status_bar_item_background_normal.9.png
status_bar_item_background_pressed.9.png
title_bar_portrait.9.png
i have a sneaking suspicion that its either the title_bar_portrait.9.png and/or the activity_title_bar.9.png
or just *.9.png files in general. all are rgb color and between 50% and 75% opacity if it matters
please help
edit- i took out the title_bar_portrait.9.png and the activity_title_bar.9.png and it works now so it was one or both of them. does anyone know why they broke everything and how to make it so they dont?
Id carry this over to the Q & A forum cause u gonna get told lol
Sent from my phone... I think using Tapatalk??
Patch9 files are not normal png files. You may have destroyed the .9 data by editing it. Also, take a clean copy of your original framework-res.apk off your phone and then using 7zip just open the file (don't unzip), and then drag and drop your modified images into the appropriate folders in the apk. Don't try and resign or make a new framework file.
nukedukem said:
Also, take a clean copy of your original framework-res.apk off your phone and then using 7zip just open the file (don't unzip), and then drag and drop your modified images into the appropriate folders in the apk. Don't try and resign or make a new framework file.
Click to expand...
Click to collapse
thats what i did when i broke it but i fixed it doing that too
nukedukem said:
Patch9 files are not normal png files. You may have destroyed the .9 data by editing it.
Click to expand...
Click to collapse
how can i modify them and restore the data? right now though i have the .9 images from above minus activity_title and title_bar modified and the system seems to be working like a charm. all i did was change the opacity in gimp aside from the background which i changed to a digi camo pattern
daktah said:
how can i modify them and restore the data? right now though i have the .9 images from above minus activity_title and title_bar modified and the system seems to be working like a charm. all i did was change the opacity in gimp aside from the background which i changed to a digi camo pattern
Click to expand...
Click to collapse
You could open the images with the 9patch tool in the sdk and double check them. Then save it using the tool.
Sent from your mom's phone.
i never noticed that before
so just open them with it and save them and i should be all good?
You could try just re-saving them. If that doesn't work, you can use the tool to check for problems. Maybe the easiest way to make sure everything is ok would be to open the original 9patch image and look at how the borders are drawn, then make sure you have the same borders in your image. I'm not an expert on 9patch files, but hopefully that will help you.
hey guys.
i'm having a frustrating issue when editing framework-res.apk to include the rectangle battery mod.
this is a long post...please DO NOT POST GENERIC ANSWERS WITHOUT READING THE POST FIRST!!!
i'm used to editing framework-res.apk and all other .apks on my phone for various purposes. i use a combination of 7zip and apkmanager 4.9 to extract, replace, decompile/recompile, etc. depending on what i'm doing.
at this point here's what i'm trying to do:
DaGunn provided me with a modified framework-res.apk which includes a buttonized power control widget (from JsChiSurf's thread). this is v2.0 (on the 3.29 ota). previously i had v1.0 which I had fully customized to my liking.
the file provided to me by DaGunn has the buttonized look, and some smooth sense elements, as well as the super circle battery meter.
i opened framework-res.apk he provided with 7zip and replaced all the 901 images in res/drawable-hdpi with my own 901 image files from my existing framework. these files all have the same exact name and same exact extensions. (hence when I drag and drop into the new framework-res.apk in 7zip i get a direct replacement rather than having extra files).
this has worked countless times in the past. as a matter of fact, it worked 99% of the way this time. all the framework images went back to my customized images. except the battery disappeared.
i narrowed it down to the battery images. if i leave his 101 circle battery .pngs and replace every other file in framework-res, it works just fine. all my images show and the battery shows up in the circle style. if i then just replace his 101 circle battery .pngs with my 101 matted blues rectangle battery .pngs, which are the same exact names (i checked!) and extension, and after I optimized them almost exactly the same file size as well, everything goes to crap. the battery doesn't show up at all in the title bar.
if i plug in the phone, the rectangle charging animation works, the download animation works, all other smooth sense animations that I have replaced with the mattedblues files from my previous framework work. except for the battery.
now, if his .pngs work, and mine replace his directly with the same exact name and extension, why would the battery display suddenly disappear?!
I'm being told it has to do with resource IDs, but here's the problem. I was provided a "guide" on how to properly modify framework-res by one of the guys involved in MattedBlues (beatblaster). in it I was told that I only need to recompile framework-res after adding NEW .pngs, that if the .pngs were already accounted for in resources.arsc then trying to recompile would throw errors and instead I should replace those .pngs with 7zip. that's what i'm trying to do but as I said, then the battery meter doesn't work.
if i decompile DaGunn's original file, I'm able to recompile it just fine. keep in mind this file already has a lot of modifications on it as it is. but if i decompile his framework, and I replace his .pngs with mine, and try to recompile, I get thousands of lines of error in the log. all having to do with public.xml, which I'm being told goes back to resource IDs.
what am i missing here? i know how to remove the battery display from the title bar so I dont have that empty space, but I do enjoy my percentage battery and I would like to get this to work!
any input will be greatly appreciated...
+5 points for you if you read this far!
I'm not clear if you are recompiling or just dropping the images in, but if you are recompiling try making all your xml changes without adding the new images. Then after its compiled drop your new images in.
Sent from my PC36100 using XDA App
i'm not modifying any xmls. only replacing .pngs. it's specifically clarified in the OP.
the existing framework, with its modified .xmls and .pngs as given to me decompiles and recompiles just fine. if i decompile, then replace the .pngs with my own, and try to recompile, then it gives error. if i just open it in 7zip and replace the .pngs with my own, the battery disappears, but no force closes or error messages.
anyone else?
Are any of the .png files you are replacing have the 9.png extension? I know modifying these is very tedious and requires a more difficult process. Also can u post the errors in the apkmanager log?
Sent from my DROIDX using XDA App
nope. the files are stat_sys_battery_0 through stat_sys_battery_100. all .png not a single one in any other extension.
i can't post the apk manager log because it is literally thousands of lines of errors.
what I can do is give you the framework as I have it, working with his battery .pngs and a separate .zip with my battery .pngs, so you can try to do it yourself and see the problem/compile errors.
it really is weird...or stupidly simple!
Firstly you SHOULD NOT be decompiling just to swap images, even .9 pngs. You only need to decompile if you are editing xml files which by reading your post you aren't. To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
t3project said:
Firstly you SHOULD NOT be decompiling just to swap images, even .9 pngs. You only need to decompile if you are editing xml files which by reading your post you aren't. To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
Click to expand...
Click to collapse
+1
The reason I was confused about what you were trying to accomplish is because you don't need to decompile unless changing xml's.
Thats what I do for non system apps. I'll give it a try in the morning and see if it makes a difference.
Swyped from my HTC Evo 4G on the MetroPCS 1X network!
Ok first if you go to recompile something and you get errors usally the first error is the one causing the problem. Look and see what the first error is and fix it, like has been said what you are trying to do using 7 zip is a good way to do it, not decompiling. You said this is how you prefer way to do it anyway so that's good.
Second I have found at times that 7 zip does not properly replace threw images so weird things happen, only happens sometimes. With that said try using apk manager to unzip the apk replace the images and rezip it do not sign it. See if that works
Third. If all else fails download nijamorph from the market. Put the images you want on your scard where I can find them easy. Open nijamorph and start a new project navigate to your framework-res.apk.from here you can do two things first you can press existing project and find what you are looking for and change one at a time or the easy way. Close the app open your favorite file manager find the pngs you are going to use, copy them, then navigate to android themes/workspace in there you will find the framework-resapk folder, in there is everything just like the apk so paste the files were they go (that last step can all be done on the computer if that is easier for you.) Next open your nijamorph app and press finish project follow the prompts and let it do its thing. If your phone does not reboot reboot it.you should be good to go.
Like always do a backup before doing these steps
Good luck
Sent from my unrEVOked using xda app
Max_Pain said:
Thats what I do for non system apps. I'll give it a try in the morning and see if it makes a difference.
Swyped from my HTC Evo 4G on the MetroPCS 1X network!
Click to expand...
Click to collapse
it works the same way when replacing pngs. compiling and recompiling is only needed if making xml/code changes. i had to learn this the hard way too. just make sure you sign system apps with option 12 instead of option 4 like you would with a non-system app.
t3project said:
To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
Click to expand...
Click to collapse
this worked!
dont know why I would have to extract, replace, compress, as I've NEVER done that with framework-res.apk, only when editing apps that need to be resigned. oh well, it worked
I think you misunderstood what I told you in the guide I gave you which is you only need to decompile/recompile when you are making XML code changes as stated above in a previous post. When I wrote that guide for you I wrote it thinking you wanted to add more features to the original power control widgets (such as smooth mods). If you want to simply replace PNGs, as stated previously, all you need to do is replace the PNGs without decompiling and recompiling.
In this instance, the problem you're running into is that you're trying to compile the framework using already-customized PNGs which will not work (another point that was stated in the guide as well )
So, in conclusion, if all you want to do is change the PNGs all you gotta do is (and you probably already know this but I'm including it to be thorough):
- Open archive (framework) in 7-zip
- Navigate to framework-res/res/drawable-hdpi
- Add your desired PNGs into the 7-zip window
- Close the 7-zip window and answer yes when 7zip asks if you want to update the archive
- Flash framework onto your phone
- All should be well
- When using this method there is no signing necessary!
Again, as stated previously, the only time you need to decompile/recompile is when you're going to edit an XML (or make any other code changes). So, for a final example of this, let's say you wanted to take DaGunn's power widgets framework but you wanted to change the "text highlight" color. What you would do then is this:
- Decompile DaGunn's framework in APK manager (option 9)
- Navigate to /projects/framework-res.apk/values/styles..xml
- Search for for "<item name="textColorHighlight">" and change the color HEX code
- Save the changes to styles.xml
- Compile the framework in APK manager (option 11)
- When asked if this is a system apk answer Y for yes
- When asked if you want to copy additional files to reduce the amount of errors answer Y for yes
- When prompted about the "keep" folder, open a file manager and navigate to /<apk_manager_folder>/keep and DELETE the resources.arsc file
- Go back to the APK manager window and press any button to finish the compile process
- Back in your file manager, go back to /<apk_manager_folder>/place-apk-here-for-modding/ folder, grab the unsignedFramework-res.apk, rename it to framework-res.apk and flash it however you flash it.
- Test your changes (in this example, the text highlight color)
This concludes my post.
thanks for the clarification beat.
but the problem was I was just opening framework-res.apk with 7zip, doing it like you're saying to do in the first part of your post above, and the battery meter would disappear instead of showing the mattedblues battery images instead of the circle ones.
if i left his .pngs in, the battery would show. if i replaced his with mine using 7zip, the battery would disappear.
this confused me because this is exactly the way that I've been integrating mattedblues into every framework i get. i open in 7zip, replace existing files with my own, and bam, everything works. this time it didnt!
this got fixed by extracting, replacing, and compressing again in apk manager 4.9.
i tried decompiling/recompiling simply because I was so out of ideas as to how else to go about it. I don't need to make any .xml changes to DaGunn's file because he had already integrated most of smooth sense with the percentage battery and v2 of the power widgets
anyways, thanks for the clarification.
beatblaster said:
So, in conclusion, if all you want to do is change the PNGs all you gotta do is (and you probably already know this but I'm including it to be thorough):
- Open archive (framework) in 7-zip
- Navigate to framework-res/res/drawable-hdpi
- Add your desired PNGs into the 7-zip window
- Close the 7-zip window and answer yes when 7zip asks if you want to update the archive
- Flash framework onto your phone
- All should be well
- When using this method there is no signing necessary!
Click to expand...
Click to collapse
max, not sure why this wouldnt work for you.
t3project said:
max, not sure why this wouldnt work for you.
Click to expand...
Click to collapse
no. this method is SUPPOSED TO WORK, as I said in the original post. this is how I've done every single change to framework-res.apk in the past. that is why I felt the need to ask for help. because the same thing that has always worked, suddenly wasn't working anymore!
for some reason, using 7zip WAS NOT WORKING to replace the battery .pngs....but ONLY those files. every other file was replaced using 7zip and they all worked. the only files I ended up having to replace through apk manager extract/compress method you gave me were the battery images.
thanks everyone
Max_Pain said:
no. this method is SUPPOSED TO WORK, as I said in the original post. this is how I've done every single change to framework-res.apk in the past. that is why I felt the need to ask for help. because the same thing that has always worked, suddenly wasn't working anymore!
for some reason, using 7zip WAS NOT WORKING to replace the battery .pngs....but ONLY those files. every other file was replaced using 7zip and they all worked. the only files I ended up having to replace through apk manager extract/compress method you gave me were the battery images.
thanks everyone
Click to expand...
Click to collapse
ohh i know. i use the way i told you because i just like to see the images while im playing with them. that way i know for sure whats up.
Hi, i have a theme installed on my sgs 2 but have found a pic that i would like to add to my settings tab, heres what i have done, i took the zip file i am using and extracted framework-res.apk, i then decompiled apk and i have deleted the pic thats on my settings now and replaced it with the pic i would like to use, recompiled apk and then rezipped, however when i flashed it all seemed to go ok but phone doesnt get past the first splash screen on boot, just stays black, i am not in anyway trying to make my own theme just would really like this pick in settings tab, could someone help me as to where i have gone wrong!! Thanks in advance
sn0wman1 said:
Hi, i have a theme installed on my sgs 2 but have found a pic that i would like to add to my settings tab, heres what i have done, i took the zip file i am using and extracted framework-res.apk, i then decompiled apk and i have deleted the pic thats on my settings now and replaced it with the pic i would like to use, recompiled apk and then rezipped, however when i flashed it all seemed to go ok but phone doesnt get past the first splash screen on boot, just stays black, i am not in anyway trying to make my own theme just would really like this pick in settings tab, could someone help me as to where i have gone wrong!! Thanks in advance
Click to expand...
Click to collapse
54 views and no replies, can any one help, please!! :crying:
I assume the original image is actually in framework-res.apk?
If so, I suspect it's a decompiling/recompiling problem.
Also, if it's just a png or jpg you're replacing, there's no need to decompile - just drop the new image into the correct folder in the apk using 7-Zip.
Spannaa said:
I assume the original image is actually in framework-res.apk?
If so, I suspect it's a decompiling/recompiling problem.
Also, if it's just a png or jpg you're replacing, there's no need to decompile - just drop the new image into the correct folder in the apk using 7-Zip.
Click to expand...
Click to collapse
Hi, thanks for reply, basically i have just taken a pic from someoneone elses theme and swapped pic with that of the theme i am using so should be right format (right?) but how when i have extracted with 7zip how do i get it all back as .apk file... i used a program called formatter to do it first time!!
Don't extract it, make sure the image you want to replace is named the same and it isn't a .9.png...open the framework-res with 7zip (open archive) navigate to the necessary folder and drop your new png in. That should work
If you extract it you break the signature, that's why you're getting a bootloop.
Sent from my GT-I9100 using xda premium
sn0wman1 said:
Hi, thanks for reply, basically i have just taken a pic from someoneone elses theme and swapped pic with that of the theme i am using so should be right format (right?) but how when i have extracted with 7zip how do i get it all back as .apk file... i used a program called formatter to do it first time!!
Click to expand...
Click to collapse
Spannaa said:
I assume the original image is actually in framework-res.apk?
If so, I suspect it's a decompiling/recompiling problem.
Also, if it's just a png or jpg you're replacing, there's no need to decompile - just drop the new image into the correct folder in the apk using 7-Zip.
Click to expand...
Click to collapse
Thanks matey, just done itand it works great, didnt realise it was that easy...
EDIT: Also thanks to you m1keyb, you answered as i sent this post!! lol :good:
If the picture you're replacing is in the same apk and is the same format (png, jpg) and has the same name and is the same size (px x px) then it ought to be OK.
If the picture you want use is OK, open the apk with 7-Zip (don't unzip it), and simply drop the picture in the correct folder and it'll replace the picture that's already there.
Edit: sn0wman1 edited the post I was replying to and m1keyb replied too - lol, I'm slow!
Hey, you guys seem to know what you are talking about!!, is there a way to get a full image on my lockscreen instead of having to crop about a third of it.. Thanks again for your help
sn0wman1 said:
Hey, you guys seem to know what you are talking about!!, is there a way to get a full image on my lockscreen instead of having to crop about a third of it.. Thanks again for your help
Click to expand...
Click to collapse
resize the pic to same size as lockscreen:laugh:
Thanks matey, what size would that be?
SGS2 - 480px X 800px
I've been getting this bootloop for the last 18hours of trying
I'm on stock ROM, with Gin2Ics V1.0 theme, and using Overdose1986 Notification toggle, but I change the wifi icon of Overdose1986 using ApkChanger and it works..
and then I want to change the battery icon of FlorinXstyle (Gin2Ics V1.0) to something like this http://forum.xda-developers.com/showthread.php?t=1472766 so I tried decompile the framework-res (should be from Gin2Ics theme) then put some new battery icon from http://forum.xda-developers.com/showthread.php?p=19938404 , then re-compile and i got bootloop..
Am i missing something or doing wrong here? well actually I just read some of the post here on how to decompile/recompile framework-res but mine always ends up in bootloop.. can somene help me thanks
I think just to replace the battery icons you don't need to decompile, just open the framework apk with 7 zip or winrar, and paste the images in, checking the names match. There might bee more or less, but so long as the names match, shouldn't be a prob.
When done, install as you have been.
Sent from my metalliArc S
Metallijim said:
I think just to replace the battery icons you don't need to decompile, just open the framework apk with 7 zip or winrar, and paste the images in, checking the names match. There might bee more or less, but so long as the names match, shouldn't be a prob.
When done, install as you have been.
Sent from my metalliArc S
Click to expand...
Click to collapse
thanks for reply, after I put the images in, what should I do next? how can I make it again to an apk file without compiling it and how should I install it?
EDIT#1: I still got a bootloop
asderth8000 said:
thanks for reply, after I put the images in, what should I do next? how can I make it again to an apk file without compiling it and how should I install it?
EDIT#1: I still got a bootloop
Click to expand...
Click to collapse
To replace images use WinRAR, rename .pngs you have the same as they are in drawable-hdpi (stat_sys_battery_0-100, stat_sys_battery_charge_0-100 stat_sys_battery_charge_full, stat_sys_battery_full, stat_sys_battery_unknown) if they aren't already renamed. So open framework-res.apk with Winrar, go to drawable-hdpi, click Add button, choose all the icons you want, click ok, choose Store compression method and OK. Then you shouldn't have a bootloop.
It won't change from apk to any other file.
n3n00 said:
To replace images use WinRAR, rename .pngs you have the same as they are in drawable-hdpi (stat_sys_battery_0-100, stat_sys_battery_charge_0-100 stat_sys_battery_charge_full, stat_sys_battery_full, stat_sys_battery_unknown) if they aren't already renamed. So open framework-res.apk with Winrar, go to drawable-hdpi, click Add button, choose all the icons you want, click ok, choose Store compression method and OK. Then you shouldn't have a bootloop.
It won't change from apk to any other file.
Click to expand...
Click to collapse
I did what you said but no luck, or maybe I'm using incompatible files but all I do is change the png files, and they have the same name already, I'll call it a night maybe try something tomorrow thanks
http://forum.xda-developers.com/showthread.php?t=1374394
Are you changing permissions when you put the framework-res back in the framework folder?
yes I'm changing permissions, rw-r--r--, but always ends up in bootloop, I read somewhere post that after changemjg permission and move to framework folder, if phone reboot itself then there must be wrong in what i' m doing, cause thats what happen after I move the framework-res to framework folder, after finish replacing the one in the folder, phone shutdown and start to bootloop..
Sent from my LT18i using xda app-developers app
Do you have .odex files in system/app? Also which battery mod are you trying to add?
n3n00 said:
Do you have .odex files in system/app? Also which battery mod are you trying to add?
Click to expand...
Click to collapse
i dont know actually about odex files i'll check them later,btw what about odex files?
its jamesgary's battery mod
Sent from my LT18i using xda app-developers app
i think i dont have .odex files in my system/app folders
Sent from my LT18i using xda app-developers app
Can somebody please help me make my pulldown bar on CodeNameAndroid just like this? It would be amazing if anybody could make a zip theme or flashable zip. The forum where I got this from has a download but it doesn't have the file for zip themer and it causes my UI to crash on boot up after flash. Stock or CNA.
I don't know how to make a ZT file or flashable zip, but I know which files need to be altered...it's not hard, you only have to change out two files in your SystemUI.apk. I'll type out an explanation if you want to try.
I'll try.
Sent from my Galaxy Nexus using xda
Sure. I hope this means I don't have to recompile or anything. I hope its just editing in photoshop.
warfexion said:
Sure. I hope this means I don't have to recompile or anything. I hope its just editing in photoshop.
Click to expand...
Click to collapse
Nah, for basic image changes you don't need even need to decompile/recompile anything.
You just have to pull your SystemUI.apk from system/app. You can do it either through adb or copy-paste to sdcard and then your PC using a file explorer app. Use this PNG I uploaded https://www.box.com/s/93whafwr36fzyijvkx86, and copy-paste it (use WinRAR or 7Zip) to the res/drawable-xhdpi folder of your SystemUI.apk. Push/copy-paste SystemUI.apk back to system/app, set permissions to rw-r-r, and then reboot. It should work.
As always though, have a nandroid handy just in case, or have your original SystemUI.apk ready if you need to push it back.
EDIT: Tried it just now to make sure it worked. Attached a pic if you want to see. Also...I can't tell from the pic you attached whether the top part where the date/time is is transparent as well. If you wanted that part transparent, use this PNG: https://www.box.com/s/hh5h8ptqpc8nojw8x292, replace it in SystemUI.apk using the exact same steps and that part will be the same transparent black as the rest.
dirtygoldfish said:
Nah, for basic image changes you don't need even need to decompile/recompile anything.
You just have to pull your SystemUI.apk from system/app. You can do it either through adb or copy-paste to sdcard and then your PC using a file explorer app. Use this PNG I uploaded https://www.box.com/s/93whafwr36fzyijvkx86, and copy-paste it (use WinRAR or 7Zip) to the res/drawable-xhdpi folder of your SystemUI.apk. Push/copy-paste SystemUI.apk back to system/app, set permissions to rw-r-r, and then reboot. It should work.
As always though, have a nandroid handy just in case, or have your original SystemUI.apk ready if you need to push it back.
EDIT: Tried it just now to make sure it worked. Attached a pic if you want to see. Also...I can't tell from the pic you attached whether the top part where the date/time is is transparent as well. If you wanted that part transparent, use this PNG: https://www.box.com/s/hh5h8ptqpc8nojw8x292, replace it in SystemUI.apk using the exact same steps and that part will be the same transparent black as the rest.
Click to expand...
Click to collapse
Thanks so much dude your awesome! IDK anything with android that isn't flashable ends up usually a mess in my hands so thanks and finally I don't have to stare at that ugly grey!
warfexion said:
Thanks so much dude your awesome! IDK anything with android that isn't flashable ends up usually a mess in my hands so thanks and finally I don't have to stare at that ugly grey!
Click to expand...
Click to collapse
Lol well that's what backups are for! And you're welcome, glad you got it sorted out.