Feature Request - Batch decompile/decompress APKs
macarthor opened this issue · comments
Hi, I'd like to request a useful feature - batch operation of APKs.
It will batch operate all APKs in "place-here-for-modding" folder, and/or the subfolder of "out" folder.
An example is as follows, it's from decompile APKs in Linux. PS: I'm a programmer but not dedicated to java and linux bash, so there may be some syntax mistakes, but the algorithm is clear.
de () {
cd other
rm -f "../place-apk-here-for-modding/repackaged.apk"
rm -f "../place-apk-here-for-modding/repackaged-signed.apk"
rm -f "../place-apk-here-for-modding/repackaged-unsigned.apk"
rm -rf "../out"
rm -rf "out.out"
clear
foreach file in ../place-here-for-modding/*.apk
fn = "basename %file .apk"
mkdir -p "../out/%fn"
java -jar apktool.jar d -f ../place-apk-here-for-modding/*.apk "../out/%fn"
end
cd ..
}
Note, we should add "-f" parameter to make it work.
In Windows, there's no proper command candidate for Linux command "basename" and "mkdir", but we can do it by native java support. For example, in both Windows and Linux, we can implement "basename" as follows (basename.jar):
basename(filename, suffix)
{
import java.io.File;
File theFile = new File(filename);
name = theFile.getName();
name = name.GetRidOfString(suffix); # use native java string function for GetRidOfString
}
Sorry, I'm no longer adding new features due to my semi-retirement. Please see the note in the first post of the kitchen thread. You can add your own plugin for the kitchen if you wish.
sad to see this...
OK i'll look into this problem.
GOOD LUCK!~