[Q] how can i sign framework-res.apk? - Galaxy S II Q&A, Help & Troubleshooting

I dont know how to sign framework-res.apk
who will teach me?

What are you trying to do exactly? Why do you need to sign it? Have you decompiled it? Recompiled? Some more info may help you get more/better answers.
If you have decompiled it and made some changes to it, then recompiled it and now have an unsigned-framework-res.apk then what I usually do it use 7zip (WITHOUT UNZIPPING the .apk file and ONLY OPEN ARCHIVE)and remove the AndroidManifest.XML and meta-inf folder. Next use 7Zip to unzip the ORIGINAL framework-res.apk, then select the AndroidManifest.XML and meta-inf folder and DRAG it into the unsigned-framework-res.apk that you also have OPENED ARCHIVE, hit OK to add it on the popup. Now I then usually copy the unsigned-framework-res.apk to my phone, use root explorer to rename it framework-res.apk (so remove the "unsigned" part of the name). Then I use root explorer and copy it into /system, long press on the framework-res.apk and choose permissions, then set the permissions correctly , then long press again and select move, navigate to /system/framework and hit paste. Then reboot phone.
IF you have a issue where it doesn't boot up correctly then there is something g wrong with your framework-res.apk and you will HAVE TO go back to recovery and reinstall your ROM to fix it (or restore a nandroid backup). This last part is just FYI in case you have an issue.
Hope this helps. If it is not what you have done or trying g to do then give some more details as to what your trying to do and why.
Sent from My SGH-I777 Running Spiderman Themed AOKP or Spiderman Themed CM10

Related

[Q] theme skinning help???

Anyone mind sharing a link or some directions on skinnning themes?
I've had someone give me these instructions:
1) extract/Decompile the .apk file you want to MOD or make changes to. Use m10 editor for this.Select the option "decomplie all"
2) Minimize the m10 editor, and open the folder where you m10 editor is installed. There you would find a folder with the name of the .apk file you just decomplied. Go to folder assests>"base theme name">drawble>shared folder.
3) now select the .png files you want to edit. Install Paint.net, and edit with them, it was easy process for me. Remeber to "flip image vertical" after you are done with editing.
4) now go back to m10 editor, and Save the file.
5) You should have AndroidSDK installed.If not, do it. Then go to the folder where you have installed it. open the "autosign" file. It will open command prompt. There select the option to sign the file manually. Give the path for the file. It will sign it then. Exit from that program.
6) you are done, you can install it now.
I've gotten this far, but i can't find out how to change these 3 things below:
In de-compiled files changes have to b made in three places.
1. Androidmanifest.xml (name of package). how do u change this?
2. Res\values\strings.xml (name of theme). how/where do u change this?
3. Assets\shared(change this to theme name) h0w/where do u change this?
Also everytime I replace the background images, when I recompile it, my background images don't stay.
Any help would be much appreciated...
okay so i hate to tell you to download something else but i use .apk manager and it is a lot more straight forward.
decompile the apk using that.
go into the projects folder, you will see the Androidmanifest.xml
what are you trying to change in there exactly? if its just icons things like that those are easy but if you are trying to change the packageID it will just cause FC's
strings.xml hangs out in the following
projects->*.apk(this will be the name of what you decompiled)->res->values->strings.xml
then go into the xml and it will have a line with the name of the apk that you can change
assets has it's own folder i haven't hung out in there at all i haven't really had a need but it is in the same file tree with the res folder
now the issue upon recompiling, when doing the recompile in apk manager press y and y to the 2 options, it will create a keep folder go into that and delete the classes.dex if you messed with any images in the drawable folders, and the resources.arsc if you changed any of the xmls. then go into the keep directories sub folders and delete the items you changed then finish the compiling
sorry if i am not the best at explaining this
Yes, what exactly do you want to change? Taskbar and other icons are very easy to do, however, I haven't done any M10 files, yet.
In the manifest you need to change the name of the apk to what you are naming it. you will see a line which will have package="com.htc.skin."apkname".
So for my zombie skin example my line says "com.htc.skin.zombie"
Also to that point what ever you name it you need to navigate to the foler that holds the m10 file and change the folder to the same name or the m10 file wont be used.
jkrough0728 said:
In the manifest you need to change the name of the apk to what you are naming it. you will see a line which will have package="com.htc.skin."apkname".
So for my zombie skin example my line says "com.htc.skin.zombie"
Also to that point what ever you name it you need to navigate to the foler that holds the m10 file and change the folder to the same name or the m10 file wont be used.
Click to expand...
Click to collapse
exactly the same, boy did that drive me nutty for a few days!!
jkrough0728 said:
In the manifest you need to change the name of the apk to what you are naming it. you will see a line which will have package="com.htc.skin."apkname".
So for my zombie skin example my line says "com.htc.skin.zombie"
Also to that point what ever you name it you need to navigate to the foler that holds the m10 file and change the folder to the same name or the m10 file wont be used.
Click to expand...
Click to collapse
using apk manager are u guys decompiling using option 9 or 10 and if ur using option 10 what framework are u dragging into it?
keedog said:
using apk manager are u guys decompiling using option 9 or 10 and if ur using option 10 what framework are u dragging into it?
Click to expand...
Click to collapse
I use apktool but if your using manager it would be 9.
sent from my Evo 3D from xda app

