d78ui98 / APKDeepLens

Android security insights in full spectrum.
MIT License
527 stars 69 forks source link

AndroidManifest.xml not found #6

Open HackJJ opened 7 months ago

HackJJ commented 7 months ago

So, I get an error saying AndroidManifest.xml not found with the below. I can run jadx against the APK successfully. What is happening?

❯ python3 APKDeepLens.py -apk Example.apk                                                                    

 ████  █████  ██  ██    ( )                  (_ )                           
██  ██ ██  ██ ██ ██    _| |  __     __  _ _   | |     __    ___    ___      
██████ █████  ████   /'_` | /'_`\ /'_`\( '_`\ | |    /'_`\/' _ `\/',__)     
██  ██ ██     ██ ██ ( (_| |(  __/(  __/| (_) )| |__ (  __/| ( ) |\__, \     
██  ██ ██     ██  ██`\__,_)`\___)`\___)| ,__/'(____/`\___)(_) (_)(____/     
                                       | |                                  
                                       (_)                                  
                                              - Made By Deepanshu

[+] /Users/jj/Documents/APKDeepLens/Example.apk found!
[+] Creating new directory for extracting apk : /Users/jj/Documents/APKDeepLens/app_source/Example.apk
[+] Extracting the source code to : /Users/jj/Documents/APKDeepLens/app_source/Example.apk
INFO  - loading ...
CompletedProcess(args=['/Users/jj/Documents/APKDeepLens/static_tools/jadx/bin/jadx', '/Users/jj/Documents/APKDeepLens/Example.apk', '-d', '/Users/jj/Documents/APKDeepLens/app_source/Example.apk'], returncode=0)
[-] ERROR: Manifest file /Users/jj/Documents/APKDeepLens/app_source/Example.apk/resources/AndroidManifest.xml not found.
/Users/jj/Documents/APKDeepLens/APKDeepLens.py:275: [-] [Errno 2] No such file or directory: '/Users/jj/Documents/APKDeepLens/app_source/Example.apk/resources/AndroidManifest.xml' at line 202
d78ui98 commented 7 months ago

Hello @HackJJ

Thank you for reporting this issue. Unfortunately, I am not able to reproduce this error. Could you please tell me more about it? Like which environment are you using, any other details.

shiyiyy commented 7 months ago

I also encountered the same problem. At first, I thought it was the mac computer that opened jadx, and then I chose to allow it to open. This problem still exists. I think you can try running it on the mac computer.

kunwaratulhax0r commented 7 months ago

Hey @HackJJ @shiyiyy I also ran in Mac, but didn't face any issues. Could you please be more specific on which architecture you running?

image

shiyiyy commented 7 months ago
图片 1

My computer is an Intel Core i7 from 2019, with a system version of 14.2.1。 It seems that other people's Windows computers are also experiencing this issue. My Python 3 version is 3.9.6

Yokr0n0s commented 7 months ago

The project is so cool . But on my windows (core i5 10210u, windows 11 version 22361 ) experiencing this problem too. hope to resole this problem soon. ERROR: Manifest file D:\test\test\test\APKDeeplens\app_source\test.apk\resources\AndroidManifest.xml not found. My Python version is Python 3.11.4 pip version is 23.1.2 and when I pip install the requirements file, it prompts 'but you have cryptography 42.0.5 which is incompat'.

kunwaratulhax0r commented 7 months ago

Looks like it's happening with everyone, I tried on both Mac Intel Arc and M1 and it was working fine with me. @d78ui98 Pls check this.

SuperZero commented 7 months ago

It seems that the built-in jadx is causing this error, the built-in jadx version is ‘dev’, I use https://github.com/skylot/jadx/releases/tag/v1.4.7 to replace the/root/APKDeepLens/static_tools/jadx/, works.

kunwaratulhax0r commented 7 months ago

@SuperZero I am not sure if it's true, because I am using same build in the repo and it's working fine. Others may try your solution and let us know if they still face same issue

Yokr0n0s commented 7 months ago

It seems that the built-in jadx is causing this error, the built-in jadx version is ‘dev’, I use https://github.com/skylot/jadx/releases/tag/v1.4.7 to replace the/root/APKDeepLens/static_tools/jadx/, works.

Great answer, I successfully ran this program by downloading and resetting all files under the jadx folder.Tks Bro.

shiyiyy commented 7 months ago

It seems that the built-in jadx is causing this error, the built-in jadx version is ‘dev’, I use https://github.com/skylot/jadx/releases/tag/v1.4.7 to replace the/root/APKDeepLens/static_tools/jadx/, works.

Thank you very much. I can also run normally now

wujianxin0 commented 7 months ago

我也遇到了同样的问题,但我是通过变更JDK的版本使用的。没有修改前系统的jdk环境=1.8,当我将jdk的版本更换为11后就可以运行了

d78ui98 commented 7 months ago

Thank you, @SuperZero, for the jadx fix and @wujianxin0 for the JDK version upgrade insight.

Both suggestions are invaluable, and I will be updating the README to reflect the JDK version requirement to assist future users.

In my environment, I am using OpenJDK version 17, so I was unable to reproduce the error initially I thought it was due to a difference in the Python version. But thanks to you both for your insightful comments they make a significant difference 😄

Titounkle commented 7 months ago

Hi, first thanks for the program, i am getting the same issue, but did not solve it with @SuperZero solution, or maybe i'm doing it wrong, i downloaded the jadx zip, and replace inside the route that he gives, my python version is 3.9.2, on a linux desktop.

EDIT2: Solved it updating JDK, didnt translate @wujianxin0 at first, but thanks for the hint.

dead5nd commented 5 months ago

According to the above statement, the Mac M series does not work. I directly installed jadx locally and then modified the code to not use jadx in the static_tools directory to run successfully!

image
ywjiaCN commented 3 months ago

"I encountered this issue as well, which is caused by Jadx not working properly. Please check the environment to ensure (1) the code path does not contain Chinese characters (2) the JDK version is 11 and the environment variables are configured."  Additionally, if you're facing issues with Jadx not functioning as expected, here are some steps you can take to troubleshoot:  Check the Code Path: Ensure that the path where Jadx is installed does not contain any Chinese characters, as this can sometimes cause issues with command-line tools.  JDK Version: Verify that you have the correct version of the Java Development Kit (JDK) installed. Jadx may require a specific version of JDK, so if it's not version 11, consider updating or installing the required version.  Environment Variables: Make sure that the JAVA_HOME environment variable is set to the JDK installation directory and that the JDK's bin directory is added to the system's PATH variable.  Run Jadx with Full Path: When executing Jadx, use the full path to the JAR file or the batch file to avoid any issues related to the current working directory.  Check for Updates: Ensure that you are using the latest version of Jadx, as updates often include bug fixes and improvements.  Consult Documentation: Review the official Jadx documentation or GitHub repository for any specific installation instructions or known issues that might be relevant to your situation.

Zxc123456zxc commented 3 months ago

看起来是内置的 jadx 导致了这个错误,内置 jadx 版本是“dev”,我使用https://github.com/skylot/jadx/releases/tag/v1.4.7替换 /root/APKDeepLens/static_tools/jadx/,成功了。

感谢,我也是替换后,成功运行

tuguanyu commented 3 months ago

看起来是内置的 jadx 导致了这个错误,内置 jadx 版本是“dev”,我使用https://github.com/skylot/jadx/releases/tag/v1.4.7替换 /root/APKDeepLens/static_tools/jadx/,成功了。

感谢,我也是替换后,成功运行

这个怎么替换呢

CHOSEN1-Z13 commented 2 months ago

看起来是内置的 jadx 导致了这个错误,内置 jadx 版本是“dev”,我使用https://github.com/skylot/jadx/releases/tag/v1.4.7替换 /root/APKDeepLens/static_tools/jadx/,成功了。

感谢,我也是替换后,成功运行

这个怎么替换呢

去这里下载https://github.com/skylot/jadx/releases/download/v1.4.7/jadx-1.4.7.zip,然后解压后复制到APKDeepLens/static_tools/jadx/这个文件夹,记得将之前的文件删除。

yingdushenyou commented 1 week ago

我是 centos 也遇到了这个问题

yingdushenyou commented 1 week ago

我想知道 centos 如何解决这个问题?

yingdushenyou commented 1 week ago

我想知道 centos 如何解决这个问题?

yingdushenyou commented 1 week ago

按照上面评论的内容解决了这个问题了

Zxc123456zxc commented 1 week ago

按照上面评论的内容解决了这个问题了

我是windows得,win替换了好使