Hi, basically I'm trying to modify the Settings.apk of the newest JVQ-Rom.
I want to delete unneeded languages, optimize pngs and so on...
The problem is, even if i change nothing and recompile the apk with apktool after decompiling it and put it into system/app. The Settings Application won't start.
I also tried it with apkmanager 4.9 and 4.8 decompile with depencies and dragging framework-res.apk in. No luck so far. After compiling again, this thing won't start. Can anyone help me with this plz?
Thanks
Related
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.
hi,
well i try it on systemui and framework-res.
With stock apk, i have no prob. decompiling and recompiling.
But if i change for example, an xml file for crt off in framework-res, and then recompile, (with suppressing of resources.arsc in keep folder of course), in the new apk i don't have the resource.arsc file.
i try on smali file too. I don't touch xml (so i let the resource.arsc in keep folder) but i modify a smali file. In the new apk, i have te resource.arcs but not the class.dex.
Anyone know why ? and how to resolve it ?
it happens as soon as i change a file. I am fed up with all of these. Help me please.
Thanks.
Hey can someone give me some quick tips on how to edit it?
I edited SystemUI.apk just fine but no matter what I do to framework-res, it won't let me replace the files (I'm only replacing pngs in drawable-mdpi folder)
What error are you getting? Also, install framework with apktool
POTATO!!!!
I think he's talking about drag and drop png file ) If it's true, the solution for him is learning how to decompile apk. Becoz most of png in systemUI is png, not too many 9.png files so it's easy to replace without decompiling
devilsking said:
I think he's talking about drag and drop png file ) If it's true, the solution for him is learning how to decompile apk. Becoz most of png in systemUI is png, not too many 9.png files so it's easy to replace without decompiling
Click to expand...
Click to collapse
Yup...
Decompile the framework-res.apk with Apktool and then replace the pngs..
I can't recompile because apktool always crashes when trying to recompile XML files. I'm using the AceCream framework apk instead of the stock rom one...
I'll try this on another PC to see if it's some weird software glitch
ZakooZ said:
I can't recompile because apktool always crashes when trying to recompile XML files. I'm using the AceCream framework apk instead of the stock rom one...
I'll try this on another PC to see if it's some weird software glitch
Click to expand...
Click to collapse
Try APK manager...much easier...
ZakooZ said:
I can't recompile because apktool always crashes when trying to recompile XML files. I'm using the AceCream framework apk instead of the stock rom one...
I'll try this on another PC to see if it's some weird software glitch
Click to expand...
Click to collapse
Tell me the definition of your "crashes"
it will show errors if u did smth wrong, even u use apkmanager )
For me apktool is more easier
devilsking said:
Tell me the definition of your "crashes"
it will show errors if u did smth wrong, even u use apkmanager )
For me apktool is more easier
Click to expand...
Click to collapse
Well, apktool dumps a stack trace where the error seems to occur in a public.xml file, apk manager says there is a error but the log shows nothing for me
https://www.dropbox.com/s/hbgqlo8pkfff10p/framework-res.apk
Can you test if you can modify this file without errors?
ZakooZ said:
Well, apktool dumps a stack trace where the error seems to occur in a public.xml file, apk manager says there is a error but the log shows nothing for me
https://www.dropbox.com/s/hbgqlo8pkfff10p/framework-res.apk
Can you test if you can modify this file without errors?
Click to expand...
Click to collapse
Oh...The infamous apktool bug...Use another version of apk tool and compile,will work
POTATO!!!!
Hello I am trying to work on a mod for rom I am working on. But the warnings I am getting happen even with untouched files.
I am editing the Secsettings.apk.
I am able to decompile it just fine with apktool 2.0.0 but compiling is another story. I install framework-res.apk and even installed twframework-res.apk. but this is what I get with unedited secsettings. I get same results when I do my edits.
I am doing
apktool b SecSettings
It is putting files in the build file
Is this ok?
jasonj711 said:
Hello I am trying to work on a mod for rom I am working on. But the warnings I am getting happen even with untouched files.
I am editing the Secsettings.apk.
I am able to decompile it just fine with apktool 2.0.0 but compiling is another story. I install framework-res.apk and even installed twframework-res.apk. but this is what I get with unedited secsettings. I get same results when I do my edits.
I am doing
apktool b SecSettings
It is putting files in the build file
Is this ok?
Click to expand...
Click to collapse
Those are only warnings. Looks like it built apk from the last line.
Here's a great tool that does all the hard work for you
http://forum.xda-developers.com/showthread.php?t=2639400
Hello,
I would like to modify some strings in the settings apk from a Huifei Android Head Unit with Android 4.4.4. I am able to decompile the settings.apk but when I try to recompile it also if I change nothing, I ever get an error.
Can someone tell me if there are differences of modifying a normal apk and a system apk apart from the signing.
Thank you
ow Try to set max memory size of your apktool !
it may works