How to unzip, edit and zip an android apk

后端 未结 3 604
陌清茗
陌清茗 2020-12-29 01:37

I have an android apk and I deleted my source code and dont have the project again, I want to change the version code of the old apk. my question is how do I unzip and repac

3条回答
  •  借酒劲吻你
    2020-12-29 02:27

    To give a complete answer for unpacking, editing and packing on Mac:

    Unpacking / Unzipping

    As Liu Tao stated, the easiest way to unpack a *.apk file on mac is to use the following command:

    unzip xxx.apk -d xxx

    This is because an *.apk file is nothing else than a zip file. Again, as Liu Tao stated, this can be found out with the file command.

    file xxx.apk

    Which will show an output that looks something like this:

    xxx.apk: Zip archive data, at least v2.0 to extract

    Editing

    I think this is self-explanatory. Go into the folder to which you exported the *.apk contents and edit them as you would usually do.

    Packing / Zipping

    On Mac, this is also quite straight-forward. You can use the zip command to pack all the files back into an *.apk file.

    zip -r xxx.apk xxx/

提交回复
热议问题