'Command to extract password protected zip file using p7zip

I'm using an open source GitHub project AndroidP7Zip which is an Android wrapper over p7zip to support zip, 7zip and other archive formats for Android project.

From android side implementation we pass the commands to the C++ code through JNI, like for extract we use following string as extract, compress command:

String.format("7z x '%s' '-o%s' -aoa", archivePath, outPath); // extract


String.format("7z a -t%s '%s' '%s'", type, outPath, filePath) // Compress 

Similarly, I need to know the commands for performing below actions on file using p7zip:

  1. Checking if a file is password protected?
  2. Extracting a password protracted file
  3. Compressing multiple files at a time
  4. Compress command with password.

Tried searching but couldn't find list of all the possible commands of p7zip anywhere.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source