Thx to our friend memnoc for this!
We are all here to learn, take from community and give back to community!!!
Hya guys, after A LOT of requests, I decided to share with the community something that I found really REALLY useful for Dev's but also for other users too that want to mess up with compiling and decompiling process. Usually, non problems at all with that, but since ICS come out, many dev\users are not able to decompile\compile properly many ics apk (not all). This guide will ensure you a good result, 100% working, easy, and fastest way to mess up with ics for theming and resizing purposes, or whatever you want
BIG THX to my friend and Dev teammate @Bichon for this
@Bichon (yes, again)
@Xavierjohn22, the amazing author of AutoApktool! Visit his thread HERE, click his thanks button, and support his work with donations, and my personal thanks to author for this tool which is the most powerful and easiest tool ever.
@Brut_all for Apktool
NOTE from cstayton :One thing to take note of as is with any de-compiling and re-compiling of apks, your resource files (i.e. framework-res.apk and com.htc.resources.apk) MUST be the original unmodified versions in order to guarantee that your modded apk will de-compile and re-compile correctly. If you are using modified framework files you may end up having problems with your apk.
Please consider to visit the original thread about this tool, because what I'm explaining here is just 1\10 of the real skill of this tool. You can do basically whatever you want with AutoApktool, themers will love it, Dev's will appreciate it a lot, I'm sure.
Why can't we use Apktool???
Well, you can, but it's more difficult, that's it.
Why do you say "must use 1.4.1 apktool version"??
The reason why is that since 1.4.2 version, apktool generate java code while recompiling process is going on, and this lead to errors that 9/10 makes decompile process fail.
Requirements (Windows environment, mine is Seven 64 bit)
Java (last version)
JDK (last version)
JDR (last version, usually included in JDK or Java)
SDK (last 3.0 version for ICS source code)
Auto_Apktool 2.0.0 (DOWNLOAD THIS ONE NOT OTHERS!!!)
HOW-TO (NOTE: before start, select Apktool version with option 21, YOU MUST CHOOSE 1.4.1 version!!)
1)Download and simply unpack Auto_ApkTool 2.0.0
2)Click on "autoapktoolmain.bat", prompt will open
3)put the apk you want to mess up with in "_INPUT_APK"
4) you can chose more than one option to decompile (option 6 is strongly recommended)
5) when option 6 is being selected, drag the apk from _INPUT_APK folder into the windows prompt and click enter
6) A Note window will appear, and will show IF the decompiling process has been done properly. Once you close that window, you will see the decompiled folder in _INPUT_APK folder
7) do your edits (xml, snali, or png, doesn't matter)
8) recompile with option 7 (NOTE: this time you MUST drag all the FOLDER, NOT the apk)
9) Once recompiling finished, open the decompiled folder, go to "dist" folder, and here you got your edited apk
10) you MUST sign the apk with option 10 (NOTE: drag the apk from dist folder to the prompt, then press enter, and in the SAME folder, a signedxxx.apk will appear)
11) Rename the apk, and push it |NOTE: you can push the apk with 62 option or with sdk typing:
That's itCode:adb remount adb push xxx.apk system/app adb reboot
Last edited by flyers2114; 04-07-2012 at 11:08 AM.
NOTE FOR SAMSUNG USERS
Samsung changed some Hex value in the compiled dex code.
It has nothing to do with resources apks or anthing.
If you want to decompile those apks you have to do the follwing:
Using 7zip extract the classes.dex file from the apk and save it somewhere.\
Delete the classes.dex file from the apk.
Now you can decompile the apk using this tutorial.
If you want to decompile the classes.dex to edit the smali code, download baksmali 1.3.2 and smali 1.3.2 and use them to decompile and recompile the classes.dex.
After you recompiled the edited smali code, just drag back in the new classes.dex file you made.
this won't be fixed until Brut will make a new Apktool, or someone inserted the new baksmali/smali code into apktool
When you're in trouble...try this one, you can apply the following method to the op too
smali/baksmali editing v1.3.2
- Download both smali and baksmali v1.3.2
This is the latest apktool used to compile/decompile .apk.
Download apktool1.4.3.tar.bz2 and apktool-install-windows-r04-brut1.tar.bz2 for Windows or
apktool-install-macosx-r04-brut1.tar.bz2 and apktool-install-linux-r04-brut1.tar.bz2 for Mac. Follow the instruction on installation.
Step by step:
1. Extract the classes.dex from the desired apk.
2. Decompile it with baksmali v1.3.2 (for modding smali)
3. Recompile classes.dex with smali v1.3.2.
4. Decompile the apk with apktool (without classes.dex in the apk itself).
4a. Modify the apk however you want to, adding your changes.
4b. Recompile it with apktool.
5. Put the modified apk back into classes.dex.
6. Sign the apk.
Last edited by flyers2114; 04-05-2012 at 01:09 PM.
that Rapidshare link under requirements is dead...
Ok thx...will fix when I get home in a bit..
Link is fixed...thx for catching it again...
Last edited by flyers2114; 04-05-2012 at 04:35 PM.
One thing to take note of as is with any de-compiling and re-compiling of apks, your resource files (i.e. framework-res.apk and com.htc.resources.apk) MUST be the original unmodified versions in order to gaurantee that your modded apk will de-compile and re-compile correctly. If you are using modified framework files you may end up having problems with your apk.
HTC Inspire 4G
Blackout ICS XL
StarDroid ICS XL
StarDroid ICS AOKP v6.0.0
Ice Cold Sandwich v7.2 Farewell Edition
StarDroid Twilight Edition v0.0.4 - DEV
StarDroid Ranger (HYBRID) v1.0.2
StarDroid ELF v1.0.5 DEV
StarDroid Goblin v1.0.1 DEV
StarDroid MyBliss v1.0.3 P.O.C
StarDroid 3D Edition 5.0.0
RCMix3D ACS Kernel v10
My ROM's & Themes are now available via the "ACS Updater" app from the market.
"Thx to our friend memnoc for this!"
It's all my pleasure :)
the link for the apk tool is broken... is there any mirror for this