[Q] Cannot add files to framework-res.apk! Help? - Galaxy S Advance I9070 Q&A, Help & Troubleshooting

Hi guys! Ive been trying to do some jpg changes i framework file but somehow i cannot add files into framework-res.apk
I used 7zip which wouldnt let me copy files out or into the framework-res.apk showing an error.
Next i used WinRAR which allows me to copy files out of the framework-res.apk but wouldnt let me copy files into the framework-res.apk. It syas the file is corrupt.
I even tried apktool. Had problems recompiling. Please help me out guys!

Related

Need help with changing battery icons

Hey guyz. I have a Samsung Galaxy 5 (GT-i5503). I have installed froyo on it now from samfirmware.com. Right now I'm using a custom ROM from a guy named motafoca. I don't like the battery icons so I thought of changing it to the icons which indicated 1-100% and looked like the default one. So I pulled the framework-res.apk file from the framework directory and added the battery icons through 7zip. I also replaced the xml files in the drawable folder namely stat_sys_battery.xml, and two more files. After that the battery icon disappeared because I had the xml files from the battery mod. Figured out , it had got something to do with the xml file, I tried replacing the original files back but my phone got stuch in boot loop. So, I reflashed and its working now. After reading lot of information on this forum, I understood that we need to decompile the apk file so that we can edit the xml files. I did that and edited the xml files as necessary. Now, when I try to recompile the apk file with apk tool or apkmanager, I am getting an error saying the "Public symbol drawable/filename declared here is not defined" I am getting this error on many files including the ones that I have added. In one of the topics, somebody had suggested that we add the png files through 7zip without extracting the apk and then decompiling the apk so that the public.xml will autogenerate the ids for the new files, but that is not working. Can anyone help please? I am attaching the framework-res.apk file for reference.
Help!-
Sent from my GT-I5500L using XDA App
Bump!
Btw, did you ever get the answer?
Once you decompile the apk with apktool/apkmanager, and add your images and edited xml files, then you will need to delete res/values/public.xml; finally you can recompile the apk file and public.xml will be generated as it is building. Hope this helps.
I realize this is an old thread, but it appears the answer would still be appreciated.
I tried that, but it just gives me a bootloop.

framwork-res.apk modifying

Hi,
i'am searching for a guide how to manipulate correctly the framework-res.apk.
All ways i have tested fails.
I would modify some symbols in Notification bar (battery 1%) but all Time the my Phone run into bootloop or all Application Crashes after Startup.
I've tryed Apk Manager 4.9 / and Manualy with apktool.
Help plz .....
what i did :
1-extract apk (i use 7zip/WinRAR)
2-edit/replace image file(s)
3-repack with zero compression level ('store' level)
4-sign the apk
5-replace file using apk or create flashable recovery zip.
regards.
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
PapaDocta said:
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
Click to expand...
Click to collapse
But when i add some new Files and Edit some XML the Sign will be Corrupted ?
no it won't...
You need to do two copies.. the original file and the moded one...
1. make a backup of the original file
2. extract the original file using apktool
3. edit and modify anything you like
4. compile the edited file
5. rename the compiled file to framework-res.zip and take the modified resources.arsc
6. using winrar or 7zip open (to view not extract) the backed up framework-res.apk
7. place the moded resources.arsc into the backed up framework-res.apk
by doing this you retain the original signature of the backed up file and not breaking it..
Thx, will test it ;-)
kowalski99 said:
But when i add some new Files and Edit some XML the Sign will be Corrupted ?
Click to expand...
Click to collapse
Android system, signs system apk's on boot, you shouldnt sign them
Sent from my Desire HD using Tapatalk
My signed apk just work well.
AFAIK, we only cant re-sign htc's apk.
PapaDocta said:
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
Click to expand...
Click to collapse
The right approach always depends, what you want to change. There is no need to decompile, if you only change a few standard png. If you change xml in values folder like color, styles or arrays, you can certainly not delete resources.arsc - resources have nothing to do with the signature anyway. So if you want to play safe, you should insert the original Meta-Inf (signature) and Android Manifest after compile. It is also recommended to zipalign the final apk in order to reduce RAM usage.
thanks he_stheone64 for the clarification.. i reached that conclusion based on my own research on the net and yeah i used to change the XML files to add language support and that the only way that worked with me..
And be sure to have a working and up-to-date sdk before trying to use apktool...
First, using a old sdk release i got a partially working result (few graphics bugs and strange reboots), then with a badly updated sdk on top off the old i got apktool making many errors. Finally, re-installing the last sdk from start i got apktool and my resulting apk working correctly.