Re-compile framework-res.apk (Custom Rom)

I got this figured out already, sorry about that.
Who ever thanked me, I wasn't posting a guide but a question.
I am trying from a fresh firmware base to learn from scratch but no idea how to get that framework to compile correctly.
did you install framework first?
Code:
apktool if framework-res.apk
Easy
I had problems with the apk tool and recompiling. The way I ended up doing it is:
I didnt decompile the framework-res.apk.
rename the file framework-res.apk.zip
open it with 7zip.
Extract the files you are wanting to work on
Do what ever work on the files you need done
Drag and drop the files back in the directories they go into while file is open in 7zip
Close 7zip
Rename file back to framework-res.apk
push to phone with adb
No decompile or recompile.
Hope this helps
Chadw1985 said:
I had problems with the apk tool and recompiling. The way I ended up doing it is:
I didnt decompile the framework-res.apk.
rename the file framework-res.apk.zip
open it with 7zip.
Extract the files you are wanting to work on
Do what ever work on the files you need done
Drag and drop the files back in the directories they go into while file is open in 7zip
Close 7zip
Rename file back to framework-res.apk
push to phone with adb
No decompile or recompile.
Hope this helps
Click to expand...
Click to collapse
If you just want to modify one of the 'normal' XML files or an image then that approach will work fine. The problem is he wants to edit the bool.xml file and that is contained in the 'resources.asrc' file and you need to decompile it first.
I am in the same situation although someone managed to edit the file for me and recompile it so I got there in the end, just not by doing it myself.
I followed the instructions you describe and the file never recompiled properly - or at least my device never booted with the one I recompiled
Try it like this:
1. Place APK in "place-apk-here-for-modding"
2. Choose "9" to Decompile
3. Grab resource "resources.arsc" from framework-res.apk
4. Do my edit in projects\framework-res.apk\res\values\bools.xml
5. Compile - Yes (system app) - Yes (copy files)
6. Go to "keep" folder and delete "resources.arsc" and the bools.xml file
7. Press any key
8. Either push by ADB or Root Explorer or Flash
nickiberli said:
Try it like this:
1. Place APK in "place-apk-here-for-modding"
2. Choose "9" to Decompile
3. Grab resource "resources.arsc" from framework-res.apk
4. Do my edit in projects\framework-res.apk\res\values\bools.xml
5. Compile - Yes (system app) - Yes (copy files)
6. Go to "keep" folder and delete "resources.arsc" and the bools.xml file
7. Press any key
8. Either push by ADB or Root Explorer or Flash
Click to expand...
Click to collapse
I have tried exactly like this and it didn't work for me. I downloaded lots of different APK tools and tried them all - there were comments about using older versions of apktool.jar etc. I kept getting different sizes of the output file depending on which one I used. I gave up in the end as someone edited the file for me and it was only one specific entry in bool.xmls I wanted changing. As far I could tell we were both doing exactly the same thing.
The last thing I said I was going to do was wipe the PC I was attempting to do this on. I never got round to doing it... I'd be interested to know why I could never get this working though
Andy
Give me the framework and tell me what u want to do.
I will do that for u
Btw is the framework ICS based?
Sent from my Micromax_A70 using Tapatalk 2 Beta-4
You have resigned?
Greets!

[MOD]Removing the ciphering warning message from notification

