Search code examples
androidpythonunzip

is it possible to unzip a .apk file(or generally any zipped file) into memory instead of writing it to fs


I am doing research with mobile apps and need to analyze their code after unzipping the .apk file. However, the process of unzipping naturally involves lots of IO, which doesn't make it scalable, I am thinking if it's possible to hold the unzipped data in memory, with several variables representing it, thus saving the trouble of writing to FS. I am loaded with thousands of apps to analyze, so being able to do something like this would significantly speed up my process. Is there anyone who can suggest a way out for me. I am using python. Thanks in advance


Solution

  • Hope you are using Linux:

    $ cd /dev/shm
    $ unzip /path/to/my.apk
    

    that's it. Unzipped APK in memory.