[Q]Change progress bar color

Hi guys,
im currently using netdrg`s sense theme http://forum.xda-developers.com/showthread.php?t=1048792
Now i changed all the green elements of the framework-res.apk to blue. Ive done everything so far, but i have no clue how to edit the color of the progress bar. (the bar when u change the volume, download something and so on...)
Ive heard that u have to edit an xml file, but as i have no clue about editing these files, i want to ask for a little favour.
Ive attached the xml file, and the color which i will use is 1761ab (hex).
So ill thank the guy who will do this for me a thousand times and i can share the theme with you afterwards!
lg l
In order to edit this xml file you need to decompile framework-res.apk. You can use apk_manager. Once the framework has been decompiled you can easily change the hex color for the progress bar (remember that the first 2 digit are for alpha channel). After that you need to recompile the framework. Actually there is another way to do that, but it‘s a bit triky as you need to modify the xmls file by using an hex editor..
If you want i can modify and compile the xml attached for you! Let me know m8
hey, thanks for your answer.
I put the framework-res.apk in the "place here for modding" folder, opened the script and hit 9 to decompile.
Then i edited all the values in the xml file in the "projects" folder and saved it.
Now i compile it, delete the file i edited in the "keep" folder and that other file mentioned.
Now i tried to apply the compiled framework_res.apk back to the system which results in a bootloop, what am i doin wrong?
soulcrash said:
hey, thanks for your answer.
I put the framework-res.apk in the "place here for modding" folder, opened the script and hit 9 to decompile.
Then i edited all the values in the xml file in the "projects" folder and saved it.
Now i compile it, delete the file i edited in the "keep" folder and that other file mentioned.
Now i tried to apply the compiled framework_res.apk back to the system which results in a bootloop, what am i doin wrong?
Click to expand...
Click to collapse
Ok, you are getting close to the solution
Once you got the unsignedframework.zip inside the place-apk-here-for-modding folder, you have to do a little trick in order to get it working...
Unzip all the content of the "unsignedframework-res.apk". You should have 5 objects (3 folders, 2 files).
Zip these files with Winrar/Winzip (whatever) but you must choose "No compression (store)" method to zip it.
Rename this zip into "framework-res.apk".
Put it into an update.zip and it should be OK to flash trough the recovery mode.
keep me updated

[Q] Framework Jar File

I am trying to create a reboot option for my galaxy tablet. I am in the proccess of using smali/baksmali to edit some files...the problem is when I adb pull the framework jar there is no classes file in the zip. The only thing in there is the META-INF obviously and a file called preloaded classes...this is considered just a file, not a class file. Should I not have a .class file?
EDIT-------------------------------------------------
I looked, what I mean is that there is no classes.dex file
Thanks
Found the problem. I am using a stock rom that hasn't been deodexed. I had to use baksmali to deodex the framework.odex file. Of course if you do this you have to have the right bootclasses in the folder or the file will not decompile right, and from what I have read you need that to happen in order to compile it back into a odex file. I should deodex the whole rom, but I am still new at this and don't want to create a boot loop
-Peace

[Q] resources.arsc not include

hi,
well i try it on systemui and framework-res.
With stock apk, i have no prob. decompiling and recompiling.
But if i change for example, an xml file for crt off in framework-res, and then recompile, (with suppressing of resources.arsc in keep folder of course), in the new apk i don't have the resource.arsc file.
i try on smali file too. I don't touch xml (so i let the resource.arsc in keep folder) but i modify a smali file. In the new apk, i have te resource.arcs but not the class.dex.
Anyone know why ? and how to resolve it ?
it happens as soon as i change a file. I am fed up with all of these. Help me please.
Thanks.

Categories

Resources