[REQ] Edit a framework-res.apk because I am unable to - Galaxy S III Q&A, Help & Troubleshooting

Could anyone more experienced with decompiling/compiling lend a hand?
I wanted to turn on the on screen nav buttons by roughly following http://forum.xda-developers.com/showpost.php?p=28603200&postcount=11 but when I recompile it the changes I made do not save for some reason.
I am using Apk Manager ICS so maybe I need to use a different tool?
Alternatively if someone does not mind modifying framework-res.apk(https://docs.google.com/open?id=0Byot0Tq2XeW6dHhRX3J1YVlERkU) for me to change that false to true I would be grateful/ tell me what they were able to successfully change it with, as I am new to compiling/decompiling.

What framework version did u link?
If its a stock one,you'll need to edit the plurals.xml as well inside res/values and other res/values-en,res/values- and so on before compiling.

Related

[Q] Bootloop Trying to Add New Button Background to Framework-res.apk

(I'm new at this, any help would be appreciated)
I'm using Daneshm90's (very awesome) APK Manager to mess around with my framework-res.apk file. I've sucessfully reskinned some pngs and changed some xml files and stuff like that.
Why does the following cause a bootloop?
1) Decompile Framework-res.apk
2) Make a copy of res\drawable\btn_default_small.xml and rename it btn_default_small2.xml
3) Change the background of something to android:background="[a]drawable/btn_default_small2"
4) Compile\flash to phone etc, watch it bootloop
(please note: [a] is really the email 'at' symbol, the forums get mad at me for using it)
I can edit existing files just fine, but whenever I try to add and use a new file everything grinds to a halt, even if its just a copy of a working 'stock' file. What am I missing? Is there a list of files somewhere I need to add my new xml file to? Should I be building from source instead of using apk manager?

editing 9.pngs

ok so i did a lil reading after trying to alter the 9.pngs i would get force closes on my phone i take it this is cause i didn't edit these properly with the correct editor .....is there any 9.pngs i can alter without eclipse ????
i know i did it before but now i just get alot of fc ..and reboots if i try to alter ......
i've always modified roms to my liking so i could use any advice i can get from you themers out there that know what there doing ....
thanks in advance
No, you do not have to use Eclipse.
If you modify the PNG files you will need to compile them, you can use the APKmanager program to do this. I had problems and so I used Eclipse.
Can you give and over view of the step you are taking when you edit your PNGs, what program(s) and then how you are placing them back into your APK or back on your device.
i'm just using paint.net program on my cp to alter all the framework pngs .....but i guess i didn't realise about the 9.png's ....what would be easier to alter the 9.pngs eclipse or apkmanager
Have a look at this thread, which I think maybe you already have.
http://forum.xda-developers.com/showthread.php?t=1008695
The first and second post have a document to read and then later down in the thread is a write up about 9.png.
If you load the Android SDK, there is a tool, draw9patch, that will let you edit the PNGs to make them into 9.png files.
If you are just editing PNG files and then do not need to be 9.png then I think any software can be used for editing.

Framework-res always displays glitches

I tried to decompile, modify 1 xml file and recompile the framework-res.apk.
But everytime I do it, I either get into a boot loop, or when In succeed it displays glitches (like notification bar, and messed up lock screen, and settings)
This is for AURORA ICS 4.0.3 and I do have the latest aapt.exe file .. so I don't know what is wrong!
I tried to use the original framework-res but replace the resources file inside, stored and compressed methods.
Tried to get the compiled framework-res but add the META-INF and Manifest file (again, both with compressed and stored resources file) and always.. it just glitches or bootloops.. and the mod that I tried (ICS on screen buttons or the CRT effect when you switch off the screen, mainly used in Oxygen roms, but it's available in all ROMs).. it never works.. only glitches the lock screen, notification bar etc..
Any help?
Thanks.
I might know the answer to this..
Which files are you modifying in framework-res? And how are you pushing it back to your phone?
Sent from my U20i using xda premium
Would be great
I am modifying some files in the values folder, bools.xml, arrays.xml .. but even if I edit bools.xml alone, it still glitches.
To push it back: I go to recovery mode on my phone, plug it into my linux machine (the system partition mounts), paste the new framework-res.apk to replace the old one, fix permissions (otherwise it boot loops), and restart the phone. This method works for other files and never had any problems, like the android.policy.jar
Would be great if you can help me. Thanks
Well, the XML files you're editing are all part of resources.arsc so it's something to do with that which is causing the problem. I used to get all sorts of annoying bugs when I edited anything in resources.arsc and I eventually found out that I was pushing the final apk back to the phone incorrectly.
I use a Windows PC, not Linux, so I might not be that helpful but this is what I do to modify and replace framework-res.apk. Hopefully it'll help. What I do is..
Decompile framework-res.apk
Make my changes
Recompile the file
Use a program like 7zip to open the old and the new files
Drag and drop the "res" folder from the new file into the old
Extract resources.arsc from the new framework-res.apk and add it to the old one in "STORE" mode, so it's not actually compressed
Go into recovery, mount the system partition and push the old file
..and that's it. Works a charm every time.
I would have thought that you would need to do the same thing on Linux but with the additional step of correcting the permissions. If you do all that and it still doesn't work, then there has to be a problem with the actual mod you're trying to do.
Thank you very much, I actually tried that method. It sort of worked, but everytime it breaks the notification bar. It becomes like double the size and I'm not sure why.
Thanks.
Then the issue must be with the modification itself. What exactly are you changing to what?
Sent from my U20i using xda premium
I tried different ones.. but even a simple one.. enable CRT animation.. which is pretty much open bools.xml and edit one true to false.. it breaks it :/

Replacing icons in apk

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

[Q] Mod an APK to run in any Phone

Is there a way to mod an apk, to make it run in any model phone?
I can decompile, recompile and sign, but I don't know what files need to change, and if this is really possible.
I know that we can change build.prop model, but I don't want do this. I really want create a modded apk.
Thanks!

Categories

Resources