FrançaisEnglishDeutsch

7zip library sources for Android

Requirements:

Main features:

  • List and Unpack contents of the following file types:
    7z,rar,tar,gz,tgz,z,tz,bz2,bzip2,tbz,tbz2,arj,lha,lzh,iso,img,cab
  • Unpack multi-volume archives
  • Unpack encrypted archives
  • List names from name-encrypted archives
  • Callback function for progress and to choose files to be unpacked
  • Can be compiled as a standalone app, or to replace internal libs
  • Open source under LGPL
  • This project is a merger of 7z1900-src.7z for Windows, and p7zip_16.02_src_all.tar.bz2 for Linux. p7zip 16.02 is very outdated, and may therefore contain security issues. 7z19.00 is up to date, but doesn't support Linux/Android.

Download the Android library (Freeware under LGPL!):

How to build this library:

  1. Install Android Studio
  2. Download the Android NDK R16b if you want to compile for ARMv6 and MIPS, and unpack to \android-sdk-windows\android-ndk-r16b
  3. Download the library source code
  4. Unzip the library source code to a separate directory in your Android project directory
  5. Open Android Studio, and then the library sources
  6. If you don't want to build for ARMv6 and MIPS, make the following changes:
    - in local.properties, change the ndk.dir variable to ndk.dir=C\:\\android-sdk-windows\\ndk-bundle
    - in app - build.gradle, change abiFilters to: abiFilters "armeabi-v7a" , "x86", "x86_64", "arm64-v8a"
  7. Build the project for release
  8. a) Install app\release\a7zip-release.apk to your device. This has the advantage that Total Commander will automatically use the external library instead of the internal library!
    b) Alternatively, extract the libtcun7zip.so libraries from a7zip-release.apk and re-package them into Total Commander. This has the disadvantage that you have to re-sign the Total Commander apk with your own certificate. You can use this method too to use the libtcun7zip.so libraries in your own project, the same way as a7zip calls them.

Changelog:

20200509 Release version 2.1
20200506 Fixed: Crash when listing or unpacking archive with more than about 507 encrypted files on some older Android versions
20200503 Added: Open archives with wrong extension, specity type like this: /path/archive.xyz|rar

20200221 Release version 2.0
20200221 Finished merging 7z1900-src.7z into project

20181221 Release version 1.0
20181121 Start development