Problem with framework-res.apk - EVO 4G Q&A, Help & Troubleshooting

I can edit the framework-res.apk and it works but I'm wanting to edit it more and every time I push it my accounts get deleted (google, facebook,etc.) Is there any way to keep this from happening?

I don't believe so.
Sent from my SUPERSONIC

Ok well I know when I flash zips that edit the framework it doesn't effect my accounts so how would I be able make flashable zip files to edit the framework?
Swyped from my VaelPaked Evo 4G

You need a signing tool. Search for Ava's toolbox. Before signing, I believe, you need to delete the 3 cert files inside of the meta-inf folder. Then just place the framework file in the toolbox and sign it. Then it will be flashable.
Sent from my SUPERSONIC

dglowe343 said:
You need a signing tool. Search for Ava's toolbox. Before signing, I believe, you need to delete the 3 cert files inside of the meta-inf folder. Then just place the framework file in the toolbox and sign it. Then it will be flashable.
Sent from my SUPERSONIC
Click to expand...
Click to collapse
Yep, signing is really easy. Like dglowe said you do need to delete the 3 files in META-INF but you also need to open the update_script with notepad++ just to make sure it won't do something you don't want, like wiping /data or something. Most theme .zips should be fine to use as a template, just double check it before you sign and flash it.

Alright thx a ton! I'll c wut I can do with this whole signing business.
Swyped from my VaelPaked Evo 4G

Related

[Q] Do I have to theme using an update zip?

