标题所说的准确。我的SDCard上有一个1.5 GB的zip文件,我想通过adb提取(未拔去电脑并推回)。有没有一个简单的命令来解压缩文件?
谢谢!
标题所说的准确。我的SDCard上有一个1.5 GB的zip文件,我想通过adb提取(未拔去电脑并推回)。有没有一个简单的命令来解压缩文件?
谢谢!
Exactly what the title says. I've got a 1.5 gb zip file on my sdcard that I would like to extract via adb (not pulling to pc and pushing back). Is there a simple command to unzip a file?
Thanks!
是和否。据我所知,典型的Android安装将不包含 unzip
。但是,您可以为Android安装BusyBox,它提供 unzip
实用程序。然后是一个简单的:
adb shell unzip /sdcard/archive.zip
会做这个技巧。如果你扎根了,你可以使用来自市场的BusyBox安装程序如stericson的。如果你不是 rooted那么你应该能够手动推动一个busybox二进制(在Github上的一个,例如;单击" RAW"要下载它),如 /data/local
,然后调用它。它应该是如此:
adb push /path/to/busybox-android /data/local/busybox adb shell chmod 0755 /data/local/busybox #Make it executable adb shell /data/local/busybox unzip /sdcard/archive.zip
或者,许多文件管理器将为您解压缩文件。我个人使用文件专家但还有很多其他人。通常,您只需长期按下存档,它将呈现"提取" 选项或类似。 Yes and no. As far as I'm aware, a typical Android install will not contain unzip
. You can, however, install busybox for Android, which provides the unzip
utility. Then a simple:
adb shell unzip /sdcard/archive.zip
Would do the trick. If you're rooted you can use a busybox installer from the Market like Stericson's. If you're not rooted then you should be able to manually push a busybox binary (one here on Github, for example; click "raw" to download it) to somewhere like /data/local
and then invoke it. It should be something like:
adb push /path/to/busybox-android /data/local/busybox adb shell chmod 0755 /data/local/busybox #Make it executable adb shell /data/local/busybox unzip /sdcard/archive.zip
Alternatively, many file managers will unzip files for you. I personally use File Expert but there are a lot of others. Usually you just need to long press on the archive and it will present an "extract" option or similar.
我也能够使用/数据/本地/ tmp并能够chmod。我无法做到我在Windows中创建的zip文件。
要克服此问题,我使用7zip创建了tar文件,并使用busy busybox tar -xvf myzip.tar目的地成功解压缩文件。I was able to use /data/local/tmp as well and able to chmod also. I was not able to do was unzip the zip file I created in windows.
To overcome this, i created the tar file using 7zip and used busybox tar -xvf myzip.tar destination to successfully unzip the file.
© 2022 it.wenda123.org All Rights Reserved. 问答之家 版权所有