Hello,
This MOD is for the Razr XT926 VZW
I have been using Eclipse rom v1.3 by nitroglycerine33 based on 4.1.2
I keep on getting this annoying message in the notification, "ciphering is not available on your network. Phone calls and/or cellular data will be unencrypted."
I decided to try and remove this message. After a little searching, i found a solution in the Razr M forum.
I pulled the framework-res.apk from system/framework folder, decompiled it, did the following modification to the bool.xml file in res/values folder:
<bool name="config_enable_ciphering_indicator">false</bool>
<bool name="config_enable_ps_ciphering_indicator">false</bool>
<bool name="config_enable_cs_ciphering_indicator">false</bool>
After changing the values to false in notepad++, i save it and recompiled it. Now the tricky part. I used apk file manager 5.0.2 by jonny walkerRK and extracted both newly compiled apk and original apk. Now i copied the "resources.arcs" file and "res" folder from the new apk folder and pasted it in the original apk folder. After that i used 7zip to zip the original folder and renamed it as .apk. I rename the original apk as framework-res.apk and i used it to replace the framework-res.apk in system/framework.
Here are the required steps to remove that annoying notification:
1. Copy the framework-res.apk to sd card.
2. Use Root Explorer to copy the file.
3. Navigate to /system/ framework folder
4. Click on "Mount R/W" on the top to change permission.
5. Paste and overwrite the existing framework-res.apk
6. Done!!!
i hav tryed, but not worked n i got bootloop
after replace the file, the phoe automatically restart it self but no load...
it restarts as soon as you replace it. thats normal.

Easiest way to edit apk

Hello,i find an easiest way by searching google to edit apk's for theming,modifying etc so i am sharing
by this trick more user can make and share thier own mods(system ui,secsettings,ROMS etc)
what we need:
root explorer,rooted phone,sib icon editor
steps:
take an apk ex-system ui.apk from system>app>systemui.apk
hold it then select Extract all
then got to extracted folder i.e sdcard0>speedsoftware>Extracted>Systemui
then in systemui folder
TO edit or change PNGS>
systemui>res>drawable-ldpi OR drawable-mdpi OR drawable-sw320dp-ldpi>Edit what u want
then
go back and hold systemui folder then select zip this folder
then go back and go to archieves in speed software folder
then hold systemui.zip and select rename then change extension to .apk
like-systemui.apk
Done
just copy this apk to sytem>app folder replace it
thats all
finish
.:fingers-crossed::good:
plz thanks me.
Thanks
That's useful, thank you! :good:
good job

Guide: Translate/modify apk files

Thought id share this since it can be quite a hassle to find everything needed if you wanna translate stuff yourself or edit something for personal needs.
This was done on miui stable 8.1.3.0 from xiami.eu on a mi5 but should work on other miui versions and roms (with slight modification)
Download Bursoft apktool (http://bursoft-portable.blogspot.se/p/blog-page_23.html) and unzip to C:\BatchApkTool
Make sure you have java installed (www.java.com)
You will also need root
Fetch the following files/folders from your phone and copy them to C:\BatchApkTool\_framework
system/framework/framework-res.apk
system/framework/framework-ext-res/
system/app/miui/
system/app/miuisystem/
system/priv-app/miuisystemUI/
Place the apk you wanna modify in C:\BatchApkTool\_INPUT_APK\
Execute BatchApkTool.exe in c:\BatchApkTool\
Press 1 to decompile
Go to your C:\BatchApkTool\_INPUT_APK\ folder and if everything worked alright then open the newly created folder from the apk file you just decompiled and make whatever change you wanna do. If you wanna translate, then open the \res\ folder and make a new folder called values-sv (if you wanna add swedish language for example) then you can either copy strings.xml from another language folder and edit them or grab xml from a partially (or fully but not 100% voted) translated source like crowdin or github
Do not use caps or anything other wierd stuff or it wont compile afterwards
You can now return to batchapktool and press 3 to recompile and hopefully no errors, otherwise check log to determine possible cause.
Do not sign the apk!
Now open the recently modified compiled apk with winrar (your w/e zip program you prefer) and grab resources.arsc out of there. Now open a copy of the original apk and paste the resources.arsc into it (replacing the existing resources.arsc).
Plug in the phone to the computer and copy the apk to the internal memory
Open your favourite root browser (using romtoolbox filemanager myself) and go to the location of the original apk and rename it (or make a backup incase any error occurs), now copy the modified apk you copied earlier into the folder of the apk you wanna replace, e.g system/app/ or system/priv-app/
Kill/close app (incase it was started earlier) and restart it and see if the changes are live!
Edit: After you replaced the files, then you need to chmod those aswell to 0644 and possibly clear cache in twrp
Might have forgotten something but just ask and ill try to help

Categories

Resources