Noob to theme'ing.
Do I have to make an update zip to theme or can I modify the framework apk and just push that to /system/app?
You can just modify and push framework-res.apk to system/framework/
Sent from my ADR6300 using XDA App
Oddity said:
You can just modify and push framework-res.apk to system/framework/
Click to expand...
Click to collapse
system/framework/
sorry i've been at this computer too long lol
My replacement keeps giving me boot loops.
All I changed was: I duplicated the green lockslider and its components and renamed them to replace the other gray locksliders.
then I compressed the framework-res to a zip (using built in mac zip compression, mac user so i can't use winrar) and change zip to apk. adb push to system/framework/
any ideas what is going wrong?
cupcakera said:
My replacement keeps giving me boot loops.
All I changed was: I duplicated the green lockslider and its components and renamed them to replace the other gray locksliders.
then I compressed the framework-res to a zip (using built in mac zip compression, mac user so i can't use winrar) and change zip to apk. adb push to system/framework/
any ideas what is going wrong?
Click to expand...
Click to collapse
Have you tried installing it via a update.zip?
cupcakera said:
My replacement keeps giving me boot loops.
All I changed was: I duplicated the green lockslider and its components and renamed them to replace the other gray locksliders.
then I compressed the framework-res to a zip (using built in mac zip compression, mac user so i can't use winrar) and change zip to apk. adb push to system/framework/
any ideas what is going wrong?
Click to expand...
Click to collapse
Well this gets to be a bit confusing. I will say what i know hopefully others can help out too.
APKs are just zip containers that are signed, that means there is no compression. In your zip program look for a setting under compression labeled store. You would then have to sign that bad boy in order for your phone to work. You can not use the testsign certificate.
With that being said here is a guide...
Modifying?
PNG's -> open the apk up in the zip program, navigate to the res/whatever_folder_had_the_original and drop your files in.
9.PNGs and XML more complicated. You will have to decompile the apk [apktool] then modify them [look for articles on that, i cant get too indepth here]. Compile the apk. Drag the now compiled xml and 9.pngs to the respective folder open in your zip program.
Really the object is not to mess up the signing that comes with the apk. opening up the apk in a zip program, allows you to view, and replace files with not destroying the signature.
This method will not work with all applications. I have still not figured why some programs work with being signed with a testcert and others are not. I have a hunch that all userspace programs can be test signed and all system files need their own [htc?] key.
Also to note is that for some reason the phone when looking at framework-res, services.jar and others does not seem to mind the differences in CRC of the files stored in it, with what is in the manifest. I still can figure out the phones reasoning to allow this to happen on some but not all apps.
I hope this was not very confusing. I am working on video toturials of this same subject. Stay tuned!
That really helps a lot. Thanks.
I'll try that out tonight. Any recommendations for zip programs with a store feature for mac?
cupcakera said:
That really helps a lot. Thanks.
I'll try that out tonight. Any recommendations for zip programs with a store feature for mac?
Click to expand...
Click to collapse
I use BetterZip on my mac..........open the apk with Betterzip, then extract the res folder to your desktop (or wherever you want). Edit the .png files you want.......steer clear ( unless you know how) of editing the 9.png files. Delete the original res folder from the framework folder and insert the res folder you just edited. Then save the framework-res.apk and push back to where it belongs.
I like 7zip better, but this works okay, since there is no 7zip for a mac.
Betterzip worked perfectly! Thanks again.

Editing apk files

I have been trying to edit an apk file, basically change some pngs. But after iam done I can't install it anymore. Why is that?
I used 7z to open the apk archive and replaced a few pngs. I put the apk on the sdcard, open to install, goes thru installing then fails. Any help would be appreciated.
Sent from my PC36100 using Tapatalk
dont you have to sign it again or something.. did you keep the same file names for the pngs?
I kept the same file names and sizes. Do I need to sign them?
jasongthang said:
dont you have to sign it again or something.. did you keep the same file names for the pngs?
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk
just delete all the stuff in the META-INF folder, make edits, rezip, and resign. easy
What's the easiest way to sign an apk?
dkdude36 said:
just delete all the stuff in the META-INF folder, make edits, rezip, and resign. easy
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk
soulassasin187 said:
What's the easiest way to sign an apk?
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
You need an apk signing tool. Basically, you put the modified apk, in the signer folder, without the meta-inf folder, and run a quick command, your signed apk is then spit out. I'll attach the one I use when I get back to my laptop.
Hey... I think this thing makes phone calls too!
Here is the APK Signing Tool that I use.
Just unzip it somewhere, put the apk in the auto sign folder, open a command prompt to the folder, and run sign.bat, it should run you through it. There's a read me file in there, read it in case I forgot something.
Also, when editing market apps, they need to be resigned, but if ur editing built in app from the system, they do not. The HTC signature needs to remain intact on those.
Worked perfectly. Thank you.
JTNiggle said:
Here is the APK Signing Tool that I use.
Just unzip it somewhere, put the apk in the auto sign folder, open a command prompt to the folder, and run sign.bat, it should run you through it. There's a read me file in there, read it in case I forgot something.
Also, when editing market apps, they need to be resigned, but if ur editing built in app from the system, they do not. The HTC signature needs to remain intact on those.
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk

could someone help me make a zip file

i want to make a morph and usually i download someone else's zip and just use that. i can make the xml file and what not. but i downloaded a morph thats a zip file and wevery time i try to delete the folders out of the moroph i dont want included, such as browser, it just says winzip is not responding and wont allow me to delete anything from the already zipped file. so how do i take my morph that is just a standard folder and make it a zip so i can use it as a morph. i have winzip. i dont need to sign the zip for a morph do i?
You don't need a zipped folder to use as metamorph. Just place it in AndroidThemes on your sdcard( folder that metamorph makes automatically). After that just chose pick existing theme and apply.
Sent from my HTC Vision using Tapatalk
Second: use 7-zip instead of winzip. Better compression, faster, and most importantly its free.
Sent from my T-Mobile G2 running Cyanogenmod.
xl DIGITAL lx said:
You don't need a zipped folder to use as metamorph. Just place it in AndroidThemes on your sdcard( folder that metamorph makes automatically). After that just chose pick existing theme and apply.
Sent from my HTC Vision using Tapatalk
Click to expand...
Click to collapse
(smack my freakin head) i cant believe i didnt think of that thanks man. hey i got another question i cant seem to get my morphs to work on cm. ive only tried to edit the framework-res.apk so far but nothing i try to change works. it just says mm has been granted su and stays at the loading screen. i have noticed all the themes in the vision forum for cm have been flashable zips. is this a better route for cm.

Unzipping and zipping apk files?

I unzipped a apk file to change some of the images in the drawable-hdpi folder, how do I zip it back into an apk file to reinstall it on my phone. Or can I flash the zip file? I dunno how that would work...
Sent from my HTC Vision using XDA App
Can you get another copy of the apk?
If you can then the best thing to do is use winRAR or 7zip to open/explore the apk just like with a .zip file. That way you never unzip it and don't run into that issue. Using those allows you to delete and add files. You can also do the same thing on your phone using root explorer or something similar.
As far as correcting what you've done already (assuming you can't get a copy of that apk) I've completely forgotten since I never have to do it. I know if you look on the android sdk's site you can find the answer though.
adamtheindien said:
I unzipped a apk file to change some of the images in the drawable-hdpi folder, how do I zip it back into an apk file to reinstall it on my phone. Or can I flash the zip file? I dunno how that would work...
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
An apk is just a zip file with the apk extension, once you zip it up change it from a .zip to a .apk
Sent from my T-Mobile G2 using XDA App
i changed what i wanted and rezipped, changed the extension, tried to install it, says problem parsing the package?
adamtheindien said:
i changed what i wanted and rezipped, changed the extension, tried to install it, says problem parsing the package?
Click to expand...
Click to collapse
It can also depend on which APK (system vs non-system) and which images (.9 images can be tricky to replace if you don't know what you are doing). Sometimes, you also need to re-sign the APK, depending on what you modified (there are tools to re-sign in the SDK or you can use something like APK Manager).
You should try the opening the APK directly in WinRAR/7-zip and replacing the images method. In my experience, if you are just replacing simple images, you usually don't have to re-sign when doing this (it leaves the existing signature intact).
ok i mainly just replaced images and and edited a couple. i dont know how to use all that adbsdkwhatever stuff.... -_- i know i should but im too lazy. so i dunno how to re sign it...
all im trying to do is edit the quick search bar images. maybe i dont have to do this if there is somewhere to find themed search bars?
If you can then the best thing to do is use winRAR or 7zip to open/explore the apk just like with a .zip file.
Click to expand...
Click to collapse
If your using winRAR click and drag stuff works if its one or two files.
If its a lot of images or a large file like framework-res.apk (I'm thinking your search bar might be in there if I'm not mistaken) then you'll want to make a new ZIP archive with "store" compression (uncompressed pretty much).
(also you shouldn't need to resign the framework-res.apk)
I haven't tested 7zips click and drag but the same principals apply. If its bigger files being recompiled Winrar tends to compress it a bit and sometimes it causes bootloops.
That being said, don't forget to nandroid
82_Z28 said:
If your using winRAR click and drag stuff works if its one or two files.
If its a lot of images or a large file like framework-res.apk (I'm thinking your search bar might be in there if I'm not mistaken) then you'll want to make a new ZIP archive with "store" compression (uncompressed pretty much).
(also you shouldn't need to resign the framework-res.apk)
I haven't tested 7zips click and drag but the same principals apply. If its bigger files being recompiled Winrar tends to compress it a bit and sometimes it causes bootloops.
That being said, don't forget to nandroid
Click to expand...
Click to collapse
Well from my experience, 7zip handles the task like a champ. I've taken every image out and put others back in with no issues. The downside is that some apps set certain dependencies in the .xml files so if you delete the wrong things it won't install and if it does, all you get is a fc all day. In that case it helps to know how to convert the xml binary to something readable (unless you're a king a hex editing).

[Q][For Devs] png-out optimization on HTC_IME.apk [SOLVED]

I have a couple questions, really...
1) I ran pngout optimization on /system/app apks for a custom ROM that I have been working on and upon flashing HTC_IME does not work. I'm sure that this is because the .apk is unsigned, but I also know that it will fail if i resign with test keys. Question is: How do I disable signature verification in the ROM (as opposed to Recovery)?
2) Second question is along the same lines as the first. Are there any .apks that I should not optimize in any way?
Thanks!
grayn0de said:
I have a couple questions, really...
1) I ran pngout optimization on /system/app apks for a custom ROM that I have been working on and upon flashing HTC_IME does not work. I'm sure that this is because the .apk is unsigned, but I also know that it will fail if i resign with test keys. Question is: How do I disable signature verification in the ROM (as opposed to Recovery)?
2) Second question is along the same lines as the first. Are there any .apks that I should not optimize in any way?
Thanks!
Click to expand...
Click to collapse
Aye you need to make sure that you don't also have to make changes in framework. I'm right sure you need to and also Rosie. Think you can only disable it in recovery but I'm not sure.
Dicht yer neb and flee awea!
U can do one of two things...
1. U can sign with test keys and then resign the other apks with the sane test keys.
2. Make ur edits and then open up the original apk and replace the Res file with the one u edited.
Gotta make sure all the apks that u have in ur rom are all signed with the same keys or the apk that arnt will not work correctly.
Pretty much if ur just doing image edits then u can open the original and replace the Res folder but if doing if ur breaking it open with apk manager or something like that to edit XML or smali edits then u have to resign it and resign the rest of the apks as well...
Sent from my PC36100 using Tapatalk
Papa Smurf151 said:
U can do one of two things...
1. U can sign with test keys and then resign the other apks with the sane test keys.
2. Make ur edits and then open up the original apk and replace the Res file with the one u edited.
Gotta make sure all the apks that u have in ur rom are all signed with the same keys or the apk that arnt will not work correctly.
Pretty much if ur just doing image edits then u can open the original and replace the Res folder but if doing if ur breaking it open with apk manager or something like that to edit XML or smali edits then u have to resign it and resign the rest of the apks as well...
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
Perfecto. Thanks!

Categories

Resources