Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JADX tool disappear in docker-compose instance #2485

Open
Antiksec opened this issue Jan 30, 2025 · 3 comments
Open

JADX tool disappear in docker-compose instance #2485

Antiksec opened this issue Jan 30, 2025 · 3 comments
Assignees

Comments

@Antiksec
Copy link
Contributor

Antiksec commented Jan 30, 2025

JADX installed during Docker build to mobsf_home/tools directory will disappear in docker-compose setup because of mounting docker volume to the mobsf_home directory (

- $HOME/MobSF/mobsf_data:/home/mobsf/.MobSF
) which is clean at the beggining. If then tools_download.py didn't download it (because of proxy settings, for example) it will crash

[ERROR] 30/Jan/2025 11:36:18 - Decompiling with JADX failed
mobsf-1 | Traceback (most recent call last):
mobsf-1 | File "/home/mobsf/Mobile-Security-Framework-MobSF/mobsf/StaticAnalyzer/views/android/converter.py", line 101, in apk_2_java
mobsf-1 | os.chmod(str(jadx), stat.S_IEXEC)
mobsf-1 | FileNotFoundError: [Errno 2] No such file or directory: '/home/mobsf/.MobSF/tools/jadx/jadx-1.5.0/bin/jadx'

Probable solution is to use different directory for JADX install

Copy link

👋 @Antiksec
Issues is only for reporting a bug/feature request. For limited support, questions, and discussions, please join MobSF Slack channel
Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.

@ajinabraham
Copy link
Member

JADX is dynamically downloaded at first run, if not found in the volume mount.
If there is a proxy config error, other things in MobSF will fail as well.

Having correct proxy configured is a requirement. There is also a way to define JADX binary path using the environment variable:

JADX_BINARY = os.getenv('MOBSF_JADX_BINARY', '')

@ajinabraham ajinabraham self-assigned this Feb 5, 2025
@Antiksec
Copy link
Contributor Author

Antiksec commented Feb 6, 2025

Yep, but download_file func which uses to download Jadx uses system proxy instead of upstream_proxy func here

I made PR to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants