FORUMS
Remove All Ads from XDA

[UTIL] Apktool - Tool for reverse engineering apk files

925 posts
Thanks Meter: 4,310
 
Post Reply Email Thread

Originally Posted by Brut.all, Updated by iBotPeaches
It is a tool for reengineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step. Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc.

It is NOT intended for piracy and other non-legal uses. It could be used for localizing, adding some features or support for custom platforms and other GOOD purposes. Just try to be fair with authors of an app, that you use and probably like.

Features:
  • decoding resources to nearly original form
  • smali debugging: SmaliDebugging
  • helping with some repetitive tasks

Links:
v2.4.1 (Released November 29th, 2019)

Quote:

  • Updated baksmali/smali to v2.3.4
  • Updated gradle to 5.6.2
  • [#2131] - Added support for Android Q (Android 10)
  • [#2086] - Fixed build issue with JDK9+ due to jmod change.
  • [#2058] - Fixed security issue with unpacking assets via directory traversal.
  • [#2027] - Fixed issue with api-level command not showing up.
  • [#2048] - Fixed issue with directory warning when not automatically making framework directory.
  • [#2045] - Fixed issue with mapping for codename "Q" release.
  • [#2046] - Fixed issue with raw qmg files not decoding properly.
  • [#2064] - Fixed issue copying assets to a directory that does not exist.
  • [#2063] - Fixed NPE with empty attributes during deserialization.
  • [#2084,#2018] - Fixed removal of META-INF/services. (Thanks adibfara)
  • [#2117] - Fixed support for "attr" bag type. (Thanks visigoth)
  • [#2093] - Fixed license headers on AOSP/Android4Me files.
  • [#2120] - Added enhanced wrapper for Windows. (Thanks Varstahl)
  • [#2051] - Added advanced command for skipping non-root dex packages.
  • [#2028] - Fixed issue with MIUI package names being renamed. (Thanks IgorEisberg)
  • [#1272] - Fixed issue with too long command due to uncompressed file list. (Thanks IgorEisberg)
  • [#2071] - Fixed issue with NPE on annotations.
  • [#1576] - Fixed issue with garbled attributes. (Thanks brianairb)
  • [#2226] - Fixed regression with --only-main-classes not usable. (Thanks realityJie)
  • [#2141] - Fixed issue with bugged Window aapt builds. (Thanks Furniel)
  • [#2105] - Fixed issue with JVM not knowing bitness on Windows.
  • [#1272] - Fixed issue with long path commands due to recording compression. (Thanks peret)

Download: https://bitbucket.org/iBotPeaches/ap...tool_2.4.1.jar
md5 - 8afe0ea0336139fd57eb504433d602e6
sha256 - bdeb66211d1dc1c71f138003ce35f6d0cd19af6f8de7ffbdd5 b118d02d825a52

Details of Release: https://connortumbleson.com/2019/11/...-4-1-released/

Thread Guidelines
  1. If you don't know the following terms (aapt, apk, java) - then please don't post in this thread.
  2. If you didn't install frameworks (see FrameworkFiles) - then do that first before asking.
  3. If you want to engage in developer discussions - then post here.
  4. If you want to thank someone or express gratitude - sure why not post here.
  5. If your building from source - do not post those snapshot builds in this thread as we mix builds and makes users confused.
  6. If you believe you've found a bug, I'd prefer you post here: Bug List - but I won't be mad if you post it in this thread.
  7. If you send me a PM about Apktool support, I will ignore it.
  8. If you post any stacktraces, error logs or console output. Use Ubuntu Paste or Pastebin. Don't clutter our thread with 200 line posts.
  9. If you need support. Search this thread. If no luck, post your problem, but please include either an apk / output / log.


Donations:
plegdroid, fisha1, djdarkknight96, Gerard, rquiett, myn, nick1313, robm1911, Accidd, allyourbase, NCandiano, Noxious Ninja, Darkman_RS, XperienceD, Primokorn, muzicfreako, __alax74__, daveyannihilation

Previous Versions:
apktool v2.4.1 - https://forum.xda-developers.com/sho...postcount=5864
apktool v2.4.0 - https://forum.xda-developers.com/sho...postcount=5709
apktool v2.3.4 - https://forum.xda-developers.com/sho...postcount=5507
apktool v2.3.3 - https://forum.xda-developers.com/sho...postcount=5385
apktool v2.3.2 - https://forum.xda-developers.com/sho...postcount=5345
apktool v2.3.1 - https://forum.xda-developers.com/sho...postcount=5178
apktool v2.3.0 - https://forum.xda-developers.com/sho...postcount=5032
apktool v2.2.4 - https://forum.xda-developers.com/sho...postcount=4936
apktool v2.2.3 - https://forum.xda-developers.com/sho...postcount=4819
apktool v2.2.2 - https://forum.xda-developers.com/sho...postcount=4635
apktool v2.2.1 - http://forum.xda-developers.com/show...postcount=4478
apktool v2.2.0 - http://forum.xda-developers.com/show...postcount=4324
apktool v2.1.1 - http://forum.xda-developers.com/show...postcount=4163
apktool v2.1.0 - http://forum.xda-developers.com/show...postcount=4017
apktool v2.0.3 - http://forum.xda-developers.com/show...postcount=3839
apktool v2.0.2 - http://forum.xda-developers.com/show...postcount=3682
apktool v2.0.1 - http://forum.xda-developers.com/show...postcount=3474
apktool v2.0.0 - http://forum.xda-developers.com/show...postcount=3063
apktool v2.0.0 RC4 - http://forum.xda-developers.com/show...postcount=2728
apktool v2.0.0 RC3 - http://forum.xda-developers.com/show...postcount=2547
apktool v2.0.0 RC2 - http://forum.xda-developers.com/show...postcount=2425
apktool v1.5.2 - http://forum.xda-developers.com/show...postcount=1391
apktool v1.5.1 - http://forum.xda-developers.com/show...postcount=1180
apktool v1.5.1 PR3 - http://forum.xda-developers.com/show...postcount=1123
apktool v1.5.1 PR2 - http://forum.xda-developers.com/show...postcount=1084
apktool v1.5.1 PR1 - http://forum.xda-developers.com/show...&postcount=828
apktool v1.5.0 - http://forum.xda-developers.com/show...&postcount=382
apktool v1.4.10 - http://forum.xda-developers.com/show...&postcount=321
apktool v1.4.9 - http://forum.xda-developers.com/show...&postcount=131
apktool v1.4.8 - http://forum.xda-developers.com/show...5&postcount=28
The Following 945 Users Say Thank You to iBotPeaches For This Useful Post: [ View ]
6th July 2012, 04:47 PM |#2  
fisha21's Avatar
Senior Member
Thanks Meter: 4,306
 
More
Thanks for posting this, great to see someone carrying on brut.all's awesome work!

Sadly, still won't play nicely with some HTC One apks, but I know that's HTC's fault not yours

Look forward to seeing what you've got coming up...

EDIT: Donation sent!
The Following 24 Users Say Thank You to fisha21 For This Useful Post: [ View ] Gift fisha21 Ad-Free
6th July 2012, 04:55 PM |#3  
rtfpessoa's Avatar
Senior Member
Flag Lisbon
Thanks Meter: 669
 
Donate to Me
More
Good work!!!
I started testing and i still have problems with framework-miui-res, any tip?
I think the errors are those about change ex: <id to <item type="id"
Isn't that fixed in this version?

NOTE: If you don't what this kind of questions here, just say it np.
The Following 2 Users Say Thank You to rtfpessoa For This Useful Post: [ View ] Gift rtfpessoa Ad-Free
6th July 2012, 05:01 PM |#4  
iBotPeaches's Avatar
OP Recognized Developer
Flag Tampa
Thanks Meter: 4,310
 
Donate to Me
More
Quote:
Originally Posted by rtfpessoa

Good work!!!
I started testing and i still have problems with framework-miui-res, any tip?
I think the errors are those about change ex: <id to <item type="id"
Isn't that fixed in this version?

NOTE: If you don't what this kind of questions here, just say it np.


Yeah that should be fixed. The only times it seemed to fail is when the value of that item was @null or null. Which I hardcoded a fix in for. Send me that APK.
The Following 19 Users Say Thank You to iBotPeaches For This Useful Post: [ View ]
6th July 2012, 05:08 PM |#5  
rtfpessoa's Avatar
Senior Member
Flag Lisbon
Thanks Meter: 669
 
Donate to Me
More
Quote:
Originally Posted by iBotPeaches

Yeah that should be fixed. The only times it seemed to fail is when the value of that item was @null or null. Which I hardcoded a fix in for. Send me that APK.

Here is the zip with both framework-res and framework-miui-res
To compile framework-res i just need to fix that stuff about %d %d to %1$d %2$d right?
But in framework-miui-res it is saying that item stuff problem.

https://www.dropbox.com/s/djqwcacb5uyqsgc/frame.zip
The Following 2 Users Say Thank You to rtfpessoa For This Useful Post: [ View ] Gift rtfpessoa Ad-Free
6th July 2012, 06:46 PM |#6  
rtfpessoa's Avatar
Senior Member
Flag Lisbon
Thanks Meter: 669
 
Donate to Me
More
Quote:
Originally Posted by iBotPeaches

Yeah that should be fixed. The only times it seemed to fail is when the value of that item was @null or null. Which I hardcoded a fix in for. Send me that APK.

BTW, i cannot decompile miui.com roms with smali1.3.3 it give errors when deodexing apks. (http://pastebin.com/Q653Thdr)
I'm using the one from MiCode repos
The Following User Says Thank You to rtfpessoa For This Useful Post: [ View ] Gift rtfpessoa Ad-Free
6th July 2012, 06:48 PM |#7  
iBotPeaches's Avatar
OP Recognized Developer
Flag Tampa
Thanks Meter: 4,310
 
Donate to Me
More
Quote:
Originally Posted by rtfpessoa

BTW, i cannot decompile miui.com roms with smali1.3.3 it give errors when deodexing apks.
I'm using the one from MiCode repos

Try these: http://miui.connortumbleson.com/other/jf/

Take the smali/baksmali that end in dev-jar-with-dependencies-small.jar

It will be w/ dependencies, but then proguard removes the bloat.
The Following 9 Users Say Thank You to iBotPeaches For This Useful Post: [ View ]
6th July 2012, 06:50 PM |#8  
rtfpessoa's Avatar
Senior Member
Flag Lisbon
Thanks Meter: 669
 
Donate to Me
More
Quote:
Originally Posted by iBotPeaches

Try these: http://miui.connortumbleson.com/other/jf/

Take the smali/baksmali that end in dev-jar-with-dependencies-small.jar

It will be w/ dependencies, but then proguard removes the bloat.

I tried the not small version and got the same. Will try that now.
The Following User Says Thank You to rtfpessoa For This Useful Post: [ View ] Gift rtfpessoa Ad-Free
6th July 2012, 06:52 PM |#9  
iBotPeaches's Avatar
OP Recognized Developer
Flag Tampa
Thanks Meter: 4,310
 
Donate to Me
More
Quote:
Originally Posted by rtfpessoa

I tried the not small version and got the same. Will try that now.

There is some new smali/baksmali in dev that will be ready soon. Are the errors about magic values? Or opCodes? or regCount?
The Following 10 Users Say Thank You to iBotPeaches For This Useful Post: [ View ]
6th July 2012, 06:52 PM |#10  
rtfpessoa's Avatar
Senior Member
Flag Lisbon
Thanks Meter: 669
 
Donate to Me
More
Quote:
Originally Posted by iBotPeaches

There is some new smali/baksmali in dev that will be ready soon. Are the errors about magic values? Or opCodes? or regCount?

http://pastebin.com/Q653Thdr

I had the same problem with that smali too.
Any tip?
The Following 2 Users Say Thank You to rtfpessoa For This Useful Post: [ View ] Gift rtfpessoa Ad-Free
6th July 2012, 06:58 PM |#11  
iBotPeaches's Avatar
OP Recognized Developer
Flag Tampa
Thanks Meter: 4,310
 
Donate to Me
More
Quote:
Originally Posted by rtfpessoa

http://pastebin.com/Q653Thdr

I had the same problem with that smali too.
Any tip?

I just re-built smali/baksmali with the new changes JF made yesterday. Let me know if they work. Re-uploaded to same location.

Code:
[email protected] [/home/connor/public_html/miui/other/jf]# md5sum *
37d228ca4fa8c36af89531bd5a2b37c4  baksmali-1.3.4-dev.jar
824abf2deae6954756e34969836b96d4  baksmali-1.3.4-dev-jar-with-dependencies.jar
09fac38365d09afdfbd95557088a4976  baksmali-1.3.4-dev-jar-with-dependencies-small.jar
6e1ab315833a0c34e65a06fc8c4764e4  dexlib-1.3.4-dev.jar
1cd1b4a117d87c5a27aed6bd68715a06  smali-1.3.4-dev.jar
4d1c6ea1f07946d4823f80b5d1f470c9  smali-1.3.4-dev-jar-with-dependencies.jar
181ba18558c5f650c9c1797f8682891c  smali-1.3.4-dev-jar-with-dependencies-small.jar
a41726d66fb78dcc9d835a73b05198e1  util-1.3.4-dev.jar
The Following 3 Users Say Thank You to iBotPeaches For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
apktool, apktools, customise apk, decompile, edit apk, recompile, reverse

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes