Apktool | A tool for reverse engineering Android apk files

 by   iBotPeaches Java Version: v2.7.0 License: Apache-2.0

kandi X-RAY | Apktool Summary

kandi X-RAY | Apktool Summary

Apktool is a Java library. Apktool has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.

It is a tool for reverse engineering 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. If you discover a security vulnerability within Apktool, please send an e-mail to Connor Tumbleson at connor.tumbleson(at)gmail.com. All security vulnerabilities will be promptly addressed.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Apktool has a medium active ecosystem.
              It has 16456 star(s) with 3370 fork(s). There are 656 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 93 open issues and 2523 have been closed. On average issues are closed in 14 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Apktool is v2.7.0

            kandi-Quality Quality

              Apktool has 0 bugs and 0 code smells.

            kandi-Security Security

              Apktool has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              Apktool code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              Apktool is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              Apktool releases are available to install and integrate.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Apktool saves you 6328 person hours of effort in developing the same functionality from scratch.
              It has 13189 lines of code, 1099 functions and 226 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed Apktool and discovered the below as its top functions. This is intended to give you an instant insight into Apktool implemented functionality, and help decide if they suit your requirements.
            • Generate the Qualifiers .
            • Create the command line options .
            • Compiles an APK2 package
            • Processes the next token .
            • Read config flags .
            • Start tag .
            • Escapes Java style characters in a string .
            • Encode the given string as XML value .
            • Decodes dex file .
            • Build resources .
            Get all kandi verified functions for this library.

            Apktool Key Features

            No Key Features are available at this moment for Apktool.

            Apktool Examples and Code Snippets

            No Code Snippets are available at this moment for Apktool.

            Community Discussions

            QUESTION

            Android locale_config.xml Unbound Prefix Error
            Asked 2022-Mar-17 at 17:14

            I am currently pentesting an Android app. I decompiled the app without any issues and whenever I try to recompile it back, the apktool.jar throw Unbound Prefix Error from the locale_config.xml file. Checked the syntax and they're all okay. I don't have any clue on what's going on.

            ...

            ANSWER

            Answered 2022-Mar-17 at 17:14

            For pentesting purposes, you might want to just get rid of localeConfig.

            To do this with minimal changes:

            1. Comment out all the lines in locales_config.xml.
            2. Remove android:localeConfig="@xml/locales_config" attribute of the tag in AndroidManifest.xml.

            That should do it.

            Source https://stackoverflow.com/questions/71267862

            QUESTION

            Making app request android permission on launch using apktool
            Asked 2022-Feb-15 at 01:50

            My app"s permissions are not being requested on launch, the only way to allow it is by settings>apps>my_app>permissions>allow_permissions . Its possible to make the app request it just by modifying the manifest, the activity_main.xml, or some other file in the decompiled apk folder (using apktool) ?

            ...

            ANSWER

            Answered 2022-Feb-15 at 01:50

            No, runtime permissions must be requested in code.

            They must be declared in the manifest (which they already are if they're showing up in the settings), but only the code can actually pop up the dialog to request the permission.

            Source https://stackoverflow.com/questions/71119426

            QUESTION

            how to locate the register problem in Android after modifying some smali code of an APK?
            Asked 2022-Jan-31 at 14:42

            I would like to add something to an app, so I added some lines to a smali file (decompiled the apk using apktools) and then repackaged and ran it on a real device. It shows

            • 10121 10211 E AndroidRuntime: os.json.JSONObject a.b.a.a.a.i.m(android.context.Context, java.lang.String) Failed to verify: os.json.JSONObject a.b.a.a.a.i.m(android.context.Context, java.lang.String): [0x161] v0 has type Conflict but expected Reference: java.lang.AutoCloseable (declaration of 'a.b.a.a.a.i' in /data/app/xxxx/xxxxx/base.apk)

            So what does the [0x161] refer to? Is it a line number? 0x161 = 353 in decimal. So I checked the smali code, but the function a.b.a.a.a.i.m has less than 353 lines in smali, so there is no line 353 and I can not locate the error.

            Neither does this function have enough lines in java (I used jadx to decompiled the generated apk).

            So in which type of file can I locate the problem in file's line 353? Should I transformed the apk into some other format to find a line 353 to troubleshoot the error? Thanks in advance.

            ...

            ANSWER

            Answered 2022-Jan-31 at 14:42

            0x161 should be the relative offset/address in bytes from the start of the method.

            You can enable in Jadx Show Dalvik Bytecode from context menu of the smali code panel to see the offsets. The offset you are looking for should be shown in the second gray colored column (the one with the red border in the sample screenshot).

            And the error should be caused by placing a wrong object reference in v0.

            Source https://stackoverflow.com/questions/70926990

            QUESTION

            bundletool build-bundle error: [BT:1.8.2] Error: Version code not found in manifest
            Asked 2022-Jan-20 at 09:11

            I am trying to turn an apk into aab, decompile with apktool, and build with aapt2 and bundletool (all in command line, without gradle).

            After decompile, aapt2 compile and link looks good, but when I execute build-bundle with bundletool, I got this error. What went wrong? And How can i fix it?

            ...

            ANSWER

            Answered 2022-Jan-20 at 09:11

            I have found a solution to my own problem. I can provide -m flag to decompile code like this:

            Source https://stackoverflow.com/questions/70781362

            QUESTION

            How to get dex file from apk when using v2 signature?
            Asked 2021-Nov-23 at 01:27

            I hava an apk file.

            When the apk is used v1 signature, it is ok when unzip an apk file. But when using v2, unzip fails.

            How can i get the original dex file?

            What i want to do is to modify the dex with ida, then rebuild to get a new apk.

            I know i can use apktool to get smali files, then modify smali file and rebuild to a new apk. But i want do try modify dex file in hex mode(eg. using ultra edit).

            enter image description here

            ...

            ANSWER

            Answered 2021-Nov-19 at 15:21

            You can pass -s, --no-src to apktool for apktool -s name_of_apk.apk and that will skip the sources. This is what is normally disassembled to smali folders.

            https://ibotpeaches.github.io/Apktool/documentation/#decode

            Source https://stackoverflow.com/questions/70032562

            QUESTION

            Is it possible to make a cordova app debuggable without recompiling?
            Asked 2021-Sep-17 at 22:34

            I have an .apk file for an old version of an app but don't have the ability to rebuild the app from source using cordova. I'm trying to debug an error and would like to enable remote debugging. Is it possible to enable remote debugging of the webview without rebuilding the app?

            I've tried unpacking the app using apktool, adding android:debuggable="true" to the AndroidManifest.xml and then repacking and resigning the .apk.

            When I run the app I can see the device in the device list of chrome://inspect#devices but the webview is not appearing. Am I missing something?

            ...

            ANSWER

            Answered 2021-Sep-17 at 22:34

            On Android in order to debug a WebView inside of an app, the following must be set in the app's code:

            WebView.setWebContentsDebuggingEnabled(true);

            From: https://developer.chrome.com/docs/devtools/remote-debugging/webviews/

            Given that you are reverse engineering an APK, you may want to look to see if the code exists and needs a special flag or attempt to add in the Smali code yourself.

            Source https://stackoverflow.com/questions/69215429

            QUESTION

            How to modify the apktool path
            Asked 2021-Apr-14 at 05:42

            4.1 dirthy, but this version was not official of apktool, and I was having some problems, so I upgraded to version 2.5.0 and official, however I want my apktool folder to be in /usr/share but if I move my apktool folder to /usr/share when I run apktool the result is this:

            ...

            ANSWER

            Answered 2021-Apr-14 at 05:42

            If you follow the steps to install apktool: https://ibotpeaches.github.io/Apktool/install/

            You will notice there are 2 files you need:

            1. a script (the one you posted), which you should name apktool and set to executable on linux chmod +x apktool
            2. a jar file: apktool.jar

            You need to have both files in the same directory for the script to work, so if you've moved the apktool file to /usr/share/apktool, you need to also move apktool.jar to /usr/share/apktool.jar

            Source https://stackoverflow.com/questions/66394034

            QUESTION

            How to solve problem in APK Tools
            Asked 2021-Apr-09 at 05:03

            I'm trying to decompile an apk with the apk tools and I'm not getting it.

            When I run apktool -d myapp.apk it displays this error to me:

            ...

            ANSWER

            Answered 2021-Mar-05 at 07:12

            QUESTION

            Aapt does not run on arm architecture
            Asked 2021-Mar-10 at 22:09

            I'm using Nethunter, and the architecture is Linux arm, and I would love to use the apktool tool, I'm studying and reading pentest books, but I can't practice if I don't apply what's there, the problem is that for me rebuild an apk using apktool b app it returns an error code 131, which according to the creator of apktool, is that aapt is not working for arm architecture, is there any way I can install aapt for arm?

            ...

            ANSWER

            Answered 2021-Mar-10 at 22:09

            So guys, as it is not possible to use this tool on Android devices, the solution I found was to use the Apk Editor Pro and change the files I need to change, but I found this Haxus tool that works on Android devices and does the same work that apktool

            Haxus tool: https://github.com/Hax4us/Apkmod

            Source https://stackoverflow.com/questions/66476688

            QUESTION

            Unity Android 64 Bit - Not Compliant Error
            Asked 2021-Feb-25 at 03:49

            Running into an issue around a native-Android Unity integration release into the Play Store. I extract it as a project out of Unity and migrate it as a Library in our native app.

            When attempting to upload an .AAB into the Play Store, the following error occurs:

            ...

            ANSWER

            Answered 2021-Feb-25 at 03:49

            The problem stemmed from the usage of '.bc' files contained within a Unity library I was using. These bc files are always interpreted as 32-bit. You'll have to upgrade whichever library you're using that contains these files.

            You can determine if you have the same issue by running the following command on your APK or AAB file:

            Source https://stackoverflow.com/questions/66143801

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Apktool

            You can download it from GitHub, Maven.
            You can use Apktool like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Apktool component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by iBotPeaches

            LeafApp_Infinite

            by iBotPeachesPHP

            Android-MIUI-Porting

            by iBotPeachesShell

            PandaLove

            by iBotPeachesPHP

            Random-Scripts

            by iBotPeachesShell

            ReachStats

            by iBotPeachesPHP