Well I used 7zip to decompile the apks now without reading anything I'm guessing apktool works pretty much like the command line version of winrar?? Just a little different though
Maybe something like
Apktool- compile apklocation
Or something to that effect?
But after I decompile the apks with 7zip the files are in a folder
Do I keep the folder to recompile or did 7zip add the folder?
Sent from my LS670 using Android Central Forums
As hlxanthus just stated, I think you are confusing extracting with decompiling. 7zip won't decompile anything. It will extract the files from the apk but there is nothing you can do with the xml files like that.
I will elaborate a little on his above instructions:
What you need to do is read up on apktool and download the right files for it. You can get them
here.
Essentially you will create a folder on your C drive to work out of. Call it "apktool" or whatever you want.
-Place the downloaded, extracted apktool files (apktool.jar - apktool.bat - aapt.exe) in said folder along with the framework-res.apk from the rom you are working with. (Important)
-Then place any other .apk files you want to modify in the same "apktool" folder as well.
Open a command prompt and navigate to your "apktool" folder and then you will type these commands:
Code:
apktool if framework-res.apk
- This loads the resources from framework-res.apk to a folder on your hard drive that apktool will use when decompiling and compiling the other .apk's you are modifying. If you switch to different rom to modify, you must run this command again using the framework-res.apk from that rom. You do not need to try to find this loaded file.... there is nothing you need to do with it once it is in place. But just remember to reload it if switching to different rom files within the "apktool" folder.
(I will use SystemUI.apk as an example for the rest of these instructions so place SystemUI.apk in your "apktool" folder)
Then type:
- This will decompile the .apk and when it's finished, you will have a folder named "SystemUI". You then can modify the xml files, .9.png images (be careful with these), and any other files you wish to change.
When you all done with your changes type this:
- This will compile everything back up. When it is done, go back into that SystemUI folder and you will see two added folder inside. One is "dist" and the other is "build".
-Open the "dist" folder and you will see a nice looking built SystemUI.apk there.
-Now for a little trick that will save you the trouble of trying to resign the modified apk. - Grab a copy of the original, unmodified SystemUI.apk and open with your 7zip. Open the new compiled one as well and place next to each other. Now take the META-INF folder from the original SystemUI.apk and place it into the newly compiled SystemUI.apk.
And that's it! Place the new SystemUI.apk back into your rom and flash the rom. Hopefully it boots up and you get no errors or FC's....... but if you do...... welcome to the world of custom rom's! Try to grab a logcat and/or look back inside your decompiled .apk to see if you can find where things went wrong.
Hope this helped - Enjoy!!