fredpedroso / android-manifest-analysis

AMA (Android Manifest Analysis) is a tool to automate analysis of AndroidManifest.xml files.
GNU General Public License v3.0
3 stars 2 forks source link

Failed to copy the file error #1

Open hax0rgb opened 2 years ago

hax0rgb commented 2 years ago

@fredpedroso Probably there is some issue in running this script.

Following is the error when running this tool.

 python3 ama.py --path sample.apk 

I: Using Apktool 2.5.0 on sample.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /var/folders/cx/njsb9c5104x9txnyk801bdgm0000gq/T/1.apk
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying raw classes.dex file...
I: Copying raw classes2.dex file...
I: Copying raw classes3.dex file...
I: Copying raw classes4.dex file...
I: Copying raw classes5.dex file...
I: Copying raw classes6.dex file...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
09-27 19:38 INFO     Generating report ...
09-27 19:38 ERROR    Failed to copy the file sample-20220927-193811.xlsx - No such file or directory
Traceback (most recent call last):
  File "/Users/redacted/Documents/Android/Tools/android-manifest-analysis/source/report.py", line 62, in generate_report
    shutil.copy(REPORT_TEMPLATE, report_path)
  File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 417, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 256, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/redacted/Documents/Android/Tools/android-manifest-analysis/report/sample-20220927-193811.xlsx'
fredpedroso commented 2 years ago

Hello @hax0rgb ,

hax0rgb commented 2 years ago

Operating system:

Mac OS Monterey version 12.4

Python version:

Python 3.10.6

Pip version:

pip 22.2.2

The error occurs when you simply supply APK file to the python script:

python3 ama.py --path sample.apk 
ptef commented 2 months ago

Is this bug still opened after 2 years? I've got the same error on Ubuntu 24.04 LTS

fredpedroso commented 2 months ago

Hi everyone,

Sorry for the delay. Let me check this issue.