Gyoonus / deoptfuscator

Deobfuscator for Android Application
MIT License
393 stars 53 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex' #20

Open 0p71mu5 opened 1 month ago

0p71mu5 commented 1 month ago

getting below error.

on further debugging, no files were found in path ~/deoptfuscator/.apk/const

I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
.apk/classes9.dex
Error : .apk/classes9.dex
Traceback (most recent call last):
  File "/tmp/redex.Gy6xOg/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.Gy6xOg/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.Gy6xOg/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes8.dex
Error : .apk/classes8.dex
Traceback (most recent call last):
  File "/tmp/redex.kL0Ah2/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.kL0Ah2/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.kL0Ah2/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes13.dex
Error : .apk/classes13.dex
Traceback (most recent call last):
  File "/tmp/redex.jxWOVL/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.jxWOVL/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.jxWOVL/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes3.dex
Error : .apk/classes3.dex
Traceback (most recent call last):
  File "/tmp/redex.fircDs/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.fircDs/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.fircDs/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes14.dex
Error : .apk/classes14.dex
Traceback (most recent call last):
  File "/tmp/redex.aBo7ec/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.aBo7ec/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.aBo7ec/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes16.dex
Error : .apk/classes16.dex
Traceback (most recent call last):
  File "/tmp/redex.mHfYND/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.mHfYND/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.mHfYND/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes15.dex
Error : .apk/classes15.dex
Traceback (most recent call last):
  File "/tmp/redex.M729W3/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.M729W3/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.M729W3/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes2.dex
Error : .apk/classes2.dex
Traceback (most recent call last):
  File "/tmp/redex.x0jV1O/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.x0jV1O/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.x0jV1O/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes.dex
Error : .apk/classes.dex
Traceback (most recent call last):
  File "/tmp/redex.8LjXDO/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.8LjXDO/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.8LjXDO/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes12.dex
Error : .apk/classes12.dex
Traceback (most recent call last):
  File "/tmp/redex.rW5ACC/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.rW5ACC/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.rW5ACC/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes10.dex
Error : .apk/classes10.dex
Traceback (most recent call last):
  File "/tmp/redex.ivu4eP/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.ivu4eP/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.ivu4eP/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes7.dex
Error : .apk/classes7.dex
Traceback (most recent call last):
  File "/tmp/redex.O09taK/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.O09taK/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.O09taK/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes6.dex
Error : .apk/classes6.dex
Traceback (most recent call last):
  File "/tmp/redex.v86uuy/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.v86uuy/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.v86uuy/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes17.dex
Error : .apk/classes17.dex
Traceback (most recent call last):
  File "/tmp/redex.v6fxLj/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.v6fxLj/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.v6fxLj/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes5.dex
Error : .apk/classes5.dex
Traceback (most recent call last):
  File "/tmp/redex.VLfkGY/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.VLfkGY/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.VLfkGY/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes11.dex
Error : .apk/classes11.dex
Traceback (most recent call last):
  File "/tmp/redex.Myealk/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.Myealk/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.Myealk/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
.apk/classes4.dex
Error : .apk/classes4.dex
Traceback (most recent call last):
  File "/tmp/redex.JwHh82/redex.py", line 640, in <module>
    run_redex(args)
  File "/tmp/redex.JwHh82/redex.py", line 499, in run_redex
    unzip_apk(args.input_apk, extracted_apk_dir)
  File "/tmp/redex.JwHh82/redex.py", line 210, in unzip_apk
    with zipfile.ZipFile(apk) as z:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1294, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.apk/const/const.dex'
$TOOLS/redex-all .apk/const/const.dex -o .apk/const
mv: cannot stat '.apk/const/classes.dex': No such file or directory
mv: cannot stat '.apk/const/classes.dex': No such file or directory
I: Using Apktool 2.4.1
I: Copying ./.apk classes.dex file...
I: Copying ./.apk classes9.dex file...
I: Copying ./.apk classes8.dex file...
I: Copying ./.apk classes13.dex file...
I: Copying ./.apk classes3.dex file...
I: Copying ./.apk classes14.dex file...
I: Copying ./.apk classes16.dex file...
I: Copying ./.apk classes15.dex file...
I: Copying ./.apk classes2.dex file...
I: Copying ./.apk classes12.dex file...
I: Copying ./.apk classes10.dex file...
I: Copying ./.apk classes7.dex file...
I: Copying ./.apk classes6.dex file...
I: Copying ./.apk classes17.dex file...
I: Copying ./.apk classes5.dex file...
I: Copying ./.apk classes11.dex file...
I: Copying ./.apk classes4.dex file...
I: Checking whether resources has changed...
I: Copying raw resources...
I: Copying libs... (/kotlin)
I: Copying libs... (/META-INF/services)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
zipalign: symbol lookup error: zipalign: undefined symbol: _ZN11zip_archive6WriterD2Ev
Exception in thread "main" java.io.FileNotFoundException: app_deobfuscated_align.apk (No such file or directory)
        at java.base/java.io.RandomAccessFile.open0(Native Method)
        at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:344)
        at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:259)
        at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:213)
        at com.android.apksig.ApkSigner.sign(ApkSigner.java:190)
        at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:356)
        at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:85)
SigmaStar commented 1 month ago

Have you already cloned all the files?

0p71mu5 commented 1 month ago

I did used git clone command, however was facing issues with tools/redex-all so copied the binary from facebook redex-all github repo release.

SigmaStar commented 1 month ago

did you finished git pull? there are some libraries that stored in git lfs but they are out-quota?