mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +01:00
feat: method to list frameworks
This commit is contained in:
parent
db1fe98524
commit
d63088db9f
@ -714,6 +714,10 @@ public class Androlib {
|
||||
mAndRes.installFramework(frameFile);
|
||||
}
|
||||
|
||||
public void listFrameworks() throws AndrolibException {
|
||||
mAndRes.listFrameworkDirectory();
|
||||
}
|
||||
|
||||
public void emptyFrameworkDirectory() throws AndrolibException {
|
||||
mAndRes.emptyFrameworkDirectory();
|
||||
}
|
||||
|
@ -854,6 +854,20 @@ final public class AndrolibResources {
|
||||
}
|
||||
}
|
||||
|
||||
public void listFrameworkDirectory() throws AndrolibException {
|
||||
File dir = getFrameworkDir();
|
||||
if (dir == null) {
|
||||
LOGGER.severe("No framework directory found. Nothing to list.");
|
||||
return;
|
||||
}
|
||||
|
||||
for (File file : Objects.requireNonNull(dir.listFiles())) {
|
||||
if (file.isFile() && file.getName().endsWith(".apk")) {
|
||||
LOGGER.info(file.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void installFramework(File frameFile) throws AndrolibException {
|
||||
installFramework(frameFile, apkOptions.frameworkTag);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user