I have tried using the APK Manager,
Problem: If I recompile the framework-res.apk, it always gives me loops...
Even if I make a very small change!
(I don't sign it!)
Images can be replaced by opening it in 7-zip but xml files can't be changed that way.
I'm 100% sure that I follow correct steps....
What I'm trying to do:
Power menu: http://forum.xda-developers.com/showthread.php?t=1169443
and
ICS transitions: http://forum.xda-developers.com/showthread.php?t=1343350
I have followed more then 10 threads with same problem but still didn't get a solution.
Sorry if I missed something.
Any help?
*BUMP*
Why don't u sign it?
Sent from my SCH-I400 using xda premium
AFAIK, we don't have to sign a system apk using APK Manager (specially the framework-res.apk)
P.S. The guide (http://forum.xda-developers.com/showthread.php?t=1169443) also states so...
Try to use APKTool, I used to compile it and decompile it with this application and it works fine
Oic. I've always signed my frameworks. Ill not from now on.
Sent from my SCH-I400 using xda premium
Apktool has worked for me in past, haven't tried for a couple of months though so not sure what Rom I was playing with... Oh and unsigned for me
Sent from my Desire HD using xda premium
Use apktool....put the frameowrk-res.apk in the same folder as the apktool u unpacked....then open command prompt and navigate to that folder....type "apktool if framework-res.apk"...that will install the framework...then when that finishes type " apktool d framework-res.apk ./out"...that will decompile the apk into the out folder you just created....make your changes then type..."apktool d -f -b framework-res out" that will recompile....when your finished you have to copy the original metainf folder into the newly recompiled apk....then copy the new classes.dex file into the new apk...done...hope that helped
Sent from my SAMSUNG-SGH-I997 using xda premium
Related
I'm wanting to change the color of the slider when you turn your volume up and down from yellow to another color. I'm running CM7 fascinatemtd ROM by JT, I know which folder it's in and how to do it. My question is, I use Apk Manager to decomplie my framework-res.apk which was pulled from the ROM using 7zip, I've decompiled the apk, edited the XML file, when I went to recompile the framework-res apk using option 11, a error pop up and told me to read the log, I hit enter, answered yes to system question, then went to keep folder and deleted the resources file as instructed, and hit enter, I was left with an unsigned framework-res.apk file, renamed it to framework-res.apk, and pushed it back into ROM with 7zip, rebooted recovery, cleared caches, and installed ROM, but phone wouldn't boot up. So what am I doing wrong...
Obviously not
Sent from my SCH-I500 using XDA App
What color do you want the slider man
Sent from my SCH-I500 using XDA App
Blue would match my theme the HEX code is 11114b...
Sent from my SCH-I500 using XDA Premium App
If apkmanager errors common logic would dictate to read the log and see what is going wrong
Trying to flash a broken apk won't work obviously
I've gotten it to decompile and recompile bit the problem now os the changes I've made don't show up I'm not getting any errors before I was ising a ROM that I themed so I went back and used the original ROM how do I get the changes to stay...
Sent from my SCH-I500 using XDA Premium App
And you're trying to edit progress_horizontal.xml? And changing code to ff11114b leaving the "f's" in?
good day.
Yes
Sent from my SCH-I500 using XDA Premium App
I should rename unsigned framework.res to framework.res right...
Sent from my SCH-I500 using XDA Premium App
And during the compile process, you hit y for "system apk" and hit y for "would you like to copy over any files..............." and from the keep folder delete resources.arsc and continue to compile. And yes rename back to framework-res.apk.
good day.
Answered yes to system app and no to copy over files, didn't delete arsc and changes stayed, but if I install will I get boot loop since I didn't delete arsc....
Sent from my SCH-I500 using XDA Premium App
If I hit y to copy over files the changes don't stay only if I hit n
Sent from my SCH-I500 using XDA Premium App
it worked, by not copying over the files and not deleting the resources arsc file, does anyone know what the XML file name is for the download progress bar color is...and thanks for your help guys...
Here's what I would do if I was on Windows!
Download apktool & dependencies:
http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
http://android-apktool.googlecode.com/files/apktool-install-windows-r04-brut1.tar.bz2
Unpack both archives to your Windows folder. This will make apktool accessible through cmd anywhere.
CD in cmd window to the location of your apk, If you haven't already done so and install the resources by copying or pulling (framework-res.apk, twframework-res.apk for touchwiz) or (framework-res.apk, SystemUI.apk for GB). Once copied to the folder you are cd'd too...
Install the resources
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile and make your changes..
apktool d framework-res.apk
Recompile when done
apktool b framework-res
If it built succesfully, then make a copy of your framework-res.apk. Then navigate to framework-res/build/apk! Open your copied apk with 7zip and drag n drop res & resources.arsc from framework-res/build/apk inside! Close it up..
Push and test.. On windows you may need to navigate to your sdk directory if not properly setup!
adb push "your_copied_file"/system/framework/framework-res.apk
If you get a failed to write to system, run this first.
adb shell su -c rw
YES got all progress bar colors changed to blue now my CM7 Fascinatemdt ROM is themed all of my drawable hdpi and XML files are complete I might post this as a theme, thank you for your help...
Sent from my SCH-I500 using XDA Premium App
notta said:
Here's what I would do if I was on Windows!
Download apktool & dependencies:
http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
http://android-apktool.googlecode.com/files/apktool-install-windows-r04-brut1.tar.bz2
Unpack both archives to your Windows folder. This will make apktool accessible through cmd anywhere.
CD in cmd window to the location of your apk, If you haven't already done so and install the resources by copying or pulling (framework-res.apk, twframework-res.apk for touchwiz) or (framework-res.apk, SystemUI.apk for GB). Once copied to the folder you are cd'd too...
Install the resources
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile and make your changes..
apktool d framework-res.apk
Recompile when done
apktool b framework-res
If it built succesfully, then make a copy of your framework-res.apk. Then navigate to framework-res/build/apk! Open your copied apk with 7zip and drag n drop res & resources.arsc from framework-res/build/apk inside! Close it up..
Push and test.. On windows you may need to navigate to your sdk directory if not properly setup!
adb push "your_copied_file"/system/framework/framework-res.apk
If you get a failed to write to system, run this first.
adb shell su -c rw
Click to expand...
Click to collapse
will this work also when trying to decompile/recompile a non system app, like one from the market, that has dependencies
adude247 said:
will this work also when trying to decompile/recompile a non system app, like one from the market, that has dependencies
Click to expand...
Click to collapse
It will work with anything provided you have the resources. Some apk's are picky by means of what you can replace.
The method above is using apktool the way it is supposed to be used. That apkmanager thing sounded crazy with the delete this after that, hit y or n before this. Seems like alot of un-needed steps and confusion!
On linux it's even easier, pretty much fully auto!
notta said:
It will work with anything provided you have the resources. Some apk's are picky by means of what you can replace.
The method above is using apktool the way it is supposed to be used. That apkmanager thing sounded crazy with the delete this after that, hit y or n before this. Seems like alot of un-needed steps and confusion!
On linux it's even easier, pretty much fully auto!
Click to expand...
Click to collapse
yeah, I didn't delete anything just decompiled, edited the XML, and recompiled, that was the only way I could get the changes to stay. Any suggestions on what to use if the above resources don't work to get the apk to decompile, an example of an apk that I want to edit but cant get it to recompile after decompiling and editing the XMLs is....
adude247 said:
yeah, I didn't delete anything just decompiled, edited the XML, and recompiled, that was the only way I could get the changes to stay. Any suggestions on what to use if the above resources don't work to get the apk to decompile, an example of an apk that I want to edit but cant get it to recompile after decompiling and editing the XMLs is....
Click to expand...
Click to collapse
I can't and won't explain getting resources for market apps or generally someone else's work. However there are several ways to approach non-building apk's.
For example aapt has the capability to recompile standalone 9's as well as xml's, which can then be injected into the apk with the 7zip method. Especially useful for minor changes.
Another example for stubborn apk's would be the Eclipse or similar project. This is where you would partially build the files you wanted to change.
Thanks for the advice...
Sent from my SCH-I500 using XDA Premium App
Hi. How to manually edit
system/framework/framework-res.apk
And system/app/systemui.apk
Without using uot kitchen and change the icons of my sga stock rom.
Thank you.....
Sent from my GalaxyNexus using xda premium
search google: edit apk
Use Apktool or apk-multi-tools. with apk-multi-tools there you can use fitur for change/replace images without decompile apk.
Pull the apk from the phone using adb and rename the format to .zip . You should be able to replace file inside with the same names without issues. But please replace the right one. Etc you're mdpi, pls use mdpi images. And try not to edit .9 images. It may cause your phone to faint. Rename back to .apk after editing thn push it to phone through adb.
Sent from my GT-S5830 using xda premium
i dont think we can do it... like it possible but so difficult to understand java's bytecode
I have been building ROMs for a while but I have been relying on other peoples bases (a big thank you to everybody for all your efforts). I have managed to edit some .apk files by opening them with WinRar and just replacing files (images etc). I now need to get a bit deeper and want to edit framework-res.apk but I just can't get it to work
Right now I have wiped and reinstalled Windows 7 Ultimate SP1 x86 on a Dell Optiplex GX270. I have let windows update do its thing and it is all up to date. I have no AV software installed. I have installed Sun JDK 6 update 32. I have installed the Android SDK and this has updated itself to Rev. 19 and installed the latest Android 4.0.3 API. I have installed the apktool using the instructions from here - http://code.google.com/p/android-apktool/. I have pulled the framework-res.apk from the phone, installed it with 'apktool if framework-res.apk' and then decompiled it with 'apktool d framework-res.apk framwork-res'. I then edited the bools.xml file using notepad++ and then recompiled with 'apktool b framework-res unsigned-framework-res.apk'. I then renamed the file and pushed it to /system/framework on the device. And its now in a boot loop
What am I doing wrong?
Andy
Use APK MULTI TOOL.
Sent from my GT-I9300 using Tapatalk 2
winrar?you can edit an app that way...but it's much better using 7zip
Sent from my MB860 using XDA
Kev_cr said:
winrar?you can edit an app that way...but it's much better using 7zip
Sent from my MB860 using XDA
Click to expand...
Click to collapse
Yes I know. My issue is with recompiling .apks though - specifically framework-res.apk and the resources.arsc it contains....
Andy
ADB100 said:
Yes I know. My issue is with recompiling .apks though - specifically framework-res.apk and the resources.arsc it contains....
Andy
Click to expand...
Click to collapse
well take everything inside from the new apk except the androidmanifest. i believe and copy it over to the old apk see if that works.
From my powered Shooter.
Easier thing to do is take the meta-info and manifest from the original apk and copy it over the new apk using an archive manager.
However I've found that if its bootlooping then I've usually missed something out.
私はローボーボブ。 Haro!!
Okay, I have been trying to change the sliders color and size by editing XML in framework-Res.apk. I set up APKmanager 5.0.2, installed the framework files, and decompiled the apk all flawlessly (I think). I then edited "progress_horizontal.xml" found in /Res/drawable/ and also edited "styles.xml" found in /Res/values/. I then recompiled and selected yes to the option to copy unedited files to reduce errors, and of course followed the instructions to delete the edited files in the "keep" folder. I continued recompiling and it finished with no errors. I then used the apk manager option to sign it, and then I copied onto my player. It booted without bootloop (surprisingly) but after it loads, framework-Res, followed by almost every system app fcs. Any ideas as to what I am doing wrong?
While I'm on this topic, does anyone know what lines to edit in strings.xml to change the width of seek bars (ex. the brightness slider in display settings)?
Sent using Tapatalk
Did you sign the apk file with the original signature?
Sent by my Robot Butler
Umm, idk. I just used the "sign" option in apk manager after I compiled it.
Sent using Tapatalk
Okay, it seems to have had a more permanent effect than I thought. I replaced it with my old framework-Res, but when I try downloading an app from the market it fcs when it tries to install. Anyone ever have similar problems?
Sent using Tapatalk
Alright, a reinstall of the market solved that, but I am still trying to figure out what I am doing wrong. If I took the xmls from my compiled unsigned apk, and used 7zip to put them in the original apk, would that work?
Sent using Tapatalk
iJimaniac said:
Alright, a reinstall of the market solved that, but I am still trying to figure out what I am doing wrong. If I took the xmls from my compiled unsigned apk, and used 7zip to put them in the original apk, would that work?
Sent using Tapatalk
Click to expand...
Click to collapse
You cannot see the XMLs in 7zip. Try copying the resources.arsc file
Sent by my Robot Butler
exacly, you have to decompile to open properly xmls.
KOala888 said:
exacly, you have to decompile to open properly xmls.
Click to expand...
Click to collapse
Yes, I know that, but I mean after I edit and recompile.
Sent using Tapatalk
Your not supposed to sign framework-res.apk
Sent from my ASUS Transformer Pad TF300T using Tapatalk 2
Okay, so will the unsigned version work correctly?
Sent using Tapatalk
gmillz said:
Your not supposed to sign framework-res.apk
Sent from my ASUS Transformer Pad TF300T using Tapatalk 2
Click to expand...
Click to collapse
You must sign it with the original signature or you will be bootlooping
Sent by my Robot Butler
I never sign any system apks and it always works.. If I sign them then I bootloop
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
gmillz said:
I never sign any system apks and it always works.. If I sign them then I bootloop
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
Click to expand...
Click to collapse
It depends on which tool you use to decompile it. Some don't remove the signature but some do. If the tool does remove the original signature then you need to sign it again with the correct signature.
So how do I sign it with the correct signature?
Sent using Tapatalk
iJimaniac said:
So how do I sign it with the correct signature?
Sent using Tapatalk
Click to expand...
Click to collapse
There is a guide here on xda on how to create your own ics style settings. Its basically a guide on how to edit XML files and recompile and resign the apk file. I'll add the link to the thread when I get to my laptop
Sent by my Robot Butler
Okay, I found the tutorial you are talking about, and have been experimenting on lidroid-res.apk (less fatal if I mess up). However, I am still having issues. I decompile with apkmanager, then edit strings.xml with notepad++ (nothing big, just changing the text of the status bar toggles). I recompile, and follow his steps to put resources.arsc into the original apk. I push it to system/framework/ with root explorer and reboot. I then get a fc from systemUI and no status bar up top. Am I missing something?
Sent using Tapatalk
iJimaniac said:
Okay, I found the tutorial you are talking about, and have been experimenting on lidroid-res.apk (less fatal if I mess up). However, I am still having issues. I decompile with apkmanager, then edit strings.xml with notepad++ (nothing big, just changing the text of the status bar toggles). I recompile, and follow his steps to put resources.arsc into the original apk. I push it to system/framework/ with root explorer and reboot. I then get a fc from systemUI and no status bar up top. Am I missing something?
Sent using Tapatalk
Click to expand...
Click to collapse
Sorry I totally forgot to post the link . I would recommend using apktool as it makes the tutorial easier to follow. Also I think its easier to use but that's just personal preferance. I don't know why it doesn't work. My advice is to redo the entire process using apktool and see if it makes a difference. I hope it works
Hmm, tried apktool, same result. One thing I saw when recompiling it was it said "could not find sources" but it continued normally with no other errors. I will try to see if it works on a different PC, since mine often has weird problems like this.
Sent using Tapatalk
iJimaniac said:
Hmm, tried apktool, same result. One thing I saw when recompiling it was it said "could not find sources" but it continued normally with no other errors. I will try to see if it works on a different PC, since mine often has weird problems like this.
Sent using Tapatalk
Click to expand...
Click to collapse
Try using apktool to decompile the apk and then see if you can recompile it without any errors. If you do get errors then something is going wrong...
Supermaster34 said:
Try using apktool to decompile the apk and then see if you can recompile it without any errors. If you do get errors then something is going wrong...
Click to expand...
Click to collapse
Well, I did it, no errors, just the "could not find sources" witch I read was normal for some system apks. I tried the compiled app but it still gives me fcs. I will let you know if I have better luck with my xp desktop.
Sent using Tapatalk
Is it necassary to sign systemui.apk? I made some changes to the file and now when i flash the ROM I get systemui force closes
Sent from my PG86100 using xda app-developers app
kevin130 said:
Is it necassary to sign systemui.apk? I made some changes to the file and now when i flash the ROM I get systemui force closes
Sent from my PG86100 using xda app-developers app
Click to expand...
Click to collapse
No, you don't ever want to sign system apps. Are you sure the permissions are correct? and what changes did you make?
I didn't put any permissions. How do I set them in the zip? And I change the 3g icon to 4g because I have virgin mobile so I can't get 4g but I want it to say 4g lol.
Sent from my PG86100 using xda app-developers app
Well if you are installing it with a zip permissions are probably correct. I'm assuming you decompiled the apk changed the icon and compiled it again? If all you want to do is change an icon, just open the apk with 7zip or similar and replace the icon, no need to decompile. That should solve it. Let me know
Okay. I'll try that and if I do decompile it, how do I set the permissions? Cuz i decompiled settings.apk and made a XML change.
Sent from my PG86100 using xda app-developers app
kevin130 said:
Okay. I'll try that and if I do decompile it, how do I set the permissions? Cuz i decompiled settings.apk and made a XML change.
Sent from my PG86100 using xda app-developers app
Click to expand...
Click to collapse
You would set permissions if you are just pushing the apk to your phone. Better question, how exactly are you installing the apk after you made the changes?
I just replace the old apk in the zip file and flash the ROM.
Sent from my PG86100 using xda app-developers app
ok, then the updater-script in the zip is handling the permissions for you, so you don't need to worry about that.
So there is no need to sign anything at all? Awesome.
Sent from my PG86100 using xda app-developers app
Apps in /system/app/ never get singed, apps in /data/app/ however have to be signed.
Alright. Thanks.
Sent from my PG86100 using xda app-developers app
Android commander... http://androidcommander.com/
great tool you should use when first dealing with androids..
you can delete/pull/push files to your phone there also apk backup which backs up your apps from the play store.. just a great program to have in your PC.
no problem, let me know if you still need help or get it working
Hi I'm also trying to learn modifying systemUI.apk through smali edits
So as a start I just decompiled my systemUI.apk with apktool v1.5.2 with no errors. Then directly recompiled it. No modifications made. The resulting apk didnt have any META-INF folder and thus I suppose is unsigned. But pushing this apk to /system/app doesn't install it.. As a result after reboot I have no installed systemUI.apk
What am I doing wrong? BTW I'm on Sony xperia live with walkman. But I suppose this is a general thing. And yes I have installed all framework files and as a result no errors while de/recompiling
havocgb said:
Hi I'm also trying to learn modifying systemUI.apk through smali edits
So as a start I just decompiled my systemUI.apk with apktool v1.5.2 with no errors. Then directly recompiled it. No modifications made. The resulting apk didnt have any META-INF folder and thus I suppose is unsigned. But pushing this apk to /system/app doesn't install it.. As a result after reboot I have no installed systemUI.apk
What am I doing wrong? BTW I'm on Sony xperia live with walkman. But I suppose this is a general thing. And yes I have installed all framework files and as a result no errors while de/recompiling
Click to expand...
Click to collapse
The best way in case of small edits is to open both your stock and your modified SystemUI.apk with 7-zip, then copy the META-INF and AndroidManifest.xml from the stock to the modded one.
Close both and push back your modded one to the phone.
Guess that work.
pquinqu said:
The best way in case of small edits is to open both your stock and your modified SystemUI.apk with 7-zip, then copy the META-INF and AndroidManifest.xml from the stock to the modded one.
Close both and push back your modded one to the phone.
Guess that work.
Click to expand...
Click to collapse
Well now I use APK Multi-Tool and it works great. From what I have understood it keeps the same signatures as in the original SystemUI.apk and there is no need of any resigning.