framework-res.apk signed or unsigned? - Captivate Q&A, Help & Troubleshooting

Refrencing changes from this thread I'm trying to change some stuff in the current framework-res.apk of this firmeware's framework-res.apk.
From what I've read, APKs only need to be signed if they're being installed, and using APK Manager, there's an option for System APK and Regular APK.
I decompile it with Option 1. Replace his ****ty icons with the default stock icons and then use option 7 with suboption 1. Push the APK to system/framework and overwrite the current one and then reboot. When I reboot I get a bunch of FCs and I have to do a clockwork recovery to get it working again.
When I open the original framework-res.apk with WinRAR, it says "signed with SignApk" in the note field. Does 2.2 require framework-res.apk to be signed? I can't get it to stop FCing on my recompiled framework-res.apk.

First of all, to get rid of all doubts, make sure the compression level is close to 0 (0 works for sure)
Then all you have to do is extract (1), modify files in 'projects', zip (3) unsigned (1). That's it

If its a custom ROM - most likely you can tweak the files and shouldn't have any FC issues.
BUT... you I would recommend finding the icons you want to change.... and then copy them directly into the res/drawable-hdpl folder with WinRar open and have it overwrite the existing ones. I've done this a few times to change batt mods and other items with little risk.
And... if your tweaking *.xml files? This could be your issue as well.

No. All I did was replace the connection icons with the stock ones from the 2.1 framework-res.apk in WinRAR. I use the "store" mode when I replace them, assuming that's the 0 compression method. Should I use Normal?

Bump. ▄

Related

[REQ] Captivate Stock AT&T Theme

I would like to flash a new ROM but i like the stock captivate theme the best.
is there any update.zip packages of the default theme floating around? i want to wait until i know i can do it before i flash. Also, is there any way to "rip" the theme from my ROM? because then i can just do that
I posted a request for this a few weeks back and got really no help.... What I did was unzip the framework.apk's from the theme I wanted and from the JH7_OTA that's floating around here somewhere and compared the images in the drawbale-hdpi folder. I think there are some files in tw-framework.apk that need to be changed if you want to change the pull down menu.
Hope this helps
The themes are mostly inside framework-res.apk, which is very ROM-specific. You can't just install them randomly inside one another.
If you'd like to port a theme, you can either replace the image files using 7-zip, WinRAR, etc. or decompile the .apk using APK Manager for more extensive changes (things like battery mods, etc.).
MikeyMike01 said:
The themes are mostly inside framework-res.apk, which is very ROM-specific. You can't just install them randomly inside one another.
If you'd like to port a theme, you can either replace the image files using 7-zip, WinRAR, etc. or decompile the .apk using APK Manager for more extensive changes (things like battery mods, etc.).
Click to expand...
Click to collapse
what he said ^^^^
but as a beginner's guide, you will need to pull your FRAMEWORK-RES.APK and TWFRAMEWORK-RES.APK from /system/framework folder
For this, you will need to use either ADB or an app like ASTRO or ROOTEXPLORER
when you copy these two apk's to your computer, you will need to open it up (NOT extract it) and simply replace the images inside with those from a stock FRAMEWORK-RES.APK & TWFRAMEWORK-RES.APK
The images you want to change are going to be in res/drawable-hdpi folder
Don't just replace everything, you will need to see which one's are different.. if there is something you want to change and don't know what .png file it is, just post it back up here and I will help you out

[Guide] Simple guide to theming ANY ROM

