Jump to content

keys used to sign framework-res.apk


Guest cheezewizz

Recommended Posts

Guest cheezewizz

Hey guys, I'm trying to add a custom locale to my Orange SF but my progress is pretty slow. I've gone from it just sitting in a bootloop to sucessfully booting but gettin endless force close messages.

It's my understanding that if you use apktool to decompile framework-res.apk you'll need to sign it after recompiling with the same key used initially. There's the problem, I'm just using the stock Orange rom at the moment, is there any way to get the right key to sign the framework with? I'm assuming it's a key problem as after a huge amount of googling it seems that that's what the force closes tend to indicate.I did stumble across this thread linky which definitely helped but I still can't get it to boot without all the force closes. any suggestions peeps?

All I did was -

1. Decode framework-res.apk with apktool

2. Edit a couple of values in values-es-rUS (this is only for testing purposes, when it's all good I'll put my own strings.xml in a proper folder and that).

3. Recompile again with apktool.

Then several combinations of

4. Resign (tried both platform and test key from linked post)

5. push back to device in recovery mode w/ system mounted.

also tride to zipalign afterwards with no sucess. sorry about the huge post. any help will be greatly appreciated...

Link to comment
Share on other sites

There are two ways to solve this:

1. This works in some occasions. After you've compiled your new framework-res.apk, unzip it and copy resources.arsc to your original framework-res.apk. No need to resign after that. Push original framework-res.apk (with new resources.arsc) to your phone.

2. Re-sign the whole ROM with new key. Sign core .apks with the same key that you signed your framework-res.apk.

Link to comment
Share on other sites

Guest cheezewizz

Thanks for the suggestions. I gave the first method a go but it just resulted in it hanging on the orange splash screen on boot. Logcat just showed errors preloading AutoText looping endlessly. When you say the 'whole ROM', do you just mean the apps located in system/app that need resigning? I'll give that a go next. I forgot to mention that i've also tried the update.zip method without much luck too...

Link to comment
Share on other sites

Yeah, apps in /system/app. You don't need to sign all of them though. Signing google apps (maps, youtube, gmail, etc) just breaks their market links. I guess no need to sign ZTE or Orange apps either but pretty much the rest. You should get it booted up and if some apps force close, sign those too. If you're doing this just in testing purposes, I guess there is no harm in signing them all.

If your going to resign the whole ROM, I think that using update.zip method is the only way to get it to your phone.

Edited by KonstaT
Link to comment
Share on other sites

I thought you didnt need to sign system apps :huh: . I modified framework-res.apk, didn't sign it, just zipaligned, installed using clockworkmod and it works fine, no errors or FC.

Link to comment
Share on other sites

Guest cheezewizz

yeah i've read plenty of different things saying whether or not framework-res needs signing or not. but i think it's because i need to decompile it to get to the values/strings.xml that need changing/adding to. just written a python script to make things run a bit smoother with the signing of multiple apks. will let you know my results.

edit: well back to the drawing board I guess, another boot loop. all sorts of permissions issues in logcat. maybe it's time to take a step back, gonna just decompile, recompile and push framework-res without making any changes just to try and get it booted stable first.

Edited by cheezewizz
Link to comment
Share on other sites

Guest cheezewizz

ok this is weird. i've gone back to trying to just copy resources.arsc from edited framework-res.apk into original one and the size changes massively after doing this. i'm using 7zip to do this but the problem is that when i've copied resources.arsc across the method shown in the 7zip archive view shows up as 'deflate' rather than the original 'store' and the size has dropped by 3K. I'm thinking that's why this method isn't booting successfully. any ideas?

Link to comment
Share on other sites

Have you perhaps tried clearing dalvik-cache after pushing/flashing your modified apk? I suspect I'll be corrected by someone who really knows, but a modified apk would need a new classes.dex in the dalvik-cache. You could delete just the relevant classes.dex rather than clearing the whole folder in clockworkmod to reduce the boot-time between testings.

Link to comment
Share on other sites

Guest cheezewizz

i really appreciate all the suggestions guys thanks a lot. Finally had sucess with the 1st method mentioned by KonstaT. Once I noticed that copying the resources.arsc from one apk to the other was actually compressing it further instead of just copying it as is, a bit of trawling let me copy it into the archive using the 7zip commandline (which is a pain in the 4rse to find docs for btw). now I just need to crack on with translating the rest of strings and job's a good 'un. Thanks for all your help again. :)

Link to comment
Share on other sites

Hey guys, I'm trying to add a custom locale to my Orange SF but my progress is pretty slow. I've gone from it just sitting in a bootloop to sucessfully booting but gettin endless force close messages.

It's my understanding that if you use apktool to decompile framework-res.apk you'll need to sign it after recompiling with the same key used initially. There's the problem, I'm just using the stock Orange rom at the moment, is there any way to get the right key to sign the framework with? I'm assuming it's a key problem as after a huge amount of googling it seems that that's what the force closes tend to indicate.I did stumble across this thread linky which definitely helped but I still can't get it to boot without all the force closes. any suggestions peeps?

All I did was -

1. Decode framework-res.apk with apktool

2. Edit a couple of values in values-es-rUS (this is only for testing purposes, when it's all good I'll put my own strings.xml in a proper folder and that).

3. Recompile again with apktool.

Then several combinations of

4. Resign (tried both platform and test key from linked post)

5. push back to device in recovery mode w/ system mounted.

also tride to zipalign afterwards with no sucess. sorry about the huge post. any help will be greatly appreciated...

did you try drag and drop files with 7zip without extract ? open ur apk file with 7zip drag the file u wanna edit out. edit it then drag it in and exit. it will ask you to save then done.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.