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

No such file or directory error on Mac #25

Closed
benoitletondor opened this issue Apr 13, 2016 · 2 comments
Closed

No such file or directory error on Mac #25

benoitletondor opened this issue Apr 13, 2016 · 2 comments

Comments

@benoitletondor
Copy link

Hello there,

I'm getting this error after running the redex cl on Mac OS. Any idea what may going wrong?

benoit@local:~/Desktop$ redex eb.apk -o eb-redex.apk
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 538, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/zl/cb9mqw910m907k5qdbcw65bm0000gn/T/tmpcm288xpk.redex_dexen/classes.dex' -> '/var/folders/zl/cb9mqw910m907k5qdbcw65bm0000gn/T/tmpcjbytfn6.redex_extracted_apk/classes.dex'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/redex", line 779, in <module>
    run_redex(args)
  File "/usr/local/bin/redex", line 746, in run_redex
    dex_mode.repackage(extracted_apk_dir, dex_dir, have_locators)
  File "/usr/local/bin/redex", line 236, in repackage
    shutil.move(join(dex_dir, 'classes.dex'), extracted_apk_dir)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 552, in move
    copy_function(src, real_dst)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 251, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 114, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/zl/cb9mqw910m907k5qdbcw65bm0000gn/T/tmpcm288xpk.redex_dexen/classes.dex'

Thanks

@benoitletondor benoitletondor changed the title No such file or directory on Mac OS No such file or directory error on Mac Apr 13, 2016
@bertmaher
Copy link
Contributor

It seems like something's screwy with your TMPDIR. It's hard to say how that's going wrong but it'll probably work for you to run redex as: TMPDIR=/tmp redex eb.apk -o eb-redex.apk

@benoitletondor
Copy link
Author

Hi,

Thanks for your help but unfortunately it still doesn't work:

benoit@local:~/Desktop$ TMPDIR=/tmp redex eb.apk -o eb-redex.apk
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 538, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp9nz1iahk.redex_dexen/classes.dex' -> '/tmp/tmpizx0mby3.redex_extracted_apk/classes.dex'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/redex", line 779, in <module>
    run_redex(args)
  File "/usr/local/bin/redex", line 746, in run_redex
    dex_mode.repackage(extracted_apk_dir, dex_dir, have_locators)
  File "/usr/local/bin/redex", line 236, in repackage
    shutil.move(join(dex_dir, 'classes.dex'), extracted_apk_dir)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 552, in move
    copy_function(src, real_dst)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 251, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 114, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp9nz1iahk.redex_dexen/classes.dex'

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