Search code examples
androidshellzipadb

Zip a file in Cyangenmod Android from adb shell


I have navigated to a file on my phone using adb shell from ubuntu terminal. If I was on unix I could zip the file with zip filename.zip input1.txt but this does not work inside the adb shell. Assuming this functionality is not installed.

Any solution to zipping a file from the adb shell command line?

I am running Ubunty 14.10 on the latop and connecting to a One Plus running Cyangenmod bacon.


Solution

  • If the SOLE objectvie is to ZIP file, you may fetch a file using "adb pull" into your system.

    ZIP the file using Ubuntu's ZIP Utility, and then simply "adb push" (means send the file back into device) the Zipped file.

    Of course, in this case, you are using your System (and not Android device) to actually ZIP a File.