A lot of people have asked in various threads lately about getting this theme on x rom, or can someone port this theme for me, etc. It really isn't that hard. It actually is pretty much a simple matter of copying and pasting. This will work on any ROM, and it only takes a few minutes, easy enough for an amateur to do it.
1. First, download the ROM that has the theme that you want on your current ROM.
2. Extract framework-res.apk from /system/framework and rename it to framework-res-old.zip and then right click it, and click extract all. Just extract them to currentdirectory\framework-res-old, which should be the default option anyway.
3. Take your current ROM, and extract framework-res.apk from /system/framework, and repeat step 2 except name it framework-res-new.zip.
4. Browse to the framework-res-old\res folder and select all of the folders starting with "drawable", such as "drawable-mdpi"
5. Browse to the framework-res-new\res folder and paste those folders, it should prompt you to merge and replace files and all that jazz, just click yes and do for the next x conflicts. It will copy and replace all of the image files.
6. Go back to the root of your framework-res-new folder, highlight all of the contents, right click, Send to > Compressed (zipped) archive
7. Windows will re-zip framework-res-new. When it finishes, rename the new zip file to framework-res.apk and push it to /system/framework. If you haven't gotten s-off on your phone, you have to do this while in clockwork recovery (make sure you mount /system in the partitions menu, or if you are s-off and booted, type adb shell mount -o rw,remount /system if it gives you memory errors)
For other operating systems, the steps are similar. If you use a linux distro, I'm going to assume you are smart enough to figure out the compression tools and menu items to unzip and rezip the apk files.
NOTE: You don't actually have to change the extensions to .zip, in fact, you won't be able to unless you unchecked hide known file extensions in the windows folder options in control panel. I just thought it would be easier. If you don't want to unhide extensions, just use a tool like 7-zip or winrar to open and extract the APK. In simple terms, all you are doing is replacing the res folder of your new framework-res.apk with the one from the theme you want. Not very hard.
ANOTHER Note: Sense roms are a bit more difficult to theme, since all of the HTC apps are themed from images in com.htc.resources.apk in /system/framework. But if you are on a sense ROM, you probably can just use a MyModes theme. If you do however choose to try this on a sense ROM, it will only theme user and non-HTC apps. This guide will technically work for any ROM but it works best for AOSP based ROMs, like CyanogenMod or ArayrayMod. The only thing is that if there is a change in the color of text, then you have to decompile both framework-res APKs and copy styles.xml from the old one to your new one and recompile it. APKtool or APK Manager both work great for that.
DO A NANDROID BACKUP BEFORE PUSHING THE NEW FRAMEWORK! Sometimes you can get boot loops from screwing with other files in framework-res, or if it is not signed properly. But you shouldn't get boot loops as long as you stay away from XMLs.
how do i extract an apk? it shows up as an apk and when i click extract it does nothing
Sometimes pushing new frameworks cause boot loops fyi..
Happened to me twice :/
Sent from my T-Mobile myTouch 3G Slide using XDA App
purple1 said:
how do i extract an apk? it shows up as an apk and when i click extract it does nothing
Click to expand...
Click to collapse
Did you try renaming it to framework-res.zip rather than .apk? If you have 7-zip or winrar you can also right click, open with, and choose 7-zip or winrar from the choose default program option.
arayray said:
Sometimes pushing new frameworks cause boot loops fyi..
Click to expand...
Click to collapse
Only if you screw with the non-drawable folders. If you leave the XMLs intact and only change the images it boots fine. The boot loops are caused by incompatible or conflicting XML files, which happens when you just push a random framework-res from another ROM, you have to just move the images over.
I use apkmanager for linux and its immensely helpful. Also you can loop one even without modifying the xmls. Least I have that's why the most important part of theming is knowing how to backup/restore or flash sbf or w/e.
Only if you screw with the non-drawable folders. If you leave the XMLs intact and only change the images it boots fine. The boot loops are caused by incompatible or conflicting XML files, which happens when you just push a random framework-res from another ROM, you have to just move the images over.
Click to expand...
Click to collapse
I think you should state that in the OP
Added a note at the bottom, thanks

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] Modifying files with apkmanager

Hi all,
Apologies if this has been covered elsewhere but searching has done me no good.
I'm trying to do a bit of theming by modifying framework-res.apk with apkmanager 4.9. As I understand it, you're supposed to:
1. Decompile (9) the APK
2. Modify files in .\projects\framework-res.apk
3. Compile (11)
4. Answer Yes to this being a system apk
5. Answer Yes to keeping unmodified files
6. Delete the files from keep that have been modified
7. Press a key to continue
At this point, if I rename the new apk to file to .zip and look inside the files I've deleted from keep are simply not there.
If I don't delete the files from keep, the old files are there, not the new files I'm replaced them with.
If I replace the files in keep with the modified versions again instead of deleting them, they do appear in the final apk and show up on my phone correctly. This only work for images though and this isn't working for XML files - only images.
After step 5 I get a line in the apk manager log saying "The system cannot find the file specified."
Can someone tell me what I'm doing wrong?
Thanks

[Q] Problem while icon changing

i´m trying to change the settings.apk icon.....
so
1) i rename the apk to .zip
2) open the archive
3) replace the original with another .png
4) save the new archive
now comes the strange part,
after saving my archive, i only got half the size of the original archive but it contains exactly the same files (4,4 mb <--> 2 mb)
i did the same way when i changed all folder icons in the arc launcher and it worked without any trouble
--------------
and is there a way to have two icons for the same app?
for example:
settings in app drawer ---> white icon
settings in widget menu ---> black icon
or does android automatically use the same icons for both?
still didn´t solve this problem ;(
tried via root manager and using 7zip under windows....filesize stayed the same but didn´t work.
and when i changed the icon, i couldn´t open the widget menu or go to options --> settings
oh boy....
try this :
1.) do all your customizing with this apk ...
2.) copy AndroidManifest.xml & META-INF (folder) from original settings.apk to your new settings.apk
3.) put in update.zip to flash in CWM, or push to system/app manually, check if permissions are ok (rw-r-r)
this worked for me theming framework-res.apk from FR18b2 ...
without copying AndroidManifest.xml & META-INF (folder) from old to new file, i always had bootloop ...
if it´s still not working, you can try and
1.) decompile with apkmanager or apktool
2.) do your customizing
3.) compile apk
4.) copy AndroidManifest.xml & META-INF (folder) from original settings.apk to your new settings.apk
5.) flash
tried your first hint but it didn´t work......
so, when i try to open the widgets i get this message:
sony ericsson home (process com.sonyericsson.home) gets force closed
maybe it has something to do with that?
i deleted lglauncher.apk and launcher2.apk and replaced it with a modified arc launcher as main launcher
---------------
im thankful for your advises but i have ZERO knowledge and experience in stuff like adb, apktool, scripts and stuff...
i can handle illustrator or photoshop
if it´s not working, i think i have to let my idea go.....

Categories

Resources