Posted it here because i need a dev.
I pulled my Framework-res.apk and modified all the icons for everything. I decompiled using apktool.
My question is what steps do i take now (do i need to sign it, what a good tool to recompile it as apktool does and gives me a framework-res.apk but caused my phone not to boot up)..also someone said seomthing about resources.arsc or something..not sure where to go...thanks for your help.
Open ur new apk using 7zip (righr click>7zip>open archive) and do the same with ur old one. Delete the resources.xxxx(i dont know the name by heart lol) and drag and drop the one (by one i meant the resources.xxxx file) from the new zip to the old zip and adb push ur old frameworkres apk and reboot
Sent from my PG86100 using XDA App
kpkimmel said:
Posted it here because i need a dev.
I pulled my Framework-res.apk and modified all the icons for everything. I decompiled using apktool.
My question is what steps do i take now (do i need to sign it, what a good tool to recompile it as apktool does and gives me a framework-res.apk but caused my phone not to boot up)..also someone said seomthing about resources.arsc or something..not sure where to go...thanks for your help.
Click to expand...
Click to collapse
sounds more like a question. Use apk manager and or 7zip
how does just that one file carry over all the new pics and stuff i changed...
edited......
What exactly have you edited? If you just change non patch9 images... then you can just drag and drop the new images into the apk (may have to rename apk to zip).
If they are patch9's... you need to..
decompile framework-res.apk (apktool d framework-res.apk)
swap out images
recompile (apktool b framework-res)
Now take the newly compiled apk (in the /dist folder). Open it up and take the edited images (only the ones you need changed) and put them into your original apk.
No need to resign just push it to your phone and verify that it works
If you are editing xml files in /values* or /layout..
do the same as above, except after re-compiling, you're going to swap over the resources.arsc file to the original apk.
This is using apktool... in my experience apk manager doesn't do the job to my expectations... so i just do it manually with apktool.
Lemme know if u need anything more, or if i didnt touch on a specific situation.
Btw, maybe to combat the retarded comments about q&a and being in the right section... maybe turn the OP into a How-To?
preludedrew said:
What exactly have you edited? If you just change non patch9 images... then you can just drag and drop the new images into the apk (may have to rename apk to zip).
If they are patch9's... you need to..
decompile framework-res.apk (apktool d framework-res.apk)
swap out images
recompile (apktool b framework-res)
Now take the newly compiled apk (in the /dist folder). Open it up and take the edited images (only the ones you need changed) and put them into your original apk.
No need to resign just push it to your phone and verify that it works
If you are editing xml files in /values* or /layout..
do the same as above, except after re-compiling, you're going to swap over the resources.arsc file to the original apk.
This is using apktool... in my experience apk manager doesn't do the job to my expectations... so i just do it manually with apktool.
Lemme know if u need anything more, or if i didnt touch on a specific situation.
Btw, maybe to combat the retarded comments about q&a and being in the right section... maybe turn the OP into a How-To?
Click to expand...
Click to collapse
Thank you very much..finally...one last question, where do i put the wallpaper so when the system is fully booted it shows the wallpaper i want? Thanks.
kpkimmel said:
Thank you very much..finally...one last question, where do i put the wallpaper so when the system is fully booted it shows the wallpaper i want? Thanks.
Click to expand...
Click to collapse
There's an xml edit for it... but forgot it off the top of my head... quickest way is to replace system/customize/resource/shows_over.jpg with your image.
preludedrew said:
There's an xml edit for it... but forgot it off the top of my head... quickest way is to replace system/customize/resource/shows_over.jpg with your image.
Click to expand...
Click to collapse
Thanks you, sorry about the stupid framework-res question...i knew the answer but had been so long forget the simplest of steps....instead of normal compression i was using store instead.....duh.......thank you though for the reminder because 7zip will automatically restore the same it was decompressed with, unlike that crap winrar. Have a good one man and thank you again.
Related
If the battery icons are just png files, couldn't I create my own images in photoshop and replace the framework-res.apk files with my custom icons? If so, does anyone know the typical dimensions for the png images? I replaced my original battery with the ICS battery thanks to a suggestion of using NinjaMorph.
You can extract the framework-res. Apk from the system folder. Tinker around with what you find inside it. Use 7zip to modify the zip without having to resign it.
Now, flashing the update zip is not going to be easy without recovery. But you can assess png dimensions, and tinker with modding them meanwhile. It's a hobby of mine also
Sent from my HTC ThunderBolt using XDA Premium App
Sean Hicks said:
You can extract the framework-res. Apk from the system folder. Tinker around with what you find inside it. Use 7zip to modify the zip without having to resign it.
Now, flashing the update zip is not going to be easy without recovery. But you can assess png dimensions, and tinker with modding them meanwhile. It's a hobby of mine also
Click to expand...
Click to collapse
Thanks. I used the ICS battery info that I have now which was 25x25 png images and created my own battery images and animations, but when I use NinjaMorph to resign the apk nothing happens on reboot. Not sure if the sizing is off or what. So when you use 7zip you just flash the new zip in recovery? Can't seem to find the apk for 7zip
Click to expand...
Click to collapse
boyj600 said:
Sean Hicks said:
Thanks. I used the ICS battery info that I have now which was 25x25 png images and created my own battery images and animations, but when I use NinjaMorph to resign the apk nothing happens on reboot. Not sure if the sizing is off or what. So when you use 7zip you just flash the new zip in recovery? Can't seem to find the apk for 7zip
Click to expand...
Click to collapse
When you use NinjaMorph, make sure to 'finish' the project by clicking on the button, then on the project. Also, make sure the files were named exactly the same and were replaced. The battery icons used in the framework-res.apk were the ones names like such:
stat_sys_battery_bn_40.png
stat_sys_battery_bn_60.png
stat_sys_battery_bn_80.png
etc....
Click to expand...
Click to collapse
I'm piggybacking on this thread, but I have a question about replacing the battery images.
I've got the images (from this post: http://forum.xda-developers.com/showpost.php?p=21003708&postcount=10), but when I open the the image folder (with NinjaMorph) in framework-res.apk/res/drawable, I can't find the corresponding image files.
In that folder, where I thought the battery images were, I have a few .xml files (stat_sys_battery.xml, stat_sys_battery_bn.xml etc) and only 2 .png files (stat_sys_battery_charge_anim6.png and stat_sys_battery_charge_anim7.png).
Am I in the wrong place, or where have I messed up along the way? Thanks in advance for any replies.
as far as image sizes go mine are 38x38 png files and they work fine. i have used several different sets without fail. also to save time you dont have to change the images, just the ones with the "bn" in the name.
also if you are doing all this on a computer you can download metamorph from the market, there is a free and paid version, and you can create the file path to the images using correctly named folder in a zip file and use metamorph to auto install. i have not tried this method myself but it should work.
@topched in ninjamorph start a new project, go to system > framework > framework-res.apk > res > drawable-mdpi, scroll down till you see the battery images.
also if you wanted to create the metamorph the file path is framework-res > res > drawable-mdpi
and if you wanted to change your wifi meter to match your battery meter, like i do, the path is system > app > SystemUI.apk > res > drawable-mdpi
metamorph filepath would be SystemUI > res > drawable-mdpi
iirc its in drawable-mdpi
Edit: oops didnt see the last reply.
Sent from my HTC EVO 3D X515m using xda premium
Once you rezip the framework-res.apk, you can use adb to replace it as well.
adb devices
adb remount
adb push c:\location of apk file /system/framework/framework-res.apk
adb reboot
That will allow you to change the images without recovery. though I think nearly everyone has recovery now anyhow.
Also note, you want to replace the images into the framework-res.apk file without extracting it. open it with winrar or 7zip, navigate to the drawable-mdpi folder, drop images in and click ok on adding/altering the file. Then push it back.
Ok I finally got the icons replaced after tinkering and trying the suggested methods. Thanks for all of the input and direction. This is my Android battery. Pretty basic, but something I thought might look cool.
Know-Fear said:
Once you rezip the framework-res.apk, you can use adb to replace it as well.
adb devices
adb remount
adb push c:\location of apk file /system/framework/framework-res.apk
adb reboot
That will allow you to change the images without recovery. though I think nearly everyone has recovery now anyhow.
Also note, you want to replace the images into the framework-res.apk file without extracting it. open it with winrar or 7zip, navigate to the drawable-mdpi folder, drop images in and click ok on adding/altering the file. Then push it back.
Click to expand...
Click to collapse
i turn the zip into an apk and edit the images using ninjamorph
kcpaynev1 said:
i turn the zip into an apk and edit the images using ninjamorph
Click to expand...
Click to collapse
Ninjamorph has really been hit or miss with me. I have always used ninjamorph and metamorph before that with high rates of success. On the NT, it seems like it will work sometimes, and other times it does nothing. I noticed it mostly with the menu.background.png trying to alleviate the white on white issue. I replaced the image at least 20 times and it did nothing. Finally I just gave up on it and pushed the new .apk with adb and it was done.
Know-Fear said:
Ninjamorph has really been hit or miss with me. I have always used ninjamorph and metamorph before that with high rates of success. On the NT, it seems like it will work sometimes, and other times it does nothing. I noticed it mostly with the menu.background.png trying to alleviate the white on white issue. I replaced the image at least 20 times and it did nothing. Finally I just gave up on it and pushed the new .apk with adb and it was done.
Click to expand...
Click to collapse
Only time I have issues is when I forget to turn on usg debugging after a reboot
Sent from my Nook Tablet using Tapatalk
Know-Fear said:
Ninjamorph has really been hit or miss with me. I have always used ninjamorph and metamorph before that with high rates of success. On the NT, it seems like it will work sometimes, and other times it does nothing. I noticed it mostly with the menu.background.png trying to alleviate the white on white issue. I replaced the image at least 20 times and it did nothing. Finally I just gave up on it and pushed the new .apk with adb and it was done.
Click to expand...
Click to collapse
I was having this issue but used ninjamorph combined with 7zip on my pc and the two worked together flawlessly
boyj600 said:
If the battery icons are just png files, couldn't I create my own images in photoshop and replace the framework-res.apk files with my custom icons? If so, does anyone know the typical dimensions for the png images? I replaced my original battery with the ICS battery thanks to a suggestion of using NinjaMorph.
Click to expand...
Click to collapse
heres an example on how to edit the files in framework-res.apk.
what i did was extract the Battery.png's into a folder, then i edit them in paint, then i use photoshop to make the background transparent because paint saves them with a white background. im doing em 1 by one. its very time consuming. once i am done editing them, i will move them back into framework-res.apk (Hopefully overwriting the other files of the same name).. then from there, im still looking on how to create a flashable zip.
NOTE: i always save them with the same name as when they were extracted from framework-res.apk
funnyangrykid said:
heres an example on how to edit the files in framework-res.apk.
what i did was extract the Battery.png's into a folder, then i edit them in paint, then i use photoshop to make the background transparent because paint saves them with a white background. im doing em 1 by one. its very time consuming. once i am done editing them, i will move them back into framework-res.apk (Hopefully overwriting the other files of the same name).. then from there, im still looking on how to create a flashable zip.
NOTE: i always save them with the same name as when they were extracted from framework-res.apk
Click to expand...
Click to collapse
Let me know if you figure out the flashable zip. I've been wondering about that.
boyj600 said:
Let me know if you figure out the flashable zip. I've been wondering about that.
Click to expand...
Click to collapse
will do.
i found this. http://forum.xda-developers.com/showthread.php?t=732957 this is new to me so im gonna test it on my phone first before i share it.
funnyangrykid said:
i found this. http://forum.xda-developers.com/showthread.php?t=732957 this is new to me so im gonna test it on my phone first before i share it.
Click to expand...
Click to collapse
Sweet! I may give this a run when I get a chance. I'm trying to theme my HTC Rezound with a custom battery and anything else I can tinker with. Thanks.
Trying to modify contacts.apk to make the dialer multi-dpi compatible. Did that and it works.
My issue is recompiling the apk. Everytime I recompile the apk with apktool it looses over a megabyte in size. In my case went from 4.49MB to 3.19MB after rebuilding. Only file modified was dialer_app.xml and it's size stayed about the same.
I've brought framework-res.apk and twframework.apk into apktool. After copying the resulting contacts.apk back to the device it is not recognized.
I've also tried copying the META-INF directory from the original apk over to the new one. Still no luck. I'm new to this and if anyone has some help for me it would be greatly appreciated!
Did you sign your new apk after recompiling it ?
Do you have classes.dex and resources.arsc files in your new apk ?
since its a system apk I've read it shouldn't be signed. Only thing I did was copy the META-INF folder to the new apk. In the new apk I do see classes.dex and resources.arsc. All the files appear to be there but the apk has shrunken in size.
I'm guessing I'm missing something simple here. But I'm new to this. Been at it for a few hours haven't had any luck.
I am new in development field. I have two questions 1. Is there same meaning for building and recompiling using apk tool? 2. I know framework-res.apk is needed for apktool d com, but where and the what is the use of twframework.apk file. Please explain anyone .
Recompiled apks will be quite a bit smaller as they will have more compression applied, this is normal, just be careful as if the tool compresses it to much you will get fc's. But it should work fine.
idhbar said:
I am new in development field. I have two questions 1. Is there same meaning for building and recompiling using apk tool? 2. I know framework-res.apk is needed for apktool d com, but where and the what is the use of twframework.apk file. Please explain anyone .
Click to expand...
Click to collapse
Read the apktool website for info about framework files, as far as which one to use, if you are decompiling a la2 or la4 base use a kl2 or kk5 framework without jkays built in as the laX frameworks are kinda buggy.
Sent from my GT-I9100 using Tapatalk
So I'm trying to do a little themeing and I have some questions. For instance, if I modify idlescreen_base.apk, do I have to sign that and then also sign the .zip? I'm trying to do a full on theme, modifying every little part of the ROM. When do you have to sign the .apks and .zips? One thing I don't like is the bubble around the four icons on the lock screen, so I went in to modify that and then found more files to change and so it began. And so while I'm on it, why do some m10s decode and some don't? Gingeritis3D and ShiftS3NS3 v3.0 have a default folder, but others have Blue Sky, etc. The default folder that has sharedm10 will decode but the others don't. Just curious. I'm using ShiftS3NS3 v3.0 as my base ROM to theme, by the way.
TheBeardedMann said:
So I'm trying to do a little themeing and I have some questions. For instance, if I modify idlescreen_base.apk, do I have to sign that and then also sign the .zip? I'm trying to do a full on theme, modifying every little part of the ROM. When do you have to sign the .apks and .zips? One thing I don't like is the bubble around the four icons on the lock screen, so I went in to modify that and then found more files to change and so it began. And so while I'm on it, why do some m10s decode and some don't? Gingeritis3D and ShiftS3NS3 v3.0 have a default folder, but others have Blue Sky, etc. The default folder that has sharedm10 will decode but the others don't. Just curious. I'm using ShiftS3NS3 v3.0 as my base ROM to theme, by the way.
Click to expand...
Click to collapse
I'm not much of a themer, but I might be able to help you with the signing.
You have to sign an APK any time you decompile and recompile it. Alternatively, if you use apktool, build the apk, then take the META-INF folder and AndroidManifest.xml from the original apk and copy them to the /build/app folder of the decompiled apk. Rebuild and your apk is signed. Your essentially taking the signature from the original apk and copying it to the one you recompiled.
If you want the zip to flash, you have to sign it. If you remove anything from an already signed zip, you have to resign it.
orkillakilla said:
I'm not much of a themer, but I might be able to help you with the signing.
You have to sign an APK any time you decompile and recompile it. Alternatively, if you use apktool, build the apk, then take the META-INF folder and AndroidManifest.xml from the original apk and copy them to the /build/app folder of the decompiled apk. Rebuild and your apk is signed. Your essentially taking the signature from the original apk and copying it to the one you recompiled.
If you want the zip to flash, you have to sign it. If you remove anything from an already signed zip, you have to resign it.
Click to expand...
Click to collapse
That makes total sense. I get it now. Thanks!
orkillakilla said:
I'm not much of a themer, but I might be able to help you with the signing.
You have to sign an APK any time you decompile and recompile it. Alternatively, if you use apktool, build the apk, then take the META-INF folder and AndroidManifest.xml from the original apk and copy them to the /build/app folder of the decompiled apk. Rebuild and your apk is signed. Your essentially taking the signature from the original apk and copying it to the one you recompiled.
If you want the zip to flash, you have to sign it. If you remove anything from an already signed zip, you have to resign it.
Click to expand...
Click to collapse
Sorry I seen this thread, and was wondering if you use metamorph to theme if you add the META-INF folder and the AndroidManifest.xml to the respective theme will the .apk be able to be installed into the data/app folder?
Deftoolfinch said:
Sorry I seen this thread, and was wondering if you use metamorph to theme if you add the META-INF folder and the AndroidManifest.xml to the respective theme will the .apk be able to be installed into the data/app folder?
Click to expand...
Click to collapse
Not sure. I don't use metamorph so I can't help you there. Sorry.
Sent from my ADR6400L using xda premium
I don't use metamorph. I modify the .apk then flash in recovery. Meta and ninja morph aren't necessary once you get the hang of flashing .zips.
Hi
sorry if for expert devs this is a basic question
I have been looking around but I did not found this explained
HOW TO CHANG THE ICON ASSOCIATED WITH AN APK ????
I know how to open a apk with 7 zip and that I have to change the png file there
but which file ?????
do I need to change just the file associated with the icons or all the others ?
I mean .... inside (for example) mm.apk I found the icons related to contacts.apk to email.apk etc ... do I need to chenge all of them with the new ones ?
decompile and recompile
Decompile the app with apktool and go into the res folder and find the icon u want to replace ,,change it and recompile with apktool.Lastly sign the app and you are good to go
I have never tried change icons but i tried to change the background images for dialer and system menu. I used the same method mentioned above by opening the apk using 7zip and changing the images files with my custom images and rename them exactly the same as old ones.
Then I used CWM to flash the zip which contains the modified apk (i.e. contacts.apk and framework-res.apk)
However, I would recommend that you backup your ROM before flashing the modified zip file just in case something wrong happens.
Good Luck
I remember that there is a tool much faster than apktool ti decompile recompile but ... I have not been on the forum for long and I lost it
Is it also possible to change only theicon by using vrtheme ? if yes can someone explain how ?
Thanks
Give this thread a whirl...should be very useful
Basic theming guide by Dully79
Darkside Agent said:
Give this thread a whirl...should be very useful
Basic theming guide by Dully79
Click to expand...
Click to collapse
All very interesting I am sure I will use it at some point
I installed Java SDK and APKtool ... I remembered what they are for ... but still ...
the only thing I needed to know was if I need to change all the images in res or only that associated to the icon.....
ads7112 said:
All very interesting I am sure I will use it at some point
I installed Java SDK and APKtool ... I remembered what they are for ... but still ...
the only thing I needed to know was if I need to change all the images in res or only that associated to the icon.....
Click to expand...
Click to collapse
fine, whatever, ignore my post
Please .. do not missunderstand me !!!
Your help is very much apreciated
I knew approximately what to do to modify the theme also if in general I preferred kitchen uot
Instead I was hoping in a simple change of icon afetr decompressing/decompiling the apk but apparently it is not so simple ...never mind
I am using kyanROM and love it! One little tweak I was looking to make was in the notification it has kyanROM along the bottom. I was looking to replace that with my nickname. I am new to modding Android, so any help or tips would be appreciated.
Here are the steps I took and the issues I encountered:
Using NinjaMorph I extracted/decompiled SystemUI
I copied the files over to my PC
Looking through the files (not an exhaustive search mind you), I found one, tw_status_bar_tracking.xml, that had android:text="@string/kyanROM and android:layout_gravity="bottom". This looked promising to me, so I changed kyanROM to the name I wanted to use.
After saving, I copied this file back to my phone and opened the projected in NinjaMorph and said replace the original xml file with my new xml file.
"Finished" the project and closed out NinjaMorph.
Immediately experienced issues. SystemUI stopped working. Rebooting did nothing. So I restored my nandroid backup in order to start over. Back in NinjaMorph, I extracted SystemUI again and copied all files to my PC. Searching the contents of all files (a more exhaustive search) I found 4 instances of the phrase kyanROM:
First was the original in tw_status_bar_tracking.xml and said android:text="@string/kyanROM"
Second is in values\public.xml and says <public type="string" name="kyanROM" id="0x7f0800cd" />
The last two hits are from the same line in values\strings.xml and say <string name="kyanROM">kyanROM</string>
Now, assuming I'm correct that I need to mod SystemUI, after looking at the search results I'm thinking the change I need to make is to the last hit on my search, thus making it <string name="kyanROM">myName</string>. Then, when tw_status_bar_tracking.xml looks for the string kyanROM, it will display myName.
So, am I correct that in order to make this change I need to be in SystemUI? And If that is correct, is my proposed change correct - modifying the strings.xml file to show <string name="kyanROM">myName</string>?
If I do those, go into NinjaMorph and say to replace the original file with my new file I then should see myName along the bottom of the notification dropdown. Thoughts???
So I started over, this time I pulled the SystemUI.apk using adb. Then using apktool I did "apktook if SystermUI.apk". Then, apktool d SystermUI.apk ./mod". Found the file I *think* I need to modify (\values\strings.xml) and replaced kyanROM with myName. Saved the file.
Now I'm trying to recompile the file. I run the following apktool b -f -d mod. When I run this I get the error: Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml.
1) Am I modifying the correct file to place myName at the bottom of the notification screen?
2) How do I fix the PathNotExist error? I've looked at some solutions, but none seem to have worked.
Actually you need framework-res.apk from /system/framework installed through apk tool.
Pull framwork-res.apk and install it as you did for systemui.
After installing framework,type
apktool d systemui.apk
Now make the necessary changes and type
apktool b systemui
To recompile it back.
Note:after you recompile,you need to add meta-inf folder from original apk to your new recompiled apk to make it work.
Sent from my GT-N7000 using xda app-developers app
OK, I think I'm with you.
I need both SystemUI and framework-res in order to modify SystemUI
Install both (apktool if NameOfApk.apk)
decompile (apktool d SystemUI.apk)
make changes
recompile (apktool b SystemUI) but not the framework-res since I made no changes to it
And thanks for the tip about adding the meta-inf folder. I knew this, but since I never gotten that far to test, I'd probably forget to do that.
cyberpac9 said:
OK, I think I'm with you.
I need both SystemUI and framework-res in order to modify SystemUI
Install both (apktool if NameOfApk.apk)
decompile (apktool d SystemUI.apk)
make changes
recompile (apktool b SystemUI) but not the framework-res since I made no changes to it
And thanks for the tip about adding the meta-inf folder. I knew this, but since I never gotten that far to test, I'd probably forget to do that.
Click to expand...
Click to collapse
Installing framework-res.apk alone is enough if you have Samsung phone and have the latest apktool...
Sent from my GT-N7000 using xda app-developers app
vijai2011 said:
Installing framework-res.apk alone is enough if you have Samsung phone and have the latest apktool...
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
OK, I installed both - no harm I guess. So I have made all my changes, updated the apk with the meta folder, etc. I'm ready to push this over to my phone. Using adb, do I need to remount or can I just do the following: adb push S:\apk\SystemUI.apk /system/app/
Well, I took a shot and just did the adb push without remount. I think it worked. We'll see if there are any issues moving forward. Yay! Many thanks....
edit: I noticed it reset my wallpaper, easy fix. Wonder if anything else would've been reset by this change?