jadx | Dex to Java decompiler | Bytecode library

 by   skylot Java Version: v1.4.7 License: Apache-2.0

kandi X-RAY | jadx Summary

kandi X-RAY | jadx Summary

jadx is a Java library typically used in Programming Style, Bytecode applications. jadx has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has high support. You can download it from GitHub, Maven.

jadx - Dex to Java decompiler. Command line and GUI tools for producing Java source code from Android Dex and Apk files. :exclamation::exclamation::exclamation: Please note that in most cases jadx can't decompile all 100% of the code, so errors will occur. Check Troubleshooting guide for workarounds.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              jadx has a highly active ecosystem.
              It has 34882 star(s) with 4318 fork(s). There are 795 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 324 open issues and 1125 have been closed. On average issues are closed in 83 days. There are no pull requests.
              It has a positive sentiment in the developer community.
              The latest version of jadx is v1.4.7

            kandi-Quality Quality

              jadx has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              jadx 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

              jadx releases are available to install and integrate.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              jadx saves you 64687 person hours of effort in developing the same functionality from scratch.
              It has 104442 lines of code, 9138 functions and 1199 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed jadx and discovered the below as its top functions. This is intended to give you an instant insight into jadx implemented functionality, and help decide if they suit your requirements.
            • Generates an instruction body for the given instruction .
            • Initialize the menu and toolbar buttons .
            • Generate the Qualifiers .
            • Yylex token .
            • Create the decoration group .
            • Make a ternary instruction for a ternary .
            • Initialize toolbar actions .
            • Extract finally block info .
            • Process a loop .
            • Check for an array for loop .
            Get all kandi verified functions for this library.

            jadx Key Features

            No Key Features are available at this moment for jadx.

            jadx Examples and Code Snippets

            No Code Snippets are available at this moment for jadx.

            Community Discussions

            QUESTION

            How to solve does not existte object error in bash
            Asked 2022-Mar-02 at 18:56

            Using a bash script to automatically pull and install an android app via ADB. However, I get an error ' does not existte object [apk path]`. Here is the script:

            ...

            ANSWER

            Answered 2022-Mar-02 at 18:56

            Start by checking the file is where it is expected as

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

            QUESTION

            Error while decompiling java class: ItemCollectionInvalidIndex: constants: requested 15873, limit 63
            Asked 2022-Feb-25 at 12:29

            I am decompiling java application, and i have already done with 99% .class files. But, I have a problem with couple of them: error while decompilation (errors are same type). Example:

            Procyon: java.lang.IllegalArgumentException: Argument 'index' must be in the range [0, 63], but value was: 15873...

            CFR:

            ...

            ANSWER

            Answered 2022-Feb-25 at 12:29

            There is nothing wrong with all decompilers i have mentioned before.

            It was a constant_pool_count issue. It happened because of some JPHP decompiler offset troubles. So, if you are trying to reverse jphp applications, use your own software to delim .phb to .class blocks with couple of bytes before each of them

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

            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

            Is it possible to analyze dex file directly with mobsf?
            Asked 2021-Feb-03 at 22:37

            I have several dex files that needs to be statically analyzed by mobsf after unpacking the apk file because core code are inaccessible prior to unpacking.

            What I've tried: Adding Line 3 and changing line 4 from glob_pattern = app_dir + *.dex' to glob_pattern = ddex_dir

            ...

            ANSWER

            Answered 2021-Jan-08 at 21:14

            I would try to use dex2jar tool for this purpose. Convert your apk to jar and then analyze it with MobSF. MobSF should work with jar files since this is an archive. I am not sure if it will show the stable behavior, but it can be an option.

            As far as I know MobSF also have this package within it's source code, so did you try to load this APK directly to MobSF without changing anything? I think it might work.

            Also you can use JADX tool for manual source code analyzing. It should restore the source code from the DEX binaries.

            Also observe this issue. MobSF developer suggests to use enjarify instead of dex2jar (2nd answer) and sends the link which explains how to do it.

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

            QUESTION

            Partially failed Android decompile contains a weird int: 65536(0x10000, float:9.18355E-41)
            Asked 2020-Oct-26 at 07:44

            I have decompiled an application using APKTool and JadX and I'm trying to manually restore a few spots that didn't decompile correctly. So far it's going slow but steady and I've fixed all of the other ones. But I'm a bit stumped by the following line:

            ...

            ANSWER

            Answered 2020-Oct-26 at 07:44

            Like Joachim Suaer already said it's just a constant value that the compiler is unsure of if it was meant to be an int or a float.

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

            QUESTION

            How to parse an APK after converting it to a minimal one?
            Asked 2020-Jun-19 at 10:46
            Background

            I want to be able to parse APK files from various sources, or various kinds. I want to get only very specific, basic information about them:

            • package-name
            • version-code
            • version-name
            • label (app name)
            • icon
            • minSdkVersion
            • whether it's a split APK or not (available when parsing the manifest)

            The Android framework has a single function to parse APK files (PackageManager.getPackageArchiveInfo), but it has 2 disadvantages:

            1. It requires a file-path. This isn't always available, as you might have a Uri to deal with, or you have the APK file being inside some ZIP file.

            2. It can't handle split APK files. Only the base one of them. If you try it on split APK files, you just get null.

            Because of this, I've tried to find a reliable, Java&Kotlin solution that can handle them easily.

            The problem

            Each solution I've found has its own disadvatanges. Some libraries I couldn't even find how to use, and some don't have any way to parse APK files without having a real file path. Some of them just create new files instead of returning you objects in Java/Kotlin. Some are even in other programming languages, making me wonder if it's possible to use them.

            So far, the only one that I've found as good enough, is "hsiafan" apk-parser, which needs only 2 files within the APK: manifest and resources files. It has some issues, but usually it can get you the information I've mentioned.

            Thing is, as I wrote, it's not always working, so I want to return to the basics, at least when I notice it fails to parse, at least for the case that it's a normal APK of base of split-APK files. Some cases it couldn't handle well are:

            1. Sometimes the app name couldn't be fetched correctly (here).
            2. Some resources are somehow hidden in some apps (here). Even tools such as Jadx fail to show them, but others can.
            3. Adaptive icon is hard to parse, including drawable XML files. I succeed parsing VectorDrawable though (here), but it's quite a workaround.

            And a few others.

            What I've tried

            So, I wanted to try out the Android framework again, but this time with a new idea: instead of handling the entire original APK, I could extract only what it really needs, based on the current observation of it.

            For example, if I know the resources I need to handle, I can copy only them (and some key files that are needed) into a new APK, and ditch the rest. This could reduce the need to copy/download huge amount of data just to parse the APK and get information about it. If the APK file is 100MB, for example, there is no need to get it all when all we need is just a tiny portion of it.

            As a start, I wanted to see how I can create a new APK that can be parsed, so for now I copied all of the entries of the original APK (currently of the current app) into a new file, and chose to parse it:

            ...

            ANSWER

            Answered 2020-Jun-13 at 18:02

            Change the copy code from

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

            QUESTION

            Is it possible to use Android Studio's decompiler from command line?
            Asked 2020-May-20 at 17:20

            I'm a begginner in android pentest and I'm using some decompiler like jadx but sometimes It does'nt work on decompiling some classes,

            but when I drag and drop the .class file in android studio it decompiles it.

            So is there a tool that use the android decompiler to decompile android application ? Or is there any way to decompile a complete APK without drag & droping each class files to android studio ?

            Thank you

            ...

            ANSWER

            Answered 2020-May-20 at 17:20

            Look here: $(Android Studio)/plugins/java-decompiler/lib/java-decompiler.jar

            Running from command line:

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

            QUESTION

            Frida: Replace string literal in class method
            Asked 2020-May-01 at 12:56

            I ran an APK through dex2jar and JD-GUI and found the class I'm interested in:

            ...

            ANSWER

            Answered 2020-May-01 at 12:56

            This call in Java:
            .\u0971("www.google.com", new String[] {"sha256/asdIa1tHg96AnzarJ6GJLu6JiogJla3UDsPWMDICs=" })
            is found in smali at:
            invoke-virtual {v1, v2, v3}, Lo/bdq$if;->ॱ(Ljava/lang/String;[Ljava/lang/String;)Lo/bdq$if;

            The Java class is o.bdq$if (class if is nested inside o.bdq). The method name is

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install jadx

            After download unpack zip file go to bin directory and run:. On Windows run .bat files with double-click Note: ensure you have installed Java 11 or later 64-bit version. For Windows, you can download it from oracle.com (select x64 Installer).
            release from github:
            latest unstable build
            jadx - command line version
            jadx-gui - UI version
            Arch linux sudo pacman -S jadx
            macOS brew install jadx
            JDK 8 or higher must be installed:. (on Windows, use gradlew.bat instead of ./gradlew). Scripts for run jadx will be placed in build/jadx/bin and also packed to build/jadx-<version>.zip.

            Support

            Please check wiki page Troubleshooting Q&A.
            Find more information at:

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

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/skylot/jadx.git

          • CLI

            gh repo clone skylot/jadx

          • sshUrl

            git@github.com:skylot/jadx.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link