jadx | Dex to Java decompiler | Bytecode library
kandi X-RAY | jadx Summary
kandi X-RAY | jadx Summary
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
Top functions reviewed by kandi - BETA
- 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 .
jadx Key Features
jadx Examples and Code Snippets
Community Discussions
Trending Discussions on jadx
QUESTION
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:56Start by checking the file is where it is expected as
QUESTION
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:29There 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
QUESTION
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:420x161
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
.
QUESTION
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:14I 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.
QUESTION
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:44Like 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.
QUESTION
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:
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.
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 problemEach 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:
- Sometimes the app name couldn't be fetched correctly (here).
- Some resources are somehow hidden in some apps (here). Even tools such as Jadx fail to show them, but others can.
- 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 triedSo, 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:02Change the copy code from
QUESTION
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:20Look here: $(Android Studio)/plugins/java-decompiler/lib/java-decompiler.jar
Running from command line:
QUESTION
I ran an APK through dex2jar
and JD-GUI
and found the class I'm interested in:
ANSWER
Answered 2020-May-01 at 12:56This 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 ॱ
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jadx
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
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page