-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApksExtractor.java
More file actions
26 lines (25 loc) · 1009 Bytes
/
Copy pathApksExtractor.java
File metadata and controls
26 lines (25 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.io.*;
import java.util.zip.*;
import java.nio.file.*;
public class ApksExtractor {
public static void main(String[] args) throws Exception {
String apksPath = "D:/Ideas/Antigravity/Notes/Notes_com,inotesapp,inotes_1,1,0.apks";
String destDir = "D:/Ideas/Antigravity/Notes/apks_extracted";
new File(destDir).mkdirs();
try (ZipInputStream zis = new ZipInputStream(new FileInputStream(apksPath))) {
ZipEntry entry;
while ((entry = zis.getNextEntry()) != null) {
File file = new File(destDir, entry.getName());
try (FileOutputStream fos = new FileOutputStream(file)) {
byte[] buf = new byte[1024];
int len;
while ((len = zis.read(buf)) > 0) {
fos.write(buf, 0, len);
}
}
zis.closeEntry();
}
}
System.out.println("Extraction Complete.");